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
check if green icon exists remove it
function handleInvalidInputStyle(inputField, i) { if (i.classList.contains(checkIcon)) { i.classList.remove(checkIcon); inputField.classList.remove("green-border"); } i.classList.add(errorIcon, "red"); inputField.classList.add("red-border"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeIcon() {\n var classes = document.querySelector('.main-weather-icon').classList;\n classes.forEach(function (value) {\n if (value.indexOf('wi-owm-') === 0) {\n classes.remove(value);\n }\n });\n }", "function clear(codes) {\n var icon;\n if (codes.weather === 800) {\n icon = codes.icon.endsWith('d') ? 'meteo_32.png' : 'meteo_33.png';\n }\n return icon;\n }", "function removeNotifyIcon() {\n if (notifyList.firstElementChild === null) { \n notifyIcon.style.opacity = '0'; \n } \n}", "function iconExists(storage, name) {\n return storage.icons[name] !== void 0;\n}", "function removeIconFromTaskBar(icon, src) {\n panelcount--;\n for (let i = 0; i < panelArray.length; i++) {\n if (panelArray[i].id == icon) {\n panelArray.splice(panelArray.indexOf(panelArray[i]),1);\n }\n }\nif(src){\n iconArray[src] = 1;\n}\n $(\"li.\" + icon).remove();\n}", "function removeIcon(itemID,folderIcon)\n{\n var icon=$(\"#\"+itemID);\n var folder=$(\"#\"+folderIcon);\n\n if (icon.hasClass(\"glyphicon-plus-sign\"))\n {\n icon.removeClass(\"glyphicon-plus-sign\").addClass(\"glyphicon-minus-sign\");\n\n if(folder.hasClass(\"fa fa-folder-o\"))\n {\n folder.removeClass(\"fa fa-folder-o\").addClass(\"fa fa-folder-open\");\n }\n else\n {\n folder.removeClass(\"fa fa-folder-open clicked\").addClass(\"fa fa-folder-o\");\n } \n }\n else if (icon.hasClass(\"glyphicon-minus-sign\"))\n {\n icon.removeClass(\"glyphicon-minus-sign\").addClass(\"glyphicon-plus-sign\");\n\n if(folder.hasClass(\"fa fa-folder-o\"))\n {\n folder.removeClass(\"fa fa-folder-o\").addClass(\"fa fa-folder-open\");\n }\n else\n {\n folder.removeClass(\"fa fa-folder-open\").addClass(\"fa fa-folder-o\");\n } \n } \n\n}", "function removeIcons(btn) {\n btn.removeClass(function(index, css) {\n return (css.match(/(^|\\s)fa-\\S+/g) || []).join(' ');\n });\n }", "function manageIconIE(icon) {\r\n\t\t\t\tif($.browser.msie) {\r\n\t\t\t\t\t$('.'+icon).html('');\r\n\t\t\t\t\t$('.'+icon+' > .empty').hide();\r\n\t\t\t\t}\r\n\t\t\t}", "function endClean(done) {\n del([iconURL]);\n done();\n}", "function checkicon(type){\nif(type==4||type==5||type==6||type==7){\nreturn true;\n}else{return false}\n}", "function highlightNewGlyphRemove (color) {\n if (color) {\n $(`#color-${color}-button`).find('.new-glyph').hide()\n } else {\n $('#si-button').find('.new-glyph').hide()\n }\n}", "isIcon(icon) {\n return findElement(this).classList.contains(icon);\n }", "function removeLoadingGraphic (location) {\n const loadingIcon = document.getElementById(location);\n loadingIcon.classList.remove(\"loadingIcon\")\n}", "function onOffIconCallback(ok) {\n\tif (!ok) {\n\t\ttoggleIcon();\n\t}\n\ticonToToggle = false;\n}", "function removeFromSelection(icons, icon) {\n\t if (icons[icon.provider] === void 0 ||\n\t icons[icon.provider][icon.prefix] === void 0) {\n\t return false;\n\t }\n\t const providerIcons = icons[icon.provider];\n\t let oldCount = providerIcons[icon.prefix].length;\n\t const matches = icon.aliases\n\t ? icon.aliases.concat([icon.name])\n\t : [icon.name];\n\t providerIcons[icon.prefix] = providerIcons[icon.prefix].filter((name) => matches.indexOf(name) === -1);\n\t const found = oldCount !== providerIcons[icon.prefix].length;\n\t if (!providerIcons[icon.prefix].length) {\n\t // Clean up\n\t delete providerIcons[icon.prefix];\n\t if (!Object.keys(providerIcons).length) {\n\t delete icons[icon.provider];\n\t }\n\t }\n\t return found;\n\t}", "function beginClean(done) {\n del([iconURL, graphicURL]);\n done();\n}", "function toggleImportant(){\n console.log(\"Icon clicked\");\n\n if(!isItImportant){\n $(\"#iImportant\").removeClass(\"far\").addClass(\"fas\");\n isItImportant = true;\n }else{\n isItImportant = false;\n $(\"#iImportant\").removeClass(\"fas\").addClass(\"far\");\n };\n}", "function clearIcon() {\n $(\"#i1\").empty();\n $(\"#i2\").empty();\n $(\"#i3\").empty();\n $(\"#i4\").empty();\n $(\"#i5\").empty();\n }", "function removeNotification(t)\n\t{\n\t\tswitch(t)\n\t\t{\n\t\t\tcase 'icon':\n\t\t\t\t$('.fv-icon').each(function() {\n\t\t\t\t\t$(this).remove();\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t}\n\t}", "function removeKilledIcons() {\n\n icons.forEach(function(icon) {\n if (!icon.alive) {\n setIconPos(icon, -1,-1);\n }\n });\n\n}", "function hideIcon () {\n currentBookmark = undefined\n browser.pageAction.hide(currentTab.id)\n updateIcon(false)\n}", "function removeCurrentIconPopUp() {\n var removePopUp = setTimeout(function() {\n var popUpTemplate = document.querySelector(\"#iconPopUp\");\n popUpTemplate.parentNode.removeChild(popUpTemplate);\n }, 1000);\n }", "function removeMapIcons() {\n deleteMarkers();\n if ($('[name=direction]').val() == 'available') {\n directions1Display.setMap(null);\n directions1Display.setPanel(null);\n }\n}", "function hideIcon(i) {\n\tvar x = document.getElementById(\"icon\" + i);\n\tif (x.style.display != \"none\"){\n\t\tx.style.display = \"none\";\n\t\tvisible[i] = false;\n\t}\n}", "removeImgTag (el) {\n let svg = el.getElementsByClassName('svg')[0]\n if (svg) {\n el.removeChild(svg)\n }\n }", "_initRemoveIcon() {\n if (this.removeIcon) {\n this._chipFoundation.setShouldRemoveOnTrailingIconClick(true);\n this.removeIcon.disabled = this.disabled;\n this.removeIcon.interaction\n .pipe(takeUntil(this.destroyed))\n .subscribe(event => {\n // The MDC chip foundation calls stopPropagation() for any trailing icon interaction\n // event, even ones it doesn't handle, so we want to avoid passing it keyboard events\n // for which we have a custom handler. Note that we assert the type of the event using\n // the `type`, because `instanceof KeyboardEvent` can throw during server-side rendering.\n const isKeyboardEvent = event.type.startsWith('key');\n if (this.disabled || (isKeyboardEvent &&\n !this.REMOVE_ICON_HANDLED_KEYS.has(event.keyCode))) {\n return;\n }\n this.remove();\n if (isKeyboardEvent && !hasModifierKey(event)) {\n const keyCode = event.keyCode;\n // Prevent default space and enter presses so we don't scroll the page or submit forms.\n if (keyCode === SPACE || keyCode === ENTER) {\n event.preventDefault();\n }\n }\n });\n }\n }", "function dragAndDropIcon(element){\n if(jQuery.trim(element.html()) === \"\" || element.html() === emptyIconCode || genBlocksList.length == 0){\n if(!(element.find(\".dndIcon\").length >= 1))\n element.append(emptyIconCode);\n } else {\n element.find(\".dndIcon\").remove();\n }\n} //DRAG & DROP icon", "renderRemoveIcon () {\n const colour = this.state.removeHover ? REMOVE_ICON_HOVER_COLOUR : REMOVE_ICON_COLOUR\n return (\n <div\n onClick={this.onRemove}\n onMouseEnter={this.onMouseEnterRemove}\n onMouseLeave={this.onMouseLeaveRemove}\n className={Styles.removeIconContainer}>\n <RemoveIcon colour={colour} />\n </div>\n )\n }", "function removeIcons(){\n\t\t$('.comment').each(function(i, obj) {\n\t\t\tvar id = obj.id.substring(8);\n\t\t\tvar icons_id = \"icons_\" + id;\n\t\t\t$(\"#\" + icons_id).remove();\n\t\t});\n\t}", "function removeImage () {\n vis.selectAll('image').attr('xlink:href', null)\n vis2.selectAll('image').attr('xlink:href', null)\n }", "function revertIconColor() {\n\tsearchIcon.style.color = '#757575'\n}", "function hideIcon(hide) {\n if (typeof Main.panel.statusArea.appMenu._iconBox != 'undefined') {\n let iconBox = Main.panel.statusArea.appMenu._iconBox; \n hideElement(iconBox, hide);\n }\t\n}", "function checkForOverlay(Exist) {\n \"use strict\";\n if (Exist) {\n $(\".removeMe\").remove();\n overlayExist = false;\n }\n}", "async function brokenIconImgChange() {\t\n\t\t\tlet iconsFetched = 0\n\t\t\tlet iconsNotFetched = 0\n\t\t iziToast.show({\n\t\t id: 'brokenicons',\n\t\t\t\ttheme: iziTheme,\n\t\t\t\tbackgroundColor: bgColor,\n\t\t\t\ttimeout: false,\n\t\t\t\tprogressBar: false,\n\t\t\t\toverlay: true,\n\t\t\t\toverlayClose: true,\n\t\t\t\tanimateInside: true,\n\t\t\t\tcloseOnEscape: true,\n\t\t\t\tclose: false,\t\t\n\t\t position: 'center',\n\t\t title: jsonLanguage.settings.dialog_brokenIconTitle,\n\t\t titleSize: '22',\n\t\t titleLineHeight: '30',\n\t\t\t\ttitleColor: 'white',\n\t\t\t\ttitleColor: '#008200',\n\t\t\t\tmessage: jsonLanguage.settings.dialog_brokenIconMsg,\n\t\t\t\tmessageSize: '18',\n\t\t\t\tmessageColor: 'white',\t\t\n\t\t\t\tmessageLineHeight: '20', \n\t\t displayMode: 2,\n\t\t image: '../img/broken-bookmark.svg',\n\t\t imageWidth: 96, \n\t\t\t\ttransitionIn: 'fadeIn',\n\t\t\t\ttransitionOut: 'fadeOutDown',\n\t\t\t\tlayout: 9,\t\t\n\t\t\t\tbuttons: [\n\t\t\t\t\t['<button style=\"background-color: #a70e0e;\">'+jsonLanguage.settings.dialog_Cancel+'</button>', function (instance, toast) {\n\t\t\t\t\t\tinstance.hide({}, toast)\n\t\t\t\t\t}],\n\t\t\t\t\t['<button style=\"background-color: #38A12A;\"><b>'+jsonLanguage.settings.dialog_Ok+'</b></button>', async function (instance, toast) {\t\n\t\t\t\t\t\tinstance.hide({}, toast)\n\t\t\t\t\t\ttoggleOverlay(true)\n\t\t\t\t\t\tlet count = document.getElementById(\"spinner-count\")\t\t\t\t\n\t\t\t\t\t\tlet jsonData\t\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tlet result = await chrome.storage.local.get(\"upStartData\")\n\t\t\t\t\t\t\tjsonData = JSON.parse(result.upStartData)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (i = 0; i < jsonData['items'].length; i++) {\n\t\t\t\t\t\t\t\tcount.innerHTML = jsonLanguage.settings.dialog_countMsg+'<BR><span class=\"highlight-text\">'+jsonData.items[i].label+'</span>'\n\t\t\t\t\t\t\t\tlet itemIcon = jsonData.items[i].icon\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//verify url\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ( (itemIcon == \"\") || (itemIcon == 'undefined') ) {\n\t\t\t\t\t\t\t\t\titemIcon = 'icon/default.svg'\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (itemIcon.toLowerCase().match(/^(icon\\/|img\\/|http:\\/\\/|https:\\/\\/|file:\\/\\/\\/|data:image\\/).*/) ) {\n\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tconsole.log(\"######### DUMP #########: brokenIconImgChange -> itemIcon\", itemIcon)\n\t\t\t\t\t\t\t\t\t\tlet response = await fetchWithTimeout(itemIcon, 5000)\n\t\n\t\t\t\t\t\t\t\t\t\tif (response.status == 200) { \n\t\t\t\t\t\t\t\t\t\t\ticonsFetched++ \n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tjsonData.items[i].icon = 'img/broken-bookmark.svg'\n\t\t\t\t\t\t\t\t\t\t\ticonsNotFetched++\n\t\t\t\t\t\t\t\t\t\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\tcatch (error) {\t\t\n\t\t\t\t\t\t\t\t\t\tconsole.log('ERRO: ',error)\n\t\t\t\t\t\t\t\t\t\tjsonData.items[i].icon = 'img/broken-bookmark.svg'\n\t\t\t\t\t\t\t\t\t\ticonsNotFetched++\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tconsole.log('ERRO: NO PROTOCOL')\n\t\t\t\t\t\t\t\t\tjsonData.items[i].icon = 'img/broken-bookmark.svg'\n\t\t\t\t\t\t\t\t\ticonsNotFetched++ \n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t toggleOverlay(false)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (iconsNotFetched != 0) {\n\t\t\t\t\t\t\t\t//message\n\t\t\t\t\t\t\t\tiziToast.show({\n\t\t\t\t\t\t\t\t\ttheme: iziTheme,\n\t\t\t\t\t\t\t\t\ttimeout: false,\n\t\t\t\t\t\t\t\t\tprogressBar: false,\n\t\t\t\t\t\t\t\t\toverlay: true,\n\t\t\t\t\t\t\t\t\tcloseOnEscape: true,\n\t\t\t\t\t\t\t\t\tclose: false,\n\t\t\t\t\t\t\t\t\tbackgroundColor: bgColor, \n\t\t\t\t\t\t\t\t\tposition: 'center',\n\t\t\t\t\t\t\t\t\ttitle: jsonLanguage.settings.dialog_scanComplete,\n\t\t\t\t\t\t\t\t\ttitleSize: '22',\n\t\t\t\t\t\t\t\t\ttitleLineHeight: '30',\n\t\t\t\t\t\t\t\t\ttitleColor: '#008200',\n\t\t\t\t\t\t\t\t\tmessage: '<BR><span class=\"highlight-text\">'+iconsFetched+'</span> '+jsonLanguage.settings.dialog_brokenIconFetched+\n\t\t\t\t\t\t\t\t\t\t\t\t\t '<BR><span class=\"highlight-text\">'+iconsNotFetched+'</span> '+jsonLanguage.settings.dialog_brokenIconNotFetched,\n\t\t\t\t\t\t\t\t\tmessageSize: '18',\n\t\t\t\t\t\t\t\t\tmessageColor: 'white',\t\t\n\t\t\t\t\t\t\t\t\tmessageLineHeight: '20',\n\t\t\t\t\t\t\t\t\ttransitionIn: 'fadeIn',\n\t\t\t\t\t\t\t\t\ttransitionOut: 'fadeOutDown',\n\t\t\t\t\t\t\t\t\tdisplayMode: 2,\n\t\t\t\t\t\t\t\t\tlayout: 2,\n\t\t\t\t\t\t\t\t\tbuttons: [\n\t\t\t\t\t\t\t\t\t\t['<button style=\"background-color: #a70e0e;\">'+jsonLanguage.settings.dialog_Cancel+'</button>', function (instance, toast) {\n\t\t\t\t\t\t\t\t\t\t\tinstance.hide({}, toast)\n\t\t\t\t\t\t\t\t\t\t}],\n\t\t\t\t\t\t\t\t\t\t['<button style=\"background-color: #38A12A;\"><b>'+jsonLanguage.settings.dialog_Apply+'</b></button>', async function (instance, toast) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tawait chrome.storage.local.set({\"upStartData\": JSON.stringify(jsonData)})\t\n\t\t\t\t\t\t\t\t\t\t\tinstance.hide({}, toast)\n\t\t\t\t\t\t\t\t\t\t\tsuccessMessage(jsonLanguage.settings.message_dataSaved)\n\t\t\t\t\t\t\t\t\t\t},true]\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} else {\n\t\t\t\t\t\t\t\t//message\n\t\t\t\t\t\t\t\tiziToast.show({\n\t\t\t\t\t\t\t\t\ttheme: iziTheme,\n\t\t\t\t\t\t\t\t\ttimeout: false,\n\t\t\t\t\t\t\t\t\tprogressBar: false,\n\t\t\t\t\t\t\t\t\toverlay: true,\n\t\t\t\t\t\t\t\t\tcloseOnEscape: true,\n\t\t\t\t\t\t\t\t\tclose: false,\n\t\t\t\t\t\t\t\t\tbackgroundColor: bgColor, \n\t\t\t\t\t\t\t\t\tposition: 'center',\n\t\t\t\t\t\t\t\t\ttitle: jsonLanguage.settings.dialog_noBrokenIcons, \n\t\t\t\t\t\t\t\t\ttitleSize: '22',\n\t\t\t\t\t\t\t\t\ttitleLineHeight: '30',\n\t\t\t\t\t\t\t\t\ttitleColor: '#008200',\n\t\t\t\t\t\t\t\t\tdisplayMode: 2,\n\t\t\t\t\t\t\t\t\ttransitionIn: 'fadeIn',\n\t\t\t\t\t\t\t\t\ttransitionOut: 'fadeOutDown',\n\t\t\t\t\t\t\t\t\tlayout: 2,\n\t\t\t\t\t\t\t\t\tbuttons: [\n\t\t\t\t\t\t\t\t\t\t['<button style=\"background-color: #38A12A;\">'+jsonLanguage.settings.dialog_Ok+'</button>', function (instance, toast) {\n\t\t\t\t\t\t\t\t\t\t\tinstance.hide({}, toast)\n\t\t\t\t\t\t\t\t\t\t},true]\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}\n\t\t\t\t\t\tcatch (error) {\n\t\t\t\t\t\t\tconsole.log(error)\n\t\t\t\t\t\t}\n\t\t\t\t\t},true]\t\t\t\t\t\n\t\t\t\t]\n\t\t\t})\n\t\t}", "function removeAllNoteIcon() {\n removeTagsByName('icnote');\n}", "function removeRadioIcons(){\n radioHearts.forEach((radioHeart) => {\n radioHeart.classList.remove('radioIcon');\n });\n}", "function toggleIcon(value){\n\tconsole.log(value);\n\tif(!value){\n\t\tchrome.browserAction.setIcon({path: 'icons/icon128inactive.png'});\n\t} else {\n\t\tchrome.browserAction.setIcon({path: 'icons/icon128active.png'});\n\t}\n}", "function iconError() {\n if (this.src != 'https://cdn.discordapp.com/embed/avatars/1.png?size=128') {\n const match =\n this.src.match(/^https:\\/\\/cdn.discordapp.com\\/avatars\\/([^.]+)\\./);\n const matchSB =\n this.src.match(/^https:\\/\\/www.spikeybot.com\\/avatars\\/([^.]+)\\./);\n if (match) {\n this.src = `https://www.spikeybot.com/avatars/${match[1]}.png`;\n } else if (matchSB) {\n this.src = `https://kamino.spikeybot.com/avatars/${matchSB[1]}.png`;\n } else {\n this.src = 'https://cdn.discordapp.com/embed/avatars/1.png?size=32';\n }\n }\n }", "function removePicture(item){\n\t$(item).remove();\n\tif(!$('#pictures_shareTag').html()){\n\t\t$('#title_pictures_shareTag').fadeOut('slow');\n\t}\n\tcheckboxPublicPrivateTag();\n}", "function keepCheckOnDesktopIcons() {\n allIcons.forEach((icon) => {\n icon.addEventListener(\"dblclick\", () => {\n let src = null;\n let split = null;\n let idg = null;\n for (let i = 0; i < allIcons.length; i++) {\n if (icon.src == allIcons[i].src) {\n src = allIcons[i].src;\n split = src.split(\"/\");\n let source = split.pop();\n idg = source.split(\".\");\n }\n }\n if (icon.src == src && iconArray[icon.src] >= 1) {\n let icon_name = idg[0];\n let icon_extension = idg[1];\n let tagType = \"img\";\n addIconToTaskbar(icon_name, icon_extension, tagType);\n panelcount++;\n iconArray[icon.src]--;\n CreateModal(idg, icon.src);\n hideWidget();\n return;\n }\n return;\n });\n });\n}", "function deletePicture() {\n symbols = [];\n drawBG();\n }", "function unannotateToolbarIcon() {\n $(\".toolbar-icon-tooltip\").remove();\n}", "switcherPlusVersMoins(channel){\n var doc = document.getElementById(\"icon\"+channel.id);\n doc.removeAttribute(\"style\");\n doc.style.color=\"#367DFE\";\n \n doc.classList.remove(\"glyphicon-plus\");\n doc.classList.add(\"glyphicon-minus\");\n }", "function clearNoResultsAlert() {\r\n console.log (\"##f()## clearNoResultsAlert function execution\");\r\n try {\r\n let noResultsIcon= document.getElementById('no-results-icon');\r\n let noResultsText= document.getElementById('no-results-text');\r\n let noResultsIconClasses = noResultsIcon.classList;\r\n console.log(\"Clases del ícono de No Results: \"+noResultsIconClasses);\r\n console.log(noResultsIconClasses.length);\r\n if(noResultsIconClasses.length==1){\r\n noResultsIcon.classList.add('hide');\r\n noResultsText.classList.add('hide');\r\n }\r\n } catch (err) {\r\n console.log(\"There is no No Results Alert to delete\"+err);\r\n }\r\n}", "function removePiece() {\n var block = piece.pieceName;\n for(var i = 0;i < block.length; i++)\n for(var j = 0; j < block.length; j++)\n if( block[i][j] == 1)\n drawPixel( piece.xPos +j, piece.yPos+i, boardColour);\n}", "async onRemoveImage() {\n await activity.resetImage(this.state.activityInfo.ActivityCode);\n this.onClose();\n this.refresh();\n }", "updateEmpty() {\n const { isEmptyInput, isEmpty, element, clearIcon } = this,\n empty = isEmptyInput && isEmpty;\n\n if (element) {\n if (clearIcon) {\n // IE11...\n clearIcon.classList[empty ? 'add' : 'remove']('b-icon-hidden');\n }\n\n // IE11...\n element.classList[empty ? 'add' : 'remove']('b-empty');\n }\n }", "function removeCard() {\n\tif ($('#light2').css('display') == 'none') {\n\t\t$('#light2 img').remove();\n\t}\n\tif ($('#light5').css('display') == 'none') {\n\t\t$('#light5 img').remove();\n\t}\n}", "function labelDeleteIconClick () {\n // Deletes the current label\n if (!status.disableLabelDelete) {\n svl.tracker.push('Click_LabelDelete');\n var currLabel = self.getCurrentLabel();\n if (!currLabel) {\n //\n // Sometimes (especially during ground truth insertion if you force a delete icon to show up all the time),\n // currLabel would not be set properly. In such a case, find a label underneath the delete icon.\n var x = $divHolderLabelDeleteIcon.css('left');\n var y = $divHolderLabelDeleteIcon.css('top');\n x = x.replace(\"px\", \"\");\n y = y.replace(\"px\", \"\");\n x = parseInt(x, 10) + 5;\n y = parseInt(y, 10) + 5;\n var item = isOn(x, y);\n if (item && item.className === \"Point\") {\n var path = item.belongsTo();\n currLabel = path.belongsTo();\n } else if (item && item.className === \"Label\") {\n currLabel = item;\n } else if (item && item.className === \"Path\") {\n currLabel = item.belongsTo();\n }\n }\n\n if (currLabel) {\n svl.labelContainer.removeLabel(currLabel);\n svl.actionStack.push('deleteLabel', self.getCurrentLabel());\n $divHolderLabelDeleteIcon.css('visibility', 'hidden');\n // $divHolderLabelEditIcon.css('visibility', 'hidden');\n\n\n //\n // If showLabelTag is blocked by GoldenInsertion (or by any other object), unlock it as soon as\n // a label is deleted.\n if (lock.showLabelTag) {\n self.unlockShowLabelTag();\n }\n }\n }\n }", "updateEmpty() {\n const {\n isEmptyInput,\n isEmpty,\n element,\n clearIcon\n } = this,\n empty = isEmptyInput && isEmpty;\n\n if (element) {\n if (clearIcon) {\n // IE11...\n clearIcon.classList[empty ? 'add' : 'remove']('b-icon-hidden');\n } // IE11...\n\n element.classList[empty ? 'add' : 'remove']('b-empty');\n }\n }", "function stopIcon() {\n\n\tplaylist.stop();\n\tplaylist.renderInElement(playlistElement);\n\n\tif (playButton.innerHTML === '<i class=\"fa fa-stop\"></i>') {\n\t\treturn playButton.innerHTML = '<i class=\"fa fa-play\"></i>';\n\t}\n\n}", "function removeImageIfNotDowloadable(image, callback){\n\tgm.compare(__dirname+'/imageNotFound.jpg', image.uri, function (err, isEqual, equality){\n\t\tif(err) {\n\t\t\tconsole.log(err);\n\t\t\tcallback(false);\n\t\t}\n\t\telse{\n\t\t\tif(equality <= 0.00001){\n\t\t\t\tfs.unlinkSync(image.uri); //remove de image\n\t\t\t\tcallback(true);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcallback(false);\n\t\t\t}\n\t\t}\n\t});\n}", "function _iconIsPaused() {\n clearTimeout( _iconIsRecording );\n chrome.browserAction.setIcon( { path: 'assets/img/icons/rec/6.png', tabId: currentTabId } );\n }", "removeLife() {\r\n const lifeIcon = document.querySelector('[alt=\"Heart Icon\"]'); // returns first one it finds\r\n \r\n /* Apply heart icon css animation */\r\n lifeIcon.className = 'spin-heart';\r\n \r\n /* Allow animation to complete before changing to lost heart icon */\r\n window.setTimeout(() => {\r\n lifeIcon.className = null;\r\n lifeIcon.setAttribute('alt', 'Lost Heart Icon');\r\n lifeIcon.setAttribute('src', 'images/lostHeart.png');\r\n }, 750);\r\n \r\n this.missed += 1;\r\n if (this.missed === 4) this.gameOver(false);\r\n }", "function updateIcon () {\n browser.browserAction.setIcon({\n path: currentBookmark\n ? {\n 19: '../public/star-filled-19.png',\n 38: '../public/star-filled-38.png'\n }\n : {\n 19: '../public/star-empty-19.png',\n 38: '../public/star-empty-38.png'\n },\n tabId: currentTab.id\n })\n browser.browserAction.setTitle({\n // Screen readers can see the title\n title: currentBookmark ? 'Unbookmark it!' : 'Bookmark it!',\n tabId: currentTab.id\n })\n}", "function browserActionButtonOff() {\n browser.browserAction.setTitle({ title: 'IIIF manifest not found' });\n browser.browserAction.setIcon({ path: 'icon_off.svg' });\n }", "function adjustIconColorDocument() {\n $('.oi-icon').each(function(e) {\n if(!$(this).hasClass('colored')) {\n $(this).css('fill', '#3E2F24');\n $(this).addClass('colored');\n }\n });\n }", "getIcon_() {\n return this.isCloudGamingDevice_ ? 'oobe-32:game-controller' :\n 'oobe-32:checkmark';\n }", "function remove() {\n //get the url of the gif\n var id = $(this)\n .siblings(\"img\")\n .attr(\"data-still\");\n //compare it with the gif urls in the fav gif array\n for (let i = 0; i < favArray.length; i++) {\n //remove it\n if (favArray[i].still === id) {\n favArray.splice(i, 1)\n }\n };\n\n //remove from the DOM\n $(this)\n .parent()\n .remove();\n localStorage.setItem(\"favs\", JSON.stringify(favArray));\n}", "function removeDrinkImg() {\n const appendElement = document.querySelector(\"#drink-info\");\n while (appendElement.lastChild) {\n appendElement.removeChild(appendElement.lastChild);\n }\n}", "checkIfElementIsActionMenuIcon(element) {\n if (element.tagName && element.parentElement) {\n return (element.tagName === 'svg' &&\n element.parentElement.classList.contains('row-actions-toggler'));\n }\n return false;\n }", "switcherMoinsVersPlus(channel){\n var doc = document.getElementById(\"icon\"+channel.id);\n doc.removeAttribute(\"style\");\n doc.style.color=\"#367DFE\";\n \n doc.classList.remove(\"glyphicon-minus\");\n doc.classList.add(\"glyphicon-plus\");\n }", "removeSprite(tag) {\n const layerNos = Object.keys(this.sprites);\n let emptyLayerNo = -1;\n layerNos.forEach(layerNo => {\n if (this.sprites[layerNo][tag] && this.spriteMap[tag]) {\n delete this.sprites[layerNo][tag];\n delete this.spriteMap[tag];\n } else {\n console.log(`sprite tag name ${tag} does not exist`);\n }\n if (this.sprites[layerNo].length === 0) {\n emptyLayerNo = layerNo;\n }\n });\n if (emptyLayerNo >= 0) {\n delete this.sprites[emptyLayerNo];\n }\n }", "function modifyIcons() {\n document.getElementById(\"panel\").removeEventListener('DOMSubtreeModified', modifyIcons, false);\n\n var icons = document.getElementsByClassName(\"adp-marker\");\n var iconLabelsExist = document.getElementsByClassName(\"icon-label\").length;\n for (var i = 0; i < icons.length; i++) {\n icons[i].src = namespace.markers[i].icon.url;\n if (!iconLabelsExist) {\n $(icons[i]).wrap('<div class=\"icon-container\"></div>');\n $( '<p class=\"icon-label\">' + (i + 1) + '</p>' ).insertAfter(icons[i]);\n }\n }\n}", "_setIcons() {\n if (this.options.list) {\n var item = this.$container.find('.select2-selection__choice__remove');\n item.text('').addClass(this.options.removeIcon);\n }\n }", "function clearSelectIcon(elem, value) {\n // Call getCategoryIconClass() to return the icon class string\n let iconClass = getCategoryIconClass(value.toLowerCase());\n\n // Remove the class from the element\n elem.removeClass(iconClass);\n}", "function button_tokushima_animationRemove(){\n\t\t\tthat.button_tokushima_i1.alpha = 1;\n\t\t\t//that.button_tokushima_i2.alpha = 1;\t\t// notAvailable\n\t\t\t//that.button_tokushima_i3.alpha = 1;\t\t// notAvailable\n\t\t\t//that.button_tokushima_i4.alpha = 1;\t\t// notAvailable\n\t\t\t//that.button_tokushima_i5.alpha = 1;\t\t// notAvailable\n\t\t\t//that.button_tokushima_i6.alpha = 1;\t\t// notAvailable\n\t\t\t//that.button_tokushima_i7.alpha = 1;\t\t// notAvailable\n\t\t}", "function checkAndKillIconMatches(icon) {\n\n if (icon === null) { return; }\n\n var canKill = false;\n\n // process the selected icon\n\n var countUp = countSameColorIcons(icon, 0, -1);\n var countDown = countSameColorIcons(icon, 0, 1);\n var countLeft = countSameColorIcons(icon, -1, 0);\n var countRight = countSameColorIcons(icon, 1, 0);\n\n var countHoriz = countLeft + countRight + 1;\n var countVert = countUp + countDown + 1;\n\n if (countVert >= MATCH_MIN)\n {\n killIconRange(icon.posX, icon.posY - countUp, icon.posX, icon.posY + countDown);\n canKill = true;\n }\n\n if (countHoriz >= MATCH_MIN)\n {\n killIconRange(icon.posX - countLeft, icon.posY, icon.posX + countRight, icon.posY);\n canKill = true;\n }\n\n return canKill;\n\n}", "function prettifyKillicon() {\n var kill = $('.ui-icon.ui-icon-trash');\n kill.empty();\n kill.append('<i class=\"fa fa-lg fa-trash\" aria-hidden=\"true\"></i>');\n console.log(kill);\n }", "function hide_info_icon()\n{\n $(\"#dvInfo\").removeClass(\"show\");\n}", "function updateIcon (iconEnabled, color = 'red') {\n if (iconEnabled === true) {\n browser.pageAction.setIcon({\n path: currentBookmark ? {\n 32: `icons/star/star-${color}-32.png`,\n 64: `icons/star/star-${color}-64.png`,\n 128: `icons/star/star-${color}-128.png`,\n 256: `icons/star/star-${color}-256.png`,\n 512: `icons/star/star-${color}-512.png`\n } : {\n 32: 'icons/empty/empty-32.png',\n 64: 'icons/empty/empty-64.png',\n 128: 'icons/empty/empty-128.png',\n 256: 'icons/empty/empty-256.png',\n 512: 'icons/empty/empty-512.png'\n },\n tabId: currentTab.id\n })\n browser.pageAction.setTitle({\n title: currentBookmark ? 'Remove this bookmark' : 'Quick bookmark this page',\n tabId: currentTab.id\n })\n } else {\n browser.pageAction.setIcon({\n path: {\n 32: 'icons/cross/cross-32.png',\n 64: 'icons/cross/cross-64.png',\n 128: 'icons/cross/cross-128.png',\n 256: 'icons/cross/cross-256.png',\n 512: 'icons/cross/cross-512.png'\n },\n tabId: currentTab.id\n })\n browser.pageAction.setTitle({\n title: 'The quick bookmark icon is disabled',\n tabId: currentTab.id\n })\n }\n}", "function appendRemoveIcon(node, subject, removeNode) {\n var image = tabulator.Util.AJARImage(tabulator.Icon.src.icon_remove_node, 'remove',undefined, myDocument)\n image.addEventListener('click', remove_nodeIconMouseDownListener)\n // image.setAttribute('align', 'right') Causes icon to be moved down\n image.node = removeNode\n image.setAttribute('about', subject.toNT())\n image.style.marginLeft=\"5px\"\n image.style.marginRight=\"10px\"\n //image.style.border=\"solid #777 1px\";\n node.appendChild(image)\n return image\n }", "function removeIcons(element) {\n for (const icon of Array.from(element.querySelectorAll('mat-icon, .material-icons'))) {\n icon.remove();\n }\n}", "getCompleatedIcon(event) {\n if (event.completed === true) {\n return { name: 'check-circle-o', color: 'lime' };\n }\n return { name: 'circle-o', color: '#0099CC' };\n }", "_checkIcon(changed) {\n const state = this.state;\n const icon$1 = this.props.icon;\n // Icon is an object\n if (typeof icon$1 === 'object' &&\n icon$1 !== null &&\n typeof icon$1.body === 'string') {\n // Stop loading\n this._icon = '';\n this._abortLoading();\n if (changed || state.icon === null) {\n // Set data if it was changed\n this._setData({\n data: icon.fullIcon(icon$1),\n });\n }\n return;\n }\n // Invalid icon?\n let iconName;\n if (typeof icon$1 !== 'string' ||\n (iconName = name.stringToIcon(icon$1, false, true)) === null) {\n this._abortLoading();\n this._setData(null);\n return;\n }\n // Load icon\n const data = functions$3.getIconData(iconName);\n if (data === null) {\n // Icon needs to be loaded\n if (!this._loading || this._loading.name !== icon$1) {\n // New icon to load\n this._abortLoading();\n this._icon = '';\n this._setData(null);\n this._loading = {\n name: icon$1,\n abort: api.API.loadIcons([iconName], this._checkIcon.bind(this, false)),\n };\n }\n return;\n }\n // Icon data is available\n if (this._icon !== icon$1 || state.icon === null) {\n // New icon or icon has been loaded\n this._abortLoading();\n this._icon = icon$1;\n // Add classes\n const classes = ['iconify'];\n if (iconName.prefix !== '') {\n classes.push('iconify--' + iconName.prefix);\n }\n if (iconName.provider !== '') {\n classes.push('iconify--' + iconName.provider);\n }\n // Set data\n this._setData({\n data,\n classes,\n });\n if (this.props.onLoad) {\n this.props.onLoad(icon$1);\n }\n }\n }", "function disappear() {\n\tfor (let i = 0; i < iconIdsArr.length; i++) {\n\t\tfor (let j = 0; j < slotClassArr.length; j++) {\n\t\t\t$(`${slotClassArr[j]}`).find(`${iconIdsArr[i]}`)\n\t\t\t\t\t\t\t\t .css(\"display\", \"none\");\n\t\t}\n\t}\n}", "function removeSpecialButton() {\n playerHitCounter = 0;\n specialBar(playerSpecialBar, playerHitCounter);\n if (buttonWrapper.contains(specialButton)) {\n buttonWrapper.removeChild(specialButton);\n } else {\n return\n }\n}", "function datasetReportIcon(itemID,folderIcon)\n{\n var icon=$(\"#\"+itemID);\n var folder=$(\"#\"+folderIcon);\n\n if (icon.hasClass(\"fa fa-plus-square-o\"))\n {\n icon.removeClass(\"fa fa-plus-square-o\").addClass(\"fa fa-minus-square-o\");\n\n if(folder.hasClass(\"fa fa-folder-o\"))\n {\n folder.removeClass(\"fa fa-folder-o\").addClass(\"fa fa-folder-open\");\n }\n else\n {\n folder.removeClass(\"fa fa-folder-open clicked\").addClass(\"fa fa-folder-o\");\n } \n }\n else if (icon.hasClass(\"fa fa-minus-square-o\"))\n {\n icon.removeClass(\"fa fa-minus-square-o\").addClass(\"fa fa-plus-square-o\");\n\n if(folder.hasClass(\"fa fa-folder-o\"))\n {\n folder.removeClass(\"fa fa-folder-o\").addClass(\"fa fa-folder-open\");\n }\n else\n {\n folder.removeClass(\"fa fa-folder-open\").addClass(\"fa fa-folder-o\");\n } \n } \n\n}", "function removeClicked() {\n remove = true;\n}", "function changeImg() {\r\n if ( document.getElementById(\"copyBtn\").classList.contains('far') ) {\r\n document.getElementById(\"copyBtn\").classList.add('fas');\r\n document.getElementById(\"copyBtn\").classList.remove('far');\r\n } else {\r\n document.getElementById(\"copyBtn\").classList.add('far');\r\n document.getElementById(\"copyBtn\").classList.remove('fas');\r\n } \r\n}", "_updateIconStyles() {\n if (this.$icon) {\n const iconSource = `url(${this.state.icon})`;\n if (this.$icon.style.backgroundImage !== iconSource) {\n this.$icon.style.backgroundImage = iconSource;\n }\n }\n }", "function replaceTextWithIcon(){\n\t\tif($(window).width() < 1030){\n\t\t\tif(!isAlreadyExist('.icon-phone')){\n\t\t\t\t$('#requestACall').css('display','none')\n\t\t\t\t$('#hd-menu-right .block').append('<span class=\"icon-phone ml-3\"><i class=\"fas fa-phone-volume icon\"></i></span></span>')\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$('#requestACall').css('display','block')\n\t\t\t$('.icon-phone').remove()\n\t\t}\n\t}", "function update_icon()\n {\n const icon = bookmarks.is_unlocked() ? \"unlocked-bookmarks.svg\" :\n \"locked-bookmarks.svg\";\n const path = `/icons/main/${icon}`;\n browser.browserAction.setIcon({\n path:\n {\n \"16\": path,\n \"32\": path,\n \"48\": path,\n \"64\": path,\n \"96\": path,\n \"128\": path,\n \"256\": path\n }\n });\n }", "function hideEditIcon() {\n $(this).children().last().remove();\n}", "function switchPlus(iconElement){\n const icon = iconElement.querySelector('i');\n if (iconElement.querySelector(\".fa-plus-square\") != null){\n icon.classList.remove(\"fa-plus-square\");\n icon.classList.add(\"fa-minus-square\");\n }\n else {\n icon.classList.remove(\"fa-minus-square\");\n icon.classList.add(\"fa-plus-square\");\n }\n}", "removeLife() {\n $('.tries img').eq(this.missed).remove();\n $('.tries').eq(this.missed).append('<img src=\"images/lostHeart.png\" alt=\"Missing Heart Icon\" height=\"35\" width=\"30\"></img>');\n this.missed += 1;\n if (this.missed === 5) {\n this.gameOver();\n }\n }", "function displayMilestoneIcon ($group) {\n $group.find('.cmb-repeatable-grouping').each(function () {\n var $this = $(this);\n var milestone = $this.find('[id$=\"milestone\"]').val();\n\n if (milestone) {\n $this.find('.on-title.dashicons').remove();\n var color = $('ul.milestones .title:contains(' + milestone + ')').next().text();\n\n $this.find('button.cmb-remove-group-row.dashicons-before').after('<span style=\"color: ' + color + '\" class=\"dashicons dashicons-flag on-title\"></span> ');\n }\n });\n }", "function deleteUnusedGraphics(){\n\tvar confimMessage = getMessage(\"confirm_delete_unused_graphics\");\n\t\n View.confirm(confimMessage, function(button){\n if (button == 'yes') {\n try {\n \tvar jobId = Workflow.startJob('AbCommonResources-GraphicsService-deleteUnusedEnterpriseGraphics');\n \t View.openJobProgressBar(getMessage('status_deleting_graphics_unused_files'), jobId, '', function(status) {});\n } \n catch (e) {\n \tWorkflow.handleError(e);\n }\n }\n });\n}", "function rccalcIconUnhover() {\n\tvar x = document.getElementById('rccalcIcon');\n\tx.setAttribute(\"src\", \"media/w95_calc.png\");\n}", "[REMOVE_IMAGE] (state,image) {\n state.images.splice(state.images.indexOf(image),1);\n if((state.featuredImage != undefined) && (image.name === state.featuredImage.name)) {\n state.featuredImage = undefined;\n }\n }", "static get icon() { throw new Error('unimplemented - must use a concrete class'); }", "render() {\n if(this.props.boardState[this.props.x][this.props.y] === 1){\n iconName = \"remove\"\n iconSize = maxWidth/7-2\n } else if (this.props.boardState[this.props.x][this.props.y] === 2) {\n iconName = \"circle-o\"\n iconSize = maxWidth/7-2\n } else {\n iconName = \"circle-o\"\n iconSize = 0\n }\n return (\n <View style={{height: 50, width: 50, backgroundColor: 'green', justifyContent: 'center'}}>\n <Icon name={iconName} size={iconSize} color='black' />\n </View>\n );\n }", "function _iconDefault() {\n clearTimeout( _iconIsRecording );\n chrome.browserAction.setIcon( { path: 'assets/img/icons/icon_16.png', tabId: currentTabId } );\n }", "function cleargifs() {\n $(\"#gif-div\").empty();\n }", "function setIcon(stallsFree) {\n if (stallsFree == 0) {\n refreshIcon(c_red);\n } else if (stallsFree == 1) {\n refreshIcon(c_yellow);\n } else {\n refreshIcon(c_green);\n }\n}", "function HiCheck (props) {\n return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 20 20\",\"fill\":\"currentColor\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"fillRule\":\"evenodd\",\"d\":\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\",\"clipRule\":\"evenodd\"}}]})(props);\n}", "function hideIcons() {\n\t$(this).find(\".upload_button\").hide();\n\t$(this).find(\".close_button\").hide();\n}", "function setIcon(element, condition){\n\t\tif(condition == 3200) condition = 48; //map the yahoo code for \"not available\" to the respective item in the array\n\t\telement.removeClass(conditionClasses);\n\t\telement.addClass(conditionCodes[condition]);\n\t}", "function hideUploadIcon() {\n return new Promise(async r => {\n const uploadIcon = document.querySelector('#upload-icon');\n if (circle.getAttribute('hidden') !== null || uploadIcon.getAttribute('hidden') !== null)\n return r();\n uploadIcon.classList.add('exit');\n uploadIcon.style.transitionTimingFunction = 'ease-in';\n return doubleRAF(() => {\n uploadIcon.classList.add('faded-out');\n waitForTransition(uploadIcon).then(() => {\n uploadIcon.setAttribute('hidden', true);\n uploadIcon.classList.remove('exit');\n uploadIcon.style.transitionTimingFunction = '';\n r();\n });\n });\n });\n}", "_remove(error = false) {\n if (!this.loaderCounter && !this.errorCounter) {\n this.$bars.addClass('bar-end');\n this.timeoutID = setTimeout(\n () => this.$headerLoader.css('display', 'none'),\n this.timeoutDelay);\n }\n if (error && !this.errorCounter) {\n this.$bars[1].style.backgroundColor = '#40ADC2';\n }\n }", "function turn_idea_icons_orange() {\n idea_icon_substring = '&avatarId=14930';\n images = document.querySelectorAll('img');\n\n for (let i = 0; i < images.length; i++) {\n if (images[i].src.indexOf(idea_icon_substring) != -1) {\n images[i].src = chrome.extension.getURL(\"/images/jira_idea_question_mark_better.jpg\");\n }\n }\n}" ]
[ "0.6873023", "0.6596962", "0.6459816", "0.6385248", "0.63440305", "0.6327116", "0.6281128", "0.6258033", "0.6080591", "0.60659367", "0.6024034", "0.5996016", "0.59885424", "0.5977781", "0.596051", "0.5931155", "0.59262556", "0.59061986", "0.5873234", "0.5866722", "0.5842173", "0.5834554", "0.58320904", "0.5796254", "0.57921433", "0.5790773", "0.5785781", "0.5785104", "0.5771835", "0.5770057", "0.57675797", "0.5705771", "0.570111", "0.56981856", "0.56919897", "0.5688685", "0.5687841", "0.56872594", "0.5685835", "0.56423235", "0.56380403", "0.5633857", "0.5602636", "0.55953974", "0.55935407", "0.5593028", "0.55895", "0.5582094", "0.5564941", "0.55642444", "0.55504614", "0.55453444", "0.5545314", "0.5536491", "0.55286616", "0.5522013", "0.5519352", "0.5519296", "0.5510889", "0.55086917", "0.5506705", "0.55047613", "0.5503938", "0.5494528", "0.5486416", "0.5481399", "0.5467362", "0.5464102", "0.545919", "0.5454215", "0.54498965", "0.54250115", "0.5418514", "0.5383399", "0.5377394", "0.5376424", "0.53760165", "0.5373042", "0.5369491", "0.5366346", "0.5362657", "0.5356954", "0.5356579", "0.5352224", "0.5344517", "0.53426325", "0.5336435", "0.53297347", "0.53256774", "0.53229374", "0.5318424", "0.53182286", "0.53097117", "0.53095675", "0.53081274", "0.5305854", "0.53046715", "0.5300933", "0.529675", "0.52942836", "0.5293533" ]
0.0
-1
requires a boxObj with the main dialogue window, and a max of 3 dialogue options for the character. Also requires a stringObj with the text for the NPC, and the player object text
function dialogueBoxes(boxObj, string, leftOffset, topOffset, size, ctx, textColor) { button.render(boxObj) wrapText( ctx, string.toString(), boxObj.left + leftOffset, boxObj.top + topOffset, boxObj.right - boxObj.left - 30, 50, size, textColor ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createPlayerOneDialog() {\n this.playerOneDialog = new Dialog({\n game: this.game,\n parent: this.game.world,\n name: 'player-one-dialog',\n options: {\n mainTextString: this.game.world.store.match.uid,\n secondaryTextString: `send this match id to a buddy${'\\n'}(they gotta pick Luke)`,\n buttonStates: [\n {\n textString: 'PLAY',\n inputDownCallback: function inputDownCallback() {\n this.tint(0xffdd00);\n },\n inputUpCallback: function inputUpCallback() {\n this.tint(0xffffff);\n this.game.world.store.howlManager.playHowl('selected');\n this.game.world.store.howlManager.fadeStopHowl('introMusic');\n this.game.state.start('Tutorial');\n },\n },\n {\n textString: 'COPY',\n inputDownCallback: function inputDownCallback() {\n this.tint(0xffdd00);\n },\n inputUpCallback: function inputUpCallback() {\n copy(this.game.world.store.match.uid);\n this.changeText('COPIED');\n setTimeout(() => {\n this.tint(0xffffff);\n this.changeText('COPY');\n }, 3000);\n },\n },\n ],\n },\n });\n }", "dialogBox(dialog) {\n if ((this.npcX > protag1.protagX - 35) && (this.npcX < protag1.protagX + 35) && (this.npcY > protag1.protagY - 35) && (this.npcY < protag1.protagY + 35)) {\n \n fill(0);\n textSize(25);\n text(dialog, 20, 335);\n\n // if (npc01) {\n // fill(0);\n // textSize(25)\n // text(\"example text 1\", 20, 335)\n // } else if (npc02) {\n // textSize(30)\n // text(\"example text 2\", 20, 335)\n // } else if (npc03) {\n // textSize(30)\n // text(\"example text 3\", 20, 335)\n // } else if (npc04) {\n // textSize(30)\n // text(\"example text 4\", 20, 335)\n // } else if (npc05) {\n // textSize(30)\n // text(\"example text 5\", 20, 335)\n // } else if (npc06) {\n // textSize(30)\n // text(\"example text 6\", 20, 335)\n // } else if (npc07) {\n // textSize(30)\n // text(\"example text 7\", 20, 335)\n // } else if (npc08) {\n // textSize(30)\n // text(\"example text 8\", 20, 335)\n // } else if (npc09) {\n // textSize(30)\n // text(\"example text 9\", 20, 335)\n // } else if (npc10) {\n // textSize(30)\n // text(\"example text 10\", 20, 335)\n // }\n }\n }", "function ct_popupbox(type, l1, l2, l3) {\n /*\n type: Type of popup; Can be Error (err), Warning (wrn) or Information (inf). PARSE AS STRING! \"err\",\"inf\",\"wrn\"\n msg: Message shown to user, parse as string.\n */\n\n switch (type) {\n case 'err':\n var typereadable = \"Error\"; // type of popup as readable text, used in titlebar; \"err\" = \"Error\"\n var pubicon = 'status/16/error.png'; // Icon for popupbox movebar\n break;\n case 'wrn':\n var typereadable = \"Warning\";\n var pubicon = 'status/16/important.png';\n break;\n case 'inf':\n var typereadable = \"Information\";\n var pubicon = 'status/16/info.png';\n break;\n default:\n console.error(\"Did not parse type of popupbox correctly when called!\"); // happens when you dont enter options correctly\n return 1;\n }\n\n var dnctv_ctpopupbox = new cwindow('ctpopupbox', 50, 50, (ele) => {\n var blines = [], // temp\n clines = [l1, l2, l3];\n var textSize = 16;\n var lineHeight = 18;\n\n clines.forEach((e, i) => {\n wordWrap(e, dnctv_ctpopupbox.width / 7.2).split('\\n').forEach((ee, ii) => {\n blines.push(ee);\n });\n });\n\n blines.forEach((e, i) => {\n mctx.fillStyle = '#000';\n mctx.font = textSize + 'px Open Sans';\n mctx.fillText(e, dnctv_ctpopupbox.x + 20, dnctv_ctpopupbox.y + 60 + i * lineHeight);\n });\n\n var newHeight = textSize + 12 + blines.length * lineHeight;\n if (dnctv_ctpopupbox.minHeight <= newHeight) dnctv_ctpopupbox.height = newHeight\n else dnctv_ctpopupbox.height = dnctv_ctpopupbox.minHeight\n });\n\n // properties of titlebar of box\n dnctv_ctpopupbox.title = typereadable + \" | CT PopupBox\";\n dnctv_ctpopupbox.icon = pubicon;\n // Size of box\n dnctv_ctpopupbox.width = 400;\n dnctv_ctpopupbox.minHeight = 100;\n // setting the location of the box to the center of the enviornment\n dnctv_ctpopupbox.x = msize.w / 2 - dnctv_ctpopupbox.width / 2;\n dnctv_ctpopupbox.y = msize.h / 2 - dnctv_ctpopupbox.height / 2;\n\n\n return 0;\n\n}", "displayDialogBox() {\n if (this.scene.dialogBox) //Process if child class has set dialogBox to true\n {\n //calculate position of title string based on position of title box and text offset\n this.dialogBox.titleBox.textPosition.x = this.dialogBox.titleBox.position.x + this.dialogBox.titleBox.textOffset.x;\n this.dialogBox.titleBox.textPosition.y = this.dialogBox.titleBox.position.y + this.dialogBox.titleBox.textOffset.y;\n\n //calculate position of text string based on position of title box and text offset\n this.dialogBox.textBox.textPosition.x = this.dialogBox.textBox.position.x + this.dialogBox.textBox.textOffset.x;\n this.dialogBox.textBox.textPosition.y = this.dialogBox.textBox.position.y + this.dialogBox.textBox.textOffset.y;\n this.dialogBox.textBox.textPosition.x2 = this.dialogBox.textBox.position.x + this.dialogBox.textBox.textOffset.x2;\n this.dialogBox.textBox.textPosition.y2 = this.dialogBox.textBox.position.y + this.dialogBox.textBox.textOffset.y2;\n\n //display text box\n push()\n rectMode(this.dialogBox.textBox.rectMode);\n noStroke();\n fill(this.dialogBox.textBox.backgroundFill.r, this.dialogBox.textBox.backgroundFill.g, this.dialogBox.textBox.backgroundFill.b);\n rect(this.dialogBox.textBox.position.x, this.dialogBox.textBox.position.y, this.dialogBox.textBox.size.width, this.dialogBox.textBox.size.height, this.dialogBox.textBox.cornerRoundness)\n pop()\n\n //display title box\n push()\n rectMode(this.dialogBox.titleBox.rectMode);\n noStroke();\n fill(this.dialogBox.titleBox.backgroundFill.r, this.dialogBox.titleBox.backgroundFill.g, this.dialogBox.titleBox.backgroundFill.b);\n rect(this.dialogBox.titleBox.position.x, this.dialogBox.titleBox.position.y, this.dialogBox.titleBox.size.width, this.dialogBox.titleBox.size.height, this.dialogBox.titleBox.cornerRoundness)\n pop()\n\n //display title\n push()\n textAlign(LEFT, BOTTOM);\n textFont(this.dialogBox.titleBox.font);\n textSize(this.dialogBox.titleBox.textSize)\n fill(this.dialogBox.titleBox.textFill.r, this.dialogBox.titleBox.textFill.g, this.dialogBox.titleBox.textFill.b);\n text(this.dialogBox.titleBox.string, this.dialogBox.titleBox.textPosition.x, this.dialogBox.titleBox.textPosition.y);\n pop()\n\n this.displayDialogText();\n }\n }", "function winnerWinner() {\r\n\r\n\ttextDialogue(john, \"John: Hey, well that wasn't so bad.\", 0);\r\n\ttextDialogue(player, player.name + \": Yeah I suppose that could have gone worse\", 1000);\r\n\ttextDialogue(john, \"John: Looks like its about that time...\", 2000);\r\n\ttextDialogue(player, player.name + \": YEE-HAW\", 3000);\r\n\r\n\t// add firework image and such to signify more than just text\r\n\ttextDialogue(narrator, \"Narocube: Hey, you win! \\n Go home... refresh to play again\", 5000);\r\n}", "create() {\n this.addUpdateable(new IntroBg({\n game: this.game,\n x: 0,\n y: 0,\n }));\n\n const chooseCharTextArgs = [\n this.game, // game\n this.game.world.centerX, // x\n 16, // y\n 'SELECT YOUR CHARACTER', // text\n {\n font: 'normal 28px Press Start 2P',\n fill: '#ffffff',\n },\n ];\n\n this.chooseCharText = new Phaser.Text(...chooseCharTextArgs);\n this.chooseCharText.anchor.setTo(0.5, 0);\n\n this.game.add.existing(this.chooseCharText);\n\n this.playerOneCard = new CharacterCard({\n game: this.game,\n charIdx: 0,\n clickCallback: () => {\n const uid = new ShortUniqueId();\n\n this.game.world.store.player.character = 0;\n this.game.world.store.match.uid = uid.randomUUID(6);\n\n this.game.world.store.howlManager.playHowl('selected');\n this.hideCharacterCards();\n this.createPlayerOneDialog();\n this.playerOneDialog.visible = true;\n },\n });\n\n this.playerTwoCard = new CharacterCard({\n game: this.game,\n charIdx: 1,\n clickCallback: () => {\n this.game.world.store.player.character = 1;\n\n this.game.world.store.howlManager.playHowl('selected');\n this.hideCharacterCards();\n this.createPlayerTwoDialog();\n this.playerTwoDialog.visible = true;\n },\n });\n }", "createDialog(game) {\n\t\tconst boxPadding = 10;\n\t\tconst box = game.rectangle(gameWidth - 40, 250, 0x00335a, 0x0f95ff, 2);\n\n\t\tconst dialogText = this.createTextAreaForDialog(game, box, boxPadding);\n\t\tbox.addChild(dialogText);\n\n\t\tbox.optionArea = game.group();\n\t\tconst optionAreaHeight = 90;\n\t\tbox.optionArea.position.set(boxPadding, box.height - optionAreaHeight);\n\t\tbox.addChild(box.optionArea);\n\n\t\tbox.zIndex = 15;\n\t\tbox.position.set(20, gameHeight - box.height - 10);\n\t\tbox.visible = false;\n\t\tbox.textArea = dialogText;\n\t\tbox.boxPadding = boxPadding;\n\t\tgame.mainContainer.addChild(box);\n\t\treturn box;\n\t}", "function showDialog()\r\n{\r\n\t// Create a new dialog box with a single panel\r\n\tvar dialog = new Window(\"dialog\", \"Sprite Sheet Splitter\");\r\n\tvar sizePanel = dialog.add(\"panel\", [0,0,215,180], \"Sprite Sheet Size\");\r\n\r\n\t// Number of columns\r\n\tvar numColsLabel = sizePanel.add(\"statictext\", [25,25,150,35], \"Number of columns:\");\r\n\tvar numColsText = sizePanel.add(\"edittext\", [145,24,185,43], 4);\r\n\r\n\t// Number of rows\r\n\tvar numRowsLabel = sizePanel.add(\"statictext\", [25,55,150,65], \"Number of rows:\");\r\n\tvar numRowsText = sizePanel.add(\"edittext\", [145,54,185,73], 4);\r\n\tnumRowsLabel.enabled = false;\r\n\tnumRowsText.enabled = false;\r\n\r\n\t// Checkbox for making the number of cols/rows the same\r\n\tvar equalRowsLabel = sizePanel.add(\"statictext\", [25,85,150,95], \"Equal cols/rows:\");\r\n\tvar equalRowsBox = sizePanel.add(\"checkbox\", [145,85,175,105]);\r\n\tequalRowsBox.value = true;\r\n\r\n\t// When the checkbox is clicked, enable/disable the second input box\r\n\tequalRowsBox.onClick = function()\r\n\t{\r\n\t\tnumRowsLabel.enabled = !numRowsLabel.enabled; \r\n\t\tnumRowsText.enabled = !numRowsText.enabled; \r\n\t\t\r\n\t\tif(equalRowsBox.value == true)\r\n\t\t\tnumRowsText.text = numColsText.text;\r\n\t}\r\n\r\n\t// Make the number of rows match the number of columns if necessary\r\n\tnumColsText.onChanging = function()\r\n\t{\r\n\t\tif(equalRowsBox.value == true)\r\n\t\t\tnumRowsText.text = numColsText.text; \r\n\t}\r\n\r\n\t// Buttons for OK/Cancel\r\n\tvar okButton = sizePanel.add(\"button\", [25,125,100,150], \"OK\", {name:'ok'});\r\n\tvar cancelButton = sizePanel.add(\"button\", [110,125,185,150], \"Cancel\", {name:'cancel'});\r\n\r\n\t// Event handler for OK button\r\n\tokButton.onClick = function()\r\n\t{\r\n\t\tnumCols = parseInt(numColsText.text);\r\n\t\tnumRows = parseInt(numRowsText.text);\r\n\t\tdialog.close(0);\r\n\t}\r\n\r\n\t// Event handler for Cancel button\r\n\tcancelButton.onClick = function()\r\n\t{\r\n\t\tdialog.close();\r\n\t\tuserCancelled = true;\r\n\t}\r\n\r\n\tdialog.center();\r\n\tdialog.show();\r\n}", "createPlayerTwoDialog() {\n const self = this;\n this.playerTwoDialog = new Dialog({\n game: this.game,\n parent: this.game.world,\n name: 'player-two-dialog',\n options: {\n mainTextString: 'Enter match id:',\n hasInput: true,\n buttonStates: [\n {\n textString: 'PLAY',\n inputDownCallback: function inputDownCallback() {\n this.tint(0xffdd00);\n },\n inputUpCallback: function inputUpCallback() {\n this.tint(0xffffff);\n this.game.world.store.match.uid = self.playerTwoDialog.input.canvasInput.value();\n this.game.world.store.howlManager.playHowl('selected');\n this.game.world.store.howlManager.fadeStopHowl('introMusic');\n this.game.state.start('Tutorial');\n },\n },\n ],\n },\n });\n }", "dialogueBox(config) {\r\n //Black out game and stop physics\r\n if (config.disPhy === true) {\r\n this.scene.menu.box.off(\"pointerdown\");\r\n this.scene.menu.box2.off(\"pointerdown\");\r\n this.scene.input.off(\"pointerdown\");\r\n } else {\r\n this.scene.menu.restart();\r\n this.scene.menu.levelMenu();\r\n this.scene.pointerXY(this.scene.spriteSelection);\r\n }\r\n if (config.bScreen === true) {\r\n this.dbBS = this.scene.add\r\n .rectangle(0, 0, 1200, 2136, 0x000000, 0.5)\r\n .setDepth(30)\r\n .setOrigin(0);\r\n } else {\r\n }\r\n\r\n //diaglogue box\r\n this.boxBG = this.scene.add\r\n .image(config.x, config.y, \"stoneBg\")\r\n .setScale(0.4, 0.2)\r\n .setDepth(31);\r\n this.whiteBox = this.scene.add\r\n .rectangle(config.x, config.y, 750, 350, 0xffffff, 0.5)\r\n .setDepth(32);\r\n\r\n //Text\r\n this.t1 = this.scene.add\r\n .text(config.t1X, config.t1Y, config.text, {\r\n fontFamily: \"Arial\",\r\n fontSize: 48,\r\n color: \"#x000000\",\r\n })\r\n .setDepth(32)\r\n .setOrigin(0.5);\r\n this.t2 = this.scene.add\r\n .text(config.t2X, config.t2Y, config.text2, {\r\n fontFamily: \"Arial\",\r\n fontSize: 48,\r\n color: \"#x000000\",\r\n })\r\n .setDepth(32)\r\n .setOrigin(0.5);\r\n this.t3 = this.scene.add\r\n .text(config.t3X, config.t3Y, config.text3, {\r\n fontFamily: \"Arial\",\r\n fontSize: 48,\r\n color: \"#x000000\",\r\n })\r\n .setDepth(32)\r\n .setOrigin(0.5);\r\n\r\n this.button(config);\r\n this.dialogueAnim(config);\r\n //Button\r\n }", "function compMember(member1, member2, mouseCoords, eventJSONId) {\nvar promptText;\nif (compMemberCats(member1, member2) || compMemberSkills(member1, member2)) { //if skills or second level category matches\npromptText = \"This event requires a <b>\"+member1[\"role\"]+\"</b> with skills overlapping those of your existing team member, <b>\"+member2[\"role\"]+\"</b>. What would you like to do?\";\n$( \"#teamRolesPrompt\" ).dialog({\nbuttons: [ //3 options:\n{\ntext: \"Add this event but use an existing team member\",\nclick: function() {\n$( this ).dialog( \"close\" );\ncreateDragEvent(mouseCoords[0],mouseCoords[1],eventJSONId);\n}\n},\n{\ntext: \"Add this event and \"+member1[\"role\"]+\" to my team\",\nclick: function() {\n$( this ).dialog( \"close\" );\naddMemberFromEvent(member1);\ncreateDragEvent(mouseCoords[0],mouseCoords[1],eventJSONId);\n}\n},\n{\ntext: \"Do not add this event and keep my team as is\",\nclick: function() {\n$( this ).dialog( \"close\" );\n}\n}\n]\n});\ndocument.getElementById(\"teamRolesPrompt\").innerHTML=promptText;\n$( \"#teamRolesPrompt\" ).dialog( \"open\" );\n} else { //else no matches, add Event block and its listed team members automatically\naddMemberFromEvent(member1);\ncreateDragEvent(mouseCoords[0],mouseCoords[1],eventJSONId);\naddMemberFromEvent(member1);\n}\n}", "async function playDialogue (member, dname) {\n usrD[member.user.id].currentDialogue = dname;\n usrD[member.user.id].nextDialogue = \"\";\n wtf();\n var inthebed = new Discord.RichEmbed(); // initiates the rich message (= \"embed message\" but I call it \"in the bed\" because this is funny)\n var dial = dg.corp[dname];\n inthebed.setTitle(dial.npc.name); // embed title = name of the npc/thing speaking\n inthebed.setColor(0x000000);\n descr = await dial.texte(member, usrD[member.user.id].answerMaterial);\n inthebed.setDescription(textSeparator+\"\\n\"+descr+\"\\n\"+textSeparator); // creates a dialogue box within the embed which contains theDialogue.texte function output\n if (descr == \"\") {\n inthebed.setDescription(\"\");\n }\n inthebed.setFooter(dial.footer(member)); // sets the footer text with theDialogue.footer() function output\n inthebed.setThumbnail(dial.npc.picture); // sets the thumbnail as the speaking npc's picture\n if (dial.thumb != undefined) inthebed.setThumbnail(dial.thumb);\n if (dial.image != undefined) inthebed.setImage(dial.image(member));\n console.log(inthebed.thumbnail);\n var ans = dial.answers(member);\n var emoteList = [];\n var ansList = [];\n\n // vvv adds answers list below the dialogue box\n\n for (var i=1; i <= ans[0] ; i++) {\n emoteList.push(dg.rep[ans[i]].emote(member));\n ansList.push(ans[i]);\n inthebed.addField(\" \"+emoteList[i-1]+\" | \"+dg.rep[ansList[i-1]].texte(member)+\"\",\"\"+textSeparator+\"\",);\n }\n let guildy = bot.guilds.find(\"id\", serverID);\n channel = guildy.channels.find(\"id\", usrD[member.user.id].channel);\n bigbug = false;\n const filter = m => {\n if(m.author.id == botID) bigbug = true;\n return m.author.id == botID;\n }\n await channel.awaitMessages(filter, { max: 1, time: 1000});\n if (bigbug == true) {\n return;\n }\n if(channel.type != \"dm\") {\n await channel.bulkDelete(2);\n }\n channel.send(inthebed)\n .then(async message => {\n\n for (var i=1; i <= ans[0] ; i++) {\n await message.react(emoteList[i-1]);\n }\n\n const emojiFilter = (reaction, user) => {\n condition = emoteList.indexOf(reaction.emoji.name) != -1 && user.id === member.user.id;\n return condition;\n };\n col = await message.awaitReactions(emojiFilter, { max: 1, time: 60000*5, errors: ['time']})\n .catch(()=>{\n });\n\n colv = col.array();\n for (var i in colv) {\n j = emoteList.indexOf(colv[i]._emoji.name);\n await message.delete().catch();\n exit = await dg.rep[ans[j+1]].exit(member);\n await playDialogue(member, exit);\n }\n\n }).catch();\n}", "function aboutGame(){\n\tvar temp=\"\";\n\tvar img=\"\";\n\tvar Title=\"\";\n\t/// if we clicked on about the game formate about game text \n\tif(this.id === 'abutBtn'){\n\t\ttemp =window.gameInformation['abutBtn'];\n\t\timg='\\rrecources\\\\AF005415_00.gif';\n\t\tTitle=\" Game General Information \";\n\n\t}////// if we clicked on about the game formate about auther text \n\telse if(this.id === 'abouMe'){\n\t\ttemp =window.gameInformation['abouMe'];\n\t\timg='\\rrecources\\\\viber_image_2019-09-26_23-29-08.jpg';\n\t\tTitle=\" About The Auther\";\n\t}// formatting Text For Instructions\n\telse if(this.id === 'Instructions')\n\t{\n\t\ttemp =window.gameInformation['Instructions'];\n\t\timg='\\rrecources\\\\keyboard-arrows-512.png';\n\t\tTitle=\" Instructions\";\n\t}\n\n\t// create the dialog for each button alone\n\tcreatDialog(Title , temp ,img,300 );\n\t\n}", "function choiceDialog(question,choicearray,dialogarray)\n{\nvar entry_highlighted=1;\n\tvar font = GetSystemFont();\n\tvar entrys=eval(\"puzzles.\"+name+\".answers\").length;\n\tvar key=0;\n\twhile (key!=key_talk){\n\t\t\n\t\tif (key==77){\n\t\tif (entry_highlighted>1) (entry_highlighted=(entry_highlighted-1));} \n\t\tif (key==79){\n\t\tif (entry_highlighted<entrys) entry_highlighted=entry_highlighted+1;}\n\t\tRenderMap();\n\t\tRectangle(0, GetScreenHeight()*0.75,GetScreenWidth(), GetScreenHeight()*0.25, CreateColor(256, 256,256));\n\t\tfont.drawTextBox(10,GetScreenHeight()*0.75+10,GetScreenWidth()/2-20,GetScreenHeight()*0.25-10,0,question);\n\t\tdisplayAnswers(\"\",entry_highlighted,dialogarray);\n\t\tFlipScreen();\n\t\tkey=getTheFuckingKeys();\n\t}\t\n\tdialog(dialogarray[entry_highlighted-1]);\n}", "function showDialog() {\r\ttry {\r\t\tvar win = new Window('dialog', localize(text.title));\r\r\t\t// description\r\t\twin.desc = win.add('panel');\r\t\twin.desc.orientation = 'row';\r\t\twin.desc.alignment = 'fill';\r\t\twin.desc.alignChildren = 'left';\r\r\t\twin.desc.coords = win.desc.add('group');\r\t\twin.desc.coords.orientation = 'row';\r\t\twin.desc.coords.add('statictext', undefined, localize(text.desc));\r\r\t\t// vertical guide settings\r\t\twin.vSettings = win.add('panel', undefined, localize(text.vSettings));\r\t\twin.vSettings.orientation = 'row';\r\t\twin.vSettings.alignment = 'fill';\r\t\twin.vSettings.alignChildren = 'center';\r\r\t\twin.vSettings.coords = win.vSettings.add('group');\r\t\twin.vSettings.coords.orientation = 'row';\r\t\twin.vSettings.coords.add('statictext', undefined, \"x:\");\r\t\twin.vSettings.coords.input = win.vSettings.coords.add('edittext', undefined, \"\");\r\t\twin.vSettings.coords.input.preferredSize = [ 125, 20 ];\r\r\t\twin.vSettings.repeat = win.vSettings.add('group');\r\t\twin.vSettings.repeat.orientation = 'row';\r\t\twin.vSettings.repeat.checkBox = win.vSettings.repeat.add('checkbox', undefined, localize(text.repeat));\r\t\twin.vSettings.repeat.checkBox.value = true;\r\r\t\t// horizontal guide settings\r\t\twin.hSettings = win.add('panel', undefined, localize(text.hSettings));\r\t\twin.hSettings.orientation = 'row';\r\t\twin.hSettings.alignment = 'fill';\r\t\twin.hSettings.alignChildren = 'center';\r\r\t\twin.hSettings.coords = win.hSettings.add('group');\r\t\twin.hSettings.coords.orientation = 'row';\r\t\twin.hSettings.coords.add('statictext', undefined, \"y:\");\r\t\twin.hSettings.coords.input = win.hSettings.coords.add('edittext', undefined, \"\");\r\t\twin.hSettings.coords.input.preferredSize = [ 125, 20 ];\r\r\t\twin.hSettings.repeat = win.hSettings.add('group');\r\t\twin.hSettings.repeat.orientation = 'row';\r\t\twin.hSettings.repeat.checkBox = win.hSettings.repeat.add('checkbox', undefined, localize(text.repeat));\r\t\twin.hSettings.repeat.checkBox.value = true;\r\r\t\t// buttons\r\t\twin.buttons = win.add('group');\r\t\twin.buttons.orientation = 'row';\r\t\twin.buttons.alignment = 'center';\r\r\t\t// ok button\r\t\twin.okBtn = win.buttons.add('button', undefined, localize(text.ok));\r\t\twin.okBtn.onClick = function() {\r\t\t\tmakeGuides(win.hSettings.coords.input.text, 'Hrzn', win.hSettings.repeat.checkBox.value);\r\t\t\tmakeGuides(win.vSettings.coords.input.text, 'Vrtc', win.vSettings.repeat.checkBox.value);\r\t\t\twin.close();\r\t\t};\r\r\t\t// cancel button\r\t\twin.cancelBtn = win.buttons.add('button', undefined, localize(text.cancel));\r\t\twin.cancelBtn.onClick = function() {\r\t\t\twin.close();\r\t\t};\r\r\t\twin.show();\r\r\t} catch (error) {}\r}", "function showAgents(objTextBox, objLabel)\r\n{\r\n objChannelTypeInvokerTextBox = objTextBox;\r\n objChannelTypeInvokerLabel = objLabel;\r\n openModalDialog('../popup/cm_agent_search_listing.htm',screen.width-50,'400');\r\n \r\n return;\r\n}", "function showCommissionTypes(objTextBox, objDescription)\r\n{\r\n objCommissionTypeInvokerTextBox = objTextBox;\r\n objCommissionTypeInvokerLabel = objDescription;\r\n openModalDialog('../popup/cm_commission_type_search_listing.htm',screen.width-50,'400');\r\n \r\n return;\r\n}", "displayDialogText() {\n //If the box is not on its landing position, don't show the text\n if (this.dialogBox.textBox.position.y <= this.dialogBox.textBox.landingPosition.y) {\n this.dialogBox.textBox.fullTextDisplayed = true //Defines to true so buttons can appear (made that way to add a typewriter effect in the future)\n //display text\n push();\n textAlign(LEFT);\n textFont(this.dialogBox.textBox.font);\n textSize(this.dialogBox.textBox.textSize)\n fill(this.dialogBox.textBox.textFill.r, this.dialogBox.textBox.textFill.g, this.dialogBox.textBox.textFill.b);\n text(this.dialogBox.textBox.string, this.dialogBox.textBox.textPosition.x, this.dialogBox.textBox.textPosition.y, this.dialogBox.textBox.textPosition.x2, this.dialogBox.textBox.textPosition.y2);\n pop();\n }\n }", "function EyebiteDialog() {\r\n new Dialog({\r\n title: \"Eyebite options\",\r\n content: \"<p>Target a token and select the effect</p>\",\r\n buttons: {\r\n one: {\r\n label: \"Asleep\",\r\n callback: async () => {\r\n for (let t of game.user.targets) {\r\n const flavor = `${CONFIG.DND5E.abilities[\"wis\"]} DC${DC} ${DAEItem?.name || \"\"}`;\r\n let saveRoll = (await tactor.rollAbilitySave(\"wis\", { flavor })).total;\r\n if (saveRoll < DC) {\r\n ChatMessage.create({ content: `${t.name} failed the save with a ${saveRoll}` });\r\n CUBControl.execute(\"apply\", \"Unconscious\", t);\r\n }\r\n else {\r\n ChatMessage.create({ content: `${t.name} passed the save with a ${saveRoll}` });\r\n }\r\n }\r\n }\r\n },\r\n two: {\r\n label: \"Panicked\",\r\n callback: async () => {\r\n for (let t of game.user.targets) {\r\n const flavor = `${CONFIG.DND5E.abilities[\"wis\"]} DC${DC} ${DAEItem?.name || \"\"}`;\r\n let saveRoll = (await tactor.rollAbilitySave(\"wis\", { flavor })).total;\r\n if (saveRoll < DC) {\r\n ChatMessage.create({ content: `${t.name} failed the save with a ${saveRoll}` });\r\n CUBControl.execute(\"apply\", \"Frightened\", t);\r\n }\r\n else {\r\n ChatMessage.create({ content: `${t.name} passed the save with a ${saveRoll}` });\r\n }\r\n }\r\n }\r\n },\r\n three: {\r\n label: \"Sickened\",\r\n callback: async () => {\r\n for (let t of game.user.targets) {\r\n const flavor = `${CONFIG.DND5E.abilities[\"wis\"]} DC${DC} ${DAEItem?.name || \"\"}`;\r\n let saveRoll = (await tactor.rollAbilitySave(\"wis\", { flavor })).total;\r\n if (saveRoll < DC) {\r\n ChatMessage.create({ content: `${t.name} failed the save with a ${saveRoll}` });\r\n CUBControl.execute(\"apply\", \"Poisoned\", t);\r\n }\r\n else {\r\n ChatMessage.create({ content: `${t.name} passed the save with a ${saveRoll}` });\r\n }\r\n }\r\n }\r\n },\r\n }\r\n }).render(true);\r\n}", "function showChannelTypes(objTextBox, objLabel)\r\n{\r\n objChannelTypeInvokerTextBox = objTextBox;\r\n objChannelTypeInvokerLabel = objLabel;\r\n openModalDialog('../popup/cm_channel_search_listing.htm',screen.width-50,'400');\r\n \r\n return;\r\n}", "function dialogBox(text) {\n\n //create a div to be turn into a dialog box\n let $dialog = $(`<div id='dialogdiv'></div>`).attr(`title`, `Greetings`);\n\n //add text to the div\n $dialog.append(`<p>${text}</p>`);\n\n //Add the div to the page\n $('body').append($dialog);\n\n //turn the div into a dialog box\n $dialog.dialog({\n\n //add a button to take the user to the ending screen\n buttons: {\n \"Close\": function() {\n setTimeout(recieveMessage, 3000);\n $(this).dialog(`close`);\n }\n },\n\n //contain within body\n containment: 'body',\n width: 300\n });\n\n $dialog.parent().offset({\n top: 0.5 * ($(window).height() - $dialog.parent().height()),\n left: 0.5 * ($(window).width() - $dialog.parent().width())\n });\n}", "function closeMessageBox() {\r\n\r\n chooseDifficulty();\r\n}", "function mourir(){\n if(personnage.sante<0){\n presenceEnnemi = 666;\n dialogBox(\"Oh, on dirait que \" + rndEnnemi.nom + \" a eu raison de toi\\nT'es un peu une merde, et t'as un peu pas d'bol\\n\\ntu as tout de même niqué \"+compteurEnnemiVaincu +\" Boloss sur ta route\\n\\nf5 pour recommencer... DU DEBUT HAHAHA\")\n}\n}", "function Menu() {\n const FONT_COLOR = 'BLACK';\n const FONT_SIZE = 17;\n \n const selectKey = 69; //keyCode of E key... , make sure it's the code \n const spaceKey = 32;\n const cKey = 67;\n const zeroKey = 48;\n const oneKey = 49;\n \n let isTalking = false;\n let isShowingCredits = false;\n \n let introDialogueSet = [\n [\"(Press 'E' to advance dialogue.)\"],\n [\"! DANGER: 2020 APPROACHING !\"],\n [\"Life as we knew it had changed forever.\", \"ARMCROSS\"],\n [\"On January 20th, 2020 the first US Covid-19 case was confirmed in Washington State.\"],\n [\"Things started to spiral form there.\"],\n [\"All the toilet paper vanished, online sales were blooming and violence was at an all-time high.\", \"IDLE\"],\n [\"As the months passed, I though the second wave would be the aliens but 2020 isn’t over yet.\"],\n [\"There was no order anywhere.\"],\n [\"No one to save us from the year that just seemed to never end.\"],\n [\"After the schools closed and we were all forced to use Zoom to interact, I decided than enough was enough.\", \"ARMCROSS\"],\n [\"I put on my Target mask, grabbed a roll of toilet paper, refilled my hand sanitizer, slipped on my Yeezy Clog and decided that I would stop the virus and save all of humanity.\"],\n ];\n \n let creditsText = 'Credits:\\n\\nThis game is dedicated to all those who have lost their lives in 2020 battling\\nCovid-19. ' + \n 'You will forever be missed and your memories cherished in the hearts\\nof your loved ones.Rest In Peace <3' +\n '\\n\\nPRODUCTION COMPANY Brown Bananas'+\n '\\nGAME TITLE Surviving 2020'+\n '\\nLEAD CAST Mario-Pants'+\n '\\nSUPPORTING CAST Mr. Lysol'+\n '\\nPRODUCTION AND SET Kevin Granados'+\n '\\nCASTING DIRECTOR Ashley Luty'+\n '\\nWRITER Aqueena Alexander'+\n '\\n\\nSpecial thanks to Google and the CSSI team for giving us this amazing\\nopportunity. We could not have done it without you. '+\n '\\n\\nShoutout to Cohort-25 and all our Googlers: Logan, Thomas, Mark, Lauren, Andy,\\nDean. '+\n 'Thank you to the behind-the-scene workers Thiney and Kelsey.'+\n '\\n\\nThis game is made for entertainment purposes only and is not meant to undermine\\nthe severity of Covid-19 in any way. '+\n 'It promotes the superheroes of 2020: the\\nfront-line workers, teachers, medical staff and everyone else who has risked\\ntheir lives so that others can be safe. '+\n 'We are forever grateful.' + \n '\\n\\nMusic and art asset credits are listed info.txt.';\n\n\n this.preload = function(){ //called before canvas is created\n\n }\n this.setup = function() { //called during first draw()\n };\n this.enter = function(){ //called once every time this scene is opened \n fill(FONT_COLOR);\n textSize(FONT_SIZE); \n displayBackground();\n \n bgm.menu.play(); \n \n let isTalking = false;\n let isShowingCredits = false;\n }\n \n this.draw = function() {\n \n };\n\n this.keyPressed = function(){\n if(keyCode === selectKey){\n if(isTalking){\n let dialogueOver = dialogueEncounterManager.continue();\n if(dialogueOver === false){\n isTalking = false;\n displayBackground();\n }\n }\n else{\n //enter dialogue encounter\n isTalking = true;\n background(150);\n fill(FONT_COLOR);\n textSize(FONT_SIZE); \n //text(\"(Press spacebar to skip intro.)\", 180, 30);\n dialogueEncounterManager.enterEncounter(PLAYER_NAME, undefined, introDialogueSet);\n }\n }\n else if(!isTalking && keyCode === spaceKey){\n leaveMenu(LevelSelect);\n } \n if(!isTalking){\n if(keyCode === cKey){\n if(isShowingCredits){\n isShowingCredits = false;\n displayBackground();\n }else{\n isShowingCredits = true;\n displayCredits();\n } \n }\n else if(keyCode === zeroKey){\n currentLevel = 1;\n leaveMenu(Level0);\n }\n else if(keyCode === oneKey){\n currentLevel = 2;\n leaveMenu(Level1);\n }\n else if (keyCode === 50){\n leaveMenu(GameEnd);\n }\n } \n \n userStartAudio();\n }\n \n function leaveMenu(scene){\n bgm.menu.stop();\n sceneManager.showScene(scene);\n }\n \n function displayCredits(){\n background(240); \n fill(FONT_COLOR);\n textSize(13); \n text(creditsText + \"\\n\\nPress 'C' to return.\", 40, 35);\n }\n \n function displayBackground() {\n background(240); \n fill(FONT_COLOR);\n textSize(FONT_SIZE); \n text(\"► Game has audio.\\n\\n\\n\\nControls:\\n\\WASD to move.\\n'E' to interact or talk.\\n'Spacebar' to shoot.\\n\\n\\nPress 'E' to play intro.\\nPress 'Spacebar' to continue to game.\\n\\n\\n\\n\\nOther Controls:\\n(Press 'C' for credits.)\\n(Press level number to skip to level.)\", 60, 65);\n\n }\n}", "function wrongHitMsg(hitEnemy)\r\n{\r\n if(hitEnemy.trashType == trash[0]){ //if textile\r\n var textileString = \"You're using the wrong weapon! Only 15% of used clothing in the USA is recycled, leaving landfills full of clothes that could've been recycled! Use the up/down keys to switch to the correct weapon.\";\r\n textBox.textContent = textileString;\r\n }\r\n else if(hitEnemy.trashType == trash[1]){ //else if recyclable\r\n textBox.textContent = \"You're using the wrong weapon! Improperly recycling prevents resources from being reused which hurts the enviroment! Use the up/down keys to switch to the correct weapon.\";\r\n }\r\n else if(hitEnemy.trashType == trash[2]){ //else if compose\r\n textBox.textContent = \"You're using the wrong weapon! Not composting leads to increased waste in landfills! Use the up/down keys to switch to the correct weapon.\";\r\n }\r\n else if(hitEnemy.trashType == trash[3]){ //else if landfill\r\n textBox.textContent = \"You're using the wrong weapon! Trash can contaminate other items being recycled or composted which compromises our sustainability mission! Use the up/down keys to switch to the correct weapon.\";\r\n }\r\n}", "function showExams(objTextBox, objLabel)\r\n{\r\n objExamInvokerTextBox = objTextBox;\r\n objExamInvokerLabel = objLabel;\r\n \r\n openModalDialog('../popup/cm_exam_search_listing.htm',screen.width-50,'400');\r\n return;\r\n}", "function charSelected(Class) {\n \n switch(Class){\n case 1:\n player1 = new Player(\"\", RandStat(12, 18), RandStat(12,18),RandStat(10,18), RandStat(2,18), RandStat(2,18), RandStat(1, 1000));\n break;\n case 2:\n player1 = new Player(\"\", RandStat(2, 18), RandStat(2,18),RandStat(1,14), RandStat(14,20), RandStat(10,18), RandStat(1, 1000));\n break;\n case 3:\n player1 = new Player(\"\", RandStat(14, 18), RandStat(8,18),RandStat(12,18), RandStat(8,18), RandStat(10,18), 0);\n break;\n case 4:\n player1 = new Player(\"\", RandStat(6, 18), RandStat(14,20),RandStat(4,18), RandStat(6,18), RandStat(8,18), RandStat(250, 1000));\n break;\n }\n if(player1.Luc < 100) {\n luck = \"Cursed\"\n }\n if(player1.Luc < 200 && player1.Luc >= 100) {\n luck = \"very-Unlcuky\"\n }\n if(player1.Luc < 300 && player1.Luc >= 200) {\n luck = \"unlucky\"\n }\n if(player1.Luc < 400 && player1.Luc >= 300) {\n luck = \"sub-par\"\n }\n if(player1.Luc < 500 && player1.Luc >= 400) {\n luck = \"Acceptable\"\n }\n if(player1.Luc < 600 && player1.Luc >= 500) {\n luck = \"Above-Average\"\n }\n if(player1.Luc < 700 && player1.Luc >= 600) {\n luck = \"High\"\n }\n if(player1.Luc < 800 && player1.Luc >= 700) {\n luck = \"Fortunate\"\n }\n if(player1.Luc < 900 && player1.Luc >= 800) {\n luck = \"Silver-Spoon\"\n }\n if(player1.Luc < 1000 && player1.Luc >= 900) {\n luck = \"God\"\n }\n\n document.getElementById(\"mainContainer\").innerHTML = '<div class=\"Character\">'+\n '<input type=\"text\" id=\"Name\" value=\"Please enter a name\" maxlength=\"15\">'+\n '<p class=\"inputs\">Strength: <input class=\"Stats\" type=\"number\" value=\"' + player1.Str + '\" min=\"1\" max=\"20\"></p>'+\n '<p class=\"inputs\">Dexterity: <input class=\"Stats\" type=\"number\" value=\"' + player1.Dex + '\" min=\"1\" max=\"20\"></p>'+\n '<p class=\"inputs\">Consitution: <input class=\"Stats\" type=\"number\" value=\"' + player1.Con + '\" min=\"1\" max=\"20\"></p>'+\n '<p class=\"inputs\">Intellignece: <input class=\"Stats\" type=\"number\" value=\"' + player1.Int + '\" min=\"1\" max=\"20\"></p>'+\n '<p class=\"inputs\">Wisdom: <input class=\"Stats\" type=\"number\" value=\"' + player1.Wis + '\" min=\"1\" max=\"20\"></p>'+\n '<p class=\"inputs\">Luck: <input class=\"Stats\" type=\"text\" value=\"\" placeholder=\"'+ luck + '\" readonly></p>'+\n '<div class=\"btnWrap Char\">'+\n '<button class=\"btn\" onclick=\"CharAccept()\">Accept this Charcter</button>'+\n '</div>'\n\n \n function RandStat(lower, upper){\n let RandNum = Math.round(Math.random() * (upper - lower)) + lower;\n return RandNum\n }\n}", "function playerCheckDialogueWalkAway(){\n if ((player.x > dialoguex + dialogueWalkAway) || (player.x < dialoguex - dialogueWalkAway)) {\n dialogueAlreadyEngaged = false; \n dialogueActive = false; \n npcDialogue.setText(''); \n currentDialogue = 0;\n clearDialogueBox();\n }\n}", "function difficultyPopUp() {\n\n // create the pop up screen\n let difficultyPopUpDiv = createElement(\"div\", \"difficulty-pop-up-div\");\n document.getElementsByTagName(\"body\")[0].appendChild(difficultyPopUpDiv);\n\n // get the transparent div and add some colour to it to fade out the rest of the screen\n document.getElementsByClassName(\"fade-div\")[0].classList.add(\"fade-out-div\");\n document.getElementsByClassName(\"fade-div\")[0].classList.remove(\"fade-div\");\n\n // create the prompt HTML\n let difficultyPopUpTitle = createElement(\"h1\", \"difficulty-pop-up-title\");\n difficultyPopUpTitle.innerHTML = \"See below for information on difficulty options\";\n difficultyPopUpDiv.appendChild(difficultyPopUpTitle);\n\n let easyPopUp = createElement(\"h2\", \"easy-pop-up\");\n easyPopUp.innerHTML = \"Easy\";\n difficultyPopUpDiv.appendChild(easyPopUp);\n\n let easyList = createElement(\"p\", \"easy-list\");\n difficultyPopUpDiv.appendChild(easyList);\n easyList.innerHTML = \"Easier vocabulary <br> Ability to skip <br> Translate French to English\";\n\n let mediumPopUp = createElement(\"h2\", \"med-pop-up\");\n mediumPopUp.innerHTML = \"Medium\";\n difficultyPopUpDiv.appendChild(mediumPopUp);\n\n let mediumList = createElement(\"p\", \"medium-list\");\n difficultyPopUpDiv.appendChild(mediumList);\n mediumList.innerHTML = \"Intermediate vocabulary <br> Ability to skip <br> Translate English to French\";\n\n let hardPopUp = createElement(\"h2\", \"hard-pop-up\");\n hardPopUp.innerHTML = \"Hard\";\n difficultyPopUpDiv.appendChild(hardPopUp);\n\n let hardList = createElement(\"p\", \"hard-list\");\n difficultyPopUpDiv.appendChild(hardList);\n hardList.innerHTML = \"Difficult vocabulary <br> No skip option <br> Translate English to French\";\n\n // create the button HTML\n let difficultyPopUpBtn = createElement(\"button\", \"difficulty-pop-up-btn\");\n difficultyPopUpBtn.innerHTML = \"Ok, got it\";\n difficultyPopUpDiv.appendChild(difficultyPopUpBtn);\n difficultyPopUpBtn.classList.add(\"buttons\");\n difficultyPopUpBtn.addEventListener(\"click\", function () {\n document.getElementsByClassName(\"fade-out-div\")[0].classList.add(\"fade-div\");\n document.getElementsByClassName(\"fade-out-div\")[0].classList.remove(\"fade-out-div\");\n difficultyPopUpDiv.remove();\n });\n}", "function charSelect(){\n setHtml(\"player\");\n setHtml(\"def1\");\n setHtml(\"def2\");\n setHtml(\"def3\");\n $(\".char-container\").detach();\n $(\"#enemies\").text(\"Choose an opponent\");\n oppSelect();\n}", "function closeDialog() {\n let bubble = document.getElementById('gdx-bubble-host')\n if (bubble) {\n bubble.remove()\n }\n definition = \"&zwnj;\"; // Blank character so the box renders the same size\n}", "function texteditdialog(_objecttype,d,i){\r\n\tvar _text;\r\n\tswitch(_objecttype){\r\n\t\tcase 'node': \r\n\t\t\t_text=[d][0].title;\r\n\t\tbreak;\r\n\t\tcase 'edge':\r\n\t\t\t_text=[d][0].label;\r\n\t\tbreak;\r\n\t\tcase 'note':\r\n\t\t\t_text=[d][0].text;\r\n\t\tbreak;\r\n\t}\r\n\tvar inputstr=_text;\r\n\tif ($('#edittextdialog')) $('#edittextdialog').remove();\r\n var dialog = document.createElement('div'); \r\n\tdialog.id='edittextdialog';\t\r\n\tdialog.style.color = 'black';\r\n\t\r\n\tvar content = document.createElement('div');\r\n\tcontent.style=\"width=230px; height=100px\";\t\r\n\t\r\n var form = document.createElement('form');\r\n\tform.id = 'texteditform';\r\n\tvar input = document.createElement('input');\r\n\tinput.id='edittextinput';\r\n\tinput.type = 'text';\r\n input.name = 'text';\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n input.style=\"width=200px; height=50px\";\r\n\tinput.contentEditable=true;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\tinput.value = _text;\r\n\tinput.focus();\r\n\tvar tempvalue=input.value;\r\n\t$(input).keydown(function (event){\r\n\t\tif (event.keyCode == 13 || event.witch==13) {\t\r\n\t\t\ttempvalue=input.value;\r\n\t\t\tevent.preventDefault();\t\r\n\t\t\t$(button1).click();\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t} );\r\n\tform.appendChild(input);\r\n\r\n\tcontent.appendChild(form);\t\r\n\r\n var button1 = document.createElement('button');\r\n button1.innerHTML = 'OK';\r\n\tbutton1.id=\"dialogbuton1\";\r\n\t$(button1).click(function () { \r\n\t\tif (_text != input.value){\r\n\t\t\tswitch(_objecttype){\r\n\t\t\t\tcase 'node': \r\n\t\t\t\t\t[d][0].title= input.value;\r\n\t\t\t\t\t//to adapt the node size to the length of the title\r\n\t\t\t\t\tif([d][0].rx <= [d][0].title.length * [d][0].fontsize *0.5) {\r\n\t\t\t\t\t\t[d][0].rx = [d][0].title.length * [d][0].fontsize * 0.5;\r\n\t\t\t\t\t\t//to adapt the paths involved this resized node:\r\n\t\t\t\t\t\tvar relatedindexes = lookfor_relatededges([d][0].id);//alert(\"relatedindexes:\"+relatedindexes.length);\r\n\t\t\t\t\t\t//console.log(relatedindexes);\r\n\t\t\t\t\t\tfor (var j =0; j< relatedindexes.length; j++){\r\n\t\t\t\t\t\t\tvar tindex = relatedindexes[j];\r\n\t\t\t\t\t\t\tif (edges[tindex].power ===2) {\r\n\t\t\t\t\t\t\t\tedges[tindex]= update_bcurve2p(nodes,edges[tindex]);\r\n\t\t\t\t\t\t\t}else if (edges[tindex].power ===3){\r\n\t\t\t\t\t\t\t\tedges[tindex]= update_bcurve3p(nodes,edges[tindex], edges[tindex].theta, selfpathANGLE_default);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tedges_tangents[tindex]=generate_tangent(nodes,edges[tindex]); //alert(\"generate_tangent!\");\r\n\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'edge':\r\n\t\t\t\t\t[d][0].label= input.value; [d][0].labelInitial=false;\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'note':\r\n\t\t\t\t\t[d][0].text= input.value;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t$(dialog).dialog('close');\r\n\t\t$('#edittextdialog').remove();\r\n\t\tupdatesvg();\r\n });\r\n\tcontent.appendChild(button1);\t\r\n\t\r\n\tvar button2 = document.createElement('button');\r\n button2.innerHTML = 'Cancel';\r\n\tbutton2.id=\"dialogbuton2\";\r\n\tbutton2.styles=\"margin-left:2px\";\r\n $(button2).click(function () {\r\n $(dialog).dialog('close');\r\n\t\t$('#edittextdialog').remove();\r\n });\r\n\tcontent.appendChild(button2);\r\n\t\r\n dialog.appendChild(content); \r\n\t\r\n //show dialog\r\n $(dialog).dialog({\r\n modal: true,\r\n title: 'Edit Text',\r\n width: \"230\",\r\n height: '130',\r\n\t bgiframe: true,\r\n closeOnEscape: true,\r\n draggable: true,\r\n resizable: true\r\n });\r\n\r\n}", "function C101_KinbakuClub_RopeGroup_TieCharlotte() {\n\tif (ActorSpecificGetValue(\"Charlotte\", ActorSubmission) >= 4) OverridenIntroText = GetText(\"YouTry\");\n}", "function showInstructions() {\r\n\tconst INSTRUCTIONS = \"1. Identify the morphological boundaries. \" \r\n\t\t\t\t\t + \"When you mouse over the word, grey slashes will appear in the spaces between the letters, indicating possible morphological boundaries. <br><br>\"\r\n\t\t\t\t\t + \"a. To mark a morphological boundary, click on the space where you think the boundary is using your mouse. <br><br> \" \r\n\t\t\t\t\t + \"b. Once you've made your selection, click on the check button to see whether you've identified the boundaries correctly. <br><br>\"\r\n\t\t\t\t\t + \"c. If you've selected your boundaries correctly, the morphological categories of the word's components will automatically appear above the word.\"\r\n\t\t\t\t\t + \"If you haven't, you will be given the opportunity to try again \"\r\n\t\t\t\t\t + \"(remember, after three tries, the program will provide the correct answer).\"; \r\n\tshowModal(INSTRUCTIONS, false);\r\n}", "function lettersModal () {\n //initialize the modal container\n modalcont.innerHTML = ``;\n\n //declare pieces of display text\n const char = charObj.ipaChar;\n const lang = charObj.refLanguage;\n const word = charObj.refWord;\n const jaw = charObj.jaw;\n const tongue = charObj.tongue;\n const emph = charObj.refEmphasis;\n \n //create HTML string for letters modal app\n lettersHTMLString = \n `\n <div class=\"modalbg\">\n <div class=\"modal\" role=\"dialog\">\n <div class=\"controls\">\n <button class=\"close\" type=\"button\" role=\"button\" name=\"close\">x</button>\n <button class=\"next\" type=\"button\" role=\"button\" name=\"next\">▶︎</button>\n </div>\n <div class=\"question\">${char}</div>\n <button class=\"showans\" type=\"button\" name=\"showans\">Show Answer</button>\n <div class=\"answer hidden\">\n <span class=\"key\">${lang}:</span><span class=\"value\">${emphasize(word,emph)}</span>\n <span class=\"key\">jaw:</span><span class=\"value\">${jaw}</span>\n <span class=\"key\">tongue:</span><span class=\"value\">${tongue}</span>\n </div>\n </div>\n </div>\n `\n //change the HTML string into a contextual fragment\n const lettersFrag = document.createRange().createContextualFragment(lettersHTMLString);\n\n //append the fragment to the modal container\n modalcont.appendChild(lettersFrag);\n \n //Next button\n const next = document.querySelector(`[name=\"next\"]`);\n next.addEventListener(`click`, () => {\n requestChar();\n lettersModal();\n });\n\n //Show Answer button\n const showans = document.querySelector(`[name=\"showans\"]`);\n showans.addEventListener(`click`, () => {\n showAnswer();\n });\n\n //Close buton\n const close = document.querySelector(`[name=\"close\"]`);\n close.addEventListener(`click`, () => {modalInit()});\n}", "addTextDial( i ){\n\n var text = this.curDataDial.charAt(i)\n\n if ( this.curDataDial == this.dialData[4] && this.verifReady ){\n console.log(\"dial 3\")\n this.transReady = true;\n this.dialReady = false;\n }\n\n if( text == ' ' && this.dialTextUp.width >= 2000 && this.dialUp ){\n this.dialUp = false;\n }\n\n if( text == ' ' && this.dialTextDown.width >= 2000 && this.dialDown ){\n this.dialDown = false;\n }\n\n // Ligne 1\n if( this.dialUp && this.dialReady ) {\n if( text != ' ' ){\n dialogue.play()\n }\n \n // console.log(\"dialUp\")\n this.curDialUp = this.curDialUp + text;\n this.dialTextUp.setText( this.curDialUp );\n }\n\n // Ligne 2\n else if( this.dialDown && this.dialReady ){\n if( text != ' ' ){\n dialogue.play()\n }\n // console.log(\"dialDown\")\n this.curDialDown = this.curDialDown + text;\n this.dialTextDown.setText( this.curDialDown );\n }\n\n // Plus de ligne\n else{\n \n this.dialUp = true;\n this.dialDown = true;\n this.switchText = true;\n if( this.indexCurChara == 0 ){\n this.indexCurChara = i;\n }\n return true;\n }\n\n // Si le texte est arrivé a sa dernière lettre alors on change de dialogue\n if( i == this.curDataDial.length && this.dialReady){\n // Reinitialiser le character de debut\n this.indexCurChara = 0;\n this.espace.setVisible(true)\n // Vérifié sir il y a un autre dialogue à lancer\n this.indexCurDial++;\n\n if( this.dialData[this.indexCurDial] ){\n this.curDataDial = this.dialData[this.indexCurDial];\n this.spawnDial();\n }\n else{\n this.ready = true;\n this.closeText = true;\n }\n\n return true;\n }\n }", "function OnGUI() {\n\t\n\tGUI.Box(Rect(0,0,200,20), \"Cookies \" + currencyCookies.ToString());\n\tGUI.Box(Rect(0,30,200,20), cookieIncome.ToString() + \" Cookies per second\");\n\tGUI.Box(Rect(0,60,200,20), clickPower.ToString() + \" Click Power\");\t\n\tGUI.Box(Rect(0,90,200,20), \"Grandmas Cost \" + grandmaCost.ToString());\t\n\tGUI.Box(Rect(0,120,200,20), \"Level \" + currentLevel.ToString() + \" Progress \" + levelProgress.ToString()+ \"%\" );\t\t\n\tGUI.Box(Rect(0,150,200,20), \"Currentxp\" + playerXP.ToString() + \" Next level XP\" + dNextLevelXP.ToString());\n\tGUI.Box(Rect(0,180,200,20), \"hello\");\t\t \n}", "function specialClic() {\n if (presenceEnnemi===0){\n dialogBox(\"Tu veux t'amuser à faire de l'esbrouffe sans spectateurs ? T'es quel genre de gars ? Le genre à boire tout seul chez lui ? A faire tourner les serviettes lors d'un dîner en tête à tête avec ton chat ? Garde ton energie pour tes prochaines rencontres.\")\n }else if (presenceEnnemi===1){\n if(specialReboot <3){\n dialogBox(\"Tu dois encore attendre pour relancer un special, t'es fou ou quoi ? T'ES UN CHEATER UN TRUC DU GENRE ? NAN MAIS T'ES QUI POUR VOULOIR ENVOYER DES COUPS SPECIAUX H24, TA MERE ELLE T'A EDUQUé COMMENT AU JUSTE ?\");\n }else if(specialReboot ===3){\n document.getElementById(\"aventure\").innerHTML += (\"</br></br>COUP SPECIAL DE LA MORT QUI TACHE</br>Attend trois actions pour pouvoir relancer le bouzin\");\n switch (classeChoisie){\n \n \n case \"guerrier\":\n \n rndEnnemi.esquive = Number(15);\n degatAssomoir = Number(personnage.force*2);\n rndEnnemi.sante = rndEnnemi.sante - degatAssomoir;\n document.getElementById(\"santeEnnemi\").innerHTML = rndEnnemi.sante;\n document.getElementById(\"aventure\").innerHTML += (\"</br></br>Votre coup était SANS SOMMATION, votre adversaire en est tout étourdi et il semble perdre en agilité, il aura du mal à esquiver vos prochains coups, et vous lui infligez \"+degatAssomoir+\" point de dégats dans sa teuté.</br>\");\n \n break;\n \n case \"moine\":\n \n personnage.esquive = personnage.esquive - 15;\n personnage.sante = personnage.sante + 250;\n document.getElementById(\"santePerso\").innerHTML = personnage.sante;\n document.getElementById(\"esquivePerso\").innerHTML = personnage.esquive;\n document.getElementById(\"aventure\").innerHTML += (\"</br></br>Vous sortez une fiole de votre poche et prenez une lampée, vous vous santez en meilleure forme, mais votre agilité en prend un coup ! Avec modération s'il vous plait !</br>\");\n \n break;\n\n case \"mage\":\n\n //Decide d'une invocation random parmis 3 possibles\n\n var Min= Number(1)\n var Max= Number(3)\n\n function getRndInterger(min, max) {\n return Math.floor(Math.random() * (max - min + 1) ) + min;}\n incantation = getRndInterger(Min, Max);\n document.getElementById(\"aventure\").innerHTML += (\"</br></br>Les incantations d'Akimieumieu sont instables, vous vous concentrez et \");\n \n\n switch (incantation){\n case (1) :\n incantationName=\"BOULE DE SHNECK ULTRA\";\n degatBoule= (rndEnnemi.sante/2)+30;\n rndEnnemi.sante = rndEnnemi.sante - degatBoule;\n document.getElementById(\"santeEnnemi\").innerHTML = rndEnnemi.sante;\n document.getElementById(\"aventure\").innerHTML += (\"lancez le sort '\"+incantationName+\"' qui amoche votre adversaire bien salement, lui ôtant \" + degatBoule + \" Points de vie</br>EN FAIT C'EST LA MOITIE DE SA VIE + 30 SI T'A CAPTé</br>\" ) \n \n break;\n\n case (2) :\n incantationName=\"INVISIBILITÉ BON MARCHÉ\";\n personnage.esquive = Number(88);\n document.getElementById(\"esquivePerso\").innerHTML = personnage.esquive;\n document.getElementById(\"aventure\").innerHTML += (\"lancez le sort '\"+incantationName+\"'. L'adversaire ne vous voit que sous une forme quasiment transparente. Un peu comme si il regardait au travers d'une pinte de bière vide. C'est le moment d'esquiver ses coups !</br>\" ) \n \n break;\n \n case (3) :\n incantationName=\"CARRESSE PSYCHIQUE\";\n degatCarresse= 1;\n rndEnnemi.sante = rndEnnemi.sante + degatCarresse;\n document.getElementById(\"santeEnnemi\").innerHTML = rndEnnemi.sante;\n document.getElementById(\"aventure\").innerHTML += (\"lancez le sort '\"+incantationName+\"' que vous aviez appris à lancer à la Fac pour séduire une jeune mage très douce, qui depuis votre séparation s'est étrangement passionnée pour la démonologie. Ce sort n'est pas vraiment un sort de combat, et votre adversaire semble même un peu plus excité qu'au paravant, vous lui avez rendu \" + degatCarresse + \" Point de vie</br>\" ) \n \n break;\n }\n break;\n case \"david\":\n attaquer();\n document.getElementById(\"aventure\").innerHTML += (\"</br></br>VOTRE ENNEMI A SIMPLEMENT CESSé D'EXISTER.</br>\");\n resetEnnemi();\n \n break;\n \n default :\n dialogBox(\"Interaction cheloue du spécial, merci d'en faire part au MJ il code comme un pied, veuillez l'excuser.\")\n break;\n }\nesquiver();\nspecialReboot=0;\nconsole.log(\"Le spécial s'est exécuté\");\nscrollDown(\"fenetreCentrale\");\n}\n}\n}", "function choosePlayer(){\n var justiceLeaguer = $('.justice-league');\n var hero = (justiceLeaguer.val());\n\n window.setTimeout(function(){\n $('.message-to-player').text(hero +'!');\n }, 2000);\n window.setTimeout(function(){\n $('.message-to-player').text('We need your help!');\n }, 4000);\n window.setTimeout(function(){\n $('.message-to-player').text('A villian has attacked a heavily populated area!');\n }, 6000);\n window.setTimeout(function(){\n $('.message-to-player').text('Your opponent is ' + villian + '.' + ' Select a superpower and...');\n }, 8000);\n window.setTimeout(function(){\n $('.message-to-player').text('ATTACK!');\n }, 10000);\n }", "function getUserInfo(){\n let humanName = userForm.userName.value;\n let humanSymbol = userForm.symbol.value;\n let aiSymbol;\n\n event.preventDefault();\n (humanSymbol == \"O\") ? aiSymbol = \"X\" : aiSymbol = \"O\"\n\n human.name = humanName;\n human.symbol = humanSymbol;\n ai.name = \"AI\";\n ai.symbol = aiSymbol;\n\n $modal.css('display','none')\n displayPlayers();\n return mode = userForm.difficulty.value;\n}", "function showYouWon() {\n const text = \"Hurrraaay You get It.\";\n let dialog = getDialog('won', text)\n document.getElementById(\"result\").innerHTML = dialog;\n}", "function openDialog()\n{\n\tif (inviteOrCall==\"invite\")\n\t{\n\t\t$.dialog.buttonNames= ['Invite', 'Cancel'],\n\t\t$.dialog.message=\"Do you want to invite \"+ contact.getFullName();+\" to become a bofff ?\";\n\t\t$.dialog.show();\n\t}\n\telse\n\tif (inviteOrCall==\"call\")\n\t{\n\t\t$.dialog.buttonNames= ['Call', 'Cancel'],\n\t\t$.dialog.message=\"Are you sure want to call \"+ contact.getFullName()+\" on this number: \"+numberToCall+\" ?\";\n\t\t$.dialog.show();\n\t}\n\t\t\n}", "function startGame() {\n setMessage(\"Select an opponent above\");\n}", "function textBox(x, y, w, h, textInside, typeIn){\r\n\tthis.objectType = typeIn;\r\n\tthis.pos = createVector(x, y);\r\n\tthis.size = createVector(w, h);\r\n\tthis.textInside = textInside;\r\n\tthis.id = objects.length;\r\n\tthis.boxcontain = new BoxContain(this);\r\n\r\n\tthis.show = function(){\r\n\t\tstrokeWeight(1);\r\n\t\ttextSize(this.size.y);\r\n\t\tif(typeIn == 'title' || typeIn == 'text'){\r\n\t\t\tif(typeIn == 'title'){\r\n\t\t\t\tif(info.title != this.textInside)\r\n\t\t\t\t\tthis.textInside = info.title;\r\n\t\t\t\tfill(VisualizeGui.titleColor);\r\n\t\t\t} else fill(VisualizeGui.textColor);\r\n\t\t\tnoStroke();\r\n\t\t\ttext(this.textInside, this.pos.x, this.pos.y);\r\n\t\t\r\n\t\t} else if(typeIn == 'time'){\r\n\t\t\tnoStroke();\r\n\t\t\tfill(255);\r\n\t\t\ttext(time(), this.pos.x, this.pos.y);\r\n\t\t}\r\n\t\ttextSize(20); // set textSize to default\r\n\t}\r\n\r\n\t// when delete one object , ID will change\r\n\tthis.updateID = function(newID){\r\n\t\tthis.id = newID;\r\n\t}\r\n\r\n\tthis.setPosition = function(x, y){\r\n\t\tthis.pos = createVector(x, y);\r\n\t}\r\n\r\n\tthis.setSize = function(w, h){\r\n\t\tthis.size = createVector(w, h);\r\n\t}\r\n\r\n\tthis.run = function(){\r\n\t\tthis.show();\r\n\r\n\t\tif(designMode)\r\n\t\t\tthis.boxcontain.show();\r\n\t}\r\n}", "function boxClickedForHuman(e){\n const id = e.target.id; \n if(!spaces[id] && flag == true ){\n spaces[id] = currentPlayer;\n e.target.innerText = currentPlayer;\n if(currentPlayer == \"X\"){\n var element = document.querySelectorAll(\".box\");\n element[id].classList.add(\"color-red\")\n }else{\n var element = document.querySelectorAll(\".box\");\n element[id].classList.add(\"color-blueviolet\")\n }\n currentPlayer = currentPlayer == O_TEXT? X_TEXT:O_TEXT;\n setText('turn' , currentPlayer+\"'s turn\");\n count++;\n winX();\n winO();\n }\n}", "function showStartScreen(){ \n var dialogVariables = Dialogs.showDialog(new optionsDialog(), Constants.DIALOG_TYPE_WIZARD, \"Choose Attribute and Objects\"); \n return dialogVariables; \n}", "function showDesignations(objTextBox, objLabel)\r\n{\r\n objDesignationInvokerTextBox = objTextBox;\r\n objDesignationInvokerLabel = objLabel;\r\n openModalDialog('../popup/cm_designation_search_listing.htm',screen.width-50,'400');\r\n return;\r\n}", "function getDialog(dialogType, text){\r\n let dialog;\r\n switch(dialogType){\r\n case \"warning\":\r\n dialog = \"<div class='alert alert-warning' role='alert'>\"\r\n break;\r\n case \"won\":\r\n dialog = \"<div class='alert alert-success' role='alert'>\"\r\n break;\r\n }\r\n dialog += text;\r\n dialog += \"</div>\"\r\n return dialog;\r\n}", "function helpDialog(helpText , title ,win , meta_wgl){\r var diag = new Window (\"dialog\",title + \"\");\r diag.preferredSize = {\"width\":450,\"height\":450};\rvar pan = diag.add('group',undefined,'');\r pan.orientation ='column';\rvar txt = pan.add('edittext',undefined,helpText,{multiline:true,scrolling: true});\r txt.preferredSize = {\"width\":440,\"height\":430};\rvar btg = pan.add (\"group\");\r\rvar cbg = btg.add (\"group\");\r\r cbg.alignment = \"left\";\r\r// var reset_button = cbg.add (\"button\", undefined, \"Reset Values to default\");\r\r btg.orientation = 'row';\r btg.alignment = \"right\";\r btg.add (\"button\", undefined, \"OK\");\r btg.add (\"button\", undefined, \"cancel\");\r\r\r if (diag.show () == 1){\r\r return true;\r\r }else{ \r\r return false;\r\r };\r}", "addTexts(){\n var startingMessage = (game.singleplayer || game.vsAi) ? \"Current Turn: X\" : \"Searching for Opponent\"\n\n game.turnStatusText = game.add.text(\n game.world.centerX, 50, startingMessage,\n { font: '50px Arial', fill: '#ffffff' }\n )\n //setting anchor centers the text on its x, y coordinates\n game.turnStatusText.anchor.setTo(0.5, 0.5)\n game.turnStatusText.key = 'text'\n\n game.playerPieceText = game.add.text(\n game.world.centerX, 600-50, '',\n { font: '50px Arial', fill: '#ffffff' }\n )\n //setting anchor centers the text on its x, y coordinates\n game.playerPieceText .anchor.setTo(0.5, 0.5)\n game.playerPieceText.key = 'text'\n\n\n\n }", "function InsertSpecialCharacter() {\r\n var options = SP.UI.$create_DialogOptions();\r\n options.title = \"Please select the special character\";\r\n options.width = 500;\r\n options.height = 300;\r\n options.y = getTop(300);\r\n options.url = \"/_layouts/BeenJammin.SharePoint.CustomRibbonActions/SpecialCharacters.aspx\";\r\n options.dialogReturnValueCallback = Function.createDelegate(null, SpecialCharacterCloseCallback);\r\n SP.UI.ModalDialog.showModalDialog(options);\r\n\r\n}", "function show_dialog(){ //Should reimplement it as array in the future\n let line_one = \"\";\n let line_two = \"\";\n let line_three = \"\";\n let line_four = \"\";\n let line_five = \"\";\n let line_six = \"\";\n const base = 2.1*bgpos[2]/16\n if(mainF.TXT.length < base){\n line_one = mainF.TXT;\n }\n else if(mainF.TXT.length < 2*base){\n line_one = mainF.TXT.slice(0,base);\n line_two = mainF.TXT.slice(base, 2*base);\n \n }\n else if(mainF.TXT.length < 3*base){\n line_one = mainF.TXT.slice(0,base);\n line_two = mainF.TXT.slice(base, 2*base);\n line_three = mainF.TXT.slice(2*base, 3*base);\n \n }\n else if(mainF.TXT.length < 4*base){\n line_one = mainF.TXT.slice(0,base);\n line_two = mainF.TXT.slice(base, 2*base);\n line_three = mainF.TXT.slice(2*base, 3*base);\n line_four = mainF.TXT.slice(3*base, 4*base);\n \n }\n else if(mainF.TXT.length < 5*base){\n line_one = mainF.TXT.slice(0,base);\n line_two = mainF.TXT.slice(base, 2*base);\n line_three = mainF.TXT.slice(2*base, 3*base);\n line_four = mainF.TXT.slice(3*base, 4*base);\n line_five = mainF.TXT.slice(4*base, 5*base);\n \n }\n else{\n line_one = mainF.TXT.slice(0,base);\n line_two = mainF.TXT.slice(base, 2*base);\n line_three = mainF.TXT.slice(2*base, 3*base);\n line_four = mainF.TXT.slice(3*base, 4*base);\n line_five = mainF.TXT.slice(4*base, 5*base);\n line_six = mainF.TXT.slice(6*base, 7*base);\n \n }\n ctx.font = '16px arial';\n ctx.textAlign = 'left';\n ctx.fillStyle = txtcolor;\n ctx.fillText(line_one,txtpos[0],txtpos[1]);\n ctx.fillText(line_two,txtpos[0],txtpos[1]+line_space);\n ctx.fillText(line_three,txtpos[0],txtpos[1]+2*line_space);\n ctx.fillText(line_four,txtpos[0],txtpos[1]+3*line_space);\n ctx.fillText(line_five,txtpos[0],txtpos[1]+4*line_space);\n ctx.fillText(line_six,txtpos[0],txtpos[1]+5*line_space);\n}", "function setupStage()\n{\n\tstage.addChild(bg);\n\t\n\tfor (i = 0; i < clue_list.length; i++) { \n\t\tstage.addChild(clue_list[i]);\n\t\tif (clue_list[i].answers) clue_list[i].onPress = showForm;\n\t}\n\t\n\tstage.addChild(tally, wrong);\n\t\n\tdisplay_score = new Text(score + \" / \" + clue_list.length, '18px AvenirBlack', '#ffffff');\n\tdisplay_score.textAlign = \"center\";\n\tdisplay_score.x = 894;\n\tdisplay_score.y = 39;\n\tstage.addChild(display_score);\n\t\n correct_container = new Container();\n correct_container.x = 248;\n\tcorrect_container.y = 179 - 640;\n correct_container.addChild(correct_panel);\n\t\n\tcorrect_msg1 = new Text(\"\", '26px AvenirBlack', '#ffffff');\n\tcorrect_msg1.textAlign = \"center\";\n\tcorrect_msg1.x = 230;\n\tcorrect_msg1.y = 122;\n\tcorrect_container.addChild(correct_msg1);\n\t\n\tcorrect_msg2 = new Text(\"\", '15px AvenirBlack', '#ffffff');\n\tcorrect_msg2.textAlign = \"center\";\n\tcorrect_msg2.x = 230;\n\tcorrect_msg2.y = 238;\n\tcorrect_container.addChild(correct_msg2);\n\t\n\tstage.addChild(correct_container);\n\t\n\tstage.update();\n\t\n find_answer_panel_size();\n\n}", "function messageOptions(){\n\n // The array that holds various text message reply options.\n var options = [\n \"Choose from your usual responses, or type in the box to formulate your own message.\",\n \"YESSSS!!! So down.\",\n \"Not sure dearie. My head is killing me :(\",\n \"Homework or drinks? Hmm... difficult decision.\",\n \"Nah I'm busy tonight sorry!.\",\n \"Where and what timeee\"\n ];\n\n // The array that holds various text that can be generated after clicking on a random text reply option.\n var abusiveResponses = [\n \"For god's sake get off the computer.\",\n \"When was the last time you moved?! Move DAMMIT\",\n \"I don't think you could ever live without your computer.\"\n ]\n\n // The array that holds the various divs that make up the text message reply options.\n var optionDivs = [\"#one\", \"#2\", \"#3\", \"#4\", \"#5\", \"#6\"]\n\n // The function that chooses a div at random.\n var randomDivs = optionDivs[Math.floor(Math.random() * optionDivs.length)];\n\n // The function that chooses a random abusive response from the abusiveResponses array.\n var randomResponse = abusiveResponses[Math.floor(Math.random() * abusiveResponses.length)];\n\n // The functions that enable the text message reply options to hold the text generated from the \"options\" array.\n $('#one').text(options[0]);\n $('#2').text(options[1]);\n $('#3').text(options[2]);\n $('#4').text(options[3]);\n $('#5').text(options[4]);\n $('#6').text(options[5]);\n\n $(randomDivs).click(function(){\n\n // On click, this function enables a random abusive response to appear in all the text message reply options.\n $(optionDivs[0]).text(randomResponse);\n $(optionDivs[1]).text(randomResponse);\n $(optionDivs[2]).text(randomResponse);\n $(optionDivs[3]).text(randomResponse);\n $(optionDivs[4]).text(randomResponse);\n $(optionDivs[5]).text(randomResponse);\n $(optionDivs[6]).text(randomResponse);\n console.log('Random response:' + randomResponse);\n // This function enables the text message response boxes to have a class called \"animate\". The \"animate\" class refers back various CSS animation properties which change its background color and text properties.\n $('.responses').addClass('animate');\n console.log('Reply options are animating.');\n\n // This function allows certain CSS properties of the reply boxes to change.\n $('.responses').css({\n 'width':'20%',\n 'position':'relative',\n 'font-size':'30px',\n 'padding':'40px',\n 'text-align':'center',\n 'margin-bottom': '50px',\n 'display':'inline-block',\n 'margin-right':'7.5%',\n 'cursor':'auto'\n });\n\n $('#float').css({\n 'margin-left':'7.5%',\n 'margin-top':'-372px'\n });\n });\n\n\n}", "function GuiGameCharacterInfo(in_pixelOrigin, in_pixelSize, in_gameBackground, in_context, in_canvas)\n{\n\t//DEBUG if ( !(this instanceof GuiGameCharacterInfo) )\n\t//DEBUG {\n\t//DEBUG \talert(\"GuiGameCharacterInfo: call constuctor with new keyword\");\t\n\t//DEBUG }\n\n\tthis.m_visible = false;\t\n\tthis.m_pixelOrigin = in_pixelOrigin;\n\tthis.m_pixelSize = in_pixelSize;\n\tthis.m_gameBackground = in_gameBackground;\n\n\tthis.m_character = null;\n\tthis.m_flip = false;\n\tthis.m_arrayGui = [];\n\t\n\tthis.m_textName = new GuiText(\"Name\", new Vector(in_pixelOrigin.m_x + 8, in_pixelOrigin.m_y + 6), GuiTextGetSmallFont());\n\tthis.m_arrayGui.push(this.m_textName);\n\t\n\tthis.m_arrayGui.push(new GuiText(\"Health:\", new Vector(in_pixelOrigin.m_x + 8, in_pixelOrigin.m_y + 26), GuiTextGetSmallFont()));\n\tthis.m_textHealth = new GuiText(\"0 / 0\", new Vector(in_pixelOrigin.m_x + 54, in_pixelOrigin.m_y + 26), GuiTextGetSmallFont());\n\tthis.m_arrayGui.push(this.m_textHealth);\n\t\n\tthis.m_arrayGui.push(new GuiText(\"Armour:\", new Vector(in_pixelOrigin.m_x + 8, in_pixelOrigin.m_y + 46), GuiTextGetSmallFont()));\n\tthis.m_textArmour = new GuiText(\"0 / 0\", new Vector(in_pixelOrigin.m_x + 54, in_pixelOrigin.m_y + 46), GuiTextGetSmallFont());\n\tthis.m_arrayGui.push(this.m_textArmour);\n\t\n\tthis.m_arrayGui.push(new GuiText(\"Aura:\", new Vector(in_pixelOrigin.m_x + 8, in_pixelOrigin.m_y + 66), GuiTextGetSmallFont()));\n\tthis.m_textAura = new GuiText(\"0 / 0\", new Vector(in_pixelOrigin.m_x + 54, in_pixelOrigin.m_y + 66), GuiTextGetSmallFont());\n\tthis.m_arrayGui.push(this.m_textAura);\n\t\n\t\n\tthis.m_dismissButton = new GuiButton(\n\t\t\"x\", \n\t\tnew Vector(in_pixelOrigin.m_x + in_pixelSize.m_x - 20, in_pixelOrigin.m_y + 2), \n\t\tnew Vector(18, 18), \n\t\tthis, \n\t\t\"CallbackHide\", \n\t\ts_guiButtonStyle.e_simple,\n\t\tin_context, \n\t\tin_canvas\n\t\t);\n\tthis.m_arrayGui.push(this.m_dismissButton);\n\t\t\n\tthis.CallbackHide = function(in_button)\n\t{\n\t\tthis.m_visible = false;\n\t}\t\n}", "function createNPC() {\n if (validateNPCFormComplete()) {\n\t\tvar c = new Character(false, $(\"npc-monster-name\").value, $(\"npc-race\").value, \"monster\", $(\"npc-armor-class\").value,\n\t\t\t\t\t\t\t $(\"npc-passive-perception\").value, $(\"npc-dexterity\").value, $(\"npc-hit-points\").value,\n\t\t\t\t\t\t\t $(\"npc-hit-dice\").value, $(\"npc-d4\").checked, $(\"npc-d6\").checked, $(\"npc-d8\").checked,\n\t\t\t\t\t\t\t $(\"npc-d10\").checked, $(\"npc-d12\").checked, $(\"npc-d20\").checked,\n\t\t\t\t\t\t\t $(\"npc-modifier\").value, $(\"npc-page-number\").value);\n c.initializeRandomizedVars();\n characters.push(c);\n showElement(\"right-container\");\n showElement(\"edit-menu\");\n hideElement(\"npc-form\");\n addCharacterToColumn(c.unique, c.name, c.race, c.passivePerception, c.armorClass, characters.length - 1);\n enableEditingButtons();\n clearNPCForm();\n }\n}", "function genMsg(type, loc, msg) {\n var error = '<div id=\"errorMessage\" style=\"display: none;\" title=\"Warning\"><p><span class=\"ui-icon ui-icon-alert\" style=\"float:left; margin:4px 10px 20px 0;\"></span>'\n + '%data%' + '</p></div>';\n var congrats = '<div id=\"congratMessage\" style=\"display: none;\" title=\"Congratulations\"><p><span class=\"ui-icon ui-icon-info \" style=\"float:left; margin:4px 10px 20px 0;\"></span>'\n + 'Secret code is <br> ' + '<span class=\"secret-code\">%data%</span>' + '</p></div>';\n var hintMsg = '<div id=\"hintMessage\" style=\"display: none;\" title=\"Hint\"><p><span class=\"ui-icon ui-icon-info \" style=\"float:left; margin:4px 10px 20px 0;\"></span>%data%</p></div>';\n var fail = '<div id=\"fun\" style=\"display: none;\" title=\"Fail!!!\"><iframe frameborder=\"0\" width=\"560\" height=\"315\" src=\"//www.dailymotion.com/embed/video/x2241lu?autoPlay=1\" allowfullscreen></iframe><br /><a href=\"http://www.dailymotion.com/video/x2241lu_ha-ha-nelson_fun\" target=\"_blank\">Ha Ha Nelson</a> <i>by <a href=\"http://www.dailymotion.com/Hollywood2NY\" target=\"_blank\">Hollywood2NY</a></i></div>';\n \n if (type === \"prize\") {\n $.getJSON(apiUri, function (data) {\n setPrizeCode(data.word);\n $(loc).append(congrats.replace(\"%data%\", data.word));\n $(\"#congratMessage\").dialog({\n resizable: false,\n height: 250,\n modal: true,\n show: {\n effect: \"shake\",\n duration: 500\n },\n hide: {\n effect: \"explode\",\n duration: 1000\n },\n buttons: {\n ok: function () {\n reset();\n $(this).dialog(\"close\");\n }\n }\n });\n });\n\n\n } else if (type === \"hint\") {\n $(loc).append(hintMsg.replace(\"%data%\", msg));\n $(\"#hintMessage\").dialog({\n resizable: false,\n height: 250,\n modal: true,\n show: {\n effect: \"shake\",\n duration: 500\n },\n hide: {\n effect: \"explode\",\n duration: 1000\n },\n buttons: {\n ok: function () {\n $(this).dialog(\"close\");\n }\n }\n });\n } else if (type === \"fail\") {\n $(loc).append(fail);\n $(\"#fun\").dialog({\n resizable: false,\n height: 600,\n width: 575,\n modal: true,\n show: {\n effect: \"shake\",\n duration: 500\n },\n hide: {\n effect: \"explode\",\n duration: 1000\n },\n buttons: {\n TryAgain: function (loc) {\n reset();\n $(this).dialog(\"close\");\n event.prevenDefault;\n\n }\n }\n });\n }\n else {\n $(loc).append(error.replace(\"%data%\", msg));\n $(\"#errorMessage\").dialog({\n resizable: false,\n height: 250,\n modal: true,\n show: {\n effect: \"shake\",\n duration: 500\n },\n hide: {\n effect: \"explode\",\n duration: 1000\n },\n buttons: {\n ok: function () {\n $(this).dialog(\"close\");\n }\n }\n });\n\n }\n\n}", "fillWinnerModal (text) {\n const div = document.createElement('div');\n const p = document.createElement('p');\n p.setAttribute('id', 'winnerP');\n p.innerText = text;\n const btn = document.createElement('button');\n btn.innerText = \"Play Again?\";\n btn.setAttribute('class', 'button');\n btn.addEventListener('click', () => {\n this.startGame();\n winnerModal.style.display = 'none';\n })\n div.append(p);\n div.append(btn);\n document.querySelector('#winner').appendChild(div);\n }", "function dialogBox() {\n // init, and early sanity checking\n if (documents.length == 0) {\n alert(LANG_ERR_DOC);\n return;\n }\n var doc = app.activeDocument;\n var sel = doc.selection;\n if(sel.length <= 1) {\n alert('Please select more than one object!');\n return;\n }\n\n // create dialog\n var dialog = new Window('dialog', SCRIPT_NAME + ' ' + SCRIPT_VERSION);\n dialog.preferredSize.width = 174;\n dialog.orientation = 'column';\n dialog.alignChildren = ['fill', 'fill'];\n dialog.opacity = DLG_OPACITY;\n\n // Value fields\n var checkbox = dialog.add(\"checkbox\", undefined, 'Align by X (else by Y)?');\n checkbox.value = true;\n\n // Buttons\n var btns = dialog.add('group');\n btns.alignChildren = ['fill', 'fill'];\n btns.orientation = 'column';\n \n var ok = btns.add('button', undefined, 'OK', { name: 'ok' });\n ok.helpTip = 'Press Enter to Run';\n var cancel = btns.add('button', undefined, 'Cancel', { name: 'cancel' });\n cancel.helpTip = 'Press Esc to Close';\n\n // button handles\n ok.onClick = function () { main(checkbox.value); dialog.close(); }\n cancel.onClick = function () { dialog.close(); }\n\n dialog.center();\n dialog.show();\n}", "function ctt_popupbox() { ct_popupbox(\"err\", \"Test popup box. The quick brown fox jumps over the lazy dog. Something something that is really long. Sprinkles on kittens and raindrops on noses something idk. Test popup box. The quick brown fox jumps over the lazy dog. Something something that is really long. Sprinkles on kittens and raindrops on noses something idk. Test popup box. The quick brown fox jumps over the lazy dog. Something something that is really long. Sprinkles on kittens and raindrops on noses something idk.\") }", "function addPlayer() {\n\n\tfunction Char(pic, name, job, special_power){\n\tthis.pic = pic;\n\tthis.name = name;\n\tthis.job = job;\n\tthis.special_power = special_power;\n\t}\n\n\tvar playerName = prompt(\"What is your player's name?\");\n\tvar playerRole = prompt(\"What is your player's role?\");\n\tvar playerPower = prompt(\"What is your player's special power?\");\n\tvar specialPower = function(){return playerPower};\n\tvar playerPic = prompt(\"Please provide a url for your player's profile pic. If none available, write 'none'.\");\n\tif(playerPic ===\"none\"){\n\t\tplayerPic = 'http://www.artofhustle.com/wp-content/uploads/featured/default-avatar_150x150.jpg';\n\t}\n\n\tvar answer = prompt(\"Which side do you want to play for, Alliance or Empire?\");\n\tanswer = answer.toLowerCase();\n\n\tif(answer===\"alliance\"){\n\t\tvar allianceObject = new Char(playerPic, playerName, playerRole, specialPower);\n\t\tcharacters.push(allianceObject);\n\t\tprintAlliance(listCharacters(characters));\n\t}else{\n\t\tvar empireObject= new Char(playerPic,playerName, playerRole, specialPower);\n\t\tenemies.push(empireObject);\n\t\tprintEmpire(listCharacters(enemies));\t\n\t}\n\n}", "function renderQuestDialog(position, id){\n questDialog.classList.add(\"show\");\n questDialog.dataset.questid = id; \n questDialog.querySelector('#quest-dialog-name h4').innerHTML = position.name + `(${id})`; \n}", "function optionsClick(option) {\r\n \r\n if (option == 'center' || option == 'left') {\r\n\r\n //aling text\r\n editor.style.textAlign = option\r\n\r\n } else if (option == 'link') {\r\n\r\n //show/hide modal for add links\r\n const mainAside = document.getElementById('mainAside')\r\n\r\n if (mainAside.style.visibility == 'visible') {\r\n\r\n mainAside.style.visibility = 'hidden'\r\n triangle.style.visibility = 'hidden'\r\n\r\n } else {\r\n\r\n mainAside.style.visibility = 'visible'\r\n triangle.style.visibility = 'visible'\r\n triangle.style.top = '479.3px'\r\n\r\n }\r\n\r\n //hide modals open\r\n const imageAside = document.getElementById('image')\r\n\r\n imageAside.style.visibility = 'hidden'\r\n\r\n } else if (option == 'img') {\r\n\r\n //show/hide modal for add image\r\n const imageAside = document.getElementById('image')\r\n\r\n if (imageAside.style.visibility == 'visible') {\r\n\r\n imageAside.style.visibility = 'hidden'\r\n triangle.style.visibility = 'hidden'\r\n\r\n } else {\r\n\r\n imageAside.style.visibility = 'visible'\r\n imageAside.style.height = '150px'\r\n triangle.style.visibility = 'visible'\r\n triangle.style.top = '524px'\r\n\r\n }\r\n\r\n //hide modal opens\r\n const mainAside = document.getElementById('mainAside')\r\n\r\n mainAside.style.visibility = 'hidden'\r\n\r\n }\r\n\r\n}", "function updateItemDialogue(){\n if(currentItem === `acRemote`){\n generateDialogue(itemDialogue.acRemote_dialogues);\n currentdialogueNbr ++;\n currentItem = `acRemote`;\n }else if (currentItem === `ac`){\n generateDialogue(itemDialogue.Air_Conditioner_dialogues);\n currentdialogueNbr ++;\n currentItem = `ac`;\n }else if (currentItem === `penpen`){\n generateDialogue(itemDialogue.penPen_dialogues);\n currentdialogueNbr ++;\n currentItem = `penpen`;\n }else if (currentItem === `pictureBoard`){\n generateDialogue(itemDialogue.Pictures_Board_dialogues);\n currentdialogueNbr ++;\n currentItem = `pictureBoard`;\n }\n checkIfNextScene();\n}", "function confirmNewPet(){\n document.getElementById('BUYNEWPET').style.zIndex = \"-31\";\n \n i_stage.removeChild(f_pondDialogue5);\n f_chooseYes.x = 460; f_chooseYes.y = 166; f_chooseNo.x = 590; f_chooseNo.y = 166;\n f_chooseYes.onMouseOver = HoverHand; f_chooseYes.onMouseOut = HoverOff; f_chooseYes.onClick = function(){\n if(g_numberOfPets < 5){\n if(g_karma >= 2500){\n buyNewPet();\n \n }\n }else{\n if(g_sounds == 1) g_rejectedSound.play();\n i_stage.removeChild(f_chooseYes, f_chooseNo, f_pondDialogue4);\n i_stage.addChild(f_pondDialogue3);\n \n setTimeout(function(){\n i_stage.removeChild(f_pondDialogue3);\n i_stage.addChild(f_pondDialogue5);\n document.getElementById('BUYNEWPET').style.zIndex = \"31'\";\n }, 4500);\n }\n };\n f_chooseNo.onMouseOver = HoverHand; f_chooseNo.onMouseOut = HoverOff; f_chooseNo.onClick = function(){i_stage.removeChild(f_chooseYes,f_chooseNo, f_pondDialogue4); i_stage.addChild(f_pondDialogue5); document.getElementById('BUYNEWPET').style.zIndex = \"22\";};\n i_stage.addChild(f_pondDialogue4, f_chooseYes,f_chooseNo);\n\n \n}", "function advanceTalk(pic, text) //selects the avatar of who speaking and the dialogue that will be said.\n{\n\t//ai, \\'Hello, I am this ships onboard AI\\'\n\t\n\tif(advanceTalkCounter===1)\n\t{\n\t\tcharacterPic('ai');\n\t\ttextDisplay('Hello, I am this ships onboard AI');\n\t\tadvanceTalkCounter++;\n\t}\n\t\n\telse if(advanceTalkCounter===2)\n\t{\n\t\tcharacterPic(avatarPic);\n\t\ttextDisplay('How did i get here?');\n\t\tadvanceTalkCounter++;\n\t}\n\telse if(advanceTalkCounter===3)\n\t{\n\t\tcharacterPic('ai');\n\t\ttextDisplay('You were placed in stasis 300 years ago to perserve your body for your return to Earth');\n\t\tadvanceTalkCounter++;\n\t}\n\telse if(advanceTalkCounter===4)\n\t{\n\t\tcharacterPic('ai');\n\t\ttextDisplay('You were awoken when we reached the edge of the Milky Way.');\n\t\tadvanceTalkCounter++;\n\t}\n\telse if(advanceTalkCounter===5)\n\t{\n\t\tcharacterPic(avatarPic);\n\t\ttextDisplay('Why wasnt i awoken when we reached Earth?');\n\t\tadvanceTalkCounter++;\n\t}\n\telse if(advanceTalkCounter===6)\n\t{\n\t\tcharacterPic('ai');\n\t\ttextDisplay('Theres a problem with the ship, a hostile ship attacked us in the previous galaxy and a number of systems have been damaged.');\n\t\tadvanceTalkCounter++;\n\t}\n\telse if(advanceTalkCounter===7)\n\t{\n\t\tcharacterPic('ai');\n\t\ttextDisplay('You are going to need to beam down to a few planets to gather supplies to fix the ship.');\n\t\tadvanceTalkCounter++;\n\t}\n\telse if(advanceTalkCounter===8)\n\t{\n\t\tcharacterPic(avatarPic);\n\t\ttextDisplay('Gather parts, I don\\'t even remember what I\\'m doing on this ship');\n\t\tadvanceTalkCounter++;\n\t}\n\telse if(advanceTalkCounter===9)\n\t{\n\t\tcharacterPic('ai');\n\t\ttextDisplay('My access to that information is restricted, perhaps there is some data on one of the ships computer terminals');\n\t\tadvanceTalkCounter++;\n\t}\n\telse if(advanceTalkCounter===10)\n\t{\n\t\tcharacterPic('ai');\n\t\ttextDisplay('The ship has just arrived at Dakara. You will need to beam down and retrieve a new power core. The Dakarans will not part with one too easily, perhaps there is something you can find on the ship to trade with.');\n\t\tadvanceTalkCounter++;\n\t}\n\telse if(advanceTalkCounter===11)\n\t{\n\t\tcharacterPic(avatarPic);\n\t\ttextDisplay('On the planet how do I beam back up to the ship?');\n\t\tadvanceTalkCounter++;\n\t}\n\telse if(advanceTalkCounter===12)\n\t{\n\t\tcharacterPic('ai');\n\t\ttextDisplay('You will need to return to the location of where you where beamed down.');\n\t\tadvanceTalkCounter++;\n\t}\n\t\n\telse if(advanceTalkCounter===13)\n\t{\n\t\tcharacterPic('ai');\n\t\ttextDisplay('Good Luck');\n\t\tadvanceTalkCounter++;\n\t\tgameShip(); //start game on the ship\n\t\t\n\t}\n\t//number jump due to deleted dialogue\n\telse if(advanceTalkCounter===498)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\t//ship exploration dialogue\n\telse if(advanceTalkCounter===500)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('There is nothing of interest here');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===502)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('There is a computer in the center of the room, it\\'s files may be accessed.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===504)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Most of this computers files have been damaged the only ones i can access for you are about the ships journey');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===505)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('This ship was launched from earth 300 years ago with the goal of discovering inhabitable worlds outside our galaxy. This ship was one of many launched.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===506)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Each ship carried a crew of 500, Most were kept in stasis to carry out the mission when those awake passed away.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===507)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('For over 200 years the ships explored the galaxies around the Milky Way, by this time the crews of many ships were down to only 50 crew members in stasis.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===508)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('At this time we began to lose contact with the ships furthest out. For the next 50 years more and more ships dropped off the grid with no explanation.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===509)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Finally a ship got off a transmission before it dropped off, it warned of a great enemy whose technology far outpowered our own, and they seemed bent on total destruction.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===510)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Too far out to warn earth, our final five ships formed a convoy and headed toward earth.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===511)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('On the edge of the Pegasus Galaxy, they caught up to us. Two giant warships bearing down, we gave it all we could, we managed to destroy 1 but 4 of our ships were destroyed. In a desperate measure the remaining crew of this ship boarded fighters and commited a suicide run aganist the enemy');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===512)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('This ship was heavily damaged but they managed to destroy the enemy ship. You are the only crew member remaining, and without our long range communications you must get back to earth to warn them.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===514)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('There appears to be a crate of medicine in the corner. Perhaps this could be used as a trade with some locals.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\t\n\telse if(advanceTalkCounter===516)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('I can\\'t teleport off the ship from here. I need to be in the embarkation room.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===518)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('If I\\'m ready i can teleport to Dakara now.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===520)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('I suggest you explore the entire ship before you beam down to Dakara');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===521)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('This ship is very large, unfortunately you cant access most areas due to the damage.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===522)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Time is of the importance');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===523)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('I have nothing else to say currently');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\t//dakara dialogue\n\telse if(advanceTalkCounter===600)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Hello.... Anybody here?');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===601)\n\t{\n\t\tcharacterPic2('telc');\n\t\ttextDisplay2('Stop! Don\\'t come any closer, there is a great sickness here.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===602)\n\t{\n\t\tif(medicine===true)\n\t\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('I have medicine I\\'d be willing to trade.');\n\t\tadvanceTalkCounter++;\n\t\t}\n\t\telse\n\t\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Perhaps there is medicine on my ship.');\n\t\t}\n\t\t\n\t\t\n\t}\n\telse if(advanceTalkCounter===603)\n\t{\n\t\tcharacterPic2('telc');\n\t\ttextDisplay2('Trade for what?');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===604)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('I need a new power core for my ship, it was damaged in battle.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===605)\n\t{\n\t\tcharacterPic2('telc');\n\t\ttextDisplay2('The men in the ruins can help you. Tell them Tel\\'c sent you and that i approve the trade.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===606)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Thank you very much.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===607)\n\t{\n\t\tcharacterPic2('telc');\n\t\ttextDisplay2('If the enemy that attacked your ship is who think, it would be wise of you to talk to the priest in the temple.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===608)\n\t{\n\t\tcharacterPic2('telc');\n\t\ttextDisplay2('He has knowlege that may be interesting to you.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===609)\n\t{\n\t\tcharacterPic2('telc');\n\t\ttextDisplay2('Also you may want to seach around, we have lots of extra gold that people on other planets may be willing to trade for.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===612)\n\t{\n\t\tcharacterPic2('bratak');\n\t\ttextDisplay2('Hello. How can i help you?');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===613)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Tel\\'c told me you could tell me about the great enemy.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===614)\n\t{\n\t\tcharacterPic2('bratak');\n\t\ttextDisplay2('A long time ago the galaxies were ruled by a ferocious race called the Wraith. They dominated through fear, feasting on the populations of world for food.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===615)\n\t{\n\t\tcharacterPic2('bratak');\n\t\ttextDisplay2('They leave just enough of a worlds population alive to allow them to reproduce and move on to the next planet. Once the have attacked all the worlds they retreat back to outer galaxies and wait for the populations to get high enough again.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===616)\n\t{\n\t\tcharacterPic2('bratak');\n\t\ttextDisplay2('This cycle has gone on for thousands and thousands of years. But this is the first time the Wraith have ever made it to the Milky Way. There must not have enough food in the other galaxies to feed them');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===617)\n\t{\n\t\tcharacterPic2('bratak');\n\t\ttextDisplay2('If your planet can mount any sort of defense you should get back and warn them as soon as possible.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===618)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Thank you for everything.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===619)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===621)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('If I\\'m ready I can beam up to the ship');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===625)\n\t{\n\t\tcharacterPic2('daniel');\n\t\ttextDisplay2('Stop right there');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===626)\n\t{\n\t\tcharacterPic2('vala');\n\t\ttextDisplay2('Who are you?');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===627)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Whoah, don\\'t shoot! Teal\\'c told me I could come here to trade.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===628)\n\t{\n\t\tcharacterPic2('daniel2');\n\t\ttextDisplay2('What do you have to trade?');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===629)\n\t{\n\t\tcharacterPic2('vala');\n\t\ttextDisplay2('And for what?');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===630)\n\t{\n\t\tif(medicine===true)\n\t\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('I have medicine I\\'d be willing to trade.');\n\t\tadvanceTalkCounter++;\n\t\t}\n\t\telse\n\t\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Perhaps there is medicine on my ship.');\n\t\t}\n\t\t\n\t}\n\telse if(advanceTalkCounter===631)\n\t{\n\t\tcharacterPic2('vala');\n\t\ttextDisplay2('There is great sickness here, you couldn\\'t have come at a better time.');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===632)\n\t{\n\t\tcharacterPic2('daniel2');\n\t\ttextDisplay2('These power cores are very valuble, you better have alot of medicine.');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===633)\n\t{\n\t\tcharacterPic2('vala');\n\t\ttextDisplay2('Daniel cut it out, give him the power core, we need to get the medicine to the people.');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===634)\n\t{\n\t\tcharacterPic2('daniel2');\n\t\ttextDisplay2('Here you go, thank you for the medicine.');\n\t\tadvanceTalkCounter++;\n\t\tpowerCore=true;\n\t\t\n\t}\n\telse if(advanceTalkCounter===635)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Thank you. I hope your people recover quickly.');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===636)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===650)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('I already picked up the item from here');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===652)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('There appears to be a chest of gold here');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===690)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('I can\\'t teleport to the ship from here, i need to be in the village');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\t//transport back to ship and orilla dialogue\n\telse if(advanceTalkCounter===700)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Welcome back aboard, i see you have retrieved a new power core, bring it over to the console.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===701)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Next up on our part list is a new hyperdrive, the current one will probably only last for one more jump.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===702)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Luckily there is a planet that might be able to help that we should reach before the drive fails');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===703)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('I hope you found something on Dakara that you can use to trade with, because once we jump there is no coming back here.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===704)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('If you are ready to engage the hyperdrive go to the control room.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===705)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===707)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('If I\\'m ready i can teleport to Orilla now.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===710)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('The ship has arrived at Orilla. As I feared the hyperdrive has failed. If you can\\'t secure a new one, we\\'re not going anywhere.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===711)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('The indigenious population of Orilla are the Asgard, they are a highly advanced civilization.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===712)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('When you\\'re ready, beam down to the planet.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===714)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('You can\\'t engage the hyperdrive at this time.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===718)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('I can beam down to Orilla if I\\'m ready.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===720)\n\t{\n\t\tcharacterPic2('thor');\n\t\ttextDisplay2('Hello traveler, I am Thor of the Asgard. Welcome to Orilla');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===721)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('I need a new hyperdrive for my ship, I must get back to my planet to warn them of the coming Wraith attack.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===722)\n\t{\n\t\tcharacterPic2('thor');\n\t\ttextDisplay2('The wraith have never been a problem for us. As for the hyperdrive you must talk to the council about that.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===723)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Why have the Wraith never been a problem for you?');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===724)\n\t{\n\t\tcharacterPic2('thor');\n\t\ttextDisplay2('We are technologically superior to them. Past that I can\\'t tell you anymore, you would need to talk to the council.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===725)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Thank you, i will go to the council now.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\t\n\telse if(advanceTalkCounter===727)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Hello, I am a traveler who needs a new hyperdrive to reach my planet to warn them before the Wraith arrive.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===728)\n\t{\n\t\tcharacterPic2('archon');\n\t\ttextDisplay2('Yes, Thor told us you would be coming.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===729)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('So, are you willing to help?');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===730)\n\t{\n\t\tcharacterPic2('archon');\n\t\ttextDisplay2('That has not yet been decided.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===731)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Why not? I must warn my people!');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===732)\n\t{\n\t\tcharacterPic2('archon');\n\t\ttextDisplay2('The Asgard do not part with the technology lightly, our technological advantage is all that we have.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===731)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Why not? I must warn my people!');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===732)\n\t{\n\t\tcharacterPic2('archon');\n\t\ttextDisplay2('The Asgard do not part with the technology lightly, our technological advantage is all that we have.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===733)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Well while you think it over, can you tell me why you never worry about the Wraith?');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===734)\n\t{\n\t\tcharacterPic2('archon');\n\t\ttextDisplay2('The Asgard and the Wraith first met over 3 centuries ago. They outnumbered us 100 to 1. We tried to negotiate a truce, but all the wanted was war.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===735)\n\t{\n\t\tcharacterPic2('archon');\n\t\ttextDisplay2('In the inital years of the war things went very badly, our ships were more powerfull but the enemy numbers were too great.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===736)\n\t{\n\t\tcharacterPic2('archon');\n\t\ttextDisplay2('We had our fleet spread out trying to defend the galaxies from the Wraith.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===737)\n\t{\n\t\tcharacterPic2('archon');\n\t\ttextDisplay2('A single Asgard ship was a match for five Wraith ships. But because we tried defending so many planets we could only spare one to ships per planet.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===738)\n\t{\n\t\tcharacterPic2('archon');\n\t\ttextDisplay2('The wraith would send ten ships to every planet we defended. There was nothing we could do. We were losing ships and the war rapidly.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===739)\n\t{\n\t\tcharacterPic2('archon');\n\t\ttextDisplay2('We made the only decision we could, we fell back to our five core worlds. We developed advanced defense satelites and even more power ships.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===740)\n\t{\n\t\tcharacterPic2('archon');\n\t\ttextDisplay2('When the Wraith came for us, we were ready. The battle lasted months, at the end, we had destroyed over 1,000 wraith ships, and suffered no major casualties.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===741)\n\t{\n\t\tcharacterPic2('archon');\n\t\ttextDisplay2('The Wraith came again and again for over 100 years before deciding we weren\\'t worth it. We have lived free of fear from the wraith for over a century now.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===742)\n\t{\n\t\tcharacterPic2('archon');\n\t\ttextDisplay2('So you see, even if you could defend againist the first wave you never could never win. ');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===743)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Then help us, send ships and some satelites and help defend Earth! ');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===744)\n\t{\n\t\tcharacterPic2('archon');\n\t\ttextDisplay2('That is a decision the entire council must make, if we decide to help our ships will arrive at earth when they are needed. ');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===745)\n\t{\n\t\tcharacterPic2('archon');\n\t\ttextDisplay2('For now, you may purchase a hyperdrive from us. Go to the shipyard and talk to Loki, we will let him know your\\'e coming. ');\n\t\tadvanceTalkCounter++;\n\t\tcouncilApprove=true;\n\t\tcouncilTalk=true;\n\t}\n\telse if(advanceTalkCounter===746)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===748)\n\t{\n\t\tcharacterPic2('archon');\n\t\ttextDisplay2('We have not reached a decision yet.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===749)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===751)\n\t{\n\t\tcharacterPic2('loki');\n\t\ttextDisplay2('I can\\'t sell you a hyperdrive without the council\\'s approval.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===752)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===754)\n\t{\n\t\tcharacterPic2('loki');\n\t\ttextDisplay2('The council has approved the purchase of a new hyperdrive. You better have the gold to pay for it, otherwise you will be stranded here forever.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===755)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\tif((goldChest || goldChest2) === true)\n\t\t{\n\t\ttextDisplay2('Yes i have the money to pay for it');\n\t\tadvanceTalkCounter++;\n\t\t}\n\t\telse\n\t\t{\n\t\ttextDisplay2('Shit! Well I guess im trapped here, what\\'s good to eat?');\n\t\t}\n\t\t\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===756)\n\t{\n\t\tcharacterPic2('loki');\n\t\ttextDisplay2('Good here you go.');\n\t\tnewhyperdrive=true;\n\t\tif((goldChest && goldChest2)===true)\n\t\t{\n\t\t goldChest=false;\n\t\t}\n\t\telse if(goldChest === false && goldChest2===true)\n\t\t{\n\t\t goldChest2=false;\n\t\t}\n\t\telse if(goldChest === true && goldChest2===false)\n\t\t{\n\t\t goldChest=false;\n\t\t}\n\t\tadvanceTalkCounter++;\n\t\t\t\t\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===757)\n\t{\n\t\tcharacterPic2('loki');\n\t\ttextDisplay2('If you have any more gold, i could be sell you advanced Asgard Beam Weapons for your ship if you don\\'t tell anyone.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===758)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\tif((goldChest || goldChest2)===true)\n\t\t{\n\t\ttextDisplay2('I have more gold, please sell me the weapon system.');\n\t\tasgardWeapons=true;\n\t\t}\n\t\telse\n\t\t{\n\t\ttextDisplay2('Sorry, no more gold. Thanks for the offer though.');\n\t\t}\n\t\tadvanceTalkCounter++;\n\t\t\t\t\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===759)\n\t{\n\t\tcharacterPic2('loki');\n\t\tif(asgardWeapons===true)\n\t\t{\n\t\ttextDisplay2('Here you go.');\n\t\t}\n\t\telse\n\t\t{\n\t\ttextDisplay2('Oh well, have a good one.');\n\t\t}\n\t\tadvanceTalkCounter++;\n\t\t\t\t\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===760)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===790)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('I can\\'t beam to the ship from here, i need to be in the city.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\t//transport back to ship and abydos dialogue\n\telse if(advanceTalkCounter===800)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Welcome back aboard, i see you have retrieved a new hyperdrive, bring it over to the console.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===801)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('The air filtration system failed while you were dwon on Orilla, without a new one I fear you will not survive the journey to earth.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===802)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Luckily there is a planet nearby that should have what we need to repair it.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===803)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('These people are very simple, they will not have it to trade for, you will need to search for it yourself. Luckily you don\\'t need to find anything to trade with on Orilla.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===804)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('If you are ready to engage the hyperdrive go to the control room.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===805)\n\t{\n\t\tif(asgardWeapons===true)\n\t\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('I see you have also aquired some asgard weaponry, hopefully we won\\'t need it.');\n\t\t}\n\t\telse if(asgardWeapons===false)\n\t\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('');\n\t\t}\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===806)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\t\n\telse if(advanceTalkCounter===810)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('The ship has arrived at Abydos. The air in here is becoming quickly toxic. If you can\\'t secure what we need to repair the filtration system you will not survive.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===811)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('The indigenious population of Abydos are very simple people.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===812)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('When you\\'re ready, beam down to the planet.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===815)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Hello. Anybody here?');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===816)\n\t{\n\t\tcharacterPic2('shauri');\n\t\ttextDisplay2('Hello, I am Shauri. We have not had visotrs in quite some time');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===817)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('I need to find parts to fix my ships air filtration system. Can you help me?');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===818)\n\t{\n\t\tcharacterPic2('shauri');\n\t\ttextDisplay2('Honestly I\\'m not sure. We are a simple people, our technology is not that advanced. But many ships have crash landed here over the years, perhaps you can find what you need by searching around.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===819)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Thank you. Also, can you tell me anything about the Wraith?');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===820)\n\t{\n\t\tcharacterPic2('shauri');\n\t\ttextDisplay2('Wraith? I\\'ve never heard of them. Maybe you can ask Kasuf in the city, he is very wise and is always willing to trade information.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===821)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Thank you, I\\'ll be sure to talk to him.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===823)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Kasuf, are you here?.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===824)\n\t{\n\t\tcharacterPic2('kasuf');\n\t\ttextDisplay2('I am Kasuf, what can i do for you.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===825)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('I was wondering if you could tell me more about the Wraith?');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===826)\n\t{\n\t\tcharacterPic2('kasuf');\n\t\ttextDisplay2('No one has asked me about the Wraith in a very long time.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===827)\n\t{\n\t\tcharacterPic2('kasuf');\n\t\ttextDisplay2('If you bring me an artifact, I will tell you what I can.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===828)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\tif(artifact===true)\n\t\t{\n\t\t\ttextDisplay2('I found an artifact in the ruins, will this work?.');\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttextDisplay2('I will go try and find one.');\n\t\t}\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===829)\n\t{\n\t\t\n\t\tif(artifact===true)\n\t\t{\n\t\t characterPic2('kasuf');\n\t\t textDisplay2('That will go great in my collection. I will tell you what I know.');\n\t\t advanceTalkCounter++;\n\t\t}\n\t\telse\n\t\t{\n\t\t characterPic2(avatarPic);\n\t\t textDisplay2('');\n\t\t}\n\t\t\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===830)\n\t{\n\t\tcharacterPic2('kasuf');\n\t\ttextDisplay2('The wraith have been the dominate force in the universe for as long as anyone can remember. They have never ventured this far into the universe before but i have heard pleantly of stories from those in other galaxies.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===831)\n\t{\n\t\tcharacterPic2('kasuf');\n\t\ttextDisplay2('When they reach a planet they bomb it from orbit destroying all military infrastructure. Then the begin to cull the population, bringing them up to their ships to feast on later.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===832)\n\t{\n\t\tcharacterPic2('kasuf');\n\t\ttextDisplay2('There numbers are so large that there are only rumors of those that can oppose them.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===833)\n\t{\n\t\tcharacterPic2('kasuf');\n\t\ttextDisplay2('If they never visited your planet before, perhaps if you destroy their ship before they can send a single to their fleet you may be able to stop anymore ships from coming..');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===834)\n\t{\n\t\tcharacterPic2('kasuf');\n\t\ttextDisplay2('I have heard stories of a few planets that managed to survive like this. Perhaps it can work for yuor planet as well.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===835)\n\t{\n\t\tcharacterPic2('kasuf');\n\t\ttextDisplay2('That\\'s all I have to say on the matter, I hope I have been of some help.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===836)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Thank you, you have been very helpful');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===837)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===839)\n\t{\n\t\tcharacterPic2('scara');\n\t\ttextDisplay2('Hello stranger, my name is Scara.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===840)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Hello, is there anything of interest here?');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===841)\n\t{\n\t\tcharacterPic2('scara');\n\t\ttextDisplay2('If you search around you could probably find an artifact or two.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===842)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Thank you');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===843)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\t\n\telse if(advanceTalkCounter===852)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('There appears to be the parts to fix the air filter.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===854)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('There appears to be an artifact here.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===890)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('I can\\'t beam to the ship from here, i need to be in the pyramid.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\t//return to ship and battle dialogue\n\telse if(advanceTalkCounter===900)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Welcome back aboard, i see you have retrieved the parts to fix the air filtration system.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===901)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('It\\'s a good thing too. The oxygen levels are dangeriously low, so go repair it.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===902)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Good, now that it is fixed, we can travel to earth. With even a little luck, we will reach earth to warn them before the Wraith arrive.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===903)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('When you are ready, go to the control room and engage the hyperdrive.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===904)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===906)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Wait. The sensors have detected another ship in orbit.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===907)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('It\\'s the Wraith! They opened fire, they\\'re targeting the hyperdrive, it\\'s offline, we can\\'t make the jump yet.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===908)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('They\\'ve stopped firing, we\\'re recieving a communication.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===909)\n\t{\n\t\tpicSwitcher('hiveShip');\n\t\tcharacterPic2('wraith');\n\t\ttextDisplay2('Prepare to die.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===910)\n\t{\n\t\tpicSwitcher('shipControlRoom');\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Quick, activate the weapons system.');\n\t\tadvanceTalkCounter++;\n\t\tbattle=true;\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===916)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('There is no need to activate the weapon system at this time.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===917)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('');\n\t\t\t\t\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===918)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Ship Health: '+shipHealth +' '+' '+' '+ ' You have selected to divert power to the shields. Ship health increased by 40.');\n\t\tadvanceTalkCounter=923;\n\t\t\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===920)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Weapon system engaged. Select weapon to engage.');\n\t\t\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===922)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Ship Health: '+shipHealth +' '+' '+' '+' You have selected to engage the: '+weaponSelect+'. Engaging now.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===923)\n\t{\n\t\tif(wraithHealth>0)\n\t\t{\n\t\t var randomnumber=Math.floor(Math.random()*11) \n\t\t if(randomnumber<=6) //adjust this number to increase/decrease difficulty of the battle. Higher the number the easier it will be\n\t\t {\n\t\t picSwitcher('hiveFiring');\n\t\t characterPic2('ai');\n\t\t textDisplay2('The wraith ship has fired again. Our ship has suffered 25 damage.');\n\t\t shipHealth-=25;\t\n\t\t advanceTalkCounter=920;\n\t\t weaponFired=false;\n\t\t gameOver();\n\t\t }\n\t\t else\n\t\t {\n\t\t picSwitcher('hiveRegenerating');\n\t\t characterPic2('ai');\n\t\t textDisplay2('The wraith ship is diverting power to hull regeneration, it\\'s health has gone up.');\n\t\t wraithHealth+=25;\t\n\t\t advanceTalkCounter=920;\n\t\t weaponFired=false;\n\t\t gameOver();\n\t\t }\n\t\t}\n\t\telse\n\t\t{\n\t\t advanceTalkCounter=930;\n\t\t advanceTalk();\n\t\t}\n\t}\n\telse if(advanceTalkCounter===925)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Cannot fire again yet. Click next to see what the Wraith do.');\n\t\tadvanceTalkCounter=923;\n\t\t\n\t}\n\telse if(advanceTalkCounter===930)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('The Wraith ship has been destroyed! The hyperdrive is back online, when your ready we can finally go to Earth.');\n\t\tadvanceTalkCounter++;\n\t\tbuttonWeaponSystem_ControlRoom.style.display='none'\n\t\tbuttonStart_ControlRoom.style.display='block'\n\t\t\n\t}\n\telse if(advanceTalkCounter===931)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('');\n\t\tadvanceTalkCounter++;\n\t\tbuttonWeaponSystem_ControlRoom.style.display='none'\n\t\tbuttonStart_ControlRoom.style.display='block'\n\t\t\n\t}\n\t\n\t//end game dialogue\n\telse if(advanceTalkCounter===935)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('The ship has arrived at earth, I will open a communication channel with them.');\n\t\tadvanceTalkCounter+=2;\n\t\tbuttonWeaponSystem_ControlRoom.style.display='none'\n\t\tbuttonStart_ControlRoom.style.display='none'\n\t\tpicSwitcher('earth');\n\t\t\n\t}\n\telse if(advanceTalkCounter===937)\n\t{\n\t\tcharacterPic2('hammond');\n\t\ttextDisplay2('Hello I am General Hammond, our sensors tell us that this is an Earth vessel from the exploaritory expedition. We would like to debrief your crew as soon as possible, are any more ships returning.');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===938)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('General Hammond Sir, I am the only crew member left aboard this ship, and no other ships are coming, they have all been destroyed.');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===939)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('They were destroyed by a powerful enemy called the Wraith. The Wraith are on their way here right now, you need to deploy any forces you have.');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===940)\n\t{\n\t\tcharacterPic2('hammond');\n\t\ttextDisplay2('We only have a few ships left but we\\'ll put up one hell of a fight.');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===941)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Good the Wraith will probably be here soon.');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===942)\n\t{\n\t\tpicSwitcher('wraithFleet');\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('Our sensors have detected the Wraith fleet emerging from hyperspace.');\n\t\tadvanceTalkCounter+=2;\n\t\t\n\t}\n\telse if(advanceTalkCounter===944)\n\t{\n\t\tcharacterPic2('hammond');\n\t\ttextDisplay2('Our ships are ready for battle. Good luck everyone');\n\t\tpicSwitcher('earthFleet');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===945)\n\t{\n\t\t\n\t\tpicSwitcher('battle1');\n\t\tcharacterPic2('caldwell');\n\t\ttextDisplay2('Engaging hostile vessels. Firing missiles.');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===946)\n\t{\n\t\t\n\t\tpicSwitcher('battle2');\n\t\tcharacterPic2('caldwell');\n\t\ttextDisplay2('Minimal effect. Switch to beam weapons.');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===947)\n\t{\n\t\t\n\t\tpicSwitcher('battle3');\n\t\tcharacterPic2('ellis');\n\t\ttextDisplay2('Firing beam weapons, direct hit.');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}else if(advanceTalkCounter===948)\n\t{\n\t\t\n\t\tpicSwitcher('battle4');\n\t\tcharacterPic2('ellis');\n\t\ttextDisplay2('That\\'s a kill!.');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===949)\n\t{\n\t\t\n\t\tpicSwitcher('battle5');\n\t\tcharacterPic2('caldwell');\n\t\ttextDisplay2('Three hives firing on us. Shields are failing. We\\'re not going to make it!');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===950)\n\t{\n\t\tcharacterPic2('hammond');\n\t\ttextDisplay2('Their forces are too many, we\\'ve lost contact with half our fleet. Their ships are attacking the planet!');\n\t\tpicSwitcher('wraithEarth');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===951)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('I\\'m detecting another fleet entering orbit');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===952)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('It\\'s the Asgard');\n\t\tadvanceTalkCounter++;\n\t\tpicSwitcher('asgardFleet');\n\t\t\n\t}\n\telse if(advanceTalkCounter===953)\n\t{\n\t\tcharacterPic2('thor');\n\t\ttextDisplay2('Hello friend, the Asgard high council approved a mission to protect Earth.');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===954)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Thor! It\\'s great to see you. I don\\'t think we would\\'ve lasted much longer.');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\telse if(advanceTalkCounter===955)\n\t{\n\t\tcharacterPic2('thor');\n\t\ttextDisplay2('The enemy fleet is in full retreat, I seriously doubt they will return.');\n\t\tadvanceTalkCounter++;\n\t\tpicSwitcher('asgardMeeting');\n\t\t\n\t}\n\telse if(advanceTalkCounter===956)\n\t{\n\t\tcharacterPic2('thor');\n\t\ttextDisplay2('General Hammond, you owe the survival of your planet to...');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===957)\n\t{\n\t\tcharacterPic2('thor');\n\t\ttextDisplay2('I just realized I never got your name.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===958)\n\t{\n\t\tcharacterPic2('thor');\n\t\ttextDisplay2('What\\'s your name?');\n\t\tadvanceTalkCounter++;\n\t\tnameDiv.style.display='block'\n\t\tnameBox.style.display='block'\n\t\tnameButton.style.display='block'\n\t\tgetName();\t\t\n\t}\n else if(advanceTalkCounter===959)\n\t{\n\t\tcharacterPic2('thor');\n\t\ttextDisplay2('Well '+name+', thank you once again, I hope we see each other again.');\n\t\tadvanceTalkCounter++;\n\t\tnameDiv.style.display='none'\t\t\n\t}\n\telse if(advanceTalkCounter===960)\n\t{\n\t\tcharacterPic2('hammond');\n\t\ttextDisplay2(name+' you will be greatly rewarded.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===961)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Thank you sir, glad to have helped.');\n\t\tadvanceTalkCounter++;\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===962)\n\t{\n\t\tcharacterPic2(avatarPic);\n\t\ttextDisplay2('Congrationaltions you have won! Thanks for playing');\n\t\tpicSwitcher('victory');\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===980)\n\t{\n\t\tcharacterPic2('ai');\n\t\ttextDisplay2('That weapon system is not installed on the ship.');\n\t\t\n\t\t\t\t\n\t}\n\telse if(advanceTalkCounter===1000)\n\t{\n\t\tcharacterPic2('wraith');\n\t\ttextDisplay2('Your ship has been destroyed. You Lose. To try again, refresh the page.');\n\t\tadvanceTalkCounter++;\n\t\t\n\t}\n\t\n}", "function final() {\n character.say(\"Good, thank you!\")\n var win = Scene.createTextBillboard(0, 5, 3);\n win.setText(\"Awesome job!\");\n }", "function interactOrSelect() {\n var item = null;\n var targetSquare = null;\n switch (playerDirection) {\n case \"up\":\n targetSquare = mapLocations[currentLocation][0][playerY - 1][playerX];\n break;\n case \"down\":\n targetSquare = mapLocations[currentLocation][0][playerY + 1][playerX];\n break;\n case \"left\":\n targetSquare = mapLocations[currentLocation][0][playerY][playerX - 1];\n break;\n case \"right\":\n targetSquare = mapLocations[currentLocation][0][playerY][playerX + 1];\n break;\n default:\n }\n if (targetSquare.toString()[0] === \"2\") { \n // Static, interactive objects\n item = staticObjects[currentLocation][parseInt(targetSquare.toString()[1])];\n showText(item.text);\n playerState = \"locked\"\n clearInterval(moveInterval);\n walkingAnimation(playerDirection);\n } else if (targetSquare.toString()[0] === \"6\") {\n // NPCs\n playerState = \"locked\"\n clearInterval(moveInterval);\n walkingAnimation(playerDirection);\n item = allNPCs[currentLocation][parseInt(targetSquare.toString()[1])];\n if (item.healer && myPokemon.currentHP < myPokemon.maxHP) {\n myPokemon.currentHP = myPokemon.maxHP;\n showText(item.name + \": Here's some chocolate for your injured Pokemon. There you go, all better!\");\n } else if (item.trainer) {\n enemyTrainer = item;\n showText(enemyTrainer.dialog);\n var trainerType = (enemyTrainer.finalFour) ? \"finalFourFight\" : \"normalTrainerFight\";\n changeMusic(\"\", trainerType);\n $(document).off();\n setTimeout(function() { enterFightMode(\"trainer\"); }, 1000);\n } else {\n showText(item.dialog);\n }\n } else if (targetSquare.toString()[0] === \"7\") {\n // Claimable items. Only pokemon at this point.\n var itemId = parseInt(targetSquare.toString()[1]);\n item = claimableObjects[currentLocation][itemId];\n if (item.status === \"locked\") {\n showText(\"You already took a Pokemon.\");\n } else if (item.confirmText) {\n // This item requires confirmation before being taken\n showText(item.confirmText);\n $(\"#confirm-box\").show();\n $(\"#yes\").attr(\"data-value\", itemId);\n chooseMenuItem(document.getElementById(\"confirm-options\").children, takeItem);\n } else {\n // No confirmation needed, so pass the item ID to takeItem()\n takeItem(itemId); \n }\n }\n}", "function showDialogBoxSymptoms() {\n let itemMainSymptome = showDialogBoxSymptomsLayout();\n document.getElementById(\"dialogBox\").innerHTML = itemMainSymptome;\n document.getElementById(\"dialogBox\").style.display = \"block\";\n}", "function generateDialogue(dialogueData){\n\n for(let i = 0; i < dialogueData.length; i++){\n\n //changes text color depending on character\n //this part should be simplified\n if(dialogueData[i].chara === \"Haru\"){\n tColor = color('yellow');\n }else if(dialogueData[i].chara === \"Soga\"){\n tColor = color('red');\n }else if(dialogueData[i].chara === \"Ishi\"){\n tColor = color('green');\n }else if(dialogueData[i].chara === \"Niimi\"){\n tColor = color('purple');\n }else if(dialogueData[i].chara === \"Inspection\"){\n tColor = color('white');\n }else{\n tColor = color('white');\n }\n\n //reads which character dialogue sprite to display\n //..maybe should've simplified the repetition here\n if(dialogueData[i].sprite ===\"haru1\"){\n img[i] = chr_haru_1;\n }else if(dialogueData[i].sprite ===\"haru2\"){\n img[i] = chr_haru_2;\n }else if(dialogueData[i].sprite ===\"haru3\"){\n img[i] = chr_haru_3;\n }else if(dialogueData[i].sprite ===\"soga1\"){\n img[i] = chr_soga_1;\n }else if(dialogueData[i].sprite ===\"ishi1\"){\n img[i] = chr_ishi_1;\n }else if(dialogueData[i].sprite ===\"ishi2\"){\n img[i] = chr_ishi_2;\n }else if(dialogueData[i].sprite ===\"ishi3\"){\n img[i] = chr_ishi_3;\n }else if(dialogueData[i].sprite ===\"niimi1\"){\n img[i] = chr_niimi_1;\n }else{\n\n }\n let dialogue = createDialogue(dialogueData[i].chara,img,tColor,dialogueData[i].sentence);\n dialogues.push(dialogue);\n }\n\n //check if at the end of dialogues\n if(currentdialogueNbr >= dialogueData.length){\n currentdialogueNbr = 0;\n dialogues = [];\n\n //scene1 cutscene > inspection\n if(currentScene === `scene1`){\n currentState = `inspection`;\n }\n if (currentState === `inspection`){\n if (currentItem ===`acRemote`){\n itemChecklist.acRemote_Checked = true;\n itemChecklist.scene1Checklist ++;\n }else if (currentItem ===`ac`){\n itemChecklist.ac_Checked = true;\n itemChecklist.scene1Checklist ++;\n }else if (currentItem ===`penpen`){\n itemChecklist.penpen_Checked = true;\n itemChecklist.scene1Checklist ++;\n }else if (currentItem ===`pictureBoard`){\n itemChecklist.pictureBoard_Checked = true;\n itemChecklist.scene1Checklist ++;\n }\n currentItem = '';\n inItemDialogue = false;\n //updates the display of the number of items investigated\n displayItemsLeft(itemChecklist.scene1Checklist);\n }\n\n // scene1 breaking the remote part\n if (currentScene ===`scene1Transition_1`){\n currentScene = `scene1Transition_2`;\n displayScene1();\n }else if (currentScene === `scene1Transition_2`){\n currentScene = `scene2`;\n displayScene2();\n }\n\n }\n\n displaydialogue();\n}", "function resurrect_window() {\n\t// $(\"#promotion_window\").dialog({\n // modal: true,\n // width: 600,\n // autoOpen: true,\n // resizable: false,\n // dialogClass: \"promotion\",\n // buttons: [\n // {\n\n // \"id\": \"bansidh_button\",\n // click: function(){\n // resurrect('B');\n // $(\".zap_window\").fadeOut();\n // $(\"#promotion_window\").fadeOut();\n // $(\".overlay\").fadeOut();\n // }\n // },\n // {\n\n // \"id\": \"clansman_button\",\n // click: function(){\n // resurrect('P');\n // $(\".zap_window\").fadeOut();\n // $(\"#promotion_window\").fadeOut();\n // $(\".overlay\").fadeOut();\n // }\n // },\n // {\n\n // \"id\": \"champion_button\",\n // click: function(){\n // resurrect('C');\n // $(\".zap_window\").fadeOut();\n // $(\"#promotion_window\").fadeOut();\n // $(\".overlay\").fadeOut();\n // }\n // },\n // {\n\n // \"id\": \"leapingchieftain_button\",\n // click: function(){\n // resurrect('L');\n // $(\".zap_window\").fadeOut();\n // $(\"#promotion_window\").fadeOut();\n // $(\".overlay\").fadeOut();\n // }\n // },\n // {\n\n // \"id\": \"squarechieftain_button\",\n // click: function(){\n // resurrect('R');\n // $(\".zap_window\").fadeOut();\n // $(\"#promotion_window\").fadeOut();\n // $(\".overlay\").fadeOut();\n // }\n // },\n // {\n\n // \"id\": \"diagonalchieftain_button\",\n // click: function(){\n // resurrect('D');\n // $(\".zap_window\").fadeOut();\n // $(\"#promotion_window\").fadeOut();\n // $(\".overlay\").fadeOut();\n // }\n // }]\n\n // });\n\n // $(\".overlay\").fadeIn();\n $(\".zap_window\").fadeOut();\n $(\"#resurrection_window\").fadeIn();\n\n}", "function createInitialArena(humanPlayers, AIs) {\n if (humanPlayers + AIs > 4){\n console.log(\"More than 4 players WTH!!!\");\n }\n \n \n var player1 = new Player({cx: 40*1, cy: 40*1, width: 36, height: 36,\n keyUp: 'W'.charCodeAt(0), \n keyDown: 'S'.charCodeAt(0), \n keyLeft: 'A'.charCodeAt(0), \n keyRight: 'D'.charCodeAt(0),\n keyPutBomb: ' '.charCodeAt(0),\n commandObject: keys\n });\n \n var player2 = new Player({cx: 40*13, cy: 40*1, width: 36, height: 36,\n keyUp: 'I'.charCodeAt(0), \n keyDown: 'K'.charCodeAt(0), \n keyLeft: 'J'.charCodeAt(0), \n keyRight: 'L'.charCodeAt(0),\n keyPutBomb: 'O'.charCodeAt(0),\n commandObject: keys \n });\n \n var player3 = new Player({cx: 40*1, cy: 40*13, width: 36, height: 36,\n keyUp: 38, // up arrow\n keyDown: 40, // down arrow\n keyLeft: 37, // left arrow\n keyRight: 39, // right arrow\n keyPutBomb: 13, // enter\n commandObject: keys \n });\n \n var player4 = new Player({cx: 40*13, cy: 40*13, width: 36, height: 36,\n keyUp: 38, // up arrow\n keyDown: 40, // down arrow\n keyLeft: 37, // left arrow\n keyRight: 39, // right arrow\n keyPutBomb: 13, // enter\n commandObject: keys \n });\n \n \n \n \n // Create AI players and command objects\n g_aiCommands.ai1 = {};\n var aiPlayer1 = new Player({cx: 40*1, cy: 40*1, width: 36, height: 36,\n keyUp: consts.CONTROLS.UP, keyDown: consts.CONTROLS.DOWN, \n keyLeft: consts.CONTROLS.LEFT, keyRight: consts.CONTROLS.RIGHT,\n keyPutBomb: consts.CONTROLS.PUT_BOMB,\n commandObject: g_aiCommands.ai1\n });\n \n g_aiCommands.ai2 = {};\n var aiPlayer2 = new Player({cx: 40*13, cy: 40*1, width: 36, height: 36,\n keyUp: consts.CONTROLS.UP, keyDown: consts.CONTROLS.DOWN, \n keyLeft: consts.CONTROLS.LEFT, keyRight: consts.CONTROLS.RIGHT,\n keyPutBomb: consts.CONTROLS.PUT_BOMB,\n commandObject: g_aiCommands.ai2\n });\n \n g_aiCommands.ai3 = {};\n var aiPlayer3 = new Player({cx: 40*1, cy: 40*13, width: 36, height: 36,\n keyUp: consts.CONTROLS.UP, keyDown: consts.CONTROLS.DOWN, \n keyLeft: consts.CONTROLS.LEFT, keyRight: consts.CONTROLS.RIGHT,\n keyPutBomb: consts.CONTROLS.PUT_BOMB,\n commandObject: g_aiCommands.ai3\n });\n \n g_aiCommands.ai4 = {};\n var aiPlayer4 = new Player({cx: 40*13, cy: 40*13, width: 36, height: 36,\n keyUp: consts.CONTROLS.UP, keyDown: consts.CONTROLS.DOWN, \n keyLeft: consts.CONTROLS.LEFT, keyRight: consts.CONTROLS.RIGHT,\n keyPutBomb: consts.CONTROLS.PUT_BOMB,\n commandObject: g_aiCommands.ai4\n });\n \n var players = []; //\n var ai1added = false;\n var ai2added = false;\n var ai3added = false;\n var ai4added = false;\n \n // Fill in slots 1, 4, 2 and 3 in that order\n // Determine slot 1\n if(humanPlayers > 0){\n players.push(player1);\n humanPlayers--;\n }else if(AIs > 0 ){\n players.push(aiPlayer1);\n AIs--;\n ai1added = true;\n }\n \n // Determine slot 4\n if(humanPlayers > 0){\n players.push(player4);\n humanPlayers--;\n }else if(AIs > 0 ){\n players.push(aiPlayer4);\n AIs--;\n ai4added = true;\n }\n \n // Determine slot 2\n if(humanPlayers > 0){\n players.push(player2);\n humanPlayers--;\n }else if(AIs > 0 ){\n players.push(aiPlayer2);\n AIs--;\n ai2added = true;\n }\n \n // Determine slot 3\n if(humanPlayers > 0){\n players.push(player3);\n humanPlayers--;\n }else if(AIs > 0 ){\n players.push(aiPlayer3);\n AIs--;\n ai3added = true;\n }\n \n \n // Initialize arena\n var arena = new Arena(players);\n \n // create Ais for ai players\n var p1Ai = new AI(arena, aiPlayer1, g_aiCommands.ai1);\n var p2Ai = new AI(arena, aiPlayer2, g_aiCommands.ai2);\n var p3Ai = new AI(arena, aiPlayer3, g_aiCommands.ai3);\n var p4Ai = new AI(arena, aiPlayer4, g_aiCommands.ai4);\n \n // add AIs to the entity manager\n if(ai1added){\n entityManager.addAi(p1Ai);\n }\n if(ai2added){\n entityManager.addAi(p2Ai);\n }\n if(ai3added){\n entityManager.addAi(p3Ai);\n }\n if(ai4added){\n entityManager.addAi(p4Ai);\n }\n \n // Set the newly created arena as the default arena\n entityManager.setDefaultArena(arena);\n \n}", "function createWindow(inputSide, inputWindName, inputDistance, inputWidth, formWindow) {\n let heightWind1 = 10;\n let wind1;\n let roomSize = canvas._objects.find(x => x.type == \"room\");\n\n if (inputSide.value.toLowerCase() === \"d\") {\n swal(\"Side Validation\", \"You must enter a Side\", \"error\");\n }\n\n\n if (inputSide.value.toLowerCase() === \"n\") {\n let topRoom = 100;\n let leftRoom = 100;\n\n wind1 = new fabric.Rect({\n name: inputWindName.value,\n type: \"window\",\n side: inputSide.value.toLowerCase(),\n left: leftRoom + parseInt(inputDistance.value),\n distance: parseInt(inputDistance.value),\n top: topRoom - heightWind1 / 2,\n fill: 'transparent',\n stroke: 'blue',\n strokeWidth: 1,\n strokeUniform: true,\n width: parseInt(inputWidth.value),\n height: heightWind1,\n //angle: 90, solo para paredes E y O\n selectable: false\n });\n\n let seSolapa = false;\n\n var dataName = inputWindName.value;\n var dataDistance = inputDistance.value;\n var dataWidth = inputWidth.value;\n\n // Expresiones regulares para validacion\n var exp = /[A-Za-z0-9]/;\n var exp1 = /[0-9]/;\n\n\n //Límites ancho: \n if ((wind1.width + parseInt(inputDistance.value)) > rect.width) {\n\n swal(\"Overlap Error\", \"The object entered overlaps with the previous\", \"error\");\n\n }\n\n else if ((inputWindName.value == \"\")) {\n swal(\"Name Validation\", \"You must enter a Name for the Window\", \"error\");\n }\n\n // Name Validations\n else if (!exp.test(dataName)) {\n swal(\"Name Validation\", \"Special characters are not allowed in the name\", \"error\");\n }\n\n\n // Width Validations\n\n\n else if (!exp1.test(dataWidth)) {\n swal(\"Width Validation\", \"The Special Caharcters/Letters are not allowed in the Width\", \"error\");\n }\n\n else if ((inputWidth.value == \"\")) {\n swal(\"Width Validation\", \"You must enter a Width for the Window\", \"error\");\n }\n\n else if ((inputWidth.value <= 0)) {\n swal(\"Width Validation\", \"Negative values and zero are not allowed\", \"error\");\n }\n\n\n // Distance Validations\n\n else if ((inputDistance.value == \"\")) {\n swal(\"Distance Validation\", \"You must enter a Distance for the Window\", \"error\");\n }\n\n else if (!exp1.test(dataDistance)) {\n swal(\"Distance Validation\", \"The Special Caharcters/Letters are not allowed in the Distance\", \"error\");\n }\n\n else if ((inputDistance.value <= 0)) {\n swal(\"Distance Validation\", \"Negative values and zero are not allowed\", \"error\");\n }\n\n\n else {\n\n //Condiciones Solapamiento:\n arrayOverlap.forEach(function (i) {\n\n if (i != rect) {\n\n if (i.intersectsWithObject(wind1)) {\n\n swal(\"Overlap Validation\", \"Objects Overlap\", \"error\");\n seSolapa = true;\n canvas.clear().renderAll();\n addToSelect();\n arrayOverlap.forEach(function (x) {\n canvas.add(x);\n })\n }\n }\n\n });\n if (!seSolapa) {\n formWindow.remove();\n canvas.clear().renderAll();\n arrayOverlap.push(wind1);\n let Ventana1 = new Ventana(inputWindName.value, inputDistance.value, inputWidth.value * -1, inputSide.value);\n MyPlano.Ventanas.push(Ventana1);\n addToSelect();\n arrayOverlap.forEach(function (x) {\n canvas.add(x);\n })\n }\n\n }\n\n }\n\n // CONDICIONES VENTANA SUR\n\n if (inputSide.value.toLowerCase() === \"s\") {\n let topRoom = 100;\n let leftRoom = 100;\n topRoom = topRoom + roomSize.height;\n leftRoom = leftRoom + roomSize.width;\n\n wind1 = new fabric.Rect();\n wind1.set({\n name: inputWindName.value,\n type: \"window\",\n side: inputSide.value.toLowerCase(),\n distance: parseInt(inputDistance.value),\n left: (leftRoom - parseInt(inputDistance.value)),\n top: topRoom - heightWind1 / 2,\n fill: 'transparent',\n stroke: 'blue',\n strokeWidth: 1,\n strokeUniform: true,\n width: parseInt(inputWidth.value * -1),\n height: heightWind1,\n //angle: 90, //solo para paredes E y O\n selectable: false\n });\n let seSolapa = false;\n\n var dataName = inputWindName.value;\n var dataDistance = inputDistance.value;\n var dataWidth = inputWidth.value;\n\n // Expresiones regulares para validacion\n var exp = /[A-Za-z0-9]/;\n var exp1 = /[0-9]/;\n\n //Límites ancho: \n if ((wind1.width * (-1) + parseInt(inputDistance.value)) > rect.width) {\n\n swal(\"Width Error\", \"The width of the object is bigger than the width of the wall\", \"error\");\n\n }\n else if ((inputWindName.value == \"\")) {\n swal(\"Name Validation\", \"You must enter a Name for the Window\", \"error\");\n }\n\n // Name Validations\n else if (!exp.test(dataName)) {\n swal(\"Name Validation\", \"Special characters are not allowed in the name\", \"error\");\n }\n\n\n // Width Validations\n\n\n else if (!exp1.test(dataWidth)) {\n swal(\"Width Validation\", \"The Special Caharcters/Letters are not allowed in the Width\", \"error\");\n }\n\n else if ((inputWidth.value == \"\")) {\n swal(\"Width Validation\", \"You must enter a Width for the Window\", \"error\");\n }\n\n else if ((inputWidth.value <= 0)) {\n swal(\"Width Validation\", \"Negative values and zero are not allowed\", \"error\");\n }\n\n\n // Distance Validations\n\n else if ((inputDistance.value == \"\")) {\n swal(\"Distance Validation\", \"You must enter a Distance for the Window\", \"error\");\n }\n\n else if (!exp1.test(dataDistance)) {\n swal(\"Distance Validation\", \"The Special Caharcters/Letters are not allowed in the Distance\", \"error\");\n }\n\n else if ((inputDistance.value <= 0)) {\n swal(\"Distance Validation\", \"Negative values and zero are not allowed\", \"error\");\n }\n\n\n\n else {\n\n //Condiciones Solapamiento:\n arrayOverlap.forEach(function (i) {\n\n if (i != rect) {\n\n if (i.intersectsWithObject(wind1)) {\n\n swal(\"Overlap Validation\", \"Objects Overlap\", \"error\");\n seSolapa = true;\n canvas.clear().renderAll();\n addToSelect();\n arrayOverlap.forEach(function (x) {\n canvas.add(x);\n })\n\n }\n }\n\n });\n if (!seSolapa) {\n formWindow.remove();\n canvas.clear().renderAll();\n arrayOverlap.push(wind1);\n let Ventana1 = new Ventana(inputWindName.value, inputDistance.value, inputWidth.value * -1, inputSide.value);\n MyPlano.Ventanas.push(Ventana1);\n addToSelect();\n arrayOverlap.forEach(function (x) {\n canvas.add(x);\n })\n\n }\n }\n }\n\n // CONDICIONES VENTANA ESTE\n\n\n if (inputSide.value.toLowerCase() === \"e\") {\n let topRoom = 100;\n let leftRoom = 100;\n topRoom;\n leftRoom = leftRoom + roomSize.width;\n\n wind1 = new fabric.Rect();\n wind1.set({\n name: inputWindName.value,\n type: \"window\",\n side: inputSide.value.toLowerCase(),\n distance: parseInt(inputDistance.value),\n left: (leftRoom - heightWind1 / 2),\n top: topRoom + parseInt(inputDistance.value),\n fill: 'transparent',\n stroke: 'blue',\n strokeWidth: 1,\n strokeUniform: true,\n width: heightWind1,\n height: parseInt(inputWidth.value),\n //angle: 10, //solo para paredes E y O\n selectable: false\n });\n\n let seSolapa = false;\n\n var dataName = inputWindName.value;\n var dataDistance = inputDistance.value;\n var dataWidth = inputWidth.value;\n\n // Expresiones regulares para validacion\n var exp = /[A-Za-z0-9]/;\n var exp1 = /[0-9]/;\n\n //Límites ancho: \n if ((wind1.height + parseInt(inputDistance.value)) > rect.height) {\n\n swal(\"Width Error\", \"The width of the object is bigger than the width of the wall\", \"error\");\n\n }\n\n else if ((inputWindName.value == \"\")) {\n swal(\"Name Validation\", \"You must enter a Name for the Window\", \"error\");\n }\n\n // Name Validations\n else if (!exp.test(dataName)) {\n swal(\"Name Validation\", \"Special characters are not allowed in the name\", \"error\");\n }\n\n\n // Width Validations\n\n\n else if (!exp1.test(dataWidth)) {\n swal(\"Width Validation\", \"The Special Caharcters/Letters are not allowed in the Width\", \"error\");\n }\n\n else if ((inputWidth.value == \"\")) {\n swal(\"Width Validation\", \"You must enter a Width for the Window\", \"error\");\n }\n\n else if ((inputWidth.value <= 0)) {\n swal(\"Width Validation\", \"Negative values and zero are not allowed\", \"error\");\n }\n\n // Distance Validations\n\n else if ((inputDistance.value == \"\")) {\n swal(\"Distance Validation\", \"You must enter a Distance for the Window\", \"error\");\n }\n\n else if (!exp1.test(dataDistance)) {\n swal(\"Distance Validation\", \"The Special Caharcters/Letters are not allowed in the Distance\", \"error\");\n }\n\n else if ((inputDistance.value <= 0)) {\n swal(\"Distance Validation\", \"Negative values and zero are not allowed\", \"error\");\n }\n\n else {\n\n //Condiciones Solapamiento:\n arrayOverlap.forEach(function (i) {\n\n if (i != rect) {\n\n if (i.intersectsWithObject(wind1)) {\n\n swal(\"Overlap Validation\", \"Objects Overlap\", \"error\");\n seSolapa = true;\n canvas.clear().renderAll();\n addToSelect();\n arrayOverlap.forEach(function (x) {\n canvas.add(x);\n })\n\n }\n }\n\n });\n if (!seSolapa) {\n formWindow.remove();\n canvas.clear().renderAll();\n arrayOverlap.push(wind1);\n let Ventana1 = new Ventana(inputWindName.value, inputDistance.value, inputWidth.value * -1, inputSide.value);\n MyPlano.Ventanas.push(Ventana1);\n addToSelect();\n arrayOverlap.forEach(function (x) {\n canvas.add(x);\n })\n }\n }\n }\n\n // CONDICIONES VENTANA OESTE\n\n\n if (inputSide.value.toLowerCase() === \"o\") {\n let topRoom = 100;\n let leftRoom = 100;\n topRoom = topRoom + roomSize.height;\n leftRoom;\n\n wind1 = new fabric.Rect();\n wind1.set({\n name: inputWindName.value,\n type: \"window\",\n side: inputSide.value.toLowerCase(),\n left: (leftRoom - heightWind1 / 2),\n distance: parseInt(inputDistance.value),\n top: topRoom - parseInt(inputDistance.value),\n fill: 'transparent',\n stroke: 'blue',\n strokeWidth: 1,\n strokeUniform: true,\n width: heightWind1,\n height: parseInt(inputWidth.value * -1),\n //angle: 10, //solo para paredes E y O\n selectable: false\n });\n\n let seSolapa = false;\n\n\n var dataName = inputWindName.value;\n var dataDistance = inputDistance.value;\n var dataWidth = inputWidth.value;\n\n // Expresiones regulares para validacion\n var exp = /[A-Za-z0-9]/;\n var exp1 = /[0-9]/;\n\n //Límites ancho: \n if ((wind1.height * (-1) + parseInt(inputDistance.value)) > rect.height) {\n\n swal(\"Width Error\", \"The width of the object is bigger than the width of the wall\", \"error\");\n }\n else if ((inputWindName.value == \"\")) {\n swal(\"Name Validation\", \"You must enter a Name for the Window\", \"error\");\n }\n\n // Name Validations\n else if (!exp.test(dataName)) {\n swal(\"Name Validation\", \"Special characters are not allowed in the name\", \"error\");\n }\n\n\n // Width Validations\n\n\n else if (!exp1.test(dataWidth)) {\n swal(\"Width Validation\", \"The Special Caharcters/Letters are not allowed in the Width\", \"error\");\n }\n\n else if ((inputWidth.value == \"\")) {\n swal(\"Width Validation\", \"You must enter a Width for the Window\", \"error\");\n }\n\n else if ((inputWidth.value <= 0)) {\n swal(\"Width Validation\", \"Negative values and zero are not allowed\", \"error\");\n }\n\n\n // Distance Validations\n\n else if ((inputDistance.value == \"\")) {\n swal(\"Distance Validation\", \"You must enter a Distance for the Window\", \"error\");\n }\n\n else if (!exp1.test(dataDistance)) {\n swal(\"Distance Validation\", \"The Special Caharcters/Letters are not allowed in the Distance\", \"error\");\n }\n\n else if ((inputDistance.value <= 0)) {\n swal(\"Distance Validation\", \"Negative values and zero are not allowed\", \"error\");\n }\n\n else {\n\n //Condiciones Solapamiento:\n arrayOverlap.forEach(function (i) {\n\n if (i != rect) {\n\n if (i.intersectsWithObject(wind1)) {\n\n swal(\"Overlap Validation\", \"Objects Overlap\", \"error\");\n seSolapa = true;\n canvas.clear().renderAll();\n addToSelect();\n arrayOverlap.forEach(function (x) {\n canvas.add(x);\n })\n\n }\n }\n });\n if (!seSolapa) {\n formWindow.remove();\n canvas.clear().renderAll();\n arrayOverlap.push(wind1);\n let Ventana1 = new Ventana(inputWindName.value, inputDistance.value, inputWidth.value * -1, inputSide.value);\n MyPlano.Ventanas.push(Ventana1);\n addToSelect();\n arrayOverlap.forEach(function (x) {\n canvas.add(x);\n })\n }\n }\n\n\n }\n return wind1;\n}", "function addCharacter(){\n\t\n\t//prevents blank characterBlocks from being added\n\tif ((document.getElementById(\"addName\").value == \"\") &&\n\t(document.getElementById(\"addAC\").value == \"\") &&\n\t(document.getElementById(\"addMaxHP\").value == \"\")){\n\t\tresetAddFocus();\n\t\treturn false;\n\t}\n\t\n\t//catch blank or non-number initiative values\n\tif ((document.getElementById(\"addInitiative\").value == \"\") ||\n\tisNaN(document.getElementById(\"addInitiative\").value)){\n\t\treturn false;\n\t}\n\t\n\tvar newBlockDiv = document.createElement('div');\n\tnewBlockDiv.id=\"characterBlock\";\n\t\n\tvar newCloseButton = document.createElement('button');\n\tnewCloseButton.type=\"button\";\n\tnewCloseButton.id=\"closeButton\";\n\tnewCloseButton.onclick=function(){removeDiv(newBlockDiv)};\n\tnewCloseButton.append(\"\\u2716\");\n\tnewBlockDiv.appendChild(newCloseButton);\n\t\n\tvar newDetailsDiv = document.createElement('div');\n\tnewDetailsDiv.id=\"characterDetails\";\n\t\n\t\tvar newInitiativeP = document.createElement('p');\n\t\tnewInitiativeP.id=\"initiativeP\";\n\t\tvar newInitiative = document.createElement('input');\n\t\tnewInitiative.type=\"text\";\n\t\tnewInitiative.id=\"initiative\";\n\t\tnewInitiative.value = (document.getElementById(\"addInitiative\").value);\n\t\t\n\t\t//if initiative is manually changed, re-places character block accordingly\n\t\tnewInitiative.addEventListener(\"keyup\", function(event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tif ((event.keyCode === 13) && (!isNaN(newInitiative.value))){\n\t\t\t\t\tplaceByInitiative(newBlockDiv);\n\t\t\t\t}\n\t\t});\n\t\tnewInitiativeP.append(newInitiative);\n\t\tnewInitiativeP.append(\"\\xa0\");\n\t\tvar newNameDiv = document.createElement('div');\n\t\tnewNameDiv.id = \"nameDiv\";\n\t\tvar newNameP = document.createElement('p');\n\t\tnewNameP.id=\"nameP\";\n\t\tvar newName = document.createElement('input');\n\t\tnewName.type=\"text\";\n\t\tnewName.id=\"name\";\n\t\tnewName.value = document.getElementById(\"addName\").value;\n\t\tnewNameP.append(newName);\n\t\tnewNameDiv.appendChild(newInitiativeP);\n\t\tnewNameDiv.appendChild(newNameP);\n\t\tnewDetailsDiv.appendChild(newNameDiv);\n\t\n\t\tvar newDetailP = document.createElement('p');\n\t\t\n\t\t\tvar newAC = document.createElement('input');\n\t\t\tnewAC.type=\"text\";\n\t\t\tnewAC.id=\"AC\";\n\t\t\tnewAC.value = document.getElementById(\"addAC\").value;\n\t\t\tnewDetailP.append(\"AC: \");\n\t\t\tnewDetailP.append(newAC);\n\t\t\n\t\t\tvar newMaxHP = document.createElement('input');\n\t\t\tnewMaxHP.type=\"text\";\n\t\t\tnewMaxHP.id=\"maxHP\";\n\t\t\tnewMaxHP.value = document.getElementById(\"addMaxHP\").value;\n\t\t\tnewDetailP.append(\" Max HP: \");\n\t\t\tnewDetailP.append(newMaxHP);\n\t\t\n\t\t\tvar newCurrentHP = document.createElement('input');\n\t\t\tnewCurrentHP.type=\"text\";\n\t\t\tnewCurrentHP.id=\"currentHP\";\n\t\t\tnewCurrentHP.value = document.getElementById(\"addMaxHP\").value;\n\t\t\tnewDetailP.append(\" Current HP: \");\n\t\t\tnewDetailP.append(newCurrentHP);\n\t\t\n\t\t\tvar newDamageTaken = document.createElement('input');\n\t\t\tnewDamageTaken.type=\"text\";\n\t\t\tnewDamageTaken.id=\"damageTaken\";\n\t\t\tnewDetailP.append(\" Damage Taken: \");\n\t\t\tnewDetailP.append(newDamageTaken);\n\t\t\tnewDamageTaken.addEventListener(\"keyup\", function(event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tif ((event.keyCode === 13) && (!isNaN(newDamageTaken.value)) && (!isNaN(newCurrentHP.value))){\n\t\t\t\t\tnewCurrentHP.value = \n\t\t\t\t\t\tnewCurrentHP.value - newDamageTaken.value;\n\t\t\t\t\tnewDamageTaken.value = \"\";\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (newCurrentHP.value <= 0){\n\t\t\t\t\t\tsetBackground(newBlockDiv, '#8c8c8c');\n\t\t\t\t\t}\n\t\t\t\t\telse if (newCurrentHP.value < (newMaxHP.value)/2){\n\t\t\t\t\t\tsetBackground(newBlockDiv, '#fb6251');\n\t\t\t\t\t}\n\t\t\t\t\telse setBackground(newBlockDiv, '#d2a479');\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\tnewDetailsDiv.appendChild(newDetailP);\n\t\n\tnewBlockDiv.appendChild(newDetailsDiv);\n\t\n\tvar newNotesDiv = document.createElement('div');\n\t\tvar newNotesArea = document.createElement('textarea');\n\t\tnewNotesArea.rows=\"1\";\n\t\tnewNotesArea.placeholder=\"NOTES\";\n\t\t\n\t\t//prevents textarea overflow in Firefox\n\t\tnewNotesArea.style.overflowX = \"hidden\";\n\t\tnewNotesDiv.append(newNotesArea);\n\t\t\n\tnewBlockDiv.appendChild(newNotesDiv);\t\n\tplaceByInitiative(newBlockDiv);\n\tclearAddDetails();\n\t\n\treturn false;\n}", "function objTriggered(event) {\n // if the textBox is not on the screen, handle the trigger\n if (!textBox.showing) {\n // front/east\n if (event.data.id === 0) {\n // if clicking on keypad\n if ($(this).is(\"#keypad\")) {\n if (!gameBackground.doorOpened) {\n // enter close object view\n showCloserObj(0);\n }\n // if clicking on switch\n } else if ($(this).is(\"#switch\")) {\n // if the fuse is installed\n if (gameBackground.fuseInstalled) {\n // turn off or on the light\n if (!gameBackground.lightOff) {\n // display message\n textBox.insertText(\"I can turn off the light now\");\n gameBackground.lightOff = true;\n } else {\n textBox.insertText(\"Light is back on\");\n gameBackground.lightOff = false;\n }\n // if the fuse is not installed\n } else {\n textBox.insertText(\"It doesn't do anything\\nIs it broken?\");\n }\n SOUND_SWITCH.play();\n // if clicking on panel\n } else if ($(this).is(\"#panel\")) {\n // if the panel is opened\n if (gameBackground.panelOpened) {\n // if the fuse is installed\n if (gameBackground.fuseInstalled) {\n textBox.insertText(\"I think I fixed something at least\");\n } else {\n // if player is holding the fuce\n if (usingFuse) {\n textBox.insertText(\"I suppose it fits\");\n gameBackground.fuseInstalled = true; // install the fuse\n removeItem(1); // remove fuse from the inventory\n SOUND_PLUG_IN.play();\n // not holding the fuse\n } else {\n textBox.insertText(\"It looks like something is missing\");\n textBox.buffer(\"Maybe I can find it somewhere\");\n }\n }\n // if the panel is not opened\n } else {\n // if the player is holding the screwdriver\n if (usingScrewDriver) {\n // open the panel\n gameBackground.panelOpened = true;\n textBox.insertText(\"I unscrewed all the screws and opened the panel!\");\n SOUND_MOVE.play();\n // if not holding the screwdriver\n } else {\n textBox.insertText(\"A panel held by 4 screws\");\n textBox.buffer(\"I wonder if I can get it open with something\");\n SOUND_PANEL.stop();\n SOUND_PANEL.play();\n }\n }\n // if click on door\n } else if ($(this).is(\"#door\")) {\n // if the door is opened\n if (gameBackground.doorOpened) {\n state = \"END\"; // go to game over screen\n endFontHeight = height + height / 4; // initiate font height\n changeDirection(6); // update game background\n // hide inventory and direction indicator\n $inventory.hide();\n $directionIndicator.hide();\n // after 2s, play the music\n setTimeout(function() {\n playing = true;\n }, 2000);\n // display message\n textBox.insertText(\"Now I remeber!\\nI was opening my apartment door...\\nbut ended up in here\");\n textBox.buffer(\"Do I leave the Cube for good?\\nOr find Oliver and bring him home?\");\n // if door is locked\n } else {\n textBox.insertText(\"Door is locked\");\n textBox.buffer(\"I need to enter some kinda of\\npasscode or something?\");\n SOUND_DOOR_LOCKED.play();\n }\n }\n // left/north\n } else if (event.data.id === 1) {\n // if click on plant\n if ($(this).is(\"#plant\")) {\n // move the plant\n if (!gameBackground.plantMoved) {\n textBox.insertText(\"I moved the plant\\nThere's a number hidden under it\");\n gameBackground.plantMoved = true;\n SOUND_MOVE.play();\n }\n // if click on the card\n } else if ($(this).is(\"#card\")) {\n showCloserObj(2);\n // if click on left drawer\n } else if ($(this).is(\"#drawer-left\")) {\n // if drawer is not out\n if (!gameBackground.drawerLeftOut) {\n textBox.insertText(\"There's a screwdriver in this drawer\\nI'm taking it\");\n gameBackground.drawerLeftOut = true;\n addItem(0); // add the screwdriver to the inventory\n SOUND_DRAWER.play();\n }\n // if click on right drawer\n } else if ($(this).is(\"#drawer-right\")) {\n // if the drawer is not out\n if (!gameBackground.drawerRightOut) {\n textBox.insertText(\"It's empty\");\n gameBackground.drawerRightOut = true;\n SOUND_DRAWER.play();\n }\n // if click on book\n } else if ($(this).is(\"#book\")) {\n textBox.insertText(\"The green book named\\n\\\"The Key to the Light Is Under the Cube\\\"\\nhas nothing written on it\");\n textBox.buffer(\"The red book is fully blank\");\n SOUND_READ.play();\n }\n // back\n } else if (event.data.id === 2) {\n // if click on newspaper\n if ($(this).is(\"#newspaper\")) {\n showCloserObj(3);\n // if click on coffee machine\n } else if ($(this).is(\"#coffeemachine\")) {\n // if the coffee machine is not powered\n if (!gameBackground.coffeeMachinePowered) {\n textBox.insertText(\"It doesn't have power\");\n // if not holding the mug\n if (!usingMug) {\n SOUND_CM_SWITCH.play();\n }\n // if the machine is powered\n } else {\n // if the mug is placed\n if (gameBackground.mugPlaced) {\n // if the mug is not heated and machine is not running\n if (!gameBackground.coffeeMachineUsed && !coffeemachineRunning) {\n textBox.insertText(\"It's working!\");\n coffeemachineRunning = true; // set coffee machine to running\n SOUND_CM_WORKING.play();\n // after 12s, mug is heated and machine is not running anymore\n setTimeout(function() {\n gameBackground.coffeeMachineUsed = true;\n coffeemachineRunning = false;\n }, 12000);\n // if mug is heated\n } else {\n // if machine is not running\n if (!coffeemachineRunning) {\n textBox.insertText(\"There's hot water in the mug\");\n textBox.buffer(\"There's something written on the mug!\");\n gameBackground.mugPlaced = false; // remove the mug\n // if mug is not taken, add mug to the inventory\n if (!mugTaken) {\n addItem(2);\n }\n }\n }\n // if mug is not placed\n } else {\n // if the mug is not heated\n if (!gameBackground.coffeeMachineUsed) {\n textBox.insertText(\"I think I can use the coffee machine\\nfor coffee?\");\n textBox.buffer(\"I don't think it has coffee\\nWhat I get probably is gonna be hot water\");\n }\n }\n }\n // if holding the mug\n if (usingMug) {\n // if the machine is not powered\n if (!gameBackground.coffeeMachinePowered) {\n textBox.insertText(\"Yeah, I wish I could get some coffee\");\n textBox.buffer(\"But it doesn't have power\");\n // if powered\n } else {\n textBox.insertText(\"Let's get some coffee or hot water...\");\n }\n gameBackground.mugPlaced = true; // place the mug\n removeItem(2); // remove mug from inventory\n SOUND_PLACE_MUG.play();\n }\n // if click on plug\n } else if ($(this).is(\"#plug\")) {\n // if the machine is not powered\n if (!gameBackground.coffeeMachinePowered) {\n // if holding cord\n if (usingCord) {\n textBox.insertText(\"The extension cord is so useful...\\nin this way\");\n gameBackground.coffeeMachinePowered = true; // machine is powered\n removeItem(3); // remove cord from the inventory\n SOUND_PLUG_IN.play();\n // play after the plug in sound\n setTimeout(function() {\n SOUND_CM_POWERED.play();\n }, 250);\n // if not holding cord\n } else {\n textBox.insertText(\"Where do I plug this in?\");\n textBox.buffer(\"The only power socket is out of reach!\");\n }\n }\n // if click on socket\n } else if ($(this).is(\"#socket\")) {\n // if the machine is not powered\n if (!gameBackground.coffeeMachinePowered) {\n // if holding cord\n if (usingCord) {\n textBox.insertText(\"The extension cord is so useful...\\nin this way\");\n gameBackground.coffeeMachinePowered = true;\n removeItem(3);\n SOUND_PLUG_IN.play();\n setTimeout(function() {\n SOUND_CM_POWERED.play();\n }, 250);\n // if not holding the cord\n } else {\n textBox.insertText(\"Why is the power socket way up there?\");\n }\n // if machine is powered\n } else {\n textBox.insertText(\"I think I can use the coffee machine now\");\n }\n // if click on fuse\n } else if ($(this).is(\"#fuse\")) {\n // if the poster is not tore\n if (!gameBackground.posterOpened) {\n textBox.insertText(\"There's something behind...\");\n gameBackground.posterOpened = true;\n SOUND_POSTER.play();\n } else {\n // if the fuse is not taken\n if (!gameBackground.fuseTaken) {\n textBox.insertText(\"It's a fuse!\\nI'm taking it\");\n gameBackground.fuseTaken = true;\n addItem(1); // add fuse to the inventory\n }\n }\n }\n // right/south\n } else if (event.data.id === 3) {\n // if click on paintings\n if ($(this).is(\"#paintings\")) {\n textBox.insertText(\"There're 3 strange abstract paintings\");\n textBox.buffer(\"I wish I can understand them\");\n // if click on upper left cabin drawer\n } else if ($(this).is(\"#cabin-left\")) {\n if (!gameBackground.cabinLeftOut) {\n textBox.insertText(\"I found a mug in here\\nI'm taking it\");\n gameBackground.cabinLeftOut = true;\n addItem(2); // add mug to the inventory\n SOUND_DRAWER.play();\n }\n // if click on upper right cabin drawer\n } else if ($(this).is(\"#cabin-right\")) {\n if (!gameBackground.cabinRightOut) {\n textBox.insertText(\"There's nothing in it\");\n gameBackground.cabinRightOut = true;\n SOUND_DRAWER.play();\n }\n // if click on bottom cabin drawer\n } else if ($(this).is(\"#cabin-bottom\")) {\n if (!gameBackground.cabinBottomOut) {\n textBox.insertText(\"It's empty except the number written inside\");\n gameBackground.cabinBottomOut = true;\n SOUND_DRAWER.play();\n }\n // if click on manual\n } else if ($(this).is(\"#manual\")) {\n showCloserObj(4);\n }\n // down\n } else if (event.data.id === 4) {\n if (!gameBackground.trapDoorOpened) {\n showCloserObj(1); // show closer view of lock\n } else {\n // if the cord is not taken\n if (!gameBackground.cordTaken) {\n textBox.insertText(\"There's an extension cord under the floor\\nI'm taking it\");\n gameBackground.cordTaken = true;\n addItem(3); // add the cord to the inventory\n }\n }\n // up\n } else if (event.data.id === 5) {\n // if the light is off\n if (gameBackground.lightOff) {\n textBox.insertText(\"The writing on the ceiling...\\nIs it a riddle?\");\n textBox.buffer(\"Nine? What is 9 for?\");\n // if the light is on\n } else {\n textBox.insertText(\"A light on the ceiling\\nIt looks like nothing special\");\n }\n // end\n } else if (event.data.id === 6) {\n // left door\n if ($(this).is(\"#door-exit\")) {\n choiceMade = true;\n // right door\n } else if ($(this).is(\"#door-oliver\")) {\n choiceMade = true;\n endId = 1;\n }\n console.log(\"Game over\");\n SOUND_DOOR_OPEN.play();\n hideTriggers();\n }\n }\n}", "function initGameMode() {\n characters = {\n \"leia\": {\n name: \"leia\",\n attackPower: 8,\n healthPoints: 120,\n counterAttackPower: 15,\n },\n\n \"vader\": {\n name: \"vader\",\n attackPower: 14,\n healthPoints: 100,\n counterAttackPower: 5,\n },\n\n \"trooper\": {\n name: \"trooper\",\n attackPower: 8,\n healthPoints: 150,\n counterAttackPower: 20,\n },\n\n \"kylo\": {\n name: \"kylo\",\n attackPower: 7,\n healthPoints: 180,\n counterAttackPower: 20,\n }\n };\n fightRound = 1;\n var $container = $(\"#characters\");\n $container.html(\"\");\n $(\"#pickOpponentChar\").html(\"\").prepend(\"<div class='pick'>Pick opponent</div>\");\n $(\"#opponentChar\").html(\"\").prepend(\"<div class='pick'>Opponent</div>\");\n\n var c = characters[\"leia\"];\n addCharacter($container, c.name, c.attackPower, c.healthPoints, c.counterAttackPower, \"leia2.jpg\");\n c = characters[\"vader\"];\n addCharacter($container, c.name, c.attackPower, c.healthPoints, c.counterAttackPower, \"vader2.jpg\");\n c = characters[\"trooper\"];\n addCharacter($container, c.name, c.attackPower, c.healthPoints, c.counterAttackPower, \"trooper.jpg\");\n c = characters[\"kylo\"];\n addCharacter($container, c.name, c.attackPower, c.healthPoints, c.counterAttackPower, \"kylo.jpg\");\n $(\"#restart\").hide();\n gameMode = \"not-started\";\n $(\"#characters\").prepend(\"<div class='pick'>Pick character</div>\");\n $(\".pick\").css(\"font-family\", 'Open Sans Condensed', 'sans-serif');\n //needs to disappear after user player is picked & change to say player\n\n $(\".pick\").css(\"font-family\", 'Open Sans Condensed', 'sans-serif');\n //needs to disappear when opponent is picked, but reappear when a second opponent needs to be picked\n\n $(\".pick\").css(\"font-family\", 'Open Sans Condensed', 'sans-serif');\n }", "function selectPlayer() {\n\t\t\t$('.hero_villain').remove();\n\t\t\tnewHtml = '<div id=\"player0\" class=\"player\"></div>';\n\t\t\tnewHtml = newHtml + '<div id=\"player1\" class=\"player\"></div>';\n\t\t\tnewHtml = newHtml + '<div id=\"player2\" class=\"player\"></div>';\n\t\t\t$(newHtml).insertAfter('article');\n\t\t\t$.each(playerCharacters, function (index) {\n\t\t\t\tcurrId = '#player'+index;\n\t\t\t\tnewHtml = '<image src=\"' + playerCharacters[index].characterPhoto + '\" alt = \"' + playerCharacters[index].characterName + '\">';\n\t\t\t\tnewHtml = newHtml + '<h3>' + playerCharacters[index].characterName + '</h3>';\n\t\t\t\tnewHtml = newHtml + '<p>Current Health: ' + playerCharacters[index].characterHealthPoints + '</p>';\n\t\t\t\t$(currId).html(newHtml); \n\t\t\t});\n\t\t\t$('#message').html('Click to choose your character.');\n\t\t}", "function launchChooseCharacterModal() {\n gameMenuInstance.close();\n let modalElement = document.querySelector(\"#choose-character-modal\");\n let options = {\n inDuration: 0,\n outDuration: 500,\n opacity: 1.0,\n dismissible: false\n };\n \n let characterInstance = M.Modal.init(modalElement, options);\n characterInstance.open();\n\n // Listener for character select divs.\n let characters = document.querySelectorAll(\".character\");\n for (let i = 0; i < characters.length; i++) {\n characters[i].addEventListener(\"click\", function() {\n let selectedCharacter = document.querySelector(\".selected\");\n if (selectedCharacter) {\n selectedCharacter.classList.remove(\"selected\");\n }\n this.classList.add(\"selected\");\n }, false);\n }\n\n // Listener for game button.\n document.querySelector(\"#start-game-button\").addEventListener(\"click\", function() {\n // Test to make sure a character is selected.\n let selectedCharacter = document.querySelector(\".selected\");\n if (selectedCharacter) {\n closeCharacterModal(selectedCharacter);\n } else {\n // Show warning toast to user for 1.5 seconds.\n makeToast(\"Must choose a character\", 1500);\n }\n });\n\n // Closes modal and calls a function to start game.\n function closeCharacterModal(character) {\n characterInstance.close();\n startGame(gameMode, character.getAttribute(\"data\"));\n }\n }", "function C101_KinbakuClub_RopeGroup_WouldYourSister() {\n\tif (ActorGetValue(ActorName) == \"Lucy\") OverridenIntroText = GetText(\"WouldYourSisterNod\");\n\tif (ActorGetValue(ActorName) == \"Heather\") OverridenIntroText = GetText(\"WouldYourSisterShake\");\n}", "function contwinfunc(chestbox, closebutt, vwn, WMn) {\n chestbox.NM();\n var Wv = chestbox.mv.x;\n var wM = chestbox.mv.y;\n \n closebutt.mv.x = Wv + (161 * mn);\n closebutt.mv.y = wM + (0 * mn);\n closebutt.NM();\n \n var mwV = SERVG.ME.mwV;\n var wwn;\n var Nmn = wM + (14 * mn); // 14 - position up/down of items ins the box window\n var wm = windowobjects.mwV;\n \n for (var place = 0; place < 4; place++) { // place is the visible item in box\n if ((place % 2) === 0) { // restristing items to be in a maximum of 2 in a row\n wwn = Wv + (12.5 * mn);\n if (place === 2) Nmn += 71 * mn;\n } else wwn += 72 * mn;\n if (mwV[place][0] === 0) continue; // if (mwV[place][0] === 1) will make items image stuck even after getting it out \n textnumberitem(wm[place], mwV[place], wwn, Nmn, vwn, WMn); // items count text\n }\n }", "function somebody_knocks(id, username) {\n log(\"somebody_knocks(\"+username+\")\",1);\n if($('#knock').length == 0) { //check for existance\n var div = $('<div>', {id: 'knock'+id, class: 'dialog_window'});\n var drag_div = $('<div>', {class: 'draggable'});\n var description = $('<div>', {class: 'description'});\n description.html(username + \" is knocking\");\n var ok = $(\"<div>\", {class: \"button\"});\n ok.html(\"let in\");\n var ignore = $(\"<div>\", {class: \"button\"});\n ignore.html(\"ignore\");\n\n div.append(drag_div);\n div.append(description);\n div.append(ok);\n div.append(ignore);\n \n ignore.mousedown(function(){\n var settings_window = $(this).parent();\n settings_window.fadeOut(\"fast\", function(){$(this).remove()});\n });\n ok.mousedown(function(){\n var settings_window = $(this).parent();\n settings_window.fadeOut(\"fast\", function(){$(this).remove()});\n send({let_in: id});\n });\n drag_div.mousedown(function(e) {\n drag = div;\n if(e.offsetX==undefined){\n x = e.pageX-target.offset().left;\n y = e.pageY-target.offset().top;\n }else{\n x = e.offsetX;\n y = e.offsetY;\n };\n });\n div.mousedown(function(){\n bring_to_front($(this));\n });\n $(\"#screen\").append(div);\n }\n}", "function drawOptionsPopup (context, width, height, frameWidth) {\n var fontSize = 14;\n\n context.fillStyle = \"rgba(0, 0, 0, 0.5)\"; \n roundRect(context, CANVAS_WIDTH - (width - 2 * frameWidth), \n CANVAS_HEIGHT - (height - frameWidth), width - (2 * frameWidth), \n height - (2 * frameWidth), 0, true, false)\n\n // draw options\n\n context.font = \"14px Verdana\"\n context.fillStyle = \"#FFF\";\n context.fillText(\"Fight\" , CANVAS_WIDTH - (width - frameWidth) + 35, \n CANVAS_HEIGHT - height + 30);\n\n context.font = \"14px Verdana\"\n context.fillStyle = \"#FFF\";\n context.fillText(\"Bag\" , CANVAS_WIDTH - (width - frameWidth) + 110, \n CANVAS_HEIGHT - height + 30);\n\n context.font = \"14px Verdana\"\n context.fillStyle = \"#FFF\";\n context.fillText(\"Team\" , CANVAS_WIDTH - (width - frameWidth) + 35, \n CANVAS_HEIGHT - height + 30 + 2 * fontSize);\n\n context.font = \"14px Verdana\"\n context.fillStyle = \"#FFF\";\n context.fillText(\"Run\" , CANVAS_WIDTH - (width - frameWidth) + 110, \n CANVAS_HEIGHT - height + 30 + 2 * fontSize);\n}", "function gameOptions() {\n\n // Get the user's name input value if the game is being replayed\n if (questionsAnswered !== 0) {\n // re-use userName\n userName;\n document.getElementById(\"end-game-div\").remove();\n clearAll();\n\n // get the user's name if it is the first game\n } else {\n userName = document.getElementById(\"input-name-input\").value;\n document.getElementById(\"input-name-div\").remove();\n }\n\n // Create gameOptions HTML elements and append to relevant divs\n let gameOptionsDiv = createElement(\"div\", \"game-options-div\");\n mainDiv.appendChild(gameOptionsDiv);\n\n let gameOptionsWelcomeName = createElement(\"h1\", \"game-options-welcome-name\");\n gameOptionsDiv.appendChild(gameOptionsWelcomeName);\n\n let gameOptionsText = createElement(\"h2\", \"game-options-text\");\n gameOptionsDiv.appendChild(gameOptionsText);\n\n let gameOptionsForm = createElement(\"form\", \"game-difficulty-form\");\n gameOptionsDiv.appendChild(gameOptionsForm);\n\n let gameOptionsDifficultyText = createElement(\"h3\", \"game-options-difficulty-text\");\n gameOptionsForm.appendChild(gameOptionsDifficultyText);\n\n // Create difficulty radio options\n let gameDifficultyOptions = [\"Easy\", \"Medium\", \"Hard\"];\n let gameDifficultyOptionsID = [];\n\n for (let i = 0; i < gameDifficultyOptions.length; i++) {\n\n // Create radio buttons\n var diffRadio = createElement(\"input\", `${gameDifficultyOptions[i]}`);\n diffRadio.type = \"radio\";\n diffRadio.name = \"diffRadioName\";\n diffRadio.checked = false;\n diffRadio.required = true;\n\n // Create radio button labels\n var diffLabel = document.createElement(\"label\");\n diffLabel.innerHTML = gameDifficultyOptions[i];\n\n // Append radios and labels to form\n gameOptionsForm.appendChild(diffRadio);\n gameOptionsForm.appendChild(diffLabel);\n gameDifficultyOptionsID.push(diffRadio.id);\n }\n\n let gameOptionsLengthText = createElement(\"h3\", \"game-options-length-text\");\n gameOptionsForm.appendChild(gameOptionsLengthText);\n\n // Create game length options\n let gameLengthOptions = [\"10\", \"20\", \"30\", \"40\"];\n\n for (let i = 0; i < gameLengthOptions.length; i++) {\n\n // Create radio buttons\n var lengthRadio = createElement(\"input\", `gameLength${gameLengthOptions[i]}`);\n lengthRadio.type = \"radio\";\n lengthRadio.name = \"lengthRadioName\";\n lengthRadio.checked = false;\n lengthRadio.required = true;\n\n // Create radio button labels\n var lengthLabel = document.createElement(\"label\");\n lengthLabel.innerHTML = gameLengthOptions[i];\n\n // Append radios and labels to form\n gameOptionsForm.appendChild(lengthRadio);\n gameOptionsForm.appendChild(lengthLabel);\n }\n\n // Set default options \n gameOptionsForm[0].checked = true;\n gameOptionsForm[3].checked = true;\n\n let gameOptionsBtn = createElement(\"button\", \"game-options-btn\");\n gameOptionsBtn.classList.add(\"buttons\");\n gameOptionsBtn.addEventListener(\"click\", function () {\n createGameArea();\n });\n gameOptionsDiv.appendChild(gameOptionsBtn);\n\n // Create the text for the elements\n gameOptionsWelcomeName.innerHTML = (`Welcome ${userName}!`);\n gameOptionsText.innerHTML = \"Now choose some game options:\";\n gameOptionsDifficultyText.innerHTML = 'Please choose a game difficulty <a onclick=\"difficultyPopUp()\"><i class=\"fa fa-question-circle\"></i></a>';\n gameOptionsLengthText.innerHTML = \"Now choose how many questions you'd like to answer\";\n gameOptionsBtn.innerHTML = \"Play game!\";\n}", "function checkWrong(){\n if (wrong == 3){\n playAudio(timeupAudio);\n // var playAgain = confirm(\"You contributed to global warming. - press Ok to play again & clear your name.\");\n // if(playAgain == true){\n // clearInterval(timerInt);\n // popup();\n // $('#game-container').empty();\n // points = 0;\n // display.text('0');\n // level = 0;\n // }\n $(\"#end-game\").dialog({\n buttons: {\n 'Play Again': function() {\n timeupAudio.pause();\n // clearInterval(timerInt);\n // display.text('0');\n // $('#game-container').empty()\n // level = 0;\n // points = 0;\n // $('#points').text(points);\n // droppedObj = 0;\n // trashTarget = 0;\n // wrong = 0;\n // popup()//runs stat again\n // $(this).dialog('close');\n location.reload();\n },\n 'No': function() {\n timeupAudio.pause();\n location.reload();\n }\n }\n });\n }\n }", "function bestMove() {\r\n\r\n var choosenBox = \"\"; //stringa rappresentante box scelto come mossa dal bot\r\n\r\n var arrayPlayer = player.moves;\r\n var arrayBot = bot.moves;\r\n\r\n //Gestione mossa iniziale, quando il giocatore ha fatto una sola mossa\r\n if(arrayPlayer.length === 1) {\r\n \r\n if(arrayPlayer.includes(\"c5\")) {\r\n console.log(\"random 0\");\r\n choosenBox = randomFromArray([\"c1\", \"c3\", \"c7\", \"c9\"]);\r\n }\r\n else {\r\n choosenBox = \"c5\";\r\n }\r\n }\r\n else if(arrayPlayer.length === 2){ //Alla seconda mossa dell'utente\r\n\r\n //Quando si hanno sulla diagonale due X e una O\r\n if((!arrTris.includes(\"c1\") && !arrTris.includes(\"c5\") && !arrTris.includes(\"c9\")) ||\r\n (!arrTris.includes(\"c3\") && !arrTris.includes(\"c5\") && !arrTris.includes(\"c7\"))) {\r\n \r\n if(arrayBot.includes(\"c5\")) { // se il cerchio è in mezzo\r\n console.log(\"random 1\");\r\n choosenBox = randomFromArray([\"c2\", \"c4\", \"c6\", \"c8\"]); //un box random fra quelli laterali\r\n }\r\n else { //Quando invece il cerchio non è in mezzo\r\n console.log(\"random 2\");\r\n choosenBox = randomFromArray([\"c1\", \"c3\", \"c7\", \"c9\"]); //un box random fra gli angoli\r\n }\r\n }\r\n else {\r\n //Nel caso cerca di bloccare l'avversario\r\n choosenBox = chooseMove(arrayPlayer);\r\n //Se ancora non si è trovato un box adeguato, logica random corner\r\n if(choosenBox == \"\") {\r\n console.log(\"random 3\");\r\n choosenBox = randomFromArray([\"c1\", \"c3\", \"c7\", \"c9\"]);\r\n }\r\n }\r\n }\r\n else { //Dopo la seconda mossa dell'utente, controlla se riesce a chiudere, altrimenti blocca il tentativo di vittoria dell'avversario\r\n\r\n //Priorità alla chiusura se ce ne è la possibilità\r\n choosenBox = chooseMove(arrayBot);\r\n //Se choosenBox è ancora vuota... Non c'è stato modo di chiudere la partita:\r\n if(choosenBox == \"\") {\r\n choosenBox = chooseMove(arrayPlayer);\r\n }\r\n //Se ancora non si è trovato un box adeguato, logica random corner\r\n if(choosenBox == \"\") {\r\n console.log(\"random 4\");\r\n choosenBox = randomFromArray([\"c1\", \"c3\", \"c7\", \"c9\"]);\r\n if(choosenBox == \"\") {\r\n choosenBox = randomFromArray([\"c2\", \"c4\", \"c6\", \"c8\"]);\r\n }\r\n }\r\n }\r\n return choosenBox;\r\n}", "scriptWith(objects) {\n let success = false;\n let suppressEndturn = false\n let verb\n if (objects.length > 2) verb = objects.shift()\n const multiple = objects[0] && (objects[0].length > 1 || parser.currentCommand.all)\n if (objects[0].length === 0) {\n metamsg(lang.nothing_msg)\n return world.FAILED; \n }\n for (let i = 0; i < objects[0].length; i++) {\n const options = {multiple:multiple, verb:verb, char:player, item:objects[0][i], with:objects[1][0]}\n if (!objects[0][i][this.attName]) {\n this.default(options)\n }\n else {\n let result = this.processCommand(options);\n if (result === world.SUCCESS_NO_TURNSCRIPTS) {\n suppressEndturn = true;\n result = true;\n }\n success = result || success;\n }\n }\n if (success) {\n return (this.noTurnscripts || suppressEndturn ? world.SUCCESS_NO_TURNSCRIPTS : world.SUCCESS);\n }\n else {\n return world.FAILED; \n }\n }", "function textPopup() {\n $(textExample.COMMENTTEXT).val('');\n $(textExample.COMMENTTEXT).css(\"font-family\", propertiesType.fontFamily);\n $(textExample.COMMENTTEXT).css(\"fontSize\", 18);\n $(textExample.COMMENTTEXT).css(\"font-style\", propertiesType.fontStyle);\n $(\"#color\").val(selectOptionByText(\"#color\", propertiesType.penColor));\n $(\"#fill\").val(selectOptionByText(\"#fill\", 'Transparent'));\n $(\"#border\").val(selectOptionByText(\"#border\", 'Transparent'));\n $(\"#font\").val(selectOptionByText(\"#font\", propertiesType.fontFamily));\n $(\"#fontSize\").val(selectOptionByText(\"#fontSize\", propertiesType.fontSize));\n $(\"#fontStyle\").val(selectOptionByText(\"#fontStyle\", propertiesType.fontStyle));\n $(\"#myModalText\").modal();\n}", "function editor_about(objname) {\r\n showModalDialog(_editor_url + \"/html/egovframework/com/cmm/utl/htmlarea/popups/about.html\", window, \"resizable: yes; help: no; status: no; scroll: no; \");\r\n}", "function C012_AfterClass_Roommates_TestInviteAmanda() {\n\tif (ActorGetValue(ActorLove) >= 10) {\n\t\tOverridenIntroText = GetText(\"GoDormLoveAmanda\");\n\t\tC012_AfterClass_Roommates_CurrentStage = 120;\n\t}\n\tif (ActorGetValue(ActorSubmission) >= 10) {\n\t\tOverridenIntroText = GetText(\"GoDormDommeAmanda\");\n\t\tC012_AfterClass_Roommates_CurrentStage = 120;\n\t}\n}", "function OnGUI()\r\n{\r\n if(close == true)\r\n {\r\n GUI.Label (Rect (0, 0, interactLabel.width, interactLabel.height),interactLabel);\r\n }\r\n GUI.Label(Rect(0,50,500,100),currentSentence);\r\n}", "function newGame(input) {\n var choixBot = pierrePapierCiseaux[Math.floor(Math.random() * pierrePapierCiseaux.length)]; //\"Bot\" Random game choice\n alert(\"L'odinateur à choisi \" + choixBot)\n\n if (choixBot == \"pierre\" && input == \"pierre\") {\n\n nb = nb + 1; // Sleeve counter\n } else if (choixBot == \"pierre\" && input == \"papier\") {\n\n nb = nb + 1; // Sleeve counter\n toi = toi + 1 // Player 1 victory counter\n } else if (choixBot == \"pierre\" && input == \"ciseaux\") {\n\n nb = nb + 1; // Sleeve counter\n bot = bot + 1 // Player 2 victory counter\n } else if (choixBot == \"papier\" && input == \"pierre\") {\n\n nb = nb + 1; // Sleeve counter\n toi = toi + 1 // Player 1 victory counter\n } else if (choixBot == \"papier\" && input == \"papier\") {\n\n nb = nb + 1; // Sleeve counter \n } else if (choixBot == \"papier\" && input == \"ciseaux\") {\n\n nb = nb + 1; // Sleeve counter\n bot = bot + 1 // Player 2 victory counter\n } else if (choixBot == \"ciseaux\" && input == \"pierre\") {\n\n nb = nb + 1; // Sleeve counter\n bot = bot + 1 // Player 2 victory counter\n } else if (choixBot == \"ciseaux\" && input == \"papier\") {\n\n nb = nb + 1; // Sleeve counter\n toi = toi + 1 // Player 1 victory counter\n } else if (choixBot == \"ciseaux\" && input == \"ciseaux\") {\n\n nb = nb + 1; // Sleeve counter\n // } else\n // return \"Rejouer ?\"\n };\n\n if (nb == 3) { // 3 sleeves = 1 game\n nb = 0; // reset counter\n\n if (bot > toi) // Alert info for player 1 : Bot win the game \n {\n alert(\"Tu as perdu !\");\n } else {\n if (bot < toi) // Alert info for player 1 : Toi win the game \n {\n alert(\"Tu as gagné !\");\n } else\n alert(\"Match nul\"); // Alert info for player 1 : No one win the game\n }\n bot = 0; // Reset bot - player 2 counter\n toi = 0 // Reset toi - player 1 counter\n\n\n return 0;\n }\n}", "fadeOutDialog() {\n if (this.scene.fadeOut) //Process if fadeout was activated in the child class\n {\n if (this.dialogBox.closing) //Process if dialog Box should be closing (because button a or b was toggled)\n {\n //If title box is not completely off the canvas (at exit position), it should continue to go down with textBox and answerBox\n if (this.dialogBox.titleBox.position.y <= this.dialogBox.titleBox.exitPosition.y) {\n this.dialogBox.titleBox.position.y += this.dialogBox.titleBox.slideOutSpeed;\n this.dialogBox.textBox.position.y += this.dialogBox.titleBox.slideOutSpeed;\n this.dialogBox.answerButton.position.y += this.dialogBox.titleBox.slideOutSpeed;\n }\n //Otherwise, if the titleBox is at its exit position, dialogBox.closed is turn true\n else if (this.dialogBox.titleBox.position.y >= this.dialogBox.titleBox.exitPosition.y) {\n this.dialogBox.closed = true; // Set dialog Box as closed to toggle either button a or b;\n }\n }\n\n // if all dialog (title, text, buttons) are off the canvas, the reaction of the button (a or b) should be toggled\n if (this.dialogBox.closed) {\n this.dialogBox.closing = false; //resets closing to false to be safe\n //button a toggle\n if (this.dialogBox.answerButton.a.toggle === true) {\n this.toggleButtonA();\n }\n //button b toggle\n else if (this.dialogBox.answerButton.b.toggle === true) {\n this.toggleButtonB();\n }\n }\n }\n }", "function playerMortgage() {\n var newPrompt = $(\"<div>\").attr(\"id\",\"promptUpgrade\");\n var qn = $(\"<p>\").text(\"What would you like to mortgage?\");\n var select = $(\"<select>\").addClass(\"styled-select\");\n for( var i = 0 ; i < propertiesInPlay.length; i++ ){\n var notMortgaged = propertiesInPlay[i].name;\n var newOption = $(\"<option>\").attr(\"value\",propertiesInPlay[i].name).text(propertiesInPlay[i].name);\n select.append(newOption);\n }\n var button1 = $(\"<button>\").attr(\"id\",\"upgradeSubmit\").text(\"Submit\");\n var button2 = $(\"<button>\").attr(\"id\",\"upgradeClose\").text(\"Close\");\n newPrompt.append(qn).append(select).append(button1).append(button2);\n newPrompt.insertAfter(\"#playerStats\");\n $(\"#upgradeClose\").on(\"click\", function(){$(\"#promptUpgrade\").remove()});\n $(\"#upgradeSubmit\").on(\"click\", mortgageProperty);\n $(\"#upgradeSubmit\").on(\"click\", function(){$(\"#promptUpgrade\").remove()});\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 showReply3 () {\n\t// variables used by the showReply3 function\n\tvar myAnswer3 = document.getElementById(\"myAnswerID3\").value.toUpperCase();\n\tvar replyText3 = document.getElementById(\"replyID3\");\n\n\t// switch cycles through myAnswer3 options and chooses the right property (e.g. reply3A) from the right animal object (e.g. unicorn) to show in the replyText3 div in the HTML\t\t\t\n\tswitch (myAnswer3) {\n \tcase \"MALE\":\n \t\treplyText3.innerHTML = unicorn.reply3A;\n \t\tbreak;\n \tcase \"FEMALE\":\n \t\treplyText3.innerHTML = unicorn.reply3B;\n \t\tbreak;\t\t \t\t \t\n \tcase \"SMART\":\n \t\treplyText3.innerHTML = troll.reply3A;\n \t\tbreak;\t\n \tcase \"STRONG\":\n \t\treplyText3.innerHTML = troll.reply3B;\n \t\tbreak;\t\n \tcase \"QUICK\":\n \t\treplyText3.innerHTML = rabbit.reply3A;\n \t\tbreak;\t\t\t \t\t\t\t \t\t\n \tcase \"RICH\":\n \t\treplyText3.innerHTML = rabbit.reply3B;\n \t\tbreak;\n \tdefault:\n \t\treplyText3.innerHTML = general.reply3A;\t\t \t\t\n\t\t\tbreak;\t\n }\n // the replyText3 div in the HTML is switched from hidden (set in css as a default option) to visible\n\treplyText3.style.visibility = \"visible\"; \t\t\n} //closes function showReply3 \t\t", "function checkWin() {\n const guessableLetters = document.querySelectorAll(\".letter\");\n const guessedLetters = document.querySelectorAll(\".show\");\n const overlay = document.getElementById('overlay');\n const overlayText = document.querySelector('.title');\n if (guessedLetters.length === guessableLetters.length){\n overlay.className = \"win\";\n overlayText.textContent = 'That was stupendous! The message was \"' + message + '\".';\n startButton.textContent = \"Play again?\";\n $(overlay).fadeIn(2500);\n } else if (missed === 5) {\n overlay.className = \"lose\";\n overlayText.innerHTML = '<p>Sorry bro, but that was awful. It should have said: \"' + message + '.\" <br><br>Redeem yourself?</You>';\n startButton.textContent = \"Giving up was never an option.\";\n $(overlay).fadeIn(2000);\n }\n }", "function clic() {\n if (presenceEnnemi === 666){\n dialogBox(\"TU ES MORT OH T'AS PAS COMPRIS OU QUOI ?\");\n } \n \n \n else if (presenceEnnemi < 1){\n var Min= Number(1)\n var Max= Number(5)\n\n function getRndInterger(min, max) {\n return Math.floor(Math.random() * (max - min + 1) ) + min;}\n ennemiChoisi = getRndInterger(Min,Max);\n//Début de niveau\n if(compteurEnnemiVaincu<4){\n switch (compteurEnnemiVaincu){\n case (0):\n rndEnnemi=giletJaune;\n document.getElementById(\"santeEnnemi\").innerHTML = (giletJaune.sante = Number(350));\n document.getElementById(\"aventure\").innerHTML += (\"</br></br></br>'AH NAN VPASSREZ PAS JCROA PA NAN'. Un humanoïde au cuir jaune phosphorescent vous bloque la route, vous empêchant de continuer votre chemin. Son regard hagard suppose que le dialogue sera vain. 'PASSREZ PA PI CETOU!'</br>\");\n scrollDown(\"fenetreCentrale\");\n break;\n \n case(1):\n rndEnnemi=keke;\n document.getElementById(\"santeEnnemi\").innerHTML = (keke.sante = Number(275));\n document.getElementById(\"aventure\").innerHTML += (\"</br></br></br>Un individu aussi bombé que nerveux marche d'un pas determiné vers vous, son regard injecté de sang vous traverse tandis qu'il s'exclame : 'T'AS TES PAPIERS TOI ? T'ES UN BON FRONCOIS ??'. Vous n'avez pas le temps de répliquer qu'il semble vouloir vous immobiliser.</br>\");\n scrollDown(\"fenetreCentrale\"); \n break;\n \n case (2):\n rndEnnemi=arrogant;\n document.getElementById(\"santeEnnemi\").innerHTML = (arrogant.sante = Number(145));\n document.getElementById(\"aventure\").innerHTML += (\"</br></br></br>'Ptite merde de pauvre de merde, si ça va pas ici c'est clairement à cause des gens comme toi sans ambitions qui ont la haine du succès et qui ne developpe aucun pouvoir d'achat pour pouvoir accéder à toutes mes offres béton que j'me casse le potin m'voyez à mettre en place, c'est à cause de gens comme toi qu'y'a rien qui va ici vous êtes vraiment un plebe de merde voyez ou pas, t'es con tu parles pas mais qu'est ce que tu vas faire ? Qu'est ce que tu vas m'faire j'suis un intouchable moi petit bâtard, essayes de me toucher que je rigole vas y essaye on va s'marrer' </br>Cet individu est bien trop insuportable pour que vous passiez à côté innocemment.</br>\");\n scrollDown(\"fenetreCentrale\");\n break;\n \n case(3):\n rndEnnemi = babos;\n document.getElementById(\"santeEnnemi\").innerHTML = (babos.sante = Number(1));\n document.getElementById(\"aventure\").innerHTML += (\"</br></br></br>Un couinement de roue vous pousse à vous retourner. Un jeune homme aux cheveux blonds tentaculaires s'adresse à vous, même si ses yeux sont rivés sur le monocycle qui le supporte. </br>'Eh mec, tu sais, ici c'est de plus en plus Babylone. Les gens ils sont encore plus fous qu'ils étaient déjà bien fous tu vois ? genre avant ils couraient partout pour faire des trucs mais ça allait. Maintenant ils courent pour faire des trucs mais ça va pas, tu vois, c'est la couleur de leur âme qu'a changé, genre, avant ils étaient dur avec eux même et avec les autres, maintenant ils ont laissé tombé et ils sont en detresse ils savent que ça va pas mais genre ils savent pas pourquoi même si ils savent pourquoi au fond. WOOOOOOH j'me suis perdu allez bisous</br>\");\n scrollDown(\"fenetreCentrale\");\n break;\n default:\n dialogBox(\"SUCE BIEN MON CUL\");\n break;\n }\n\n\n //fin de niveau\n }else if(compteurEnnemiVaincu>=4){\n switch (ennemiChoisi){\n case (1):\n rndEnnemi=giletJaune;\n document.getElementById(\"santeEnnemi\").innerHTML = (giletJaune.sante = Number(350));\n document.getElementById(\"aventure\").innerHTML += (\"</br></br></br>'AH NAN VPASSREZ PAS JCROA PA NAN'. Un humanoïde au cuir jaune phosphorescent vous bloque la route, vous empêchant de continuer votre chemin. Son regard hagard suppose que le dialogue sera vain. 'PASSREZ PA PI CETOU!'</br>\");\n scrollDown(\"fenetreCentrale\");\n break;\n \n case(2):\n rndEnnemi=keke;\n document.getElementById(\"santeEnnemi\").innerHTML = (keke.sante = Number(275));\n document.getElementById(\"aventure\").innerHTML += (\"</br></br></br>Un individu aussi bombé que nerveux marche d'un pas determiné vers vous, son regard injecté de sang vous traverse tandis qu'il s'exclame : 'T'AS TES PAPIERS TOI ? T'ES UN BON FRONCOIS ??'. Vous n'avez pas le temps de répliquer qu'il semble vouloir vous immobiliser.</br>\");\n scrollDown(\"fenetreCentrale\"); \n break;\n \n case (3):\n rndEnnemi=arrogant;\n document.getElementById(\"santeEnnemi\").innerHTML = (arrogant.sante = Number(145));\n document.getElementById(\"aventure\").innerHTML += (\"</br></br></br>'Ptite merde de pauvre de merde, si ça va pas ici c'est clairement à cause des gens comme toi sans ambitions qui ont la haine du succès et qui ne developpe aucun pouvoir d'achat pour pouvoir accéder à toutes mes offres béton que j'me casse le potin m'voyez à mettre en place, c'est à cause de gens comme toi qu'y'a rien qui va ici vous êtes vraiment un plebe de merde voyez ou pas, t'es con tu parles pas mais qu'est ce que tu vas faire ? Qu'est ce que tu vas m'faire j'suis un intouchable moi petit bâtard, essayes de me toucher que je rigole vas y essaye on va s'marrer' </br>Cet individu est bien trop insuportable pour que vous passiez à côté innocemment.</br>\");\n scrollDown(\"fenetreCentrale\");\n break;\n \n case(4):\n rndEnnemi = babos;\n document.getElementById(\"santeEnnemi\").innerHTML = (babos.sante = Number(1));\n document.getElementById(\"aventure\").innerHTML += (\"</br></br></br>Un couinement de roue vous pousse à vous retourner. Un jeune homme aux cheveux blonds tentaculaires s'adresse à vous, même si ses yeux sont rivés sur le monocycle qui le supporte. </br>'Eh mec, tu sais, ici c'est de plus en plus Babylone. Les gens ils sont encore plus fous qu'ils étaient déjà bien fous tu vois ? genre avant ils couraient partout pour faire des trucs mais ça allait. Maintenant ils courent pour faire des trucs mais ça va pas, tu vois, c'est la couleur de leur âme qu'a changé, genre, avant ils étaient dur avec eux même et avec les autres, maintenant ils ont laissé tombé et ils sont en detresse ils savent que ça va pas mais genre ils savent pas pourquoi même si ils savent pourquoi au fond. WOOOOOOH j'me suis perdu allez bisous</br>\");\n scrollDown(\"fenetreCentrale\");\n break;\n\n case(5):\n rndEnnemi = macron;\n document.getElementById(\"santeEnnemi\").innerHTML = (macron.sante = Number(666));\n document.getElementById(\"aventure\").innerHTML += (\"</br></br></br>FINAL BOSS TEMPORAIRE, IL EST RAPIDE, PAS BEAU, MAIS HABILE.</br>Enjoy.</br>\");\n scrollDown(\"fenetreCentrale\");\n break;\n \n default:\n dialogBox(\"SUCE BIEN MON CUL\");\n break;\n }\n }\n presenceEnnemi++;\n document.getElementById(\"pseudoEnnemi\").innerHTML = rndEnnemi.nom;\n document.getElementById(\"forceEnnemi\").innerHTML = rndEnnemi.force;\n document.getElementById(\"specialEnnemi\").innerHTML = rndEnnemi.special;\n } \n\n\n else if (presenceEnnemi === 1){\n dialogBox(\"Tu as déjà un adversaire à qui botter le fion, occupe toi de celui ci !\");}\n}", "function combatSpoils() {\r\n\tviewBox.style.display = \"block\";\r\n\tget(\"vBoxEquip\").style.display = \"none\";\r\n\tget(\"vBoxUse\").style.display = \"none\";\r\n\tget(\"vBoxDrop\").style.display = \"none\";\r\n\tget(\"vBoxCancel\").style.display = \"none\";\r\n\tget(\"vBoxDesc\").style.display = \"block\";\r\n\tget(\"vBoxDesc\").innerHTML = \"Well, it could have been worse... at least I'm still standing.\";\r\n\tget(\"vBoxHeader\").innerHTML = \"You vanquish the \" + currEnemyName + \"!\";\r\n\tget(\"vBoxContent\").innerHTML = \"<strong>EXP:</strong> \" + currEnemyXp + \"<br>\" + \" <strong>Gold Pieces:</strong> \" + currEnemyGp;\r\n\tget(\"vBoxAccept\").style.display = \"inline\";\r\n\tplayerDetails.exp += currEnemyXp;\r\n}", "function askForName() {\n // drop down menu\n let input = document.createElement(\"input\");\n input.type = \"text\";\n // when the input field is unselected the popup will be closed\n input.addEventListener(\"blur\", (e) => {\n players.push(new Player(e.target.value));\n e.target.parentNode.style.display = \"none\";\n });\n createPopup(\"Enter Name:\", input);\n}", "function win() {\r\n if(playerHasSword===true && playerHasSelfConfidence===true && playerHasShortBlade===true && playerHasWD40===true && currentlocation===10) {\r\n var msg = \"You crawl through the ductwork and see your target. Quickly jumping down, you wound him with the short blade. He lashes out and strikes you back while drawing his sword. You draw the Sword of Aquilius and attack. After a brief battle, LaFontanue knocks the sword from your hand and prepares to run your through. At the last second, you extend your hidden blade and plunge it into his throat, killing him. Your mission is complete. Congratulations.\";\r\n updateText(msg);\r\n }\r\n }" ]
[ "0.664677", "0.63976127", "0.6198172", "0.6083115", "0.5990981", "0.59305096", "0.58780956", "0.58722365", "0.5835621", "0.58279914", "0.57722867", "0.5729465", "0.5729293", "0.57028335", "0.5695204", "0.5682242", "0.56712484", "0.56617755", "0.5656474", "0.56164366", "0.5601469", "0.55946076", "0.55924445", "0.5585768", "0.5554887", "0.5541343", "0.5539553", "0.5528611", "0.55040324", "0.55013263", "0.5496018", "0.54720414", "0.54641837", "0.5463234", "0.54631835", "0.5440752", "0.54104185", "0.53919846", "0.53875315", "0.53803855", "0.5379084", "0.5372256", "0.5371958", "0.5362487", "0.53619516", "0.5360308", "0.5357923", "0.53515226", "0.5347175", "0.53463864", "0.53396505", "0.5334221", "0.5297598", "0.5289534", "0.5288626", "0.5285314", "0.52758205", "0.52720034", "0.52679884", "0.5267973", "0.5263853", "0.52612185", "0.52569014", "0.5251196", "0.5244888", "0.5243632", "0.5243451", "0.5233633", "0.52223223", "0.52192515", "0.52153593", "0.5211086", "0.5206916", "0.5198915", "0.5194776", "0.5191075", "0.5188747", "0.51852053", "0.5180502", "0.5179097", "0.51766104", "0.5176096", "0.5173865", "0.517238", "0.5169369", "0.5160627", "0.51592594", "0.5156992", "0.5154974", "0.51514703", "0.5148854", "0.514539", "0.514128", "0.5139848", "0.51370883", "0.5136864", "0.51353025", "0.512978", "0.5119897", "0.5119115" ]
0.62166345
2
x, and y can be anything... but maxWidth should not be the right side of your rectangle.
function wrapText(ctx, text, x, y, maxWidth, lineHeight, size, color) { var words = text.split(" "); var line = ""; ctx.font = size + "pt arial"; ctx.fillStyle = color; for (var n = 0; n < words.length; n++) { var testLine = line + words[n] + " "; var metrics = ctx.measureText(testLine); var testWidth = Math.abs(metrics.actualBoundingBoxLeft) + Math.abs(metrics.actualBoundingBoxRight); if (testWidth > maxWidth && n > 0) { ctx.fillText(line, x, y); line = words[n] + " "; y += lineHeight; } else { line = testLine; } } ctx.fillText(line, x, y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleWrapping() {\n // Off the left or right\n if (this.x < 0) {\n this.x += width;\n }\n else if (this.x > width) {\n this.x -= width;\n }\n constrain(this.y, 0, height);\n }", "constrain(x, y, scale) {\n scale || (scale = this.state.scale);\n\n if (this.state.size.width * scale > this.props.width) {\n minX = (this.state.size.width * scale - this.props.width) * -1;\n maxX = 0;\n } else {\n minX = 0;\n maxX = this.props.width - this.state.size.width * scale;\n }\n\n if (this.state.size.height * scale > this.props.height) {\n minY = (this.state.size.height * scale - this.props.height) * -1;\n maxY = 0;\n } else {\n minY = 0;\n maxY = this.props.height - this.state.size.height * scale;\n }\n\n x = Math.max(x, minX);\n x = Math.min(x, maxX);\n\n y = Math.max(y, minY);\n y = Math.min(y, maxY);\n\n return {\n x: x,\n y: y\n };\n }", "function put_rect(rect, max_width){\r\n line.push(rect);\r\n\r\n var parent = undefined;\r\n\r\n for (var i = 0; i < line.length; i++){\r\n if ((line[i].space_left >= rect.height) && (line[i].x + line[i].width + rect.width + applyPacking.PADDING - max_width) <= applyPacking.FLOAT_EPSILON){\r\n parent = line[i];\r\n break;\r\n }\r\n }\r\n\r\n if (parent !== undefined){\r\n rect.x = parent.x + parent.width + applyPacking.PADDING;\r\n rect.y = parent.bottom;\r\n rect.space_left = rect.height;\r\n rect.bottom = rect.y;\r\n parent.space_left -= rect.height + applyPacking.PADDING;\r\n parent.bottom += rect.height + applyPacking.PADDING;\r\n } else {\r\n rect.y = global_bottom;\r\n global_bottom += rect.height + applyPacking.PADDING;\r\n rect.x = init_x;\r\n rect.bottom = rect.y;\r\n rect.space_left = rect.height;\r\n }\r\n\r\n if (rect.y + rect.height - real_height > -applyPacking.FLOAT_EPSILON) real_height = rect.y + rect.height - init_y;\r\n if (rect.x + rect.width - real_width > -applyPacking.FLOAT_EPSILON) real_width = rect.x + rect.width - init_x;\r\n }", "function resizeRect() {\n changeCursor(\"nw-resize\")\n coordinates = getCanvasMousePosition(canvas, event)\n if(coordinates.x > panels[whichPanel][i].x && coordinates.y > panels[whichPanel][i].y)\n {\n resizeRectangle(canvas, event, i)\n }\n }", "getMaxWidth(){return this.__maxWidth}", "function constrainPoint(point,rect){return{left:Math.min(Math.max(point.left,rect.left),rect.right),top:Math.min(Math.max(point.top,rect.top),rect.bottom)};}", "function positionRectangle(rect, x, y) {\n if (x >= 0 && x + rect.width <= canvas.width) {\n rect.left = x;\n rect.right = rect.left + rect.width;\n } else if (x < 0) {\n rect.left = 0;\n rect.right= rect.width;\n } else if (x + rect.width > canvas.width) {\n rect.left = canvas.width - rect.width;\n rect.right = canvas.width;\n }\n if (y >= 0 && y + rect.height <= canvas.height) {\n rect.top = y;\n rect.bottom = rect.top + rect.height;\n } else if (y < 0) {\n rect.top = 0;\n rect.bottom = rect.height;\n } else if (y + rect.height > canvas.height) {\n rect.top = canvas.height - rect.height;\n rect.bottom = canvas.height; \n }\n}", "function rectangleArea(l, w) {\n\treturn length * width;\n}", "function areaRectangle(length, width){\n return -1;\n }", "set maxWidth(value) {}", "function smallRect (xVal, yVal, red, green, blue) {\n\tfill(red, green, blue);\n\trect(xVal, yVal, 60, 150);\n}", "handleConstraints() {\n if (this.x < 0) {\n this.x = 0;\n }\n if (this.x > width - 1) {\n this.x = width - this.size;\n }\n if (this.y < 0) {\n this.y = 0;\n }\n if (this.y > height - 1) {\n this.y = height - this.size;\n }\n\n\n }", "static WorldPointToSizedRect() {}", "function calcDimensions(x, y) {\n if (x > xMax) {\n xMax = x;\n }\n if (x < xMin) {\n xMin = x;\n }\n if (y > yMax) {\n yMax = y;\n }\n if (y < yMin) {\n yMin = y;\n }\n }", "inBounds(){\n if (this.pos.x <= 0) {\n this.pos.x = 0;\n }\n if (this.pos.y <= 0) {\n this.pos.y = 0;\n }\n if (this.pos.x >= width ) {\n this.pos.x = width;\n }\n if (this.pos.y >= height) {\n this.pos.y = height;\n }\n }", "wrap() {\n if (this.x > width) {\n this.x -= width;\n }\n }", "function Rect(x,y,sx,sy,centered){\n this.sx = sx; // width of the rectangle on the x axis\n this.sy = sy; // width of the rectangle on the y axis\n this.hx = sx/2; // half of the rectangle width on the x axis\n this.hy = sy/2; // half of the rectangle width on the y axis\n this.x = x; // minimum x coordinate contained in the rectangle \n this.y = y; // minimum y coordinate contained in the rectangle\n this.cx = x + this.hx; // x coordinate of the rectangle center\n this.cy = y + this.hy; // y coordinate of the rectangle center\n this.mx = this.x + sx; // maximum x coordinate contained in the rectangle\n this.my = this.y + sy; // maximum x coordinate contained in the rectangle\n if(centered){\n this.x -= this.hx;\n this.cx -= this.hx;\n this.mx -= this.hx;\n this.y -= this.hy;\n this.cy -= this.hy;\n this.my -= this.hy;\n }\n }", "function checkExpanse(x, y){\n\n\t//check bounds\n\tvar w = drawing.style(\"width\");\n\tvar h = drawing.style(\"height\");\n\n\tif(x>w){\n\t\tdrawing.style(\"width\", w+x);\n\t}\n\tif(y>h){\n\t\tdrawing.style(\"height\", h+y);\n\t}\n\n}", "function boundaries(box){\n if(box.x <=0){\n box.x = 0\n }\n if(box.x + box.width >= canvas.width){\n box.x = canvas.width - box.width;\n }\n if(box.y <=0){\n box.y = 0;\n }\n if(box.y + box.height >= canvas.height){\n box.y = canvas.height - box.height;\n }\n}", "function fillRectInnerBorder(ctx, x, y, width, height, borderWidth) {\r\n // horizontal (top and bottom) edges\r\n ctx.fillRect(x + borderWidth, y, width - borderWidth * 2, borderWidth);\r\n ctx.fillRect(x + borderWidth, y + height - borderWidth, width - borderWidth * 2, borderWidth);\r\n // vertical (left and right) edges\r\n ctx.fillRect(x, y, borderWidth, height);\r\n ctx.fillRect(x + width - borderWidth, y, borderWidth, height);\r\n}", "function boundArea(x, y, w, h){\n\tthis.x = x;\n\tthis.y = y;\n\tthis.w = w;\n\tthis.h = h;\n}", "function getCoordinate(event) {\n let ne = rectangle.getBounds().getNorthEast();\n let sw = rectangle.getBounds().getSouthWest();\n\n rightUpLat = ne.lat();\n rightUpLng = ne.lng();\n leftDownLat = sw.lat();\n leftDownLng = sw.lng();\n\n let rectangleLength = rightUpLng - leftDownLng;\n let rectangleWidth = rightUpLat - leftDownLat;\n let check = false;\n\n if (rectangleWidth > maxWidth) {\n\n let newBounds = {\n north: rightUpLat,\n south: rightUpLat - maxWidth + 0.02,\n east: rightUpLng,\n west: leftDownLng\n };\n\n rectangle.setBounds(newBounds);\n check = true;\n }\n\n if (rectangleLength > maxLength) {\n\n let newBounds = {\n north: rightUpLat,\n south: leftDownLat,\n east: rightUpLng,\n west: rightUpLng - maxLength + 0.02\n };\n\n rectangle.setBounds(newBounds);\n check = true;\n }\n\n\n if (check) {\n alert('Превышен максимальный размер области');\n }\n}", "function getRectangle(x, y, width, height) {\n return {\n minX: x,\n maxX: x + width,\n minY: y,\n maxY: y + height\n };\n }", "function rectArea ({ width = 5, height = 5 } = {}) {\n return width*height;\n}", "function isValidCoordinate( x, y) {\n if(x < 0 || y < 0 || x >= maxWidth || y >= maxRows ) {\n return false\n }\n return true\n}", "function BoundingBoxRect() { }", "function drawRectangle() {\n let op = document.getElementById('canvas2').getContext(\"2d\");\n let height = Number(prompt(\"Height:\"));\n let width = Number(prompt(\"Width:\"));\n let x = Number(prompt(\"X:\"));\n let y = Number(prompt(\"Y:\"));\n\n if (height + y > 512 || width + x > 1024){\n alert(\"The rectangle will not fit on the canvas\");\n } else if (height < 1){\n alert(\"Height is too small\");\n } else if (width < 1){\n alert(\"Width is too small\");\n } else if (x < 5){\n alert(\"X is too small\");\n } else if (y < 5){\n alert(\"Y is too small\");\n } else if (isNaN(height) || isNaN(width) || isNaN(x) || isNaN(y)){\n alert(\"One of your inputs is not a number\");\n } else {\n op.clearRect(0,0,1024,512);\n op.fillStyle = \"gray\";\n op.fillRect(x-1, y-1, width+2, height+2);\n op.fillStyle = \"white\";\n op.fillRect(x+1, y+1, width-2, height-2);\n }\n}", "function drawRectangle() {\n let canvas = document.getElementById('canvas2');\n var draw = canvas.getContext('2d');\n draw.clearRect(0, 0, canvas.width, canvas.height);\n width= Number(prompt('Please enter a positive width greater than 1'));\n height= Number(prompt('Please enter a positive height greater than 1'));\n x= Number(prompt('please enter an x position'));\n y= Number(prompt('Please enter a y position'));\n if (isNaN(height) == true || isNaN(width) == true || isNaN(x) == true || isNaN(y) == true) {\n alert(\"One of your inputs is not a number.\");\n } else if (height < 1) {\n alert(\"Your height is too small.\");\n } else if (width < 1) {\n alert(\"Your width is too small.\");\n } else if (x < 5) {\n alert(\"Your x-coordinate is too small.\");\n } else if (y < 5) {\n alert(\"Your y-coordinate is too small.\");\n } else if (x + width >= 1024 || y + height >= 512) {\n alert(\"The rectangle will not fit on the canvas.\");\n } else {\n draw.strokeRect(x, y, width, height);\n }\n}", "function checkBounds(x, y) {\n return x < 0 || x >= w || y < 0 || y >= h;\n}", "function rectangle(width, height, x, y) {\n if (!_utils_Type__WEBPACK_IMPORTED_MODULE_1__[\"isNumber\"](x)) {\n x = 0;\n }\n if (!_utils_Type__WEBPACK_IMPORTED_MODULE_1__[\"isNumber\"](y)) {\n y = 0;\n }\n return moveTo({ x: x, y: y }) + lineTo({ x: x + width, y: y }) + lineTo({ x: x + width, y: y + height }) + lineTo({ x: x, y: y + height }) + closePath();\n}", "getMaxWidthUnit(){return this.__maxWidthUnit}", "handleWrapping() {\n // Off the left or right\n if (this.x < 0) {\n this.x += width;\n } else if (this.x > width) {\n this.x -= width;\n }\n // Off the top or bottom\n if (this.y < 0) {\n this.y += height;\n } else if (this.y > height) {\n this.y -= height;\n }\n }", "handleWrapping() {\n // Off the left or right\n if (this.x < 0) {\n this.x += width;\n } else if (this.x > width) {\n this.x -= width;\n }\n // Off the top or bottom\n if (this.y < 0) {\n this.y += height;\n } else if (this.y > height) {\n this.y -= height;\n }\n }", "handleWrapping() {\n// Off the left or right\n if (this.x < -100) {\n this.x += width;\n this.y = random(0,height);\n }\n else if (this.x > width) {\n this.x -= width;\n }\n }", "function getRectArea(width, height) {\n return width * height;\n}", "get maxWidth() {}", "function increaseRectangleWidth(rectangle) {\n rectangle.setWidth(rectangle.width + 1);\n}", "rect(x, y, w, h) {\n CanvasManager.rect(findNodeHandle(this), x, y, w, h)\n }", "function rect(x, y, w, h) {\n this.x = x;\n this.y = y;\n this.w = w;\n this.h = h;\n }", "function checkBounds(x,y) {\n return ((0<=x) && (x<=maxX) && (0<=y) && (y<=maxY)); }", "function constrainPoint(point, rect) {\n return {\n left: Math.min(Math.max(point.left, rect.left), rect.right),\n top: Math.min(Math.max(point.top, rect.top), rect.bottom)\n };\n }", "maxRect() {\n return [0, 0, null, null, 0, 0];\n }", "function keepInBounds(el){\n if(el.x + el.w >= canvas.width){\n el.x = canvas.width - el.w;\n }\n else if(el.x <= 0){\n el.x = 0;\n }\n if(el.y >= canvas.height - el.h){\n el.y = canvas.height - el.h;\n }\n else if(el.y <= 0){\n el.y = 0;\n }\n }", "function constrain(obj) {\n if (obj.x < 0) {\n obj.x = 0;\n //the five comes from the border width\n } else if (obj.x > windowX - obj.diameter - 5) {\n obj.x = windowX - obj.diameter - 5;\n }\n if (obj.y < 0) {\n obj.y = 0;\n } else if (obj.y > windowY - obj.diameter - 5) {\n obj.y = windowY - obj.diameter - 5;\n }\n}", "function drawRectangle(value) {\n var width = value.width;\n var length = value.length;\n}", "limitx() { return (this.scale - 1) * this.sizex / 2; }", "setTileBorderWidth(x, y, width) {\n // bounds checking\n if (x >= 0 && x < this._width && y >= 0 && y < this._height) \n this.getTile(x, y).borderWidth = width;\n }", "setTileBorderWidth(x, y, width) {\n // bounds checking\n if (x >= 0 && x < this._width && y >= 0 && y < this._height) \n this.getTile(x, y).borderWidth = width;\n }", "function Rect(x, y, w, h) {\n this.x = x;\n this.y = y;\n this.width = w;\n this.height = h;\n}", "checkRectangleSide(min, max, value) {\n //Does the whole magic\n if (value < min) {\n return min;\n } else if (value > max) {\n return max;\n } else {\n return value;\n }\n }", "function constrainPoint(point, rect) {\n return {\n left: Math.min(Math.max(point.left, rect.left), rect.right),\n top: Math.min(Math.max(point.top, rect.top), rect.bottom)\n };\n}", "function constrainPoint(point, rect) {\n return {\n left: Math.min(Math.max(point.left, rect.left), rect.right),\n top: Math.min(Math.max(point.top, rect.top), rect.bottom)\n };\n}", "function constrainPoint(point, rect) {\n return {\n left: Math.min(Math.max(point.left, rect.left), rect.right),\n top: Math.min(Math.max(point.top, rect.top), rect.bottom)\n };\n}", "function constrainPoint(point, rect) {\n return {\n left: Math.min(Math.max(point.left, rect.left), rect.right),\n top: Math.min(Math.max(point.top, rect.top), rect.bottom)\n };\n}", "function constrainPoint(point, rect) {\n return {\n left: Math.min(Math.max(point.left, rect.left), rect.right),\n top: Math.min(Math.max(point.top, rect.top), rect.bottom)\n };\n}", "function xResizeTo(e,w,h)\r\n{\r\n xWidth(e,w);\r\n xHeight(e,h);\r\n}", "get Area() { return this.Width * this.Height; }", "get Area() { return this.Width * this.Height; }", "constrainTo(_rect) {\n if (this.x < _rect.left) {\n this.x = _rect.left;\n }\n if (this.y < _rect.top) {\n this.y = _rect.top;\n }\n if (this.x > _rect.right) {\n this.x = _rect.right;\n }\n if (this.y > _rect.bottom) {\n this.y = _rect.bottom;\n }\n return this;\n }", "drawBoundaryRect(x,y,w,h,col){\n ctx.beginPath();\n ctx.rect(x,y,w,h);\n ctx.lineWidth = 1;\n ctx.fillStyle = col; //determines the colour of the fill of the dragging rectangle \n ctx.fill();\n }", "function rectangle(height, width, x, y) {\n var rect = [x, y, 0,\n x + width, y, 0,\n x + width, y + height, 0,\n x, y + height, 0\n ];\n return rect;\n}", "function drawRect(gRect, w, h, x, y) { gRect.append(\"rect\").attr(\"fill\", \"red\").attr(\"width\", w).attr(\"height\", h).attr(\"x\", x).attr(\"y\", y); }", "function checkMapBounds(x, y, width, height) {\n\tvar safeX = x,\n\t\tsafeY = y;\n\n\tif (x < 0) {\n\t\tsafeX = 0;\n\t} else if ((x + width) > serverConfig.mapWidth) {\n\t\tsafeX = serverConfig.mapWidth - width;\n\t}\n\n\tif (y < 0) {\n\t\tsafeY = 0;\n\t} else if ((y + height) > serverConfig.mapHeight) {\n\t\tsafeY = serverConfig.mapHeight - height;\n\t}\n\n\treturn {\n\t\tx: safeX,\n\t\ty: safeY\n\t};\n}", "checkEdge(displayWidth, displayHeight){\n if(this.x < 0){\n this.x = displayWidth;\n }\n else if(this.x > displayWidth){\n this.x = 0;\n }\n if(this.y < 0){\n this.y = displayHeight;\n }\n else if(this.y > displayHeight){\n this.y = 0;\n }\n }", "function coordinateToRectangle(x, y){\n\n // The space a single rectangle and border occupies\n const unitWidth = rectangleWidth + gridThickness;\n const unitHeight = rectangleHeight + gridThickness;\n\n // We need to take into account the extra border at the top/left sides\n // of the canvas, before performing the calculation\n const extraBorder = gridThickness / 2;\n\n // The grid counts rectangles starting at the bottom, but coordinates start\n // at the top, so the row needs to be inverted (0 -> max, max -> 0, etc.)\n const maxRow = numRectanglesHigh - 1;\n\n let column = Math.ceil(x / unitWidth - extraBorder);\n let row = maxRow - Math.ceil(y / unitHeight - extraBorder);\n\n column = clampValueBetween(column, 0, numRectanglesWide - 1);\n row = clampValueBetween(row, 0, numRectanglesHigh - 1);\n\n return {\n x: column,\n y: row\n };\n }", "function __ceilRect(rect)\r\n{\r\n var x = rect.x;\r\n var y = rect.y;\r\n rect.x = Math.floor(x);\r\n rect.y = Math.floor(y);\r\n rect.width = Math.ceil(rect.width + (x - rect.x));\r\n rect.height = Math.ceil(rect.height + (y - rect.y));\r\n}", "function cursor_box_size() { return { x: 10, y: 10 }; }", "function Rect(x, y, w, h) {\n this.x = x; this.y = y;\n this.w = w; this.h = h;\n}", "function drawRectangle(x, y, length, width, color, lineWidth)\n{\n var canvas = document.getElementById(\"myCanvas\");\n var ctx = canvas.getContext(\"2d\");\n ctx.lineWidth = width;\n ctx.strokeStyle = color;\n ctx.rect(x, y, lineWidth, length);\n ctx.stroke();\n\n}", "function lbCreateRect2(x, y, width, height) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n}", "function constrainPoint(point, rect) {\n\treturn {\n\t\tleft: Math.min(Math.max(point.left, rect.left), rect.right),\n\t\ttop: Math.min(Math.max(point.top, rect.top), rect.bottom)\n\t};\n}", "function constrainPoint(point, rect) {\n\treturn {\n\t\tleft: Math.min(Math.max(point.left, rect.left), rect.right),\n\t\ttop: Math.min(Math.max(point.top, rect.top), rect.bottom)\n\t};\n}", "function constrainPoint(point, rect) {\n\treturn {\n\t\tleft: Math.min(Math.max(point.left, rect.left), rect.right),\n\t\ttop: Math.min(Math.max(point.top, rect.top), rect.bottom)\n\t};\n}", "function constrainPoint(point, rect) {\n\treturn {\n\t\tleft: Math.min(Math.max(point.left, rect.left), rect.right),\n\t\ttop: Math.min(Math.max(point.top, rect.top), rect.bottom)\n\t};\n}", "function constrainPoint(point, rect) {\n\treturn {\n\t\tleft: Math.min(Math.max(point.left, rect.left), rect.right),\n\t\ttop: Math.min(Math.max(point.top, rect.top), rect.bottom)\n\t};\n}", "function constrainPoint(point, rect) {\n\treturn {\n\t\tleft: Math.min(Math.max(point.left, rect.left), rect.right),\n\t\ttop: Math.min(Math.max(point.top, rect.top), rect.bottom)\n\t};\n}", "function constrainPoint(point, rect) {\n\treturn {\n\t\tleft: Math.min(Math.max(point.left, rect.left), rect.right),\n\t\ttop: Math.min(Math.max(point.top, rect.top), rect.bottom)\n\t};\n}", "function constrainPoint(point, rect) {\n\treturn {\n\t\tleft: Math.min(Math.max(point.left, rect.left), rect.right),\n\t\ttop: Math.min(Math.max(point.top, rect.top), rect.bottom)\n\t};\n}", "constrainSpriteBounds() {\n if( this.playerSprite === null ) {\n return;\n }\n\n if(this.playerSprite.position.x < -1 ) {\n this.playerSprite.position.x = 0;\n }\n else if(this.playerSprite.position.x > width+1 ) {\n this.playerSprite.position.x = width;\n }\n else if(this.playerSprite.position.y < -1 ) {\n this.playerSprite.position.y = 0;\n }\n else if(this.playerSprite.position.y > height ) {\n this.playerSprite.position.y = height;\n }\n }", "function Rect (x, y, w, h) {\n\tthis.x = x || 0;\n\tthis.y = y || 0;\n\tthis.width = w || 0;\n\tthis.height = h || 0;\n}", "function constrainPoint(point, rect) {\n return {\n left: Math.min(Math.max(point.left, rect.left), rect.right),\n top: Math.min(Math.max(point.top, rect.top), rect.bottom)\n };\n }", "function constrainPoint(point, rect) {\n return {\n left: Math.min(Math.max(point.left, rect.left), rect.right),\n top: Math.min(Math.max(point.top, rect.top), rect.bottom)\n };\n }", "function constrainPoint(point, rect) {\n return {\n left: Math.min(Math.max(point.left, rect.left), rect.right),\n top: Math.min(Math.max(point.top, rect.top), rect.bottom)\n };\n }", "function constrainPoint(point, rect) {\n return {\n left: Math.min(Math.max(point.left, rect.left), rect.right),\n top: Math.min(Math.max(point.top, rect.top), rect.bottom)\n };\n }", "function constrainPoint(point, rect) {\n return {\n left: Math.min(Math.max(point.left, rect.left), rect.right),\n top: Math.min(Math.max(point.top, rect.top), rect.bottom),\n };\n }", "function rect(x, y, w, h) {\n gCtx.beginPath();\n gCtx.rect(x, y, w, h);\n gCtx.closePath();\n gCtx.fill();\n}", "function drawRect() {\n changeCursor(\"crosshair\")\n coordinates = getCanvasMousePosition(canvas, event)\n if(coordinates.x > leftCorner.x && coordinates.y > leftCorner.y)\n {\n drawDragRect(canvas, event, leftCorner)\n }\n }", "function constrainPoint(point, rect) {\n\t\treturn {\n\t\t\tleft: Math.min(Math.max(point.left, rect.left), rect.right),\n\t\t\ttop: Math.min(Math.max(point.top, rect.top), rect.bottom)\n\t\t};\n\t}", "function Rect(point, width, height) {\n this.point = point;\n this.width = width; \n this.height = height;\n}", "function changeRectangleWidthNasty() {\n document.querySelector(\"#rectangle\").style.width = \"-300px\";\n}", "function __Rect(x, y, width, height) {\n this.x1 = x || 0;\n this.y1 = y || 0;\n this.width = width || 0;\n this.height = height || 0;\n this.x2 = this.x1 + this.width;\n this.y2 = this.y1 + this.height;\n\n return this;\n }", "function getArea(rectangle) {\n return rectangle.width * rectangle.height;\n}", "function drawSquareRectangle(width,height) {\n var canvas = document.getElementById('myCanvas');\n if (canvas.getContext) {\n var ctx = canvas.getContext('2d');\n ctx.strokeRect(10, 10, width, height);\n }\n}", "function setRectangle(gl, x, y, width, height) {\n var x1 = x;\n var x2 = x + width;\n var y1 = y;\n var y2 = y + height;\n\n // Drawing related to the canvas size\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([x1, y1, x2, y1, x1,\n y2, x1, y2, x2, y1, x2, y2\n ]), gl.STATIC_DRAW);\n\n}", "static createRectangle(x, y, width, height) {\n return new Rectangle(x, y, width, height)\n }", "set minimumWidth(value) { }", "function rect(x,y,w,h){\r\n var rect = {\r\n filly:ctx.fillRect(x,y,w,h),\r\n stroky:ctx.strokeRect(x,y,w,h)\r\n };\r\n return rect;\r\n}", "function maxSize (x) {\r\n var pref = size(x);\r\n if ( pref === null ) {return null;}\r\n return filter(x) ? filter(x).call(this, {\r\n edge : edge(x), \r\n result : { width : pref.maxWidth, height : pref.maxHeight },\r\n size : { width : width, height : height }\r\n }) : minSize(x);\r\n }", "function showRect(svg, { x, y, width, height }) {\n const view = getViewBox(svg);\n const { width: width_, height: height_ } = calculateNewWidthAndHeight({\n width,\n height,\n });\n setViewBox(svg, {\n x: x + width / 2 - width_ / 2,\n y: y + height / 2 - height_ / 2,\n width: width_,\n height: height_,\n });\n function calculateNewWidthAndHeight({ width, height }) {\n const margin = 1.3;\n const minimum = 500;\n if (width < minimum && height < minimum) {\n if (width > height) {\n width = minimum;\n } else {\n height = minimum;\n }\n }\n return {\n width:\n width > height\n ? width * margin\n : (view.width * height * margin) / view.height,\n height:\n height >= width\n ? height * margin\n : (view.height * width * margin) / view.width,\n };\n }\n }", "resizeToChildren() {\n let totalBounds = this.recurseThroughChildren(this, []);\n let minX;\n let minY;\n let maxX;\n let maxY;\n for (let bound in totalBounds) {\n if (!minX) {\n minX = this.x;\n maxX = totalBounds[bound].x + totalBounds[bound].width;\n minY = this.y;\n maxY = totalBounds[bound].y + totalBounds[bound].height\n continue;\n }\n if (totalBounds[bound].x + totalBounds[bound].width > maxX) {\n maxX = totalBounds[bound].x + totalBounds[bound].width\n }\n if (totalBounds[bound].y + totalBounds[bound].height > maxY) {\n maxY = totalBounds[bound].y + totalBounds[bound].height\n }\n }\n this.x = minX;\n this.y = minY;\n this.width = maxX - minX;\n this.height = maxY - minY;\n this.sizeUpdated = true;\n }", "function createRect() {\n return { top: NaN, left: NaN, width: NaN, height: NaN };\n}" ]
[ "0.6698688", "0.65038264", "0.649497", "0.63847077", "0.63452333", "0.62611157", "0.6204067", "0.6187502", "0.6127468", "0.612503", "0.6111942", "0.6104942", "0.6099007", "0.60744506", "0.60655034", "0.6045468", "0.5999384", "0.5980415", "0.5974906", "0.5963732", "0.59569883", "0.5931198", "0.59149635", "0.59110886", "0.59108406", "0.5906609", "0.59001184", "0.5893464", "0.5893318", "0.5891092", "0.5875243", "0.587126", "0.587126", "0.58649266", "0.58562243", "0.584955", "0.58437985", "0.58366257", "0.5836519", "0.58363855", "0.5827772", "0.5795285", "0.57912743", "0.57836497", "0.57810545", "0.5774669", "0.57716435", "0.57716435", "0.5767666", "0.5766432", "0.5762894", "0.5762894", "0.5762894", "0.5762894", "0.5762894", "0.57505214", "0.5749798", "0.5749798", "0.5747527", "0.57471925", "0.57348496", "0.5732566", "0.5722711", "0.5720373", "0.5709015", "0.5692688", "0.56674266", "0.5656097", "0.5654168", "0.5652423", "0.56507057", "0.56507057", "0.56507057", "0.56507057", "0.56507057", "0.56507057", "0.56507057", "0.56507057", "0.5639853", "0.56368786", "0.56331974", "0.56331974", "0.56331974", "0.56331974", "0.5630083", "0.5630045", "0.5629242", "0.5622605", "0.56221855", "0.5610507", "0.5609197", "0.5595629", "0.5594236", "0.5591156", "0.5590873", "0.55892366", "0.5581905", "0.55797416", "0.5576359", "0.5574939", "0.55673426" ]
0.0
-1
Launches Dynamics NAV desktop client and waits for it to show up on screen.
function NavLaunch() { function _NavIsRunning() { var windows = g_util.FindWindows("regex:.*Microsoft Dynamics NAV", "regex:WindowsForms10.*"); return windows.length > 0; } function _MaximizeNav() { var windows = g_util.FindWindows("regex:.*Microsoft Dynamics NAV", "regex:WindowsForms10.*"); if (windows.length > 0) { windows[0].Maximized = true; } } if (_NavIsRunning()) { Tester.Message("Dynamics NAV Client is already running"); if (!g_inTestSet) { return true; } } var pfFolder = Global.GetSpecialFolderPath("ProgramFilesX86"); var dynamicsPath100 = pfFolder + "\\Microsoft Dynamics NAV\\100\\RoleTailored Client\\Microsoft.Dynamics.Nav.Client.exe"; var dynamicsPath110 = pfFolder + "\\Microsoft Dynamics NAV\\110\\RoleTailored Client\\Microsoft.Dynamics.Nav.Client.exe"; var pathOptions = [dynamicsPath100, dynamicsPath110]; var dynamicsPath = null; for(var i = 0; i < pathOptions.length; i++) { var path = pathOptions[i]; Log("Checking " + path); if (File.Exists(path)) { dynamicsPath = path; break; } } if(!dynamicsPath) { Tester.Message("Dynamics NAV Client is not installed on this computer"); return false; } if (_NavIsRunning() && g_inTestSet) { Global.DoKillByName('Microsoft.Dynamics.Nav.Client.exe'); } Tester.Message("Dynamics NAV Client is not started."); Global.DoLaunch(dynamicsPath); // Waiting for NAV to start for(var i = 0; i < 60; i++) { var _windows = g_util.FindWindows("regex:.*Microsoft Dynamics NAV", "regex:WindowsForms10.*"); if (_windows.length > 0) { var _wnd = _windows[0]; var uiaObj = SeSGetUIAutomationObject(_wnd); var toolBar = g_UIAutomationWrapper.FindElementByPropertyValue(uiaObj, 4, "AutomationElementIdentifiers.ControlTypeProperty", "ToolBar"); if (toolBar) { _MaximizeNav(); return true; } } Global.DoSleep(1000); } Tester.Message("Dynamics NAV Client did not start"); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startDialog() {\r\n\t// set server to appropriate value\r\n\tserver = window.arguments[0];\r\n\t\r\n\t// generate step list\r\n\tsetSteps();\r\n\t\r\n\t// move to center of parent window\r\n\tcenterWindowOnScreen();\r\n}", "function runDesktop() {\n distributor.run();\n bindMenu();\n }", "function start_auto_launch() {\n \n var quarkclientAutoLauncher = new AutoLaunch({\n name: 'QuarkClient',\n // path: '/Applications/QuarkClient.app',\n // path: '\"C:\\\\Users\\\\C9G\\\\AppData\\\\Roaming\\\\uTorrent Web\\\\utweb.exe\" /MINIMIZED',\n path: basepath + '\\\\quarkclient.exe',\n });\n\n quarkclientAutoLauncher.enable();\n\n quarkclientAutoLauncher.isEnabled()\n .then(function(isEnabled){\n if(isEnabled){\n return;\n }\n quarkclientAutoLauncher.enable();\n })\n .catch(function(err){\n // handle error\n });\n}", "function RCConnect() \n{\t\t\n\t//alert(\"RCTicket: \" + g_szRCTicket);\n\t//..alert(\"UserName: \" + g_szUserName);\n\t\n\tConnectionProgressLayer.style.visibility = \"visible\";\n\tRemoteControlObject.style.visibility = \"hidden\";\n\n\n\tif(null != RemoteDesktopClientHost)\n\t{\n\t\t\n\t\tg_bNewBinaries = true;\n\t\t \n\t\ttry\n\t\t{\n\t\t\t// \n\t\t\t// set screen up for the connect anouncement screen size.\n\t\t\t//\n\t\t\t//..setupFirstScreen();\n\t\t\tEnunciator.innerText = L_ConnectTo;\n\t\t\tHelpeeName.innerText = g_szUserName;\n\t\t\tFirstProgressBox.bgColor=\"#F5F5F5\";\n\n\t\t\t//alert(\"Obtaining g_oSAFRemoteDesktopClient \" + RemoteDesktopClientHost.readyState);\n\t\t\t//\n\t\t\t// Obtain the RDSClient object\n\t\t\t//\t\t\t\n\t\t\tg_oSAFRemoteDesktopClient = RemoteDesktopClientHost.GetRemoteDesktopClient();\n\t\t\t\n\t\t\t\n\t\t\tif(null != g_oSAFRemoteDesktopClient)\n\t\t\t{\n\t\t\t\t//\t\n\t\t\t\t//\tBind the event handlers for this object.\n\t\t\t\t//\n\t\t\t\tg_oSAFRemoteDesktopClient.OnConnected = function() \n\t\t\t\t\t\t{ ConnectedHandler(); }\n\n\t\t\t\tg_oSAFRemoteDesktopClient.OnDisconnected = function(reason) \n\t\t\t\t\t\t{ DisconnectedHandler(reason); }\n\t\n\t\t\t\tif (false == g_bNewBinaries)\n\t\t\t\t{\n\t\t\t\t\t//\n\t\t\t\t\t// Using the Old SALEM interfaces\n\t\t\t\t\t//\n\t\t\t\t\tg_oSAFRemoteDesktopClient.OnChannelDataReady = function(channelID) \n\t\t\t\t\t\t\t{ ChannelDataReadyHandler(channelID); }\n\t\n\t\t\t\t\tg_oSAFRemoteDesktopClient.ConnectToServer(g_szRCTicket);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\n\t\t\t\t\t//\n\t\t\t\t\t// Using the NEW Salem interfaces\n\t\t\t\t\t//\n\t\t\t\t\t\n\t\t\t\t\t//g_oSAFRemoteDesktopClient.OnRemoteControlRequestComplete = function(status)\n\t\t\t\t\t//\t{ RemoteControlRequestCompleteHandler( status ); }\n\t\t\t\t\t\t\n\t\t\t\t\t//alert(\"RCTicket: \" + g_szRCTicket);\n\t\t\t\t\tg_oSAFRemoteDesktopClient.ConnectParms = g_szRCTicket;\n\t\t\t\t\t\n\t\t\t\t\t//alert(\"Calling ConnectToServer\");\n\t\t\t\t\tg_oSAFRemoteDesktopClient.ConnectToServer();\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//\n\t\t\t\t// ToDo: Handle connection failure conditions\n\t\t\t\t//\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\talert( L_ERRRDSCLIENT_MSG );\n\t\t\t}\n\t\t}\n\t\tcatch(error)\n\t\t{\t\t\n\t\t\t\n\t\t\talert( L_ERRCONNECT_MSG + \"\\n\" + error );\n\n\t\t}\t\n\t}\n\telse\n\t{\n\t\talert( L_ERRRDSCLIENTHOST_MSG );\n\t}\n\n\t\n\t\n\treturn;\n}", "async startup() {\n const pwrap = this.app.getPage();\n\n log.info(`Start up`);\n\n const { delay = 20 } = this.loginMode;\n await pwrap.wait(delay * 1000);\n await pwrap.click('lets_get_started'); \n await pwrap.wait(5000);\n }", "function showPage() {\n\n g_opclient = new OpenpuxClient();\n\n // Create a form for navigation buttons\n enableForm(\"NavigationForm\");\n\n // Create a form for the sensor account information\n enableForm(\"SensorAccountForm\");\n}", "function Connect ()\n{\n\tvar DeviceName = GetProjectPartName ();\n\tTargetInterface.message (\"## Connect to \" + DeviceName);\n\tTargetInterface.message (\"## Connect to \" + DeviceName + \" - done\");\n}", "function initclient() {\n\tvar model=new RemoteModel();\n\tvar view=new UserView();\n\tvar controller=new Controller(model,view);\n\tmodel.init();\n\tgeid('userinterface').innerHTML=\"client initialized\";\n\tgeid('title').innerHTML=\"IOktopus v0.35 growing...\";\n}", "async function startClient() {\n\tconst entryFiles = resolve(__dirname, './index.html');\n\tconst options = {};\n\tconst bundler = new Bundler(entryFiles, options);\n\tawait bundler.serve(config.guiPort);\n}", "function start() {\n\n gw_job_process.UI();\n gw_job_process.procedure();\n\n var args = { ID: gw_com_api.v_Stream.msg_openedDialogue };\n gw_com_module.streamInterface(args);\n\n gw_com_module.startPage();\n gw_com_api.show(\"btnArrow\");\n }", "function start() {\n\n gw_job_process.UI();\n gw_job_process.procedure();\n gw_com_module.startPage();\n\n var args = { ID: gw_com_api.v_Stream.msg_openedDialogue };\n gw_com_module.streamInterface(args);\n\n v_global.logic.login_cnt = 0;\n }", "function initClient() {\n window.g_finished = false; // for selenium testing.\n\n // Runs the sample in V8. Comment out this line to run it in the browser\n // JavaScript engine, for example if you want to debug it.\n // TODO(kbr): we need to investigate why turning this on is\n // significantly slower than leaving it disabled.\n // o3djs.util.setMainEngine(o3djs.util.Engine.V8);\n\n o3djs.util.makeClients(main);\n}", "function doLoad()\n{\n window.open(\"load_device.xul\", \"loaddevice\", \n \"chrome,centerscreen,modal\");\n ClearDeviceList();\n RefreshDeviceList();\n}", "async started() {\n\t\tthis.broker.waitForServices(\"steedos-server\").then(async () => {\n\t\t\tawait this.publicClientJS()\n\t\t});\n\t}", "function start() {\n\n gw_job_process.UI();\n gw_job_process.procedure();\n\n var args = { ID: gw_com_api.v_Stream.msg_openedDialogue };\n gw_com_module.streamInterface(args);\n\n gw_com_module.startPage();\n }", "function launchArcIMS(ims) {\n var Win1 = open(ims,\"ArcIMSWindow\",\"height=800,width=1000,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes\");\n Win1.focus();\n }", "function openClientConnection() {\n\t\tclient.open(address, () => {\n\t\t\tif (document.URL.includes(\"edit.html\")) { //one edit HTML page for all possible edit options\n\t\t\t\tclient.addEditEventListeners(diagram);\n\t\t\t}\n\t\t\tclient.refreshDiagram(diagram);\n\t\t});\n\t}", "function start() {\n\n gw_job_process.UI();\n gw_job_process.procedure();\n\n var args = { ID: gw_com_api.v_Stream.msg_openedDialogue };\n gw_com_module.streamInterface(args);\n\n gw_com_module.startPage();\n\n }", "async function frontFun() {\n openForFrontPage();\n getSupportedMimeTypes().forEach(mimeType => {\n const option = document.createElement('option');\n option.value = mimeType;\n option.innerText = option.value;\n codecPreferences.appendChild(option);\n });\n codecPreferences.disabled = false;\n document.querySelector('#createIt').addEventListener('click', () => {\n init();\n createRoom();\n });\n roomDialog = new mdc.dialog.MDCDialog(document.querySelector('#room-dialog'));\n document.querySelector('#joinIt').addEventListener('click', () => {\n init();\n joinRoom();\n });\n\n}", "async function app() {\n\tawait waitLoading()\n\n\tadaptiveSize.init()\n\t// create controls\n\tconst ic = new InputControl()\n\tconst da = new DisplayAirports(ic)\n\tconst df = new DisplayFlight(ic)\n\tic.init()\n\tda.init()\n\tawait df.init()\n\n\t// attach global hooks\n\tadaptiveDisplay.init(da, df)\n\n\tawait waitTimeout(50) // wait for UI to initialise\n\tdocument.getElementById(\"overlay-loading\").remove() // remove the loading overlay\n}", "open() {\r\n browser.url('');\r\n browser.pause(3000);\r\n // browser.windowHandleMaximize();\r\n // browser.pause(3000);\r\n }", "async function callClient(){\r\n console.log(\"Waiting for the project....\");\r\n let firstStep = await willGetProject();\r\n let secondStep = await showOff(firstStep);\r\n let lastStep = await willWork(secondStep);\r\n console.log(\"Completed and deployed in seatle\");\r\n}", "onConnectedDevice() {\n// Add a timeout to allow the active window to close...\nthis.runDelayed(() => {\nif (!this._settings.getShowSimulator() && !this._settings.getDontShowConnected()) {\ndispatcher.dispatch('Dialog.Hint.Connected', {});\n}\n});\n}", "function startSerial(){\n setMessage('status.start', 'loading');\n\n try {\n // Load the CNCServer serial runner in a webview...\n var $runner = $('<webview>').attr({\n border: 0,\n class: 'hide',\n nodeintegration: 'true',\n src: '../node_modules/cncserver/runner/runner.html',\n disablewebsecurity: 'true',\n }).appendTo('body');\n\n // Report runner messages direct to the main console.\n $runner[0].addEventListener('console-message', function(e) {\n console.log('RUNNER:', e.message);\n });\n\n cncserver.start({\n botType: robopaint.currentBot.type,\n success: function() {\n setMessage('status.found');\n },\n error: function(err) {\n setMessage('status.error', 'warning', ' - ' + err.message);\n $options.slideDown('slow');\n },\n connect: function() {\n setMessage('status.success', 'success');\n $stat.fadeOut('slow');\n setModal(false);\n\n // If caught on startup...\n if (initializing) {\n $('svg').fadeIn('slow');\n initializing = false;\n }\n\n // Initialize settings...\n loadSettings();\n robopaint.utils.saveSettings(robopaint.settings);\n\n // Init sockets for data stream\n initSocketIO();\n },\n disconnect: function() {\n setModal(true);\n $stat.show();\n setMessage('status.disconnect', 'error');\n $options.slideDown();\n }\n });\n } catch(e) {\n handleInitError('Serial Start', e);\n }\n}", "function DfoWait()\r\n{\r\n\tGlobal.DoSleep(2000);\r\n\r\n\tvar waitPane = Navigator.Find('//div[@id=\"ShellProcessingDiv\"]');\r\n\tif (!waitPane)\r\n\t{\r\n\t\treturn true;\r\n\t}\r\n\t\r\n\tvar waitResult = Global.DoWaitForProperty(waitPane, '_DoDOMGetAttribute', 'display: none;', 300000, 'style');\r\n\treturn waitResult != false;\t\r\n}", "function go_dialer(){\n\tdocument.getElementById(\"display-screen\").innerHTML = loading;\n\tx_dial_page(\"\", do_display);\n\t\t\n}", "function start() {\n\n gw_job_process.UI();\n gw_job_process.procedure();\n //----------\n gw_com_module.startPage();\n //----------\n var args = {\n ID: gw_com_api.v_Stream.msg_openedDialogue\n };\n gw_com_module.streamInterface(args);\n //----------\n\n }", "async function start(from, to ) {\n var result = {};\n \n try {\n result = await $.ajax({\n url: \"/getFlightData\"\n });\n } catch (error) {\n // console.error(error);\n }\n \n \n // launch app\n var launcher = new Launcher(result);\n launcher.launch(from, to);\n}", "function start() { \n \t//[3.1] UI & Events\n \tgw_job_process.UI(); \n \tgw_job_process.procedure();\n //[3.2] Notice Opened Event to Master Page\n var args = { ID: gw_com_api.v_Stream.msg_openedDialogue };\n gw_com_module.streamInterface(args);\n }", "async function launchBrowser() {\n removeChromeCrashed();\n // the autoselect chrome code just uses a c++ string find to find the matching share (when you call getDisplayMedia, look at the label under the option)\n // when there is only one monitor, there is no label for the screen, so it is called Entire screen\n // when there are multiple, the label is \"Screen 1\" for the primary monitor\n let numMonitors = parseInt(await execPromise(GET_NUM_MONITORS_COMMAND));\n let settings = await readSettings();\n let options = {\n headless: false,\n defaultViewport: null,\n args: [\n '--enable-remote-extensions',\n '--no-sandbox',\n '--disable-infobars',\n '--start-maximized',\n `--auto-select-desktop-capture-source=${numMonitors > 1 ? SCREEN_ONE : ENTIRE_SCREEN}` // this has to be like this otherwise the launcher will not read the argument. It has to do with node.js processes and how they handle quotes with shell=true. \n ],\n ignoreDefaultArgs: [\"--disable-extensions\"],\n userDataDir: USER_DATA_DIR\n };\n if( !settings.windowed ) options.args.push(\"--start-fullscreen\");\n if(process.argv.indexOf(CHROMIUM_ARG) == -1) {\n options.executablePath = LINUX_CHROME_PATH;\n }\n browser = await puppeteer.launch(options);\n let context = await browser.defaultBrowserContext();\n context.overridePermissions(\"http://\" + LOCALHOST, ['microphone','camera']);\n let pages = await browser.pages();\n menuPage = await pages[0];\n await exposeFunctions();\n menuPage.on('close', () => {\n proc.execSync(KILL_GUYSTATION_COMMAND);\n });\n pipPage = await browser.newPage();\n await menuPage.bringToFront();\n \n // for pages besides menu and pip, add controller controls\n browser.on( 'targetcreated', async (target) => {\n // inject the javascript to allow for the gamepad to be used as a controller.\n let page = await target.page();\n if( page ) {\n page.on('load', () => {\n addGamepadControls(page);\n });\n }\n if(target.opener() == pipPage.target()) {\n (await target.page()).close();\n }\n } );\n\n let sambaString = \"\";\n if( sambaOn ) {\n sambaString = \"&smb=\" + sambaUrl;\n }\n\n await menuPage.goto(\"http://\" + LOCALHOST + \":\" + STATIC_PORT + \"?\" + IS_SERVER_PARAM + sambaString);\n ks.sendKey('tab');\n if( settings.motionDetectGame ) {\n await setMotionDetectLaunchGame( settings.motionDetectGame.system, settings.motionDetectGame.game, settings.motionDetectGame.parents );\n }\n\n browser.on(\"targetdestroyed\", async function(target) {\n if( target.type() !== 'page' ) return Promise.resolve();\n // If there are no more browse tabs, the browser has been quit\n let pages = await browser.pages();\n if( pages.length <= 2 ) { // only the menu page is open\n browsePage = null; // There is no browse page\n if( isBrowserOrClone(currentSystem) ) {\n await blankCurrentGame();\n await menuPage.bringToFront();\n }\n }\n else {\n let currentPage;\n let currentPageIndex = 0;\n // Get the currently visible (active) page\n for(let page of pages) {\n if( await isActivePage(page) ) {\n currentPage = page;\n break;\n }\n currentPageIndex ++;\n }\n // If the current page is the menu page, we need to switch it\n while( currentPage.mainFrame()._id === menuPage.mainFrame()._id || currentPage.mainFrame()._id === pipPage.mainFrame()._id ) {\n // there is necessarily at least one other browse tab, since the open pages > 2\n currentPageIndex++;\n if( currentPageIndex >= pages.length ) {\n currentPageIndex = 0;\n }\n currentPage = pages[currentPageIndex];\n }\n await switchBrowseTab( currentPage.mainFrame()._id );\n }\n });\n\n //setTimeout( reloadMenuPage, RELOAD_MENU_PAGE_INTERVAL );\n}", "function showMainScreen() {\n display.set(\"mainScreen\").show();\n }", "function Display_Screen2()\n{ \n\t//\n\t// Check if Password needs to be set\n\t//\n\tif(true == g_oCurrentIncident.RCTicketEncrypted)\n\t{\n\t\t//\n\t\t// Decrypt RCTicket\n\t\t//\n\t\tif(false == DecryptRCTicket())\n\t\t{\n\t\t\t//\n\t\t\t// Invalid password. Re-enter\n\t\t\t//\n\t\t\treturn;\n\t\t}\n\t}\n\t\n //\n // Go To HC Home Page\n //\n navigate(c_szHomePage);\n \n var vArgs = new Array(2);\n vArgs[0] = g_szRCTicket;\t// Remote Control Ticket\n vArgs[1] = g_szUserName;\t// UserName of Helpee\n \n //\n // Launch the actual RCTool in a seperate window\n //\n window.showModalDialog(\"RCToolScreen2.htm\", vArgs, \"dialogwidth:\" + Screen2Width + \"px;dialogHeight:\" + Screen2Height + \"px;status:no;resizable:yes\"); \n}", "function login() {\n var loginWin = createLoginWin();\n loginWin.open();\n }", "function InitScreen2() \n{\t\n\t\n\t\n\t\n\t//\n\t// Hide all the divs, except the one that displays connection status\n\t//\n\t\t\n\tRemoteControlLayer.style.visibility = \"hidden\";\n\tRemoteControlObject.style.visibility = \"visible\";\n\tChatServerLayer.style.visibility = \"hidden\";\n\tConnectionProgressLayer.style.visibility = \"visible\";\n\tLayer2.style.visibility = \"hidden\";\n\n\tConnectStarted = 0;\n\tg_bConnected = true;\n\n\t//\n\t// Decrypt RCTicket if necessary\n\t//\n\tif(true == g_oCurrentIncident.RCTicketEncrypted)\n\t{\n\t\tDecryptRCTicket();\n\t}\n\t\n\t//\n\t// Check if the RemoteClientDesktopHost object is loaded\n\t// if loaded, connected\n\t//\n\tcheckLoadx();\n\n\treturn;\n}", "function showSystemIntegrationDialog() {\n // Check the shell service.\n let shellService;\n try {\n shellService = Cc[\"@mozilla.org/mail/shell-service;1\"].getService(\n Ci.nsIShellService\n );\n } catch (ex) {}\n let defaultAccount = accountManager.defaultAccount;\n\n // Load the search integration module.\n let { SearchIntegration } = ChromeUtils.import(\n \"resource:///modules/SearchIntegration.jsm\"\n );\n\n // Show the default client dialog only if\n // EITHER: we have at least one account, and we aren't already the default\n // for mail,\n // OR: we have the search integration module, the OS version is suitable,\n // and the first run hasn't already been completed.\n // Needs to be shown outside the he normal load sequence so it doesn't appear\n // before any other displays, in the wrong place of the screen.\n if (\n (shellService &&\n defaultAccount &&\n shellService.shouldCheckDefaultClient &&\n !shellService.isDefaultClient(true, Ci.nsIShellService.MAIL)) ||\n (SearchIntegration &&\n !SearchIntegration.osVersionTooLow &&\n !SearchIntegration.osComponentsNotRunning &&\n !SearchIntegration.firstRunDone)\n ) {\n window.openDialog(\n \"chrome://messenger/content/systemIntegrationDialog.xhtml\",\n \"SystemIntegration\",\n \"modal,centerscreen,chrome,resizable=no\"\n );\n // On Windows, there seems to be a delay between setting TB as the\n // default client, and the isDefaultClient check succeeding.\n if (shellService.isDefaultClient(true, Ci.nsIShellService.MAIL)) {\n Services.obs.notifyObservers(window, \"mail:setAsDefault\");\n }\n }\n}", "function startConnect() {\n connection.connect(function (err) {\n if (err) throw err;\n // run the start function after the connection is made to prompt the user\n console.log(\"connected as id \" + connection.threadId + \"\\n\");\n displayProducts();\n });\n}", "function showRemote() {\n $(\"#remote\").centerInClient();\n $(\"#remote\").css(\"display\", \"block\");\n documentReady();\n}", "function PownceDesktop() {\r\n // get VERSION from application.xml\r\n VERSION = (new DOMParser().parseFromString(air.NativeApplication.nativeApplication.applicationDescriptor, \"text/xml\")).getElementsByTagName('application')[0].getElementsByTagName(\"version\")[0].firstChild.data;\r\n \n\tair.trace(air.Capabilities.os);\n\t\r\n // If application supports system tray \r\n if (navigator.userAgent.match(\"Windows\")) {\r\n // it is windows\r\n properties.ui.is_win = true;\r\n this.ui.configureForOS(\"win-os\");\r\n } // else if the application supports a doc icon\r\n else if (air.Capabilities.os.match(\"Mac OS\")) {\r\n // it is OSX\r\n properties.ui.is_osx = true;\r\n this.ui.configureForOS(\"mac-os\");\r\n }\n\telse if (air.Capabilities.os.match(\"Linux\")){\n\t\tproperties.ui.is_linux = true;\n\t\tthis.ui.configureForOS(\"linux-os\");\n\t}\r\n // get saved properties\r\n this.loadProperties();\r\n \r\n // refresh log file\r\n this.deleteLogfile();\r\n \r\n // check for Pownce Desktop Update\r\n // this.checkForUpdate();\r\n \r\n // Initialize the UI\r\n this.uiInitialize();\r\n \n\twindow.nativeWindow.visible = true;\n\t\n $('username').value = properties.user.username;\n if (properties.settings.auto_login&&properties.user.password&&properties.user.password!='') {\r\n $('password').value = properties.user.password;\r\n $('auto-login').checked = properties.settings.auto_login;\r\n this.doLogin();\r\n }\n}", "function onOpen() {\n console.log('Spacebrew Connected');\n var message = \"Connected as <strong>\" + sb.name() + \"</strong>\";\n if (sb.name() === app_name) {\n message += \"<br>You can customize this app's name in the query string by adding <strong>name=your_app_name</strong>.\"\n }\n $(\"#statusMsg\").html(message);\n\n // Perform browser based date synchronization\n console.log('Websockets are ready')\n var today = new Date();\n // getTime() always uses UTC for time representation. For example, a client browser in one timezone,\n // getTime() will be the same as a client browser in any other timezone.\n\n var delayInMilliseconds = 500;\n\n setTimeout(function() {\n //code executed after delay time\n sendCmd('Time:' + today.getTime())\n }, delayInMilliseconds);\n\n}", "function startClient() {\n var client = new Client();\n console.log('client started');\n}", "function startApp() {\n connection.connect(function (err) {\n if (err) throw err;\n console.log('connected as id ' + connection.threadId);\n console.log('\\n');\n managerView();\n });\n}", "function launchApp() {\r\n console.log(\"Hypersubs: Launching.\");\r\n $('#hypersubs-main-dialog').dialog('open');\r\n $('#hypersubs-splash').css('display', 'none');\r\n loadFlange(0, userPreferences.smartFill);\r\n }", "function drawDesktops(desktops) {\n \n _arrClients = remote.getGlobal('clients');\n\n if (desktops.length === 0 && _arrClients.length > 0) {\n _arrClients.forEach(cl => {\n getDesktopByName(cl);\n });\n } else {\n showDesktops(desktops);\n } \n}", "function checkLoadx()\n{\n\t//\n\t// Check if DesktopClientHost object loaded\n\t//\n\tif(L_COMPLETE != RemoteDesktopClientHost.readyState)\n\t{\n\t\t//\n\t\t// Not loaded yet\n\t\t//\n\t\tsetTimeout('checkLoadx()', 3000);\n\t\t\n\t}\n\telse\n\t{\n\t\t//alert(\"L_COMPLETE == RemoteDesktopClientHost.readyState\");\n\t\t//\n\t\t// Object loaded: Make a connection to the helpee's machine using SALEM API\n\t\t//\n\t\tsetTimeout('RCConnect()', 1); // BUGBUG: THIS IS GROSS\n\n\t}\n}", "function startServer(){\n listDevices.startAttendaceServer(UserName);\n startMessageServer();\n console.log('did');\n}", "goToTestClient() {\n return this\n .waitForElementVisible('@testclient', 2000)\n .click('@testclient')\n }", "function showWindow() {\n var theWin = new MainWin(null);\n theWin.setBlockOnOpen(true)\n theWin.open()\n}", "function runInteraction()\n{\n let delay = ''; //document.getElementById(\"delay\").value;\n delay =\n !isNaN(parseFloat(delay)) && isFinite(delay) ? \" \" + delay : \" 250\";\n let cmd =\n process.platform === \"win32\"\n ? \"python interact.py ./viewer/config.json 1000\"\n : \"python interact.py ./viewer/config.json 1000\";\n GC.interactor = execute(cmd + delay, function(output) {\n console.log(output);\n });\n}", "function showApp(header) {\n gApp.launch();\n }", "async function launchInstance(instanceId) {\n const driver = await new Builder().forBrowser('chrome').setChromeOptions(optionsChrome).build();\n await driver.get('https://sharedboard.io/r/895-309-842');\n\n driver.switchTo().frame(driver.findElement(By.css(\"iframe[src='https://client.sharedboard.io/']\")));\n \n //await driver.sleep(3000);\n await driver.wait(until.elementLocated(By.id('name-override-name-input')));\n await driver.wait(until.elementLocated(By.id('btn-complete-name-override')));\n\n await driver.sleep(1000); \n\n driver.findElement(By.id('name-override-name-input')).sendKeys(instanceId);\n await driver.sleep(500); \n driver.findElement(By.id('btn-complete-name-override')).click();\n\n await driver.wait(until.elementLocated(By.id('btn-join'), 10000));\n await driver.wait(until.elementLocated(By.id('btn-camera-enable'), 1000));\n await driver.wait(until.elementLocated(By.id('btn-mic-enable'), 1000));\n\n await driver.sleep(1000);\n\n driver.findElement(By.id('btn-camera-enable')).click();\n if (Math.random() < 0.1) {\n driver.findElement(By.id('btn-mic-enable')).click();\n }\n\n await driver.sleep(2000);\n\n driver.findElement(By.id('btn-join')).click();\n\n await driver.sleep(30 * 60 * 1000); // n minutes\n driver.quit();\n}", "function bt_OnConnect(ok) {\n if (ok) {\n setTimeout(communicate, 100);\n //hide the connect button\n }\n else app.ShowPopup(\"Failed to connect!\");\n}", "function uiStart()\n{\n console.log(\"[start]\");\n uiSetState(UI_STARTING);\n showSpinner(uiLocalVideo, uiRemoteVideo);\n\n sendMessage({\n id: 'START',\n });\n}", "async function establishConnection() {\n document.getElementById(\"home-title\").innerHTML = \"Attempting to contact SCOUt server...\";\n document.getElementById(\"home-content\").innerHTML = \"\";\n var contactMade = await attemptContact(20, 500);\n if (contactMade) successfulContact();else unsuccessfulContact();\n}", "function displayConnectDialog() {\n var type=\"click\";\n var e=document.createEvent('MouseEvent');\n var b=document.querySelector(\".midiInSelM\");\n e.initEvent(type, true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);\n b.dispatchEvent(e);\n}", "function displayConnectDialog() {\n var type=\"click\";\n var e=document.createEvent('MouseEvent');\n var b=document.querySelector(\".midiInSelM\");\n e.initEvent(type, true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);\n b.dispatchEvent(e);\n}", "function buildHMSClientScreen() {\r\n let x = document.createElement('div');\r\n x.id = \"HMSClientScreen\";\r\n x.style.width = window.innerWidth + \"px\";\r\n x.style.height = window.innerHeight + \"px\";\r\n x.style.position = \"absolute\";\r\n x.style.top = \"0px\";\r\n x.style.left = \"0px\";\r\n x.style.display = \"none\";\r\n x.style.zIndex = \"99999999\";\r\n x.style.padding = \"5px\";\r\n x.style.backgroundColor = \"rgb(112, 112, 112, 0.75)\";\r\n document.body.appendChild(x);\r\n\r\n //creates the categories:\r\n for(i=0;i<module_categorys.length;i++) {\r\n document.getElementById(\"HMSClientScreen\").appendChild(newDiv(module_categorys[i] + \"-categoryHolderS\"));\r\n document.getElementById(module_categorys[i] + \"-categoryHolderS\").appendChild(newTextBlock(module_categorys[i] + \"-categoryHolderS-header\", module_categorys[i], D_ui_border_C))\r\n document.getElementById(module_categorys[i] + \"-categoryHolderS\").appendChild(newFancyDiv(module_categorys[i] + \"-categoryS\"))\r\n document.getElementById(module_categorys[i] + \"-categoryHolderS\").style.display = \"inline-block\";\r\n document.getElementById(module_categorys[i] + \"-categoryHolderS\").style.verticalAlign = \"top\";\r\n let xbr = document.createElement(\"div\");\r\n xbr.style.display = \"inline-block\";\r\n xbr.style.width = \"5px\";\r\n document.getElementById(\"HMSClientScreen\").appendChild(xbr);\r\n }\r\n //creates the subcategories:\r\n for(i=0;i<module_sub_categorys.length;i++) {\r\n document.getElementById(module_sub_categorys[i].parentCategory + \"-categoryS\").appendChild(newDiv(module_sub_categorys[i].name + \"-subCategoryHolderS\"));\r\n let divbr = document.createElement('div');\r\n divbr.style.backgroundColor = \"#303030\";\r\n divbr.style.height = \"10px\";\r\n document.getElementById(module_sub_categorys[i].parentCategory + \"-categoryS\").appendChild(divbr);\r\n document.getElementById(module_sub_categorys[i].name + \"-subCategoryHolderS\").appendChild(newTextBlock(module_sub_categorys[i].name + \"-subCategoryHeaderS\", module_sub_categorys[i].displayName, \"#FFF\", null, \"#FFF\", null, null, null, i, \"hud\"));\r\n document.getElementById(module_sub_categorys[i].name + \"-subCategoryHolderS\").appendChild(newFancyDiv(module_sub_categorys[i].name + \"-subCategoryS\", null, null, null, \"#FFF\")) ;\r\n }\r\n //insertes all the modules in their designated subcategory:\r\n for(i=0;i<modules.length;i++) {\r\n let d = document.createElement('div');\r\n d.id = modules[i].getModuleId() + \"-moduleS-container\";\r\n if(modules[i].hasSettings == true) {\r\n d.style.borderLeft = \"solid\";\r\n d.style.borderColor = D_ui_border_C;\r\n d.style.borderWidth = \"2px\";\r\n }\r\n let s = document.createElement('div');\r\n s.id = modules[i].getModuleId() + \"-moduleS-setting-container\";\r\n s.style.display = \"none\";\r\n document.getElementById(modules[i].getModuleCategory() + \"-subCategoryS\").appendChild(d);\r\n document.getElementById(modules[i].getModuleId() + \"-moduleS-container\").appendChild(newButton((modules[i].getModuleId() + \"-moduleS\"), (modules[i].getModuleName()), i, modules[i].getModuleTooltip(), \"#a3a3a3\", \"#6e6e6e\"));\r\n document.getElementById(modules[i].getModuleId() + \"-moduleS-container\").appendChild(s);\r\n }\r\n\r\n document.body.addEventListener('keypress', e => {\r\n if(e.key === \"`\") {\r\n toggleHMSClientScreen();\r\n }\r\n })\r\n\r\n\r\n //watermark:\r\n let w = newTextBlock(\"HMSClientWatermark\", \"<h2 style='display:inline-block'>HMS Client </h2><p style='display:inline-block'><sub> Public</sub></p>\", D_ui_border_C, null, null, \"25px\");\r\n switch(injectMode) {\r\n case \"live\":\r\n w.innerHTML = \"<h2 style='display:inline-block'>HMS Client </h2><p style='display:inline-block'><sub> Public</sub></p>\";\r\n break;\r\n case \"liveDebug\":\r\n w.innerHTML = \"<h2 style='display:inline-block'>HMS Client </h2><p style='display:inline-block'><sub> Dev</sub></p>\";\r\n break;\r\n case \"dev\":\r\n w.innerHTML = \"<h2 style='display:inline-block'>HMS Client </h2><p style='display:inline-block'><sub> Dev</sub></p>\";\r\n break;\r\n case \"Premium\":\r\n w.innerHTML = \"<h2 style='display:inline-block'>HMS Client </h2><p style='display:inline-block'><sub> Premium</sub></p>\"\r\n\r\n }\r\n w.style.position = \"absolute\";\r\n w.style.left = \"\";\r\n w.style.top = \"\";\r\n w.style.right = \"20px\";\r\n w.style.bottom = \"20px\";\r\n document.getElementById(\"HMSClientScreen\").appendChild(w);\r\n\r\n\r\n \r\n}", "function init() {\n // initialize the ccp\n connect.core.initCCP(containerDiv, {\n ccpUrl: instanceURL, // REQUIRED\n loginPopup: false, // optional, defaults to `true`\n region: \"ap-southeast-2\", // REQUIRED for `CHAT`, optional otherwise\n softphone: { // optional\n allowFramedSoftphone: true, // optional\n disableRingtone: false, // optional\n ringtoneUrl: \"./ringtone.mp3\" // optional\n },\n pageOptions: { //optional\n enableAudioDeviceSettings: false, //optional, defaults to 'false'\n enablePhoneTypeSettings: true //optional, defaults to 'true'\n }\n });\n\n connect.core.getEventBus().subscribe(connect.EventType.ACK_TIMEOUT, function () {\n try {\n connect.getLog().warn('ACK_TIMEOUT occurred, attempting to pop the login page.');\n var width = 500;\n var height = 600;\n var left = (screen.width / 2) - (width / 2);\n var top = (screen.height / 2) - (height / 2);\n\n loginWindow = window.open(instanceURL, 'true', 'width=' + width + ',height=' + height +\n ',menubar=no,status=no,toolbar=no,left=' + left + ',top=' + top);\n } catch (e) {\n connect.getLog().error('ACK_TIMEOUT occurred but we are unable to open the login popup.' + e).withException(e);\n }\n });\n\n connect.agent(function (agent) {\n loginWindow.close();\n\n _agent = agent;\n _agent.onRefresh(function (a) {\n var state = a.getAgentStates()[0];\n a.setState(state, {\n success: function () { window.alert(\"success\");},\n failure: function () { window.alert(\"fail\"); }\n });\n });\n });\n}", "function testRefuseSwitchingToEmpty() {\n asyncTestCase.waitForAsync('finishing desktop switch 1/1');\n virtualDesktopManager.switchToDesktop(1, 1, false, function() {\n assertEquals(0, currentDesktop);\n assertEquals('normal', windowProvider.windows[1].state);\n assertEquals('normal', windowProvider.windows[2].state);\n assertEquals('normal', windowProvider.windows[3].state);\n assertEquals('minimized', windowProvider.windows[4].state);\n assertEquals('normal', windowProvider.windows[5].state);\n assertEquals(1, windowProvider.lastFocusedWindow);\n\n asyncTestCase.continueTesting();\n });\n}", "function setUp() {\n virtualdesktops.settings.setDesktops(4);\n delete window.localStorage['currentDesktop'];\n delete window.localStorage['windowStates'];\n windowProvider = new virtualdesktops.FakeWindowProvider();\n createWindow(1, 0, 0, 1280, 480, 'normal');\n createWindow(2, 0, 480, 640, 480, 'normal');\n createWindow(3, 640, 480, 640, 480, 'normal');\n createWindow(4, null, null, null, null, 'minimized');\n createWindow(5, 0, 0, 200, 150, 'normal');\n windowProvider.currentWindow = 1;\n windowProvider.update(1, {focused: true}, function() {});\n virtualDesktopManager = new virtualdesktops.VirtualDesktopManager(\n windowProvider, function(desktop) { currentDesktop = desktop; });\n}", "function OnStart()\r\n{\r\n\t//Check wifi is enabled.\r\n\tip = app.GetIPAddress();\r\n\tif( ip == \"0.0.0.0\" ) { \r\n\t\tapp.ShowPopup( \"Please Enable Wi-Fi\" ); \r\n\t\tapp.Exit();\r\n\t}\r\n\t\r\n\t//Prevent wifi from powering down.\r\n app.PreventWifiSleep();\r\n\t\r\n\t//Create a layout with objects vertically centered.\r\n\tlay = app.CreateLayout( \"linear\", \"VCenter,FillXY\" );\r\n\r\n\t//Create a text label and add it to layout.\r\n\tvar s = \"Type the following address into your\" + \r\n\t\t\t\" browser(s)\\n\\n\" + ip +\":8080\";\r\n\ttxt = app.CreateText( s, 0.8, 0.3, \"AutoScale,MultiLine\" );\r\n\ttxt.SetTextSize( 22 );\r\n\tlay.AddChild( txt );\r\n\t\r\n\t//Create a text label and add it to layout.\r\n\ttxtMsg = app.CreateText( \"\", 0.8, 0.3, \"AutoScale,MultiLine\" );\r\n\ttxtMsg.SetTextSize( 22 );\r\n\tlay.AddChild( txtMsg );\r\n\t\r\n\t//Create a 'Send Message' button.\r\n\tbtn = app.CreateButton( \"Send Message to Clients\", 0.6, 0.1 );\r\n\tbtn.SetMargins( 0, 0.05, 0, 0 );\r\n\tbtn.SetOnTouch( SendMessage );\r\n\tlay.AddChild( btn );\r\n\t\r\n\t//Add layout to app.\t\r\n\tapp.AddLayout( lay );\r\n\t\r\n\t//Create and run web server on port 8080.\r\n serv = app.CreateWebServer( 8080, \"Upload,ListDir\" );\r\n serv.SetFolder( \"/sdcard/DroidScript/\"+app.GetAppName() );\r\n serv.SetOnReceive( serv_OnReceive );\r\n serv.Start();\r\n\t\r\n\t//Start timer to show WebSock connections.\r\n\tsetInterval( ShowConnections, 3000 );\r\n}", "function ShowWaitDialog() {\n}", "function FXdisplayLaunch () {\n document.getElementById(\"launch\").style.visibility = \"visible\";\n }", "async function main () {\r\n // New v86 instance\r\n window.emulator = new V86Starter({\r\n memory_size: 256 * 1024 * 1024,\r\n screen_container: document.getElementById('emulator'),\r\n bios: {\r\n url: './bios/seabios.bin'\r\n },\r\n vga_bios: {\r\n url: './bios/vgabios.bin'\r\n },\r\n hda: {\r\n url: '../images/windows98.img',\r\n async: true,\r\n size: 300 * 1024 * 1024\r\n },\r\n fda: {\r\n buffer: window.appState.floppyFile || undefined\r\n },\r\n boot_order: 0x132\r\n })\r\n\r\n // High DPI support\r\n if (navigator.userAgent.includes('Windows')) {\r\n const scale = window.devicePixelRatio\r\n\r\n window.emulator.screen_adapter.set_scale(scale, scale)\r\n }\r\n\r\n // Restore state. We can't do this right away\r\n // and randomly chose 500ms as the appropriate\r\n // wait time (lol)\r\n setTimeout(async () => {\r\n if (!window.appState.bootFresh) {\r\n windows98.restoreState()\r\n }\r\n\r\n setupInfo()\r\n\r\n window.appState.cursorCaptured = true\r\n window.emulator.lock_mouse()\r\n window.emulator.run()\r\n }, 500)\r\n}", "function start() {\n\n gw_job_process.UI();\n gw_job_process.procedure();\n gw_com_module.startPage();\n\n //processRetrieve({});\n\n }", "async function establishConnection() {\n document.getElementById(\"home-title\").innerHTML = \"Attempting to contact SCOUt server...\"\n document.getElementById(\"home-content\").innerHTML = \"\"\n let contactMade = await attemptContact(20, 500)\n if (contactMade) successfulContact()\n else unsuccessfulContact()\n}", "function showHostsAndSettingsMode() {\r\n console.log('entering show hosts and settings mode.');\r\n $('#backIcon').hide();\r\n $('#quitCurrentApp').hide();\r\n $(\".mdl-layout__header\").show();\r\n $(\"#main-content\").children().not(\"#listener, #loadingSpinner, #naclSpinner\").show();\r\n $(\"#game-grid\").hide();\r\n $(\"#main-content\").removeClass(\"fullscreen\");\r\n $(\"#listener\").removeClass(\"fullscreen\");\r\n $(\"body\").css('backgroundColor', 'white');\r\n // We're no longer in a host-specific screen. Null host, and add it back to the polling list\r\n if(api) {\r\n beginBackgroundPollingOfHost(api);\r\n api = null; // and null api\r\n }\r\n}", "function start() {\n\n gw_job_process.UI();\n gw_job_process.procedure();\n //----------\n gw_com_api.setValue(\"frmOption\", 1, \"dept_area\", gw_com_api.getPageParameter(\"dept_area\"));\n gw_com_api.setValue(\"frmOption\", 1, \"yyyy\", gw_com_api.getPageParameter(\"yyyy\"));\n gw_com_api.setValue(\"frmOption\", 1, \"rev\", gw_com_api.getPageParameter(\"rev\"));\n gw_com_api.setValue(\"frmOption\", 1, \"item_no\", gw_com_api.getPageParameter(\"item_no\"));\n gw_com_api.setValue(\"frmOption\", 1, \"item_nm\", gw_com_api.getPageParameter(\"item_nm\"));\n processRetrieve({});\n //----------\n gw_com_module.startPage();\n\n }", "function start() {\n\n gw_job_process.UI();\n gw_job_process.procedure();\n //----------\n gw_com_api.setValue(\"frmOption\", 1, \"dept_area\", gw_com_api.getPageParameter(\"dept_area\"));\n gw_com_api.setValue(\"frmOption\", 1, \"yyyy\", gw_com_api.getPageParameter(\"yyyy\"));\n gw_com_api.setValue(\"frmOption\", 1, \"rev\", gw_com_api.getPageParameter(\"rev\"));\n gw_com_api.setValue(\"frmOption\", 1, \"item_no\", gw_com_api.getPageParameter(\"item_no\"));\n gw_com_api.setValue(\"frmOption\", 1, \"item_nm\", gw_com_api.getPageParameter(\"item_nm\"));\n processRetrieve({});\n //----------\n gw_com_module.startPage();\n\n }", "function waitForAccountAndStart() {\n web3js.eth.getAccounts((err, accounts) => {\n if (!err && accounts.length > 0)\n startApp(accounts[0]);\n else\n window.setTimeout(waitForAccountAndStart, 5000);\n });\n}", "async waitForWindow() {\n return new Promise(resolve => {\n const defer = setInterval(() => {\n const windows = OriginalBrowserWindow.getAllWindows();\n\n if (windows.length === 1 && windows[0].webContents.getURL().includes('discordapp.com')) {\n resolve(windows[0]);\n clearInterval(defer);\n }\n }, 10);\n });\n }", "function start() {\n\tconsole.log(\"\\nWELCOME TO THE BAMAZON STORE!\\n\");\n\tinquirer.prompt(\n\t\t{\n\t\t\tname: \"browse\",\n\t\t\ttype: \"confirm\",\n\t\t\tmessage: \"Would you like to browse the available products?\"\n\t\t}\n\t).then(function(answer) {\n\t\tif (answer.browse) {\n\t\t\tdisplayProducts();\n\t\t} else {\n console.log(\"Come back soon, have a nice day!\")\n\t\t\tconnection.end();\n\t\t}\n });\n \n}", "function displayHome() {\n\tvar message = HomeServices.generateHome();\n\tdisplay = document.getElementById(\"displayWindow\");\n\tif(message) {\n\t\tdisplay.innerHTML = message;\n\t}\n\telse {\n\t\tdisplay.innerHTML = \"<h1>The 'generate home' message returned was NULL</h1>\";\n\t}\n\n\t$('#displayWindow').trigger(\"create\");\n}", "function launchDataLink(data) {\n var Win = open(data,\"DataAccessPage\",\"height=800,width=1000,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes\");\n Win.focus();\n }", "function startIDE() {\n\tlog(\"start.js: bootwifi callback arrived ... starting ide\");\n\tvar ide_webserver = require(\"ide_webserver.js\");\n\tlog(\"About to start ide_webserver()\");\n\tide_webserver();\n}", "function start() {\n\ttry {\n\t\tvar ev = document.createEvent(\"Events\");\n\t\tev.initEvent(\"start\", true, false);\n\t\tgetMainWindow().document.dispatchEvent(ev);\n\t} catch (e) {\n\t\tjsdump(\"Exception sending start event: \"+ e);\n\t}\n}", "click_Homescreen_TVShows(){\n this.Homescreen_TVShows.waitForExist();\n this.Homescreen_TVShows.click();\n }", "function start() {\n\t// DEVTOOL: uncomment to bring up devtools on plugin view\n\t// IPC.sendToHost('devtools');\n\t\n\t// Call the API\n\tupdate();\n}", "function getDesktopByName(client) {\n var desktop = {\n idComputadora: 0, \n IP: client.sock.address().address,\n nombre: client.data.hostname,\n costoRenta: 0,\n enLinea: false\n }\n var url = apiURL + 'api/Desktop/getDesktopByName';\n $.ajax({\n url: url,\n type: \"POST\",\n data: JSON.stringify(desktop),\n contentType: \"application/json\",\n success: function (data, textStatus, jqXHR) {\n if (data) {\n let desktopInfo = data;\n setDesktopInfoToStorage(data);\n let d = { idComputadora: desktopInfo.idComputadora, enLinea: true };\n setDesktopStatus(d);\n // ipcRenderer.send('getSockets', desktopInfo);\n sendDesktopInfoFromSocket(desktopInfo);\n }\n },\n error: function (data, textStatus, jqXHR) { errorAjaxHandler(data, textStatus, jqXHR); }\n });\n}", "function test_start() {\n var obj_start = new tizen.ApplicationControlData('service_action', ['start']);\n var appcontrol_start = new tizen.ApplicationControl('http://tizen.org/appcontrol/operation/service',\n null,\n null,\n null, [obj_start],\n 'SINGLE'\n );\n tizen.application.launchAppControl(appcontrol_start,\n APP_ID,\n function() {\n console.log('Starting appcontrol succeeded.');\n },\n function(e) {\n console.log('Starting appcontrol failed : ' + e.message);\n }, null);\n\n}", "start() {\n super.start();\n\n this._defineAudioFileExtention();\n this._definePlatform();\n\n // resolve required features from the application\n client.compatible = this._checkRequiredFeatures();\n\n // handle `showDialog === false`\n if (this.options.showDialog === false) {\n if (client.compatible) {\n const startPromises = this._getHooks('startHook');\n const interactionPromises = this._getHooks('interactionHook');\n const promises = [].concat(startPromises, interactionPromises);\n\n Promise.all(promises).then(results => {\n let resolved = true;\n results.forEach(bool => resolved = resolved && bool);\n\n if (resolved)\n this.ready();\n else\n throw new Error(`service:platform - didn't obtain the necessary authorizations`);\n })\n } else {\n throw new Error('service:platform - client not compatible');\n }\n } else {\n // default view values\n this.view.updateCheckingStatus(false);\n this.view.updateIsCompatibleStatus(null);\n this.view.updateHasAuthorizationsStatus(null);\n\n if (!client.compatible) {\n this.view.updateIsCompatibleStatus(false);\n this.show();\n } else {\n this.view.updateIsCompatibleStatus(true);\n this.view.updateCheckingStatus(true);\n this.show();\n\n // execute start hook\n const startPromises = this._getHooks('startHook');\n\n Promise.all(startPromises).then(results => {\n // if one of the start hook failed\n let hasAuthorizations = true;\n results.forEach(success => hasAuthorizations = hasAuthorizations && success);\n\n this.view.updateHasAuthorizationsStatus(hasAuthorizations);\n this.view.updateCheckingStatus(false);\n\n if (hasAuthorizations) {\n // move to 'touchend' and 'mouseup' because 'touchstart' is no\n // longer recognized as a user gesture in android\n // @todo - define what to do with the template...\n // cf. https://docs.google.com/document/d/1oF1T3O7_E4t1PYHV6gyCwHxOi3ystm0eSL5xZu7nvOg/edit#heading=h.qq59ev3u8fba\n this.view.$el.addEventListener('touchend', this._onInteraction('touch'));\n this.view.$el.addEventListener('mouseup', this._onInteraction('mouse'));\n // this.view.setTouchStartCallback(this._onInteraction('touch'));\n // this.view.setMouseDownCallback(this._onInteraction('mouse'));\n }\n }).catch((err) => console.error(err.stack));\n }\n }\n }", "function start() {\n\n gw_job_process.UI();\n gw_job_process.procedure();\n //----------\n gw_com_module.startPage();\n //----------\n\n }", "function showUI() {\n // <body> children are hidden until the UI is translated\n document.body.classList.remove('hidden');\n\n // load frame_script.js for preview mode and show loading background\n if (!isPhone) {\n LazyLoader.load('js/frame_scripts.js');\n }\n\n // Tell performance monitors that our chrome is visible\n window.performance.mark('navigationLoaded');\n }", "async function init() {\n\tlet ports = cli.readParameters()\n\tif(ports.portClient != undefined) wsClient.init(ports.portClient)\n\tif(ports.portServer != undefined) config.portServer = ports.portServer\n\twsServer.init(config.portServer)\n\n\t// You can stop it by typing 'exit' or ctrl + c\n\twhile(true) {\n\t\tlet answer = await cli.interactWithUser()\n\t\tprocessResponse(answer)\n\t}\n}", "function start() {\n\n gw_job_process.UI();\n gw_job_process.procedure();\n gw_com_module.startPage();\n //----------\n processRetrieve({});\n\n }", "function DomAutomationController() {}", "function funShowClients() {\n for (let i = 0; i < aryClients.length; i++) {\n try {\n funUpdateServerMonitor(\"Connection Code: \" + aryClients[i].connectionCode + \"&nbsp;&nbsp;&nbsp;User ID: \" + aryClients[i].userId, true);\n } catch (err) {\n //\n }\n }\n // let dtTemp = Date.now();\n setTimeout(funShowClients, 10000);\n}", "function onFirstJoin() {\n // Focus the webview; enable the cursor.\n registerWebview.focus(); // Focus the Window\n registerWebview.emit('ready');\n alt.showCursor(true); // Show Cursor for Window\n alt.toggleGameControls(false); // Freeze player controls.\n native.displayRadar(false); // Turn off the radar.\n\n // Setup the login camera.\n loginCamera = native.createCamWithParams(\n 'DEFAULT_SCRIPTED_CAMERA',\n startingCamPoint.x,\n startingCamPoint.y,\n startingCamPoint.z + 10,\n 0,\n 0,\n 0,\n 90,\n true,\n 0\n );\n\n // Point the login camera at the coordinate.\n native.pointCamAtCoord(\n loginCamera,\n pointDirection.x,\n pointDirection.y,\n pointDirection.z\n );\n\n // Render the now setup camera; to the player.\n native.renderScriptCams(true, false, 0, true, false);\n native.transitionToBlurred(1000);\n}", "function launchEEM(edu_module) {\n var Win1 = open(edu_module,\"\",\"height=800,width=1000,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes\");\n Win1.focus();\n }", "async openIntercomClient () {\n\t\t// NOTE: THE LINE BELOW MAKES THIS SCRIPT OBSOLETE, WE NO LONGER HAVE AN INTERCOM KEY\n\t\t//this.intercomClient = new Intercom.Client({ token: ApiConfig.getPreferredConfig().telemetry.intercom.token });\n\t}", "function startOpeningDisplay(){\n console.log(\" \")\n console.log(\"\\n Displaying all products available for sale... \\n\");\n\n connection.query(\"SELECT * FROM products\", function(err, res){\n\n if (err) throw err;\n \n //log for results of query for all products available for sale\n console.table(res);\n \n //run inquire prompt\n customerQuestion();\n\n });\n}", "function show() {\n window.extensions.KJSLINT.KomodoAdaptor.showCommandPanel();\n }", "open() {\n super.open('http://10.10.10.250:8060/');\n browser.pause(2000);\n }", "function init () {\n log.info('Hyperion Remote starting...')\n createSSDPHandler()\n createWebsocketHandler()\n createWindow()\n}", "start() {\n this.setupDoorbellSocket();\n this.setupMQTT();\n this.initLogin();\n }", "async onConnected() {\n await this.displayConfiguration(/* manual= */ false);\n }", "function buildHMSClient() {\r\n let x = document.createElement('div');\r\n x.id = \"HMSClientWindow\";\r\n x.style.display = \"none\";\r\n x.style.padding = \"5px;\";\r\n x.style.backgroundColor = \"#525252\";\r\n x.style.border = \"solid\";\r\n x.style.borderWidth = \"1px\";\r\n x.style.position = \"absolute\";\r\n x.style.top = \"20px\";\r\n x.style.left = \"20px\";\r\n x.style.zIndex = \"999999\";\r\n x.style.overflowY = \"scroll\";\r\n x.style.maxHeight = window.innerHeight - 150 + \"px\";\r\n document.body.appendChild(x);\r\n document.getElementById(\"HMSClientWindow\").appendChild(newTextBlock(\"HMSClientWindow-header\", \"HMS Client\", \"#FFF\", null, \"#FFF\"));\r\n document.getElementById(\"HMSClientWindow-header\").style.cursor = \"move\";\r\n document.getElementById(\"HMSClientWindow-header\").style.color = \"#FFF\";\r\n dragElement(document.getElementById(\"HMSClientWindow\"));\r\n //creates the categories:\r\n for(i=0;i<module_categorys.length;i++) {\r\n document.getElementById(\"HMSClientWindow\").appendChild(newDiv(module_categorys[i] + \"-categoryHolder\"));\r\n document.getElementById(module_categorys[i] + \"-categoryHolder\").appendChild(newTextBlock(module_categorys[i] + \"-categoryHeader\", module_categorys[i], D_ui_border_C))\r\n document.getElementById(module_categorys[i] + \"-categoryHolder\").appendChild(newFancyDiv(module_categorys[i] + \"-category\"))\r\n let br = document.createElement('div');\r\n br.style.backgroundColor = \"#303030\";\r\n br.style.height = \"15px\";\r\n document.getElementById(\"HMSClientWindow\").appendChild(br);\r\n }\r\n //creates the subcategories:\r\n for(i=0;i<module_sub_categorys.length;i++) {\r\n document.getElementById(module_sub_categorys[i].parentCategory + \"-category\").appendChild(newDiv(module_sub_categorys[i].name + \"-subCategoryHolder\"));\r\n let divbr = document.createElement('div');\r\n divbr.style.backgroundColor = \"#303030\";\r\n divbr.style.height = \"10px\";\r\n document.getElementById(module_sub_categorys[i].parentCategory + \"-category\").appendChild(divbr);\r\n document.getElementById(module_sub_categorys[i].name + \"-subCategoryHolder\").appendChild(newTextBlock(module_sub_categorys[i].name + \"-subCategoryHeader\", module_sub_categorys[i].displayName, \"#FFF\", null, \"#FFF\", null, null, null, i, \"array\"));\r\n document.getElementById(module_sub_categorys[i].name + \"-subCategoryHolder\").appendChild(newFancyDiv(module_sub_categorys[i].name + \"-subCategory\", null, null, null, \"#FFF\")) ;\r\n }\r\n //insertes all the modules in their designated subcategory:\r\n for(i=0;i<modules.length;i++) {\r\n document.getElementById(modules[i].getModuleCategory() + \"-subCategory\").appendChild(newButton((modules[i].getModuleId() + \"-module\"), (modules[i].getModuleName()), i, modules[i].getModuleTooltip(), \"#a3a3a3\", \"#6e6e6e\"));\r\n let br = document.createElement('br');\r\n document.getElementById(modules[i].getModuleCategory() + \"-subCategory\").appendChild(br);\r\n }\r\n\r\n /*\r\n for(i=0;i<modules.length;i++) {\r\n document.getElementById(\"HMSClientWindow\").appendChild(newButton((modules[i].getModuleId()), (modules[i].getModuleName()), i));\r\n let br = document.createElement('br');\r\n document.getElementById(\"HMSClientWindow\").appendChild(br);\r\n }*/\r\n}", "function start() {\n if ( !_started ) {\n if ( win ) {\n if ( document.readyState === 'interactive' || document.readyState === 'complete' ) {\n addWindowListener( /*autoExec*/ );\n } else {\n document.onreadystatechange = function() {\n if ( document.readyState === 'interactive' ) {\n // the timeout is needed to solve\n // a weird safari bug https://github.com/riot/route/issues/33\n setTimeout( function() { addWindowListener( /*autoExec*/ ); }, 1 );\n }\n };\n }\n }\n\n _started = true;\n }\n}", "function showStartScreen() {\n $(\"#start-screen\").show();\n $(\"#what-to-expect\").hide();\n $(\"#tips\").hide();\n $(\"#question-display\").hide();\n $(\"#question-result-display\").hide();\n $(\"#test-result-display\").hide();\n }", "function funShowClients() {\n for (let i = 0; i < global.aryClients.length; i++) {\n try {\n mRU.funUpdateServerMonitor(\"Connection Code: \" + global.aryClients[i].strSocketID + \"&nbsp;&nbsp;&nbsp;User ID: \" + aryClients[i].userId, true);\n } catch (err) {\n //\n }\n }\n mRU.funUpdateServerMonitor(\"Total No. of Clients Connected: \" + global.aryClients.length, true);\n\n setTimeout(funShowClients, config.cintFunShowClients);\n}", "function startConnect() {\n // Generate a random client ID\n clientID = document.getElementById(\"user\").value;\n\n // Fetch the hostname/IP address and port number from the form\n host = document.getElementById(\"host\").value;\n port = document.getElementById(\"port\").value;\n\n // Print output for the user in the messages div\n document.getElementById(\"messages\").innerHTML += '<span>Connecting to: ' + host + ' on port: ' + port + '</span><br/>';\n document.getElementById(\"messages\").innerHTML += '<span>Using the following client value: ' + clientID + '</span><br/>';\n\n // Initialize new Paho client connection\n client = new Paho.MQTT.Client(host, Number(port), clientID);\n\n // Set callback handlers\n client.onConnectionLost = onConnectionLost;\n client.onMessageArrived = onMessageArrived;\n\n // Connect the client, if successful, call onConnect function\n client.connect({\n onSuccess: onConnect,\n });\n}" ]
[ "0.6000005", "0.59584874", "0.5937641", "0.58792377", "0.58649707", "0.5819533", "0.58167946", "0.5781655", "0.57457465", "0.5722296", "0.57198775", "0.5685828", "0.56280863", "0.56045866", "0.5596938", "0.5590635", "0.55841815", "0.55714834", "0.55663425", "0.5483654", "0.54642093", "0.54600763", "0.54551834", "0.5446407", "0.54428446", "0.543864", "0.542944", "0.5427268", "0.5421824", "0.54087466", "0.539214", "0.5387804", "0.5298243", "0.529752", "0.5295837", "0.52940613", "0.52873486", "0.5287273", "0.5271886", "0.5249491", "0.52476734", "0.5245512", "0.5245498", "0.5223844", "0.5213662", "0.52011675", "0.51875025", "0.5185833", "0.5181523", "0.5176518", "0.5176222", "0.5171565", "0.5169317", "0.51676476", "0.51676476", "0.5164906", "0.51586664", "0.5143214", "0.5128658", "0.5127567", "0.5117064", "0.51148397", "0.51088256", "0.50992465", "0.50943273", "0.5093759", "0.50901353", "0.50901353", "0.5088932", "0.5072793", "0.5072696", "0.5070589", "0.50705004", "0.50642407", "0.50620306", "0.5050959", "0.50493544", "0.50361603", "0.5036092", "0.50232977", "0.5020353", "0.50186837", "0.5016686", "0.50076354", "0.5006391", "0.50057024", "0.50018424", "0.5001291", "0.49868026", "0.4984351", "0.49839774", "0.49836856", "0.49832052", "0.4974618", "0.4974259", "0.4973836", "0.4972922", "0.49699494", "0.4965778", "0.49581087" ]
0.67304164
0
Returns NAV version (2017 100, 2018 110)
function NavVersion() { var pfFolder = Global.GetSpecialFolderPath("ProgramFilesX86"); var dynamicsPath100 = pfFolder + "\\Microsoft Dynamics NAV\\100\\RoleTailored Client\\Microsoft.Dynamics.Nav.Client.exe"; var dynamicsPath110 = pfFolder + "\\Microsoft Dynamics NAV\\110\\RoleTailored Client\\Microsoft.Dynamics.Nav.Client.exe"; if (File.Exists(dynamicsPath110)) { return 110; } return 100; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getVersion() {\n return this.get('pdb/meta/v1/version');\n }", "function getVersion(){return _VERSION}", "getVersion() {\n return this.version.split(this.seperator).slice(0, 3).join(this.seperator);\n }", "function getVersion(){\n return version;\n }", "function mirrorbrain_getVersion( href ) {\n\tvar file;\n\tfile = mirrorbrain_getTagFileName( href );\n\treturn mirrorbrain_getTagVersion( file );\n}", "function generateVersionInfo() {\n const versionInfo = git.gitDescribeSync({ longSemver: true });\n\n if (versionInfo.dirty || versionInfo.distance) {\n let versionString = versionInfo.raw.startsWith('v') ? versionInfo.raw.substr(1) : versionInfo.raw;\n if (versionInfo.dirty) {\n versionString = `${versionString}-${Date.now().toString()}`;\n }\n if (!versionInfo.tag) {\n versionString = `0.0.0-${versionString}`;\n }\n\n return versionString;\n }\n\n return undefined;\n}", "function getVersion(){\n return genericPolicyAPIGetItemsRequest('debug/buildversion', {\n project_id: 'Default' //API requires a project ID to be set but it does not need to correspond to an actual value in the system.\n });\n}", "function osVerLog() {\n var osVer = document.querySelector(\".osVer\");\n\n var osysVer = result.os.version;\n console.log(osysVer);\n osVer.innerHTML += osysVer;\n }", "function getVersion() {\n return 1.0;\n}", "function getThisVersion() {\r\n\r\n\t\t\t// Get the data:\r\n\t\t\tvar appData = air.NativeApplication.nativeApplication.applicationDescriptor;\r\n\t\t\t//air.trace(appData);\r\n\t\t\t\r\n\t\t\t// Turn the file data into an XML object:\r\n\t\t\tvar dp = new DOMParser();\r\n\t\t\tvar xml = dp.parseFromString(appData, 'text/xml');\r\n\r\n\t\t\t// Parse out and return the version value:\r\n\t\t\tvar version = xml.getElementsByTagName('version')[0].firstChild;\r\n\t\t\tthisVersion = version.nodeValue;\r\n\t\t\tair.trace(thisVersion);\r\n\t\t\t\r\n\t\t\tgetCurrentVersion();\r\n\r\n\t\t} // End of getThisVersion() function.", "function getVersion(a) {\n var secondBracket = a.url.indexOf('/', 1);\n return a.url.substring(1, secondBracket) || \"v1\";\n}", "function GetVersionString() {\n\t\tvar Prop = \"Version\";\n\n\t\tProp = Prop;\n\t\tvar Str = SigWebGetProperty(Prop);\n\t\tvar trimStr = Str.slice(1, Str.length - 2);\n\t\treturn trimStr;\n\t}", "function version(){ return \"0.13.0\" }", "function osVerNameLog() {\n var osVerName = document.querySelector(\".osVerName\");\n\n var osysVerName = result.os.versionName;\n console.log(osysVerName);\n osVerName.innerHTML += osysVerName;\n }", "function s_oraVer(_s,_v){_v=_s+_v;oraVersion=-1==oraVersion.indexOf(_s)?oraVersion+_v:oraVersion.substr(0,oraVersion.indexOf(_s))+_v}", "getFhirRelease() {\n return this.getFhirVersion().then(v => {\n var _a;\n\n return (_a = settings_1.fhirVersions[v]) !== null && _a !== void 0 ? _a : 0;\n });\n }", "function mirrorbrain_getTagVersion( file ) {\n\tvar retVal = null;\n\tif ( file != null ) {\n\t\tvar s = file.split( \"_\" );\n\t\tretVal = s[1];\n\t\tif ( s[0] == \"OOo-Dev\" ) {\n\t\t\tif ( file.indexOf( \"_install-\" ) > -1 || (\n\t\t\t\tfile.indexOf( \"_install_\" ) > -1 && (\n\t\t\t\t\tfile.indexOf( \"_Linux_\" ) > -1 || file.indexOf( \"_MacOS_\" ) > -1 || file.indexOf( \"_Win_\" ) > -1 || file.indexOf( \"_Solaris_\" ) > -1\n\t\t\t\t)\n \t) ) {\n\t\t\t\t// new schema\n\t\t\t\tif ( s[1].indexOf( \"_m\" ) > -1 ) {\n\t\t\t\t\tretVal = s[1];\n\t\t\t\t} else if ( s[1].indexOf( \"m\" ) > -1 ) {\n\t\t\t\t\tvar s2 = s[1].split( \"m\" );\n\t\t\t\t\tretVal = s2[0] + \"_m\" + s2[1];\n\t\t\t\t} else {\n\t\t\t\t\tretVal = s[1];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// old schema\n\t\t\t\tretVal = s[1] + \"_\" + s[2];\n\t\t\t}\n\t\t}\n }\n\treturn retVal;\n}", "function getProductVersion() {\n return \"7.4.0.9058\";\n}", "get versionId() {\n // Report the RTV.\n // TODO: Make this a more readable string.\n return this.opts.version;\n }", "get version() {\n return this.getStringAttribute('version');\n }", "get version() {\n return this.getStringAttribute('version');\n }", "static get() {\n return (\"snapClinical JS SDK Version: \" + \"1.2.15\" );\n }", "getVersion() {\n return this.call(\"GET\", \"/version/qbittorrent\")\n }", "get version() {\n return window.navigator.appVersion;\n }", "getVersion()\n {\n let version = this.getArg('version') || DEFAULT_BRANCH;\n\n this.versionMap.forEach((substitution, rule) => {\n // Check regular expression rule\n if (rule instanceof RegExp) {\n version = version.replace(rule, substitution);\n } else if (rule === version) {\n version = substitution;\n }\n })\n return version;\n }", "static get name () {\n return 'version'\n }", "version () {\n var p = this.cli.exec(['--version'])\n\n return p.then(pro => {\n return pro.compact().toPromise(Promise).then(v => {\n var matches = v.toString().match(/Ledger (.*),/)\n if (matches) return matches[1]\n else throw new Error('Failed to match Ledger version')\n })\n })\n }", "getVersion() {\n IPC_RENDERER.send(\"ledger:getVersion\");\n }", "get osVersion() {\n return this.getStringAttribute('os_version');\n }", "_computeNewVersion() {\n const { version } = this.active.releaseCandidate;\n return semver.parse(`${version.major}.${version.minor}.${version.patch}`);\n }", "get version() {\n return this.getVersion(this.name);\n }", "display() {\n\t\treturn VersionDomain.toString();\n\t}", "function getVersion()\n{\n\treturn packageJson.name + '-' + packageJson.version;\n}", "function getVersion()\n{\n\treturn packageJson.name + '-' + packageJson.version;\n}", "function createVersionNumber() {\n return new Date().toJSON().slice(0, 10) + '--' + uniqueId();\n}", "function getCurrentVersion() {\r\n\r\n\t\t\tvar errorCallback = function(){};\r\n\t\t\tvar completeHandle = function(event){\r\n\t\t\t\tvar ld = air.URLLoader(event.target);\r\n\t\t\t\tvar d = JSON.parse(ld.data);\r\n\t\t\t\t\r\n\t\t\t\tcurrentVersion = d.version;\r\n\t\t\t\tfileUrl = d.downloadurl;\r\n\t\t\t\tair.trace(currentVersion, fileUrl)\r\n\t\t\t\tdownloadNewVersion();\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tvar request = new air.URLRequest();\r\n\t\t\trequest.method = air.URLRequestMethod.POST;\r\n\t\t\trequest.url = \"http://www.startfeel.com/app/mease/check.json\";\r\n\t\t\t\r\n\t\t\tair.trace(completeHandle);\r\n\t\t\tair.trace(errorCallback);\r\n\t\t\tvar loader = new air.URLLoader();\r\n\t\t\tloader.addEventListener(air.Event.COMPLETE,completeHandle);\r\n\t\t\tloader.addEventListener(air.IOErrorEvent.IO_ERROR,errorCallback);\r\n\t\t\tloader.load(request);\r\n\r\n\t\t} // End of getCurrentVersion() function.", "function getProductVersion() {\n return \"8.5.0.9167\";\n}", "function cd_getVersion(objName) {\n\treturn cd_getSpecificObject(objName).Version;\n}", "get api_version() {\n return \"1.1\"\n }", "function version(){\n console.log(\"Version:\" , _cfg.version );\n}", "static version() {\n let version = \"\";\n switch (Application.getCurrentBrowser()) {\n case Browser.CHROME:\n version = chrome.runtime.getManifest()[\"version\"];\n break;\n }\n return version;\n }", "async getCurrentVersion() {\n if (this._version) {\n return this._version;\n }\n const service = await this.getService();\n return [...service.versions].pop().number;\n }", "async function getGameVersion() {}", "getWordVersion() {return \"seventeen\";}", "function WLVersionDate(url) {\n //url = \"http://web.archive.org/web/20171112200853/http://iskme.org/\";\n var WLVersionDateRegexp = /(https?:\\/\\/web.archive.org\\/web\\/)(\\d*)(\\/)/g;\n match = WLVersionDateRegexp.exec(url);\n if (match !== null && match.length == 4) {\n return WLParseDate(match[2]);\n } else {\n return null;\n }\n}", "get version() {\n return \"3.1.4\";\n }", "getVersion ({ commit }) {\n return api.getInfo()\n .then(response => {\n commit('SET_VERSION', response.version)\n })\n .catch(error => {\n console.error(error)\n })\n }", "get engineVersionActual() {\n return this.getStringAttribute('engine_version_actual');\n }", "async version() {\n const version = await this._getVersion();\n return version.product;\n }", "async version() {\n const version = await this._getVersion();\n return version.product;\n }", "async version() {\n const version = await this._getVersion();\n return version.product;\n }", "get latestVersion() {\n return this.getStringAttribute('latest_version');\n }", "function parseNWVer(code) {\n var i = code.indexOf(\"#define NW_MAJOR_VERSION\"),\n j = code.indexOf(\"#define NW_VERSION_IS_RELEASE\"),\n main = code.slice(i, j).split(\"\\n\").slice(0, -1),\n vers = main.map(function(v){\n return v.split(\" \")[2];\n });\n return vers.join(\".\");\n }", "get version () {\n\t\treturn this._version;\n\t}", "get version () {\n\t\treturn this._version;\n\t}", "get version () {\n\t\treturn this._version;\n\t}", "get version () {\n\t\treturn this._version;\n\t}", "get version () {\n\t\treturn this._version;\n\t}", "get version () {\n\t\treturn this._version;\n\t}", "toString() {\n return this.version;\n }", "_formatVersion() {\n const parts = []\n\n for (let key in this.version) {\n if (this.version.hasOwnProperty(key)) {\n parts.push(this.version[key])\n }\n }\n\n return parts.join('.')\n }", "getBuild() {\n return this.version.split(this.seperator).pop();\n }", "get version() {\n\t\treturn this.__version;\n\t}", "get version() {\n\t\treturn this.__version;\n\t}", "get version() {\n\t\treturn this.__version;\n\t}", "function renderVersion() {\n $.ajax({\n url: jsconfig.baseurl + \"/api/version\",\n beforeSend: authHeaders\n }).then(function(data) {\n var versionText = \"TempGopher © 2018 Mike Shoup | Version: \" + data.version;\n $(\"#version\").text(versionText);\n });\n}", "getFhirVersion() {\n return (0, lib_1.fetchConformanceStatement)(this.state.serverUrl).then(metadata => metadata.fhirVersion);\n }", "GetVersion() {}", "get documentVersion() {\n return this.getStringAttribute('document_version');\n }", "function libraryVersion() {\r\n return \"1.1.3\";\r\n }", "function display_version() {\n\tvar appdesc = air.Shell.shell.applicationDescriptor;\n\tvar xmlobject = (new DOMParser()).parseFromString(appdesc, \"text/xml\");\n\tvar root = xmlobject.getElementsByTagName ('application')[0];\n\tvar ver = root.getAttribute(\"version\");\n\tvar version = new Element('span',{'id':'version'});\n\tversion.injectInside($$('h1')[0]);\n\tversion.setText(' ' + ver);\n}", "get version() {\n return this.portfolioRuntime.currentPackage.version\n }", "function retrieveMajor(semver) {\n semver = semver.split('.')\n\tconsole.log(semver[0]);\n \n}", "function browVerLog() {\n var browVer = document.querySelector(\".browVer\");\n\n var browserVer = result.browser.version;\n console.log(browserVer);\n browVer.innerHTML += browserVer;\n }", "function generateVersionSpecifier() {\n return `// Version [${cred.resourceVersion}] //`;\n }", "simulatorAddonVersion(addon) {\n let match = SimulatorRegExp.exec(addon.id);\n if (!match) {\n return null;\n }\n let version = match[1];\n return version || \"Unknown\";\n }", "get version() {\n return this.originalResponse.version;\n }", "get version() {\n return this.originalResponse.version;\n }", "get version() {\n return this.originalResponse.version;\n }", "get version() {\n return this.originalResponse.version;\n }", "function getCurrentAppVersion() {\n return $http.get((_appMountPath + '/version'));\n }", "get defaultVersion() {\n return this.getStringAttribute('default_version');\n }", "GetVersion(){\n return localStorage.getItem(this._DBKeyVersion) // Recuperer la version de la DB du browser\n }", "function extractVersion(code) {\n return code.split('v')[1].split(' ')[0];\n}", "function version () {\n return pkg.version\n}", "function mirrorbrain_getVersionForDownloadFolder( version ) {\n\tvar s = null;\n\tif ( version.indexOf( \"_\" ) > -1 ) {\n\t\ts = version.split( \"_\" )[0];\n\t} else {\n\t\ts = version;\n\t}\n\n\tif ( version == VERSION ) {\n\t\treturn version;\n\t} else if ( version == OLD_VERSION ) {\n\t\treturn version;\n\t} else if ( version == RC_VERSION ) {\n\t\treturn s;\n\t} else if ( version == BETA_VERSION ) {\n\t\treturn version;\n\t} else if ( version == DEV1_VERSION ) {\n\t\treturn version;\n\t} else if ( version == DEV2_VERSION ) {\n\t\treturn version;\n\t} else if ( version == TEST_VERSION ) {\n\t\treturn version;\n\t}\n\t// error\n\treturn null;\n}", "function getComparableVersion (strVersion) {\n var nMajor = 0;\n var nMinor = 0;\n var nBuild = 0;\n var nIndex = 0;\n var strLocale = \"\";\n var strError = \"\";\n \n strVersion = strVersion.split(\".\");\n \n for (nIndex = 0; nIndex < strVersion.length && nIndex < 3; nIndex++) {\n if (!isNaN(strVersion[nIndex])) {\n if (nIndex == 0)\n nMajor = parseInt(strVersion[nIndex]) * 10000;\n else if (nIndex == 1)\n nMinor = parseInt(strVersion[nIndex]) * 1000;\n else if (nIndex == 2)\n nBuild = parseInt(strVersion[nIndex]);\n }\n else {\n strLocale = window.external.Locale;\n \n switch (strLocale.toLowerCase())\n {\n case \"sv\":\n strError = \"Det angivna versionnumret har ett felaktigt format.\";\n break;\n default:\n strError = \"Invalid format of the specified version.\";\n break;\n }\n \n throw new Error(strError);\n }\n }\n \n return nMajor + nMinor + nBuild; \n }", "get isCurrentVersion() {\n return this.originalResponse.isCurrentVersion;\n }", "get isCurrentVersion() {\n return this.originalResponse.isCurrentVersion;\n }", "get version() {\n return this._version;\n }", "function getApiVersion() {\n return '6.0-preview';\n}", "function getApiVersion() {\n return '6.0-preview';\n}", "function displayVersion() {\r\n\tvar version = chrome.app.getDetails().version;\r\n\tvar divVersion = document.getElementById('version');\r\n\tdivVersion.innerHTML = \"<br><b>Sprint Reader</b> (v\" + version + \")\";\r\n}", "function version() {\r\n return \"3.8.0-dev+202301211440\";\r\n}", "get versioning () {\n\t\treturn this._versioning;\n\t}", "function createVersionAndOSSpan() {\n var span = $('<span>').attr('class', 'version-info');\n if (node.status === 'online') {\n $(span).text('v' + node.version);\n }\n if (node.os !== 'not available') {\n $(span).text($(span).text() + ' on ' + node.os);\n }\n return span;\n }", "function findVersion() {\n return $('meta').filter(function () {\n var name = $(this).attr('http-equiv')\n return name && name.toUpperCase() === 'X-PJAX-VERSION'\n }).attr('content')\n }", "get version() {\n return this.metadata['appVersion']\n }", "function getSystemData() {\n return String(browser.execute(() => navigator.appVersion).value);\n }", "function getVersion(path) {\n const url = new URL(path, 'https://foo.bar');\n const segments = url.pathname.split('/');\n return segments.find((segment) => segment.match(/v[0-9]+(.[0-9]+)?/));\n}" ]
[ "0.6730418", "0.664479", "0.6611412", "0.65533495", "0.64958006", "0.62962997", "0.62794346", "0.6229501", "0.62173635", "0.6127776", "0.6124941", "0.60970175", "0.60622567", "0.6057409", "0.6036838", "0.60245293", "0.6015456", "0.5989351", "0.597836", "0.5933121", "0.5933121", "0.5926319", "0.59155655", "0.5880331", "0.5877539", "0.5876428", "0.58687145", "0.5861577", "0.5845414", "0.58218855", "0.5816378", "0.58079416", "0.58043104", "0.58043104", "0.58015317", "0.5791755", "0.5781496", "0.5751609", "0.5748002", "0.5747043", "0.5729819", "0.5728472", "0.5725827", "0.57228553", "0.5715568", "0.56958795", "0.56817496", "0.5675569", "0.5668728", "0.5668728", "0.5668728", "0.5664007", "0.56619525", "0.56573904", "0.56573904", "0.56573904", "0.56573904", "0.56573904", "0.56573904", "0.56572163", "0.56518006", "0.56398153", "0.56348044", "0.56348044", "0.56348044", "0.56245965", "0.5621753", "0.5620103", "0.5612767", "0.5593809", "0.55857897", "0.5576218", "0.55715847", "0.55589515", "0.55502576", "0.55484605", "0.5540824", "0.5540824", "0.5540824", "0.5540824", "0.5537799", "0.5532156", "0.55283064", "0.5522516", "0.550749", "0.54986817", "0.5493313", "0.54904413", "0.54904413", "0.54792005", "0.5467593", "0.5467593", "0.54655325", "0.5460755", "0.5459086", "0.5449027", "0.54445803", "0.54413915", "0.54357445", "0.5434214" ]
0.63760287
5
Closes Dynamics NAV desktop client.
function NavClose() { SeS("G_CloseNav").DoClick(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CloseConnectionHandler()\n{\n\tif(null != g_oSAFRemoteDesktopClient)\n\t{\n\t\tg_oSAFRemoteDesktopClient.DisConnectRemoteDesktop();\n\t}\n}", "close() {\n fidl.ProtocolClient.close(this._pathClient);\n }", "close() {\n\n if (this.onClose) {\n setTimeout(() => {\n this.onClose();\n this.onClose = null;\n }, 150);\n }\n\n this.client.$.removeClass('dialog-active');\n this.base.attr('open', false);\n this.base.find('.rdp-dialog__body').empty();\n this.activeModel = null;\n this.interaction = null;\n this.selector = null;\n this.isOpen = false;\n\n // re-enable other interface components again when closing\n this.client.toolbar.enable();\n this.client.snapshots.lock(false);\n\n }", "function RCDisconnect() \n{\n\t\n\tif (g_oSAFRemoteDesktopClient != null) \n\t{\n\t\tif (false == g_bNewBinaries)\n\t\t{\n\t\t\t//\n\t\t\t// Using the old interface\n\t\t\t//\n\t\t\t\n\t\t\t//\n\t\t\t// Remove the chat channel\n\t\t\t//\n\t\t\tg_oSAFRemoteDesktopClient.RemoveChannels( c_szChatChannelID );\n\t\t\n\t\t\t//\n\t\t\t// Remove the control channel\n\t\t\t//\n\t\t\tg_oSAFRemoteDesktopClient.RemoveChannels( c_szControlChannelID );\n\t\t}\n\t\t\n\t\tif(false == g_bUserDisconnect)\n\t\t{\n\t\t\t//\n\t\t\t// Disconnect from Server (only if helper initiated)\n\t\t\t//\n\t\t\tg_oSAFRemoteDesktopClient.DisconnectFromServer();\n\t\t}\n\t\t\n\t\tnavigate( c_szHomePage );\n\t\t//alert( L_DISCONNECTED_MSG );\n\t}\n}", "disconnect() {\n\t\tif (this.client === undefined) {\n\t\t\treturn\n\t\t}\n\t\tthis.client.disconnect()\n\t\tthis.portalId = undefined\n\t\tthis.client.end()\n\t}", "close() {\r\n this.native.close();\r\n }", "function closeClientsOrganizer() {\n organizerClientsOpen=true;\n}", "close() {\n this.graylog2Client.close();\n }", "async function close() {\n this.client.close();\n}", "function closeNethardware() {\n\t\t\tdocument.getElementById(\"Nethardware\").style.width = \"0\";\n\t\t}", "close() {\r\n this.closed = true;\r\n this.client.end();\r\n }", "close() {\n /* Disconnect Trueno session */\n process.exit();\n }", "close() {\n this._connected = false;\n this.userId = undefined;\n try {\n return this._ddpClient.close();\n } catch (err) {\n bugsnag.notify(err);\n return false\n }\n }", "async close() {\n await this.client.close();\n }", "function closeVirtualnet() {\n\t\t\tdocument.getElementById(\"Virtualnet\").style.width = \"0\";\n\t\t}", "function close() {\n // automatically blur current element\n // on reload otherwise would hang\n //\n document.activeElement.blur();\n\n // and close the cli\n if (ws) {\n // disable any onclose handler first\n ws.onclose = function () { };\n ws.close();\n }\n }", "close() {\n this.sendAction('close');\n }", "function close(self) {\n\tvar connect = self._connect;\n\tself._connect = null;\n\tself.connected = false;\n\tif (connect && typeof connect == 'object') {\n\t\tconnect.idle();\n\t}\n}", "close() {\n\t\tthis._communicator.close();\n\t}", "function closeConnection() {\n nativeAppPort.disconnect();\n}", "function closeDhcp() {\n\t\t\tdocument.getElementById(\"Dhcp\").style.width = \"0\";\n\t\t}", "function closeHouseDetails(){\n ipc.send('ipc-close-house-detail', undefined);\n}", "async close() {\n //TODO\n await client.close();\n }", "function closeHypervisor() {\n\t\t\tdocument.getElementById(\"Hypervisor\").style.width = \"0\";\n\t\t}", "end() {\n this._client.release();\n }", "function disconnect() {\n // Change status text area to Disconnecting \n document.getElementById(\"status\").innerHTML = \"Disconnecting\";\n cw.close()\n }", "function closeComphardware() {\n\t\t\tdocument.getElementById(\"Comphardware\").style.width = \"0\";\n\t\t}", "function stop_webclient() {\n\n\n\t// Disconnect XMPP\n\tactive911.gps=null;\n\tactive911.timer_controller.remove_all();\n\tactive911.xmpp.disconnect();\n\tactive911.xmpp=null;\n\n\t// Show the login form\n\t$(\"#loading_area\").hide();\n\t$(\"#client_area\").hide();\n\t$(\"#register_area\").slideDown();\n\n}", "disconnect() {\n console.log(4,'cli closed');\n return this.client.close();\n }", "function close() {\n\n ipcRenderer.send('close', 'close')\n\n }", "closeW(clsid) {\n this.props.dataExchange({\n waction: 'closeWindow',\n wid: clsid\n })\n }", "function stopClient()\n{\n\t// Remove all the current prices if exists\n\tcommon.getJQueryRef(\"prices\").html('') ;\n\t\n\t// Secondly, stop the remote connection\n\tremoteConnection.stop() ;\n}", "function closeNfvihardware() {\n\t\t\tdocument.getElementById(\"Nfvihardware\").style.width = \"0\";\n\t\t}", "function closeOrchestrator() {\n\t\t\tdocument.getElementById(\"Orchestrator\").style.width = \"0\";\n\t\t}", "function closeVirtualcomp() {\n\t\t\tdocument.getElementById(\"Virtualcomp\").style.width = \"0\";\n\t\t}", "function closeWindow() {\n\t\twin.close();\n\t}", "function closeWindow() {\n\t\twin.close();\n\t}", "function rt_disconnect()\r\n{\r\n console.log('** disconnecting rtmonitor **');\r\n pot_disconnected.style['display'] = 'block';\r\n document.getElementById('connect_box').className = 'not_connected';\r\n rt_mon.close();\r\n}", "function stopClient()\r\n{\r\n\t// Remove all the current prices if exists\r\n\tcommon.getJQueryRef(\"prices\").html('') ;\r\n\t\r\n\t// Secondly, stop the remote connection\r\n\tremoteConnection.stop() ;\r\n}", "close()\n {\n //---------------------------------------------------------------------------\n // neccassary to access context storage\n //\n let context = this.context();\n\n //---------------------------------------------------------------------------\n // read context variable\n //\n const client = context.get('client');\n\n //---------------------------------------------------------------------------\n // close client connection\n //\n client.close();\n\n }", "function closeWindow(){\n\tipcRenderer.send('close:window');\n}", "close() {\n if (this.timer) {\n clearTimeout(this.timer);\n this.timer = 0;\n }\n if (this.messageTimer) {\n clearTimeout(this.messageTimer);\n this.messageTimer = 0;\n }\n if (this.webrtcIsReady()) {\n this.client.close();\n }\n if (this.peerConnOpen()) {\n this.pc.close();\n }\n if (this.relayIsReady()) {\n this.relay.close();\n }\n this.onCleanup();\n }", "function closeStorhardware() {\n\t\t\tdocument.getElementById(\"Storhardware\").style.width = \"0\";\n\t\t}", "function closePopup()\n{\n\tconsole.log(\"closing popup\");\n\ttau.closePopup();\n\tstopService();\n\ttizen.application.getCurrentApplication().exit();\n}", "function closeWindow() {\n\t\t\t\tinfoWin.close();\n\t\t\t}", "function actCloseDICOM(){\n $('.obj-opendicom').toggle();\n pageScroll('auto');\n\n// $('main').css('overflow', 'auto').css('height', 'auto');\n// toggleFullScreen();\n }", "onClose() {\n\t\t// There are still clients connected.\n\t\tif ( this.wss.clients.size ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconsole.log( 'No more clients!' );\n\t\tthis.forge.stop();\n\t}", "removeControls() {\n const win = osWindow.getById(WIN_ID);\n osWindow.close(win);\n }", "function close() {\n\t'use strict';\n\n\t// close the window, showing the master window behind it\n\t$.win.close();\n}", "close() {\n var windowPosition = this.window.getPosition();\n config.set(\"window.x\", windowPosition[0]);\n config.set(\"window.y\", windowPosition[1]);\n\n this.window.close();\n }", "function forcedClose_p () {\n// --------------------------------------------------------\n window_o.close(true);\n}", "function onunload() {\n channel.destroy();\n channel = null;\n remoteControl.dispose();\n}", "function onPageUnload() {\n var session = icwsDirectUsageExample.session;\n\n session.immediateDisconnect();\n }", "async close() {\n if (!this.browser) return;\n\n this.log.debug('Page closing', this.meta);\n\n /* istanbul ignore next: errors race here when the browser closes */\n await this.browser.send('Target.closeTarget', { targetId: this.targetId })\n .catch(error => this.log.debug(error, this.meta));\n }", "function continueClose() {\n Alloy.eventDispatcher.trigger('session:renew');\n $.trigger('dashboard:dismiss', {});\n}", "function CloseDeviceDetectionPopup() \n{\n ClosePopup('CovRDMDeviceDetection.html');\n}", "function closeVirtualstor() {\n\t\t\tdocument.getElementById(\"Virtualstor\").style.width = \"0\";\n\t\t}", "function closeConnection() {\n discordClient.destroy();\n\n discordClient = initializeRemoteDiscordClient();\n loggedIn = false;\n previousPlaying = '';\n}", "function OpenPCS_Read_NodeHandler_OnClose ()\n {\n\n TraceMsg ('{OpenPCS_Read_Node} closing...');\n\n // clear immediate timeout\n if (ThisNode.m_injectImmediate)\n {\n clearImmediate(ThisNode.m_injectImmediate);\n }\n\n // cancel possibly running status timer\n if ( ThisNode.m_ObjStatusTimer )\n {\n clearTimeout (ThisNode.m_ObjStatusTimer);\n ThisNode.m_ObjStatusTimer = null;\n }\n\n // delete variable runtime instance\n ThisNode.m_ObjIpcClient.close();\n ThisNode.m_ObjIpcClient = null;\n\n // cleares the status entry from the node\n OpenPCS_Read_ShowIpcState (IPC_STATE_UNDEF);\n\n return;\n\n }", "close() {\n this.googleInfoWindow_.close();\n this.googleInfoWindow_.setContent(null);\n }", "function sdk_close(timeout) {\n var client = hub_getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n return syncpromise_SyncPromise.reject(false);\n}", "async finalize() {\n \n if (this.client) {\n this.client.close();\n }\n }", "async close() {\n //@TODO\n try {\n await this.client.close();\n }\n catch (err) {\n throw new AppError('DB', err.toString());\n }\n }", "function handleClose() {\n navigate(\"/EscolherCondominio\"); // vai pra tela de condominios\n setDialog(false);\n }", "close() {\n if (this.wasStarted) {\n this.trs80.start();\n }\n this.hide();\n }", "close() {\n if (this._windowRef != null) {\n this._renderer.removeAttribute(this._elementRef.nativeElement, 'aria-describedby');\n this._popupService.close();\n this._windowRef = null;\n this.hidden.emit();\n this._changeDetector.markForCheck();\n }\n }", "function CerrarVentana(){\r\n\twindow.close();\r\n}", "w3_close() {\n\t\tthis.mySidenav.style.display = \"none\";\n\t\tthis.overlayBg.style.display = \"none\";\n\t}", "function close() {\n\t\t$('#PortableCSSPad-container').addClass('PortableCSSPad-pad-disabled');\n\t\t$(window).off('beforeunload', windowBeforeUnload);\n\t}", "close() {\n if (this._windowRef) {\n this._renderer.removeAttribute(this._elementRef.nativeElement, 'aria-describedby');\n this._popupService.close();\n this._windowRef = null;\n this.hidden.emit();\n this._changeDetector.markForCheck();\n }\n }", "function window_close()\n{\n window.close();\n setTimeout(function(){ console.log(\"Attempting self.close\"); self.close(); }, 1000);\n setTimeout(function(){ console.log(\"Notifying the user.\"); alert(_TSUGI.window_close_message); open(\"about:blank\", '_self').close(); }, 2000);\n}", "function window_close()\n{\n window.close();\n setTimeout(function(){ console.log(\"Attempting self.close\"); self.close(); }, 1000);\n setTimeout(function(){ console.log(\"Notifying the user.\"); alert(_TSUGI.window_close_message); open(\"about:blank\", '_self').close(); }, 2000);\n}", "function closeWindow()\n{\n overwolf.windows.getCurrentWindow(function (result) {\n if (result.status == \"success\") {\n overwolf.windows.close(result.window.id);\n }\n });\n}", "close() {\n\t\t\tthis.visible = false\n\t\t\tthis._unlockBody()\n\n\t\t\tsetTimeout(() => this.is_open = false, 300)\n\t\t\tthis.$emit('close')\n\t\t}", "close() {\n this._closedFromClient = true;\n\n this._stopConnectionRetries();\n\n this._areRetriesEnabled = false;\n\n if (this._channel) {\n try {\n this._channel.close();\n } catch (error) {} // eslint-disable-line no-empty\n\n\n this._channel = null;\n }\n }", "close() {\n this.state_ = WindowState.CLOSING;\n this.appWindow_.close();\n }", "function closeDetails() {\n\n\tif (!Alloy.Globals.detailsWindow) {\n\t\treturn;\n\t}\n\n\t$.tab.closeWindow(Alloy.Globals.detailsWindow);\n\n\tAlloy.Globals.detailsWindow = null;\n}", "function closeVirtualisation() {\n\t\t\tdocument.getElementById(\"Virtualisation\").style.width = \"0\";\n\t\t}", "async close() {\n\t\tif ( this.browser ) {\n\t\t\tawait this.page.waitForTimeout( 1000 );\n\t\t\tawait this.browser.close();\n\t\t\tthis.browser = null;\n\t\t}\n\t\treturn;\n\t}", "function closeFulfilled()\n{\n const r = window.radioclient;\n\n r.context = null;\n}", "close() {\n // Remove events listeners\n this.rl.removeListener('SIGINT', this.onForceClose);\n process.removeListener('exit', this.onForceClose);\n\n this.rl.output.unmute();\n\n if (this.activePrompt && typeof this.activePrompt.close === 'function') {\n this.activePrompt.close();\n }\n\n // Close the readline\n this.rl.output.end();\n this.rl.pause();\n this.rl.close();\n }", "close() {\n // Remove events listeners\n this.rl.removeListener('SIGINT', this.onForceClose);\n process.removeListener('exit', this.onForceClose);\n\n this.rl.output.unmute();\n\n if (this.activePrompt && typeof this.activePrompt.close === 'function') {\n this.activePrompt.close();\n }\n\n // Close the readline\n this.rl.output.end();\n this.rl.pause();\n this.rl.close();\n }", "close() {\n this.connection.sendBeacon({type: 'disconnect', session: this.sessionId})\n this.messageSubscription.unsubscribe()\n clearTimeout(this.resendReportTimer)\n clearInterval(this.performPurgeTimer)\n clearTimeout(this.changeReportDebounceTimer)\n }", "function closeLink(){\n\t\t\n\t\tfunction getValue(n){\n\t\t tString = n;\n\t\t endString = tString.indexOf(\"p\");\n\t\t string = \"\";\n\t\t for(i=0;i<endString;i++){\n\t\t\t string = string + tString.charAt(i);\n\t\t }\n\t\t return string;\n\t\t}\n\t\t\n\t\t//Disengages the CLOSE button by removing the mouse action from it. Called \"waitO\" because this action happens after a short delay. Intended to happen after the widget window shrinks back to its normal size.\n\t\tfunction waitO(){\n\t\t\twiDiv.removeChild(document.getElementById('wiClose'));\n\t\t\twiDiv.style.position = \"relative\";\n\t\t\treturnToHome(false,false);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\twiWidth = 200;\n\t\twiHeight = parseInt(window.innerHeight - 40);\n\t\tdocument.getElementById('wiClose').removeEventListener(\"click\",function(){},false);\n\t\tt = expand(wiDiv.offsetWidth,wiDiv.offsetHeight,warpit_width,warpit_height,1,false,false);\n\t\tlittleTime = window.setTimeout(function(){ waitO(); },500);\n\t\treturn false;\n\t}", "close() {\n if (this.isOpen()) {\n this._vcRef.remove(this._vcRef.indexOf(this._cRef.hostView));\n this._cRef = null;\n this.closed.emit();\n this._changeDetector.markForCheck();\n // restore focus\n let elementToFocus = this._elWithFocus;\n if (isString(this.restoreFocus)) {\n elementToFocus = this._document.querySelector(this.restoreFocus);\n }\n else if (this.restoreFocus !== undefined) {\n elementToFocus = this.restoreFocus;\n }\n // in IE document.activeElement can contain an object without 'focus()' sometimes\n if (elementToFocus && elementToFocus['focus']) {\n elementToFocus.focus();\n }\n else {\n this._document.body.focus();\n }\n }\n }", "close(e) {\n // clean up event for click away in mini mode if active\n this.opened = false;\n this.activeNode = null;\n this.loading = false;\n this.like = \"\";\n this.mini = false;\n this._programValues = {};\n this.programSearch = \"\";\n this.voiceCommands = {};\n this.defaultVoiceCommands();\n this.programResults = [];\n this.programName = null;\n this.commandContext = \"*\";\n // important we stop listening when the UI goes away\n this.setListeningStatus(false);\n // hide the toast if it's up.. unless in santa mode..\n if (!this.santaMode) {\n if (e && e.type !== \"super-daemon-close\" && e.type !== \"close\") {\n window.dispatchEvent(\n new CustomEvent(\"super-daemon-toast-hide\", {\n bubbles: true,\n composed: true,\n cancelable: false,\n detail: false,\n })\n );\n }\n }\n const event = new MouseEvent(\"click\", {\n view: window,\n bubbles: true,\n cancelable: true,\n });\n document.dispatchEvent(event);\n this.windowControllers2.abort();\n if (window.ShadyCSS && !window.ShadyCSS.nativeShadow) {\n this.shadowRoot\n .querySelector(\"web-dialog\")\n .shadowRoot.querySelector(\"#backdrop\").style.position = \"relative\";\n }\n }", "close() {\n if (!this.isOpen()) {\n return;\n }\n this.flyout_.hide();\n // TODO: We can remove the setVisible check when updating from ^10.0.0 to\n // ^11.\n if (this.workspace_.scrollbar &&\n /** @type {*} */ (this.workspace_.scrollbar).setVisible) {\n /** @type {*} */ (this.workspace_.scrollbar).setVisible(true);\n }\n Blockly.Events.fire(new BackpackOpen(false, this.workspace_.id));\n }", "function close() {\n\t\tif (mWebSocket) {\n\t\t\tconsole.log('Client socket: Closing');\n\t\t\tmWebSocket.close();\n\t\t}\n\t}", "close() {\n this.screen.releaseCursor();\n }", "close() {\n this.screen.releaseCursor();\n }", "function HandleEnd()\n{\n this.device.close(); // close the device\n}", "function closeInternet10() {\n\t\t\tdocument.getElementById(\"Internet10\").style.width = \"0\";\n\t\t}", "function closeInternet10() {\n\t\t\tdocument.getElementById(\"Internet10\").style.width = \"0\";\n\t\t}", "close() {\n this.overlayManager.close(this.overlayName);\n }", "function closeNav() {\n\t//document.getElementById(\"ControlPanel\").style.display = \"none\";//hide contorl pannel\n\tShowOf(ControlPanel, false);\n\t//document.getElementById(\"buttonOpenControlPanel\").style.display = \"block\";//show open control pannel button\n\tShowOf(buttonOpenControlPanel, true);\n}", "async disconnect() {\n if (this._updateInvalidatedAccessories) { // Should come first, as other operations might take some time.\n clearInterval(this._updateInvalidatedAccessories);\n this._updateStatuses = undefined;\n }\n\n if (this._db) {\n this._db.close();\n this._db = undefined;\n }\n\n if (this._client) {\n this._client.disconnect();\n this._client = undefined;\n }\n\n if (this._publisher) {\n this._publisher.publish(PubSubEvents.SERVER_PUB_DISCONNECTED,\n JSON.stringify(this._options.homeId), () => {\n this._publisher.quit();\n this._publisher = undefined;\n });\n }\n\n if (this._subscriber) {\n this._subscriber.unsubscribe(PubSubEvents.SERVER_SUB_INTERACT);\n this._subscriber.quit();\n }\n\n this._updateStatuses = undefined;\n this.emit('disconnect');\n }", "function CloseMSWindow() {\n CloseMSWindow('');\n}", "function closeTelephonyas() {\n\t\t\tdocument.getElementById(\"Telephonyas\").style.width = \"0\";\n\t\t}", "function closeWindow() {\r\n window.close();\r\n }", "function closeDialog() {\n jQuery('#oexchange-dialog').hide();\n jQuery('#oexchange-remember-dialog').hide();\n refreshShareLinks();\n }", "close () {\n // don't do anything when we have an error\n if (this.state === 'error') { return; }\n\n if (!this.leaveOpen && this.active) {\n this.closed = true;\n this.rsWidget.classList.add('rs-closed');\n let selected = document.querySelector('.rs-box.rs-selected');\n if (selected) {\n selected.setAttribute('aria-hidden', 'true');\n }\n } else if (this.active) {\n this.setState('connected');\n } else {\n this.setInitialState();\n }\n\n if (this.rsWidget.classList.contains('rs-modal')) {\n this.rsBackdrop.classList.remove('visible');\n setTimeout(() => {\n this.rsBackdrop.style.display = 'none';\n }, 300);\n }\n }" ]
[ "0.689827", "0.6757282", "0.66361046", "0.64057153", "0.63511354", "0.6245412", "0.62138325", "0.6129813", "0.6124731", "0.6105676", "0.61042273", "0.60963506", "0.6082997", "0.6070551", "0.60434043", "0.60210997", "0.60125107", "0.59882766", "0.5984562", "0.5963501", "0.5953864", "0.5923395", "0.58811754", "0.58755773", "0.5853503", "0.5835795", "0.5827855", "0.5824464", "0.5822867", "0.58209145", "0.5812287", "0.579916", "0.5789013", "0.57875407", "0.57854563", "0.5771832", "0.5771832", "0.5760527", "0.5760094", "0.57506233", "0.57467604", "0.57381624", "0.5713782", "0.570999", "0.5701713", "0.57008", "0.5685676", "0.568289", "0.5656122", "0.5654601", "0.5647432", "0.5638985", "0.5634627", "0.5619217", "0.56156856", "0.5604804", "0.5595529", "0.55940926", "0.5571294", "0.55545586", "0.55519986", "0.5551838", "0.5549215", "0.5547714", "0.55362916", "0.5534607", "0.5531812", "0.5531555", "0.55260867", "0.55248207", "0.5523799", "0.5523799", "0.5523693", "0.5521789", "0.5503341", "0.54972327", "0.5493135", "0.5478092", "0.54764473", "0.54723626", "0.5469971", "0.5469971", "0.54692686", "0.54627836", "0.5459149", "0.5457996", "0.5456852", "0.54456383", "0.5444387", "0.5444387", "0.54413635", "0.5439629", "0.5439629", "0.54392934", "0.54389495", "0.5438354", "0.5435773", "0.5427686", "0.5426683", "0.5411032", "0.5407272" ]
0.0
-1
Navigates to a specific page using address bar.
function NavNavigate(/**string*/ page, /**string*/ company) { SeS("G_AddressBar").DoClick(); var addressEdit = SeS("G_AddressEdit"); if (!company) { var currentPage = "" + addressEdit.GetText(); company = currentPage.split("/")[0]; } addressEdit.DoSetText(company + "/" + page); addressEdit.DoSendKeys("{ENTER}"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goToPage( pageName, config )\n {\n // If no pages, just go to home\n if( pageName.length === 0 )\n return;\n \n // Add current state to history\n if( window.history.pushState && config.useHistory )\n window.history.pushState( { page: pageName }, document.title, pageName );\n \n // Scroll to the proper page\n scrollToPage( pageName, config );\n }", "function navigate(dest) {\n $.mobile.changePage(dest);\n}", "function appGoTo(page, params){\n\tvar params_ = (params != null) ? params : '';\n document.location.href = 'index.php?'+page + params_;\n}", "navigateTo(pageId) {\r\n window.location.href = `#${pageId}`;\r\n }", "function routeTo(pageName) {\n let y = document.querySelector(`[data-page=\"${pageName}\"]`).offsetTop - document.querySelector(\"#topbar\").scrollHeight;\n window.scrollTo({ top: y, left: 0, behavior: 'smooth' });\n}", "function navigate(pageName) {\n\tconst state = { page: pageName };\n\twindow.history.pushState(state, pageName, `${pageName}.html`);\n\topenPage(state);\n}", "function goTo(page) {\r\n\tshowLoading();\r\n//\t$.mobile.changePage(page, {\r\n//\t\ttransition : \"slide\"\r\n//\t});\r\n location.href=page;\r\n}", "function goToPage(name) {\n if (name == 'main'){\n document.location.href = \"main.html\";\n } else if(name == 'edit') {\n document.location.href = \"edit.html\";\n } else if(name == 'timer'){\n document.location.href = \"timer.html\";\n } else{\n // Unknown page...just go to the main page\n document.location.href = \"main.html\";\n }\n}", "function goLocationPage(page){\n window.location.href = page;\n}", "function gotoPage(pageURL) {\n console.log(\"Moving to \" + pageURL);\n window.location.assign(pageURL);\n}", "function goToPage(pageName, args) {\n viewController.goToPage(pageName, args);\n}", "function gotoPage(){\n\t\t//checks for hashes\n\t\t\tif(window.location.hash) {\n\t\t\t\tvar hash\t\t=\twindow.location.hash.substring(1).split('/');\n\t\t\t\tpageNumber\t=\t(hash[1] == undefined)?1:parseInt(hash[1]);\n\t\t\t\tarticle\t\t\t=\tparseInt(hash[0]);\n\t\t\t\tupdatePageInfo();\n\t\t\t}\n\t\t\t\n\t\t\t$(\".page\").hide();\n\t\t\tif(!$(\".page-\"+pageNumber+\"#article_\"+article).is(':hidden'))\n\t\t\t{\n\t\t\t\t$(\".page.last#article_\"+article).show();\n\t\t\t\tpageNumber\t=\tparseInt($(\".page.last#article_\"+article).attr(\"data-pageNumber\"));\n\t\t\t\tupdatePageInfo();\n\t\t\t}else{\n\t\t\t\t$(\".page-\"+pageNumber+\"#article_\"+article).show();\n\t\t\t}\n\t\t}", "function goPage(url){\n var index=url.indexOf('#');\n if(index==-1){\n url=url+window.location.hash;\n }\n reload(url);\n}", "function moveToMainPage(pathName) {\n\tif(pathName.indexOf('locator.jsp') !== -1) {\n\t\t/* Moving to main_payment_page with #home for home(pay your bill) page */\n\t\tlocation.href = 'main_payment_page.jsp?resourceAppId=' + applicationId + '#home';\n\t\treturn;\n\t}\n\thashChangedCalled = true;\n\tmakeActiveTab('footerHomeTab');\n\tbookmarks.sethash(\"#home\", loadHomeScreenArea);\n}", "function goToPage(hash) {\n\t// Stop any unwanted processes\n\tif (hash != \"#dataView\" && clientDeviceDetails != null) {\n\t\tclientDeviceDetails.disconnect();\n\t\tclientDeviceDetails = null;\n\t}\n\n\t// Initially set display for all pages to none\n\t$(\"#dataView\").css(\"display\", \"none\");\n\t$(\"#eventsView\").css(\"display\", \"none\");\n\t$(\"#loginView\").css(\"display\", \"none\");\n\n\t// Display page and call loading function\n\t$(hash).css(\"display\", \"block\");\n\n\tif (window.location.hash != hash) {\n\t\t// Set the hash for the page\n\t\twindow.location.hash = hash;\n\t} else {\n\t\t// Run the page's loading function\n\t\tvar func = hashToFuncName(hash);\n\t\tif (typeof window[func] == \"function\") {\n\t\t\twindow[func]();\n\t\t}\n\t}\n}", "function GoPage(page_name) {\n curr_page = page_name;\n LoadPage(page_name);\n}", "function handleNav(ev) {\n ev.preventDefault();\n var href = ev.currentTarget.href;\n var parts = href.split(\"#\");\n console.log(\"Clicked: page \" + parts[1]);\n loadPage(parts[1]);\n return false;\n}", "function goPage(url) {\n //alert(\"goPage(\" + url + \")\");\n if (url != null) window.location = url;\n}", "function goToPage(page_name) {\n hideAllPages();\n $page = $('#page_' + page_name);\n $page.show();\n pages['page_' + page_name].bind($page)();\n}", "function navigateTo(url) {\n window.location = url;\n }", "function nextPage(targetPage){\n\n switch(targetPage) {\n case \"things\":\n window.location = \"thingsToDoPage.html?parkCode=\" + parkCode + \"&parkName=\" + parkName;\n break;\n case \"learn\":\n window.location = \"learnMorePage.html?parkCode=\" + parkCode + \"&parkName=\" + parkName;\n break;\n }\n}", "function goToPage(path){\n\tvar currentUrl = window.location.href;\n\tnewUrl = currentUrl.split(\"/\");\n\tnewUrl = newUrl[0] + \"//\" + newUrl[2] + path;\n\twindow.location.href = newUrl;\n}", "function checkPage(){\n\n\t\tvar page_id = $(\".navigation ul li.active a\").attr(\"href\").split(\"#\")[1];\n\n\t\tgoto_page(page_id);\n\n\t}", "function gotoNextPage() {\n setCurrentPageUrl(nextPageUrl)\n }", "function goToPage(url){\n \n console.log(\"Go to page: \"+url);\n window.location=url;\n}", "function navigateToPage( pageId ) {\n var completeNavigationFn = function() {\n if ( pageId === CUSTOMER_REVIEW_PAGE || pageId === TECH_REVIEW_PAGE ) {\n navigateToReviewPage( pageId );\n } else {\n UIFrame.navigateToPage( UIFrame.getPage( pageId ).url, false, null );\n }\n };\n\n // Prevent navigation to other manage work order pages while\n // the technician is traveling and the work order being managed is the current work order\n if ( JSONData.isTechnicianTraveling() ) {\n Dialog.showConfirmYesNo( Localization.getText( \"technicianStatusTraveling\" ),\n Localization.getText( \"manageWorkOrderTravelNavAlert\" ),\n function() {\n // SFAM-297: Switch to productive clocking and complete the navigation\n Dialog.closeDialog( false );\n Clocking.switchTravelToProductive();\n completeNavigationFn();\n }, null, '400px' );\n } else {\n completeNavigationFn();\n }\n }", "function redirectToDetailPage() {\n console.log(\"in global.redirectToDetailPage\");\n // switch the browser to the detail page\n window.location ='detail.html';\n }", "function gotoPage(pageName, accountName, password) {\n\t//if(pageName === \"summary\") {\n\t\tswitch(pageName) {\n\t\t\tcase \"summary\":\n\t\t\t\t//alert(pageName);\n\t\t\t\t//alert(accountName);\n\t\t\t\twindow.location = './summary.htm?accountName='+ accountName+\"&password=\"+ password;\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\twindow.location = './'+pageName+'.htm?accountName='+ accountName+\"&password=\"+ password;\n\t\t\tbreak;\n\t\t}\n\t//}\n\t\n\t//return false;\n}", "function changePage(){\n\t\twindow.location = \"processing.html\";\n\t}", "handleNavPage(e) {\n history.push('/GeneralQuestionnarie');\n }", "function showPage(pageId) {\n activePage = pageId;\n hideAllPages();\n document.querySelector(`#${pageId}`).style.display = \"block\";\n location.href = `#${pageId}`;\n setActiveTab(pageId);\n}", "function navigatingTo(args) {\n page = args.object;\n}", "function go_mainpage(){\n\n object.getpage('mainpage.html');\n }", "function showPage(pageId) {\n hideAllPages();\n document.querySelector(`#${pageId}`).style.display = \"block\";\n location.href = `#${pageId}`;\n setActiveTab(pageId);\n}", "function nextPage() \n{\n\tgotoUrl( nextIndexPageUrl );\n}", "function nav(){\n var path = currentTest().path;\n window.location = path;\n }", "function navToAbout() {\r\n location = \"about.html\"\r\n}", "function handleNavigation(){\r\n document.body.scrollTo({ y: 0 });\r\n var path = window.location.pathname;\r\n var hash = window.location.hash ? window.location.hash.substr(1) : '';\r\n \r\n getPage(path).then($html => {\r\n // remove old content\r\n while ($content.firstChild)\r\n $content.removeChild($content.firstChild);\r\n \r\n // add new content\r\n $content.appendChild($html);\r\n\r\n // update UI\r\n updateUi(path, hash);\r\n });\r\n}", "function goTo(page) {\r\n\tshowLoading();\r\n\t$.mobile.changePage(page, {\r\n\t\ttransition : \"slide\"\r\n\t});\r\n}", "function goToPage() {\n var index = document.getElementById(\"page-select\").value;\n setPage(index);\n}", "function navToAddBook() {\n location.href = 'Admin.php?page=AddBook';\n}", "function navigatingTo(args) {\n // Get the event sender\n var page = args.object;\n}", "function navigate (uri) {\n\t\tif (typeof uri === 'string') {\n\t\t\thistory.pushState(null, null, address ? address + uri : uri);\n\t\t}\n\t}", "function onUserEnter(){\n\n // *Checking if current page exists and if it has an history entry:\n if(history.state && pageExists(history.state.page_name)){\n // *If it exists:\n // *Loading it:\n loadPage();\n } else{\n // *If not (The user may be hard typing the url):\n // *Getting only the first part of the path:\n let match = /[^/]\\S*?[^/]*/gi.exec(window.location.pathname);\n var page_name = match?match[0]:'';\n\n // *Checking if it exists:\n if(pageExists(page_name)){\n // *If exists, navigate to it:\n navigateTo(page_name);\n } else{\n // *If it not:\n // *Navigating to fallback page:\n navigateTo();\n }\n }\n }", "function goTo(href) {\n // Show a section with an id corresponding\n // to the link's href\n switchToSection(href);\n\n // Add the current \"state/page\" to our history\n history.pushState(null,null,href);\n}", "function searchPage() {\n var page2 = 'page2.html';\n window.location = page2;\n}", "function changePage2(){\n window.location = \"indexresults.html\";\n }", "function goToIndex(control){\n\twindow.location.href = \"Index.html\";\n}", "function myNewPage() {\n\twindow.location.assign(\"http://www.google.md\");\n}", "static goToHome() {\n browser.refresh();\n new MenuBar().clickHome();\n }", "function onNavigatedTo(args) {\n page = args.object;\n \n //create a reference to the topmost frame for navigation\n topmostFrame = frameMod.topmost();\n}", "function navToHistory() {\r\n location = \"history.html\"\r\n}", "function gotoPage(menu, position)\n{ \n\twindow.location.href = \"index.php?p=sections&id=\"+menu+\"&pos=\"+position ;\n}", "function doNavigate() {\n if (!hashIsEmpty()) {\n var parsedHash = this.parse(window.location.hash);\n this.navigate.apply(this, parsedHash);\n } else {\n this.navigate(_defaultRoute);\n }\n }", "function nav(url) {\n console.log(\"Navigating to: \" + url);\n chrome.tabs.getSelected(null, function(tab) {\n chrome.tabs.update(tab.id, {url: url});\n });\n }", "_loadPage() {\n this._loadWithCurrentLang();\n\n let url = navigation.getCurrentUrl();\n if (url != '/') {\n navigation.navigatingToUrl(url, this.lang, this.DOM.pagesContent, false);\n }\n\n navigation.listenToHistiryPages(this.lang, this.DOM.pagesContent);\n }", "function ui_jumpTo(str_anchor){\n\tif ( (ui_trim(str_anchor) != \"\") ) {\n \twindow.location.href = '#' + str_anchor;\n\t}\n}", "function goToPage() {\n var pgNb = $(this).text();\n paging(pgNb);\n return pgNb;\n }", "function _navTo( n ) {\n\t\t// go to it\n\t\t$( \"#taxa > section\", _sandbox.context ).scrollTo( \"#\" + n.link.attr( \"id\" ), 100, { offset: -45 } );\n\t}", "function navigatingTo(args) {\n /*\n This gets a reference this page’s <Page> UI component. You can\n view the API reference of the Page to see what’s available at\n https://docs.nativescript.org/api-reference/classes/_ui_page_.page.html\n */\n var page = args.object;\n}", "function goToAboutPage () {\n window.location.href = \"about.html\"\n}", "function goToPage($this){\n if($this.val() !== null){document.location.href = $this.val()}\n }", "function goToPage($this){\n if($this.val() !== null){document.location.href = $this.val()}\n }", "function pageNavigateHandler(paramStr) {\n Microsoft.CIFramework.getFocusedSession().then((sessionid) => {\n var sess = phone.listOfSessions.get(sessionid);\n sess.pageNavigateHandlerSess(paramStr);\n });\n}", "function showPage(page) {\n const pages = [\n \"home\",\n \"evaluationPage\",\n \"elist\",\n \"gpsPage\",\n \"configurationPage\"\n ];\n let i = 0;\n for (i; i < pages.length; i += 1) {\n if (page === pages[i]) {\n document.getElementById(pages[i]).style.display = \"block\";\n location.hash = `${pages[i]}`;\n } else {\n document.getElementById(pages[i]).style.display = \"none\";\n }\n }\n}", "function goTo(path) {\n\t\t\t$window.location.href = path;\n\t\t}", "function nav(address) {\n\tdocument.location.href = \"https://google.com/?q=\" + encodeURIComponent(box.value);\n\tif (/^(?:(?:https?|ftp):\\/\\/).*/i.test(address)) {\n\t\tdocument.location.href = address;\n\t} else {\n\t\tdocument.location.href = \"http://\" + address;\n\t}\n}", "function gotoIkarte() {\n\t$.mobile.changePage(\"#pageIkarte\");\n\tsessionStorage.iLastScreenVisited = \"K\";\n}", "function showPage(pageId) {\n hideAllPages();\n document.querySelector(`#${pageId}`).style.display = \"block\";\n\n location.href = `#${pageId}`;\n document.getElementById(\"myNav\").style.display = \"none\";\n\n}", "Navigate(string, Variant, Variant, Variant, Variant) {\n\n }", "function loadPage(){\n\n // *If SPA isn't loaded yet, return:\n if(!spa_loaded) return;\n\n // *Getting the page to load:\n let { page_name, params } = history.state;\n let page = findPage(page_name);\n\n // *Getting the page to unload:\n let previous_page = findPage(current_page_name);\n\n // *If it's the same page as before, return:\n if(page_name === current_page_name) return;\n\n // *Unloading the previous page:\n if(previous_page) previous_page.getOnLeft().resolveAll(f => f(previous_page));\n\n // *Changing the current page flag:\n current_page_name = page_name;\n\n // *Loading the new page:\n page.getOnNavigate().resolveAll(f => f(page, params));\n }", "function goHomeAnd(address) {\n\n // window.alert(\"Hello World 2\");\n\n //Navigate to the home page\n window.location.href = \"profilePage.php\";\n\n //Show the requested source after the page loaded\n //showSRC(address);\n}", "function setCurrentPage(){\n var navigationContainer = document.getElementById(\"navigation\")\n var navBarListCollection = navigationContainer.getElementsByTagName('li');\n var navBarLinkCollection = navigationContainer.getElementsByClassName('menulink');\n \n var currentPageArray = window.location.pathname.split('/');\n var currentPagePath = currentPageArray[1]\t\n \n for (var j=0; j < navBarListCollection.length; j++) {\n \n navBarLinkPathCollectionArray = navBarLinkCollection[j].pathname.split('/')\n\n\t\tif (currentPagePath == 'home' || currentPagePath == \"\") {\n\t \tnavBarLinkCollection[0].className = 'active';\n break;\t\n\t\t}else if (currentPagePath == navBarLinkPathCollectionArray[1] || currentPagePath == navBarLinkPathCollectionArray[0]) {\n\t \tnavBarLinkCollection[j].className = 'active';\n\t \tbreak;\n\t\t}\n }\n}", "function _page1_page() {\n}", "static goPage(params, page) {\n const navigation = NavigationUtil.navigation;\n /*children level router can't jump to parent level router*/\n //const {navigation} = params;\n if (!navigation) {\n console.log('NavigationUtil.navigation can\\'t be null.')\n }\n navigation.navigate(\n page,\n {\n ...params\n }\n );\n }", "function changePage() {\n const url = window.location.href;\n const main = document.querySelector('main');\n loadPage(url).then((responseText) => {\n const wrapper = document.createElement('div');\n wrapper.innerHTML = responseText;\n const oldContent = document.querySelector('.mainWrapper');\n const newContent = wrapper.querySelector('.mainWrapper');\n main.appendChild(newContent);\n animate(oldContent, newContent);\n });\n }", "function goToBookPage(newBookISBN, from){\n window.location.href = 'pages/Book.html?isbn='+newBookISBN+'&from='+from;\n}", "function loadPage(pageNumber)\n{\n\twriteCookie(0);\n\tswitch(pageNumber){\n\t\tcase 1: //Player menu\n\t\t\twindow.location = 'AddPlayer.html';\n\t\t\tbreak;\n\t\tcase 2: //Game menu\n\t\t\twindow.location = 'AddGame.html';\n\t\t\tbreak;\n\t\tcase 3: //Choose screen\n\t\t\tif (players.length < 1){\n\t\t\t\tloadPage(1);\n\t\t\t}else if (games.length < 1){\n\t\t\t\tloadPage(2);\n\t\t\t}else{\n\t\t\t\twindow.location = 'Play.html';\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 4: //Timer screen\n\t\t\twindow.location = 'Timer.html';\n\t\t\tbreak;\n\t\tdefault: //Title menu\n\t\t\twindow.location = 'GameAndPlayerRandomizer.html';\n\t\t\tbreak;\n\t}\n\t\n}", "navigate(path) {\n Composite.asynchron((path) => {\n window.location.hash = path;\n }, SiteMap.locate(path));\n SiteMap.locate(path)\n }", "function loadPage( url ){\n\tif(url == null){\n\t\t//home page first call\n\t\tpages[0].style.display = 'block';\n\t\thistory.replaceState(null, null, \"#home\");\t\n\t}else{\n \n for(var i=0; i < numPages; i++){\n if(pages[i].id == url){\n pages[i].style.display = \"block\";\n history.pushState(null, null, \"#\" + url);\t\n }else{\n pages[i].style.display = \"none\";\t\n }\n }\n for(var t=0; t < numLinks; t++){\n links[t].className = \"\";\n if(links[t].href == location.href){\n links[t].className = \"activetab\";\n }\n }\n\t}\n}", "function activate_page(sel, have_state) {\n var $dn = $(sel);\n var is_vis = $dn.is(\":visible\");\n if (!is_vis) {\n $dn.parents(\"body\").find(\".upage\").addClass(\"hidden\");\n $dn.removeClass(\"hidden\");\n\n if (!have_state) {\n window.history.pushState({\n upage: sel\n }, sel, document.location.origin + document.location.pathname + sel);\n }\n }\n $(document).trigger(\"pageChange\");\n }", "function GoToAboutUs() {\n\twindow.location.href=\"AboutUs.html\";\n}", "function navigateToSearchPage() {\n\tmarkers = [];\n\tremoveMapDiv();\n\n\tcreateMapDiv();\n\n\tvar user = getCurrentUser();\n\tconsole.log(\"changeToSearchPage\");\n\tconsole.log(user);\n\t$.mobile.changePage(\"#search\");\n\n}", "function goToFirstPage(){\r\n console.log(\"working\");\r\n location.replace(\"../html/StartHere.html\");\r\n}", "function navigate (event) {\n const href = event.target.pathname\n const next = Object.assign({}, state, {href})\n window.history.pushState(next, document.title, href)\n morph(document.body, view(next))\n event.preventDefault()\n }", "function navigate(){\n \n // Get a reference to the \"content\" div.\n var contentDiv = document.getElementById(\"main\"),\n \n // Isolate the fragment identifier using substr.\n // This gets rid of the \"#\" character.\n fragmentId = location.hash.substr(1);\n \n \n getContent(fragmentId, function (content) {\n contentDiv.innerHTML = content;\n });\n \n }", "function backToBookManagement() {\n window.location.href = \"Admin.php?page=BookManagement\";\n}", "function gotoUrl(addr){\r\n\twindow.location = addr;\r\n}", "goToPage(pageName, options) {\n this.transition = options.transition || '';\n // page is added to stack only when currentPage is available.\n if (this.history.getCurrentPage()) {\n this.isPageAddedToHistory = true;\n }\n this.history.push(new PageInfo(pageName, options.urlParams, this.transition));\n if (CONSTANTS.isWaveLens) {\n const location = window['location'];\n const strQueryParams = _.map(options.urlParams || [], (value, key) => key + '=' + value);\n const strQuery = (strQueryParams.length > 0 ? '?' + strQueryParams.join('&') : '');\n location.href = location.origin\n + location.pathname\n + '#/' + pageName\n + strQuery;\n return;\n }\n return this.router.navigate([`/${pageName}`], { queryParams: options.urlParams });\n }", "function gotoPage(url)\n{\n\t//llamada Ajax...\n\tajaxCall(httpMethod=\"GET\", \n\t\t\t\t\turi= url + \"?pagenumber=\" + currentPage, \n\t\t\t\t\tdivResponse=\"response\", \n\t\t\t\t\tdivProgress=\"grid-progress\", \n\t\t\t\t\tformName=null, \n\t\t\t\t\tafterResponseFn=showCurrentPage, \n\t\t\t\t\tonErrorFn=null); \t\n}", "function navigateToEditProfile(callFromRefresh) {\n\tvar pathName = $(location).attr('pathname');\n\tremoveMessageFromDivId();\n\t/* Checking for if user clicked home tab in locator page then s/he should move to main_payment_page */\n\tif(pathName.indexOf('locator.jsp') !== -1) {\n\t\t/* Moving to main_payment_page with #home for home(pay your bill) page */\n\t\tlocation.href = 'main_payment_page.jsp?resourceAppId=' + applicationId + '#editProfile';\n\t\treturn;\n\t}\n\tmakeActiveTab('footerProfileTab');\n\tbookmarks.sethash(\"#editProfile\", loadEditProfilePage, callFromRefresh);\n}", "function gotoAbout() {\n location.href = \"about.html\";\n}", "function handleNav(ev){\n\tev.preventDefault();\n\tvar href = ev.target.href;\n\tvar parts = href.split(\"#\");\n\tloadPage( parts[1] );\t\n if (parts[1]==\"three\"){\n \n three();\n}\n return false;\n}", "function GoMainPage(){\n window.location=\"index.html\";\n}", "function changeLocation(newURL, title, navIndex) {\n if (UTIL.idExists(\"jbmnplsWebpage\")) {\n DEBUGGER.refresh();\n $(\"#jbmnplsWebpage\").attr(\"src\", newURL);\n if (title.empty()) {\n title = \"Jobmine Plus\";\n }\n document.title = title;\n setNavSelection(navIndex);\n }\n}", "function loadPageByUrlHash() {\n var actionName=document.location.hash.replace(/#/i,'');\n console.log('Action loaded from hash: %s', actionName);\n var isValid = isValidAction(actionName);\n if (isValid) {\n var menuItem = navPanel.find('a[href=\"' + actionName + '\"]');\n loadPage(menuItem);\n }else {\n console.warn('Invalid URL parameter value: %s. Loading default page', actionName);\n loadPage(defaultPage);\n }\n }", "function loadPage(href, history) {\n const pathName = getPathName(href);\n const { template, title, type } = routes[pathName];\n\n // already here, nothing to do\n if (!history && pathName === window.location.pathname) return;\n\n // render page content html\n renderContent(template, html => {\n\n // get full page title string\n const pageTitle = `Robert Dale Smith | ${title}`;\n\n // update history state only on loads not coming from browser back/forward\n if (!history) window.history.pushState({ pathName, pageTitle }, pageTitle, `${pathName}`);\n\n // update the page title\n document.title = pageTitle;\n\n // update content html\n document.querySelector('.content').innerHTML = html;\n\n // scroll to top of page/content\n if (!history) {\n if (pathName === '/') {\n // scrolls to top of home page\n document.scrollingElement.scrollTo(0, 0);\n } else {\n // scrolls to top of new page content and offset a bit\n const y = document.querySelector('.content').offsetTop;\n document.scrollingElement.scrollTo(0, y - 24);\n }\n }\n\n // set page type class\n document.querySelector('.page').className = `page ${type}`;\n\n // bind new viewer images\n viewer.bindImages('.thumbnail');\n\n // bind new page links\n bindLinks();\n\n // track page view\n ga.pageView(pathName);\n });\n}", "function goToNextPage() {\n setCurrentPageUrl(nextPageUrl)\n }", "function winLoadPage(page) {\n\tswitch(page) {\n\t\tcase 'index':\n\t\tcase 'init':\n\t\tcase 'preferences':\n\t\t\tmainWindow.loadURL(`file://${__dirname}/`+ page + `.html`);\t\n\t\t\tconsole.log('mainwindows load ', page, '.html')\n\t\t\tbreak;\n\t\tcase 'test':\n\t\t\tconsole.log('test.html ')\n\t\t\tmainWindow.loadFile('test.html')\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tconsole.log('mainwindows load fail. no such page ')\n\t}\n}", "function openPage(pageName, elmnt, loc) {\r\n // Hide all elements with class=\"tab-content\" by default\r\n var tabcontent, tablinks;\r\n tabcontent = document.getElementsByClassName(\"tab-content\");\r\n for (var i = 0; i < tabcontent.length; i++) {\r\n tabcontent[i].style.display = \"none\";\r\n }\r\n\r\n // Remove the background color of all tablinks/buttons\r\n tablinks = document.getElementsByClassName(\"tabl\");\r\n for (var i = 0; i < tablinks.length; i++) {\r\n tablinks[i].style.backgroundColor = \"\";\r\n tablinks[i].style.color = \"\";\r\n }\r\n\r\n // Show the desired tab content\r\n document.getElementById(pageName).style.display = \"block\";\r\n\r\n // Add the specific color to the button used to open the tab content\r\n if (elmnt) {\r\n elmnt.style.backgroundColor = \"silver\";\r\n elmnt.style.color = \"#224\";\r\n }\r\n \r\n // Scrolls (up then) down to the content\r\n document.getElementById('KFD').scrollIntoView({block: \"nearest\", inline: \"nearest\", behavior: \"smooth\"})\r\n document.getElementById(loc).scrollIntoView({block: \"center\", inline: \"nearest\", behavior: \"smooth\"})\r\n\r\n if (clicked)\r\n toggleNav();\r\n}" ]
[ "0.7030589", "0.6728481", "0.6667955", "0.64770085", "0.6449415", "0.6408263", "0.63698643", "0.634865", "0.634487", "0.62852246", "0.6268784", "0.62497514", "0.6243622", "0.6242361", "0.6225444", "0.6184733", "0.6175121", "0.61739886", "0.61647666", "0.61331207", "0.61116034", "0.6091354", "0.60819274", "0.60642123", "0.6061199", "0.6055262", "0.6027801", "0.60246587", "0.6008656", "0.600562", "0.59962523", "0.59921014", "0.59908223", "0.5980052", "0.59663296", "0.5956471", "0.5947949", "0.5940189", "0.59388846", "0.5933261", "0.59323704", "0.59295017", "0.5912406", "0.59060234", "0.59004265", "0.5873734", "0.5860237", "0.58545035", "0.5849885", "0.58438724", "0.5828445", "0.5815364", "0.5808718", "0.5790898", "0.57879615", "0.5778098", "0.5772535", "0.57649016", "0.57628393", "0.575762", "0.57567185", "0.5751713", "0.5751713", "0.5743179", "0.57339054", "0.572608", "0.5722523", "0.57200533", "0.5719072", "0.57095087", "0.5705521", "0.56858546", "0.5683489", "0.5681977", "0.5671381", "0.5669295", "0.56651896", "0.566346", "0.5662492", "0.5661895", "0.56314206", "0.5631073", "0.5629653", "0.5629262", "0.5618975", "0.56107366", "0.56095004", "0.5608563", "0.56059647", "0.55963063", "0.5596269", "0.5580874", "0.55797523", "0.55788046", "0.55758667", "0.5571882", "0.5570164", "0.55646294", "0.5559832", "0.55581033" ]
0.67993087
1
Applies a filter to table data.
function NavFilterGrid(/**string*/ value, /**string*/ field) { if (!value) { LogAssert("NavFilterGrid: value is not set"); return; } if (!field) { LogAssert("NavFilterGrid: field is not set"); return; } SeS("G_FilterValue").DoClick(); SeS("G_FilterValue").DoSetText(value); SeS("G_FilterOpen").DoClick(); SeS("G_FilterDropDown").DoSelectItem(field); SeS("G_FilterApply").DoClick(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterTable() {\n \n // 8. Set the filtered data to the tableData.\n var filterData = tableData\n \n // 9. Loop through all of the filters and keep any data that\n // matches the filter values\n Object.entries(dataFilter).forEach(([key, value])=>{\n filterData = filterData.filter(row => row[key] === value);\n })\n \n // 10. Finally, rebuild the table using the filtered data\n buildTable(filterData);\n }", "function filterTable() {\n\n // Set the filteredData to the tableData\n filteredData = tableData\nconsole.log(filteredData, 'line 78')\n // Loop through all of the filters and keep any data that\n // matches the filter values\n Object.entries(filters).forEach(([key,value]) => {\n filteredData = filteredData.filter(row => row[key] === value);\n })\n\n // Finally, rebuild the table using the filtered Data\n buildTable(filteredData);\n}", "function filterTable() {\n \n // 8. Set the filtered data to the tableData.\n var filteredData = tableData;\n \n // 9. Loop through all of the filters and keep any data that\n // matches the filter values\n if (entryLengthDatetime > 0) {\n console.log(inputValueDatetime)\n var filteredData = data.filter(report => report.datetime === inputValueDatetime);\n }\n \n else if (entryLengthCity > 0) {\n var filteredData = data.filter(report => report.city === inputValueCity);\n }\n \n else if (entryLengthState > 0) {\n var filteredData = data.filter(report => report.state === inputValueState);\n }\n \n else if (entryLengthCountry > 0) {\n var filteredData = data.filter(report => report.country === inputValueCountry);\n }\n \n else if (entryLengthShape > 0) {\n var filteredData = data.filter(report => report.shape === inputValueShape);\n }\n\n console.log(filteredData);\n\n refresh(filteredData);\n \n // 10. Finally, rebuild the table using the filtered data\n filteredData.forEach((UFOReport) => {\n var row = tbody.append(\"tr\");\n Object.entries(UFOReport).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n }", "function filterfunction() {\n let filterdata = tableData;\n Object.entries(filters).forEach(([key, value]) => {\n filterdata = filterdata.filter(uSighting => uSighting[key] === value);\n });\n buildtable(filterdata);\n\n}", "function filterTable() {\n\n// 8. Set the filtered data to the tableData.\n let filteredData = tableData\n\n// 9. Loop through all of the filters and keep any data that\n// matches the filter values\nObject.entries(filters).forEach(([key, value]) => {\nfilteredData = filteredData.filter(row => row[key] === value);\n});\n\n// 10. Finally, rebuild the table using the filtered data 11.5.4\n// 11.5.4 given code After we pass filteredData in as our new argument, our full handleClick() function should look like the one below:\n buildTable(filteredData)\n}", "function filterTable() {\n\n filteredData = tableData\n\n// Loop through all of the filters and keep any data that\n// matches the filter values\n Object.entries(filters).forEach(([key,value]) => {\n filteredData = filteredData.filter(x => x[key] === value)\n console.log(key,value)\n })\n\n// Finally, rebuild the table using the filtered data\n buildTable(filteredData)\n\n console.log(filteredData)\n}", "function filterData() {\n \n // Prevent the page from refreshing\n d3.event.preventDefault();\n \n // Get filter input\n var dateFilter = d3.select(\"#datetime\").property(\"value\");\n\n // Filter tableData for selection\n var filteredData = tableData;\n if (dateFilter !== \"\") {\n var filteredData = filteredData.filter(sighting => sighting.datetime === dateFilter);\n };\n\n // remove existing table data\n d3.select(\"tbody\").remove();\n\n // add table body back\n table.append(\"tbody\");\n\n // reload table\n loadTable(filteredData);\n}", "function updateFilter(){\n $(\"#visab-table\").tabulator(\"setFilter\", customFilter );\n }", "function applyFilters(callback) {\r\n\tif (data === null) return;\r\n\tconsole.log('applyFilters', data);\r\n\t\r\n\t// Reset the null record flag\r\n\t$.each(data, (index, record) => {\r\n\t\tif (record[0]) record[0].__filters[tableColumns.length + 1] = true;\r\n\t\tif (record[1]) record[1].__filters[tableColumns.length + 1] = true;\r\n\t});\r\n\r\n\t$('select.sjo-api-filter, .sjo-api-filter-checkbox').each(function(index, element) {\r\n\t\t\r\n\t\t// Get filter parameters\r\n\t\tvar filter = $(element);\r\n\t\tvar colIndex = filter.closest('td').prop('cellIndex');\r\n\t\tvar column = tableColumns[colIndex];\r\n\t\t\r\n\t\tif (filter.is('[type=\"checkbox\"]')) {\r\n\t\t\t\r\n\t\t\t// Get checkbox status\r\n\t\t\tvar checked = filter.prop('checked');\r\n\t\t\tvar indeterminate = filter.prop('indeterminate');\r\n\t\t\tconsole.log('applyFilters', colIndex, column, checked, indeterminate, filter);\r\n\t\t\t\r\n\t\t\t// Update the data set with the filter value\r\n\t\t\t$.each(data, (index, record) => {\r\n\t\t\t\tvar set = column.set >= 0 ? column.set : record[0] ? 0 : 1;\r\n\t\t\t\tif (!record[set]) {\r\n\t\t\t\t\tif (checked && !indeterminate) record[1 - set].__filters[tableColumns.length + 1] = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\trecord[set].__filters[colIndex] = indeterminate || checked === !!record[set][column.name];\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\t// Get selected values\r\n\t\t\tvar values = filter.val();\r\n\t\t\tconsole.log('applyFilters', colIndex, column, values, filter);\r\n\t\t\t\r\n\t\t\t// Parse numeric values\r\n\t\t\t// TODO: rename \"sort\" as something like \"type\"\r\n\t\t\tif (values && dataFields[column.name].sort == '#') {\r\n\t\t\t\tvalues = values.map(value => value === '' ? '' : parseInt(value));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Update the data set with the filter value\r\n\t\t\t$.each(data, (index, record) => {\r\n\t\t\t\tvar set = column.set >= 0 ? column.set : record[0] ? 0 : 1;\r\n\t\t\t\tif (!record[set]) {\r\n\t\t\t\t\tif (values) record[1 - set].__filters[tableColumns.length + 1] = false;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\trecord[set].__filters[colIndex] = values === null || values.indexOf(record[set][column.name]) >= 0 || \r\n\t\t\t\t\t(column.name == '_election_area' && values.indexOf(record[set][column.name].split('.')[0] + '.*') >= 0);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t// Hide extra space in dropdowns\r\n\t\t\t// TODO: this makes it impossible to type a second search term\r\n\t\t\tfilter.closest('td').find('.search-field').toggle(!values);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t});\r\n\t\r\n\t// Apply the current elections filter\r\n\tvar current = currentExtract.urls[0] == allCandidatesUrl && $('#sjo-api-current').is(':checked');\r\n\tconsole.log('applyFilters', current);\r\n\t$.each(data, (index, record) => {\r\n\t\tif (!record[0]) return;\r\n\t\trecord[0].__filters[tableColumns.length] = current ? record[0].election_current : true;\r\n\t});\r\n\t\r\n\t// Render table\r\n\trenderTable(callback);\r\n\t\r\n}", "function filterTable() {\n // First, clear out any existing ufo_table body data by using the selectAll commect on all rows followed by the .remove() method. This ensures that the table is rendered fresh each time the filter is applied\n ufo_table.selectAll('tr').remove();\n\n // Now check whether any input was provided in the filter search form. If no input exists (the value property of the form is an empty string), then display the entire table of UFO sightings.\n if (dateTimeEntry.property('value') === '') {\n // tableData is a list of objects, each object being a specific UFO sighting consisting of key:value pairs. Begin by using .forEach to iterate over each object\n tableData.forEach((ufoSighting) => {\n // For every object in the table, append a new row to the DOM table\n var row = ufo_table.append('tr');\n // Now use the forEach function to iterate though each key:value pair of each object. For every pair, append a new table data item (td), then populate the cell with the value.\n Object.entries(ufoSighting).forEach(([key, value]) => {\n var cell = row.append('td');\n cell.text(value);\n }); \n });\n } else {\n // If an input was provided, then display the table based on the date provided\n tableData.forEach((ufoSighting) => {\n // For every object in the table with a dateTime value that matches the value of the dateTime entry form date input, append a new row to the DOM table\n if (ufoSighting.datetime === dateTimeEntry.property('value')) {\n var row = ufo_table.append('tr');\n // Now use the forEach function to iterate though each key:value pair of each object. For every pair, append a new table data item (td), then populate the cell with the value.\n Object.entries(ufoSighting).forEach(([key, value]) => {\n var cell = row.append('td');\n cell.text(value);\n }); \n };\n });\n } \n}", "function filter(filteredData) {\n // Remove existing table so filtered data shows at the top\n d3.selectAll(\"td\").remove();\n console.log(\"Search Results:\", filteredData);\n // Build the new table\n // Use D3 to select the table body\n var tbody = d3.select(\"tbody\");\n filteredData.forEach((filteredTable) => {\n //append one table row per sighting\n var row = tbody.append(\"tr\");\n Object.entries(filteredTable).forEach(([key, value]) => {\n var cell = tbody.append(\"td\");\n cell.text(value);\n });\n }); \n }", "function applyFilters() {\n Object.keys(_filters).forEach(function(columnName) {\n var filterValues = _filters[columnName].filterValues;\n var keyDimension = _filters[columnName].dimension();\n var fs = _filterHandler(keyDimension, filterValues);\n _filters[columnName].filterValues = fs ? fs : filterValues;\n });\n }", "function applyFilterRowsToRequest(filterRows, data) {\n $.each(filterRows, function eachFilterRow() {\n var filterRow = this;\n // Remove search text format errors.\n $(filterRow).find('.fa-exclamation-circle').remove();\n // Build the filter required for values in each filter row input.\n $.each($(filterRow).find('input'), function eachInput() {\n var cell = $(this).closest('td');\n var field = $(cell).attr('data-field');\n var fnQueryBuilder;\n var query;\n var fieldNameParts;\n var fn;\n if ($(this).val().trim() !== '') {\n // If there is a special field name, break it into the name\n // + parameters.\n fieldNameParts = field.replace(/#/g, '').split(':');\n // Remove the convertor name from the start of the array,\n // leaving the parameters.\n fn = fieldNameParts.shift();\n if (typeof indiciaFns.fieldConvertorQueryBuilders[fn] !== 'undefined') {\n // A special field with a convertor function.\n fnQueryBuilder = indiciaFns.fieldConvertorQueryBuilders[fn];\n query = fnQueryBuilder($(this).val().trim(), fieldNameParts);\n if (query === false) {\n // Flag input as invalid.\n $(this).after('<span title=\"Invalid search text\" class=\"fas fa-exclamation-circle\"></span>');\n } else if (typeof query === 'object') {\n // Query is an object, so use it as is.\n data.bool_queries.push(query);\n } else {\n // Query is a string, so treat as a query_string.\n data.bool_queries.push({\n bool_clause: 'must',\n query_type: 'query_string',\n value: query\n });\n }\n } else if (indiciaData.esMappings[field].type === 'keyword' || indiciaData.esMappings[field].type === 'text') {\n // Normal text filter.\n data.textFilters[field] = $(this).val().trim();\n } else if (indiciaData.esMappings[field].type === 'date') {\n // Date filter.\n query = indiciaFns.dateToEsFilter($(this).val().trim(), field);\n if (query === false) {\n $(this).after('<span title=\"Invalid search text\" class=\"fas fa-exclamation-circle\"></span>');\n } else {\n data.bool_queries.push({\n bool_clause: 'must',\n query_type: 'query_string',\n value: query\n });\n }\n } else {\n // Normal numeric filter.\n data.numericFilters[field] = $(this).val().trim();\n }\n }\n });\n });\n }", "function runFilter() {\n d3.event.preventDefault();\n var inputField = d3.select(\"#datetime\");\n var inputValue = inputField.property(\"value\");\n var filterByDate = tableData.filter(rowData => rowData.datetime === inputValue);\n tbody.html(\"\")\n filterByDate.forEach(sighting => {\n var row = tbody.append(\"tr\");\n Object.values(sighting).forEach(value => {\n row.append(\"td\").text(value);\n });\n });\n}", "function filterData(table, field, input) {\n if(input) {\n return table.filter(function(sighting) {\n if (sighting[field] === input) {\n return true;\n }\n });\n }\n // console.log(table);\n return table;\n}", "function filterTable() {\n \n // 8. Set the filtered data to the tableData.\n // Following 11.5.3 (2021), we'll do just that.\n // Similarly, we'll grab five separate values, including the datetime value, \n // in a manner similar to our code from 11.5.3 (2021).\n let date = d3.select(\"#datetime\").property(\"value\");\n let city = d3.select(\"#city\").property(\"value\");\n let state = d3.select(\"#country\").property(\"value\")\n let country = d3.select(\"#country\").property(\"value\")\n let shape = d3.select(\"#shape\").property(\"value\")\n let filteredData = tableData;\n \n // 9. Loop through all of the filters and keep any data that\n // matches the filter values\n // Continuing with our refactoring of 11.5.3 (2021) code, we'll specify if statements\n // for each distinct value\n if (date) {\n filteredData = filteredData.filter(row => row.datetime === date);\n }\n if (city) {\n filteredData = filteredData.filter(row => row.city === city)\n }\n if (state) {\n filteredData = filteredData.filter(row => row.state === state)\n }\n if (country) {\n filteredData = filteredData.filter(row => row.country === country)\n }\n if (shape) {\n filteredData = filteredData.filter(row => row.shape === shape)\n }\n\n // 10. Finally, rebuild the table using the filtered data\n buildTable(filteredData)\n }", "function Filter_TableRows() { // PR2019-06-09 PR2020-08-31 PR2022-03-03\n //console.log( \"===== Filter_TableRows=== \");\n //console.log( \"filter_dict\", filter_dict);\n\n // function filters by inactive and substring of fields\n // - iterates through cells of tblRow\n // - skips filter of new row (new row is always visible)\n // - if filter_name is not null:\n // - checks tblRow.cells[i].children[0], gets value, in case of select element: data-value\n // - returns show_row = true when filter_name found in value\n // - if col_inactive has value >= 0 and hide_inactive = true:\n // - checks data-value of column 'inactive'.\n // - hides row if inactive = true\n\n const data_inactive_field = null; // \"data-inactive\";\n for (let i = 0, tblRow, show_row; tblRow = tblBody_datatable.rows[i]; i++) {\n tblRow = tblBody_datatable.rows[i]\n show_row = t_Filter_TableRow_Extended(filter_dict, tblRow, data_inactive_field);\n add_or_remove_class(tblRow, cls_hide, !show_row);\n };\n }", "function filterTable() {\n var filteredData = tableData\n // console.log(dateTimeEntry.property('value'))\n if (dateTimeEntry.property('value')) {\n var filteredData = filteredData.filter(ufoSighting => ufoSighting.datetime === dateTimeEntry.property('value'));\n }\n if (cityEntry.property('value')) {\n var filteredData = filteredData.filter(ufoSighting => ufoSighting.city === cityEntry.property('value').toLowerCase());\n }\n if (stateEntry.property('value')) {\n var filteredData = filteredData.filter(ufoSighting => ufoSighting.state === stateEntry.property('value').toLowerCase());\n }\n if (shapeEntry.property('value')) {\n var filteredData = filteredData.filter(ufoSighting => ufoSighting.shape === shapeEntry.property('value').toLowerCase());\n }\n // Filter on the country by determining which country has been selected by the country button. If neither 'us' nor 'ca' is selected, this filter will not run.\n if (country_button.text() === 'United States') {\n var filteredData = filteredData.filter(ufoSighting => ufoSighting.country === 'us')\n } else if (country_button.text() === 'Canada') {\n var filteredData = filteredData.filter(ufoSighting => ufoSighting.country === 'ca')\n }\n\n // Clear the DOM table from the previous state\n ufo_table.selectAll('tr').remove();\n\n // Clear the noData div \n d3.selectAll('#nodata').text('')\n\n // If the filteredData has a length of zero, print a message indicating as such\n if (filteredData.length === 0) {\n d3.selectAll('#nodata').text('Sorry, your filter returned no results. Please try again.')\n }\n // Repopulate the DOM table with the filtered data.\n filteredData.forEach((ufoSighting) => {\n\n var row = ufo_table.append('tr');\n Object.entries(ufoSighting).forEach(([key, value]) => {\n var cell = row.append('td');\n cell.text(value);\n }); \n }); \n}", "function filterTable(filterProp, isGreater, tableData) {\n /* Change the filter to be the filter + the opposite of the current direction\n * so that the next press of the same option will flip the filter direction\n */\n setFilter(filterProp + !isGreater);\n let temp = tableData;\n temp.sort((a, b) => {\n let aVal = a.props[filterProp];\n let bVal = b.props[filterProp];\n if (aVal < bVal) {\n return 1;\n } else if (aVal > bVal) {\n return -1;\n } else {\n return 0;\n }\n });\n\n // Reverse the sorted array if the filter is set in the opposite direction\n if (!isGreater) {\n temp.reverse();\n }\n setTable(temp);\n }", "function handleFilterButtonClick() {\n var datefilter = $dateInput.value;\n\n\n // Filter on date\n if (datefilter != \"\") {\n tableData = data.filter(function(results) {\n var resultsDate = results.datetime;\n return resultsDate === datefilter;\n });\n } else { tableData };\n\n getTable();\n}", "function filterTable(entries) {\n\n //const key = Object.keys(entries);\n \n // 8. Set the filtered data to the tableData.\n \n \n // 9. Loop through all of the filters and keep any data that\n // matches the filter values\n\n let dataset = data.filter(item => {\n const list = Object.keys(entries);\n if(list.length === 0) return true;\n console.log(\"size of list = \"+list.length);\n return list.every(k => {\n return ((entries[k] == '') || (entries[k] == item[k]))\n });\n });\n\n \n // 10. Finally, rebuild the table using the filtered data\n buildTable(dataset);\n }", "function filterTable() {\n // Prevent the page from refreshing\n d3.event.preventDefault();\n\n // get the user input for filtering \n var inputDate = dateSelect.property(\"value\")\n\n // make a copy of the data for filtering\n var filteredData = tableData;\n\n // if there is a date input, filter the table according to the date\n if (inputDate) {\n filteredData = filteredData.filter(sighting => sighting.datetime == inputDate);\n }\n\n // reset the table\n clearTable();\n\n // if the filteredData array is empty\n if (filteredData.length == 0) {\n var row = tbody.text(\"There are no sightings for your chosen filters.\");\n }\n\n // use forEach and Object.values to populate the tbody with filtered data\n filteredData.forEach((ufoSighting) => {\n\n // create a new row for every sighting object\n var row = tbody.append(\"tr\");\n\n // iterate through each object's values to populate cells\n Object.values(ufoSighting).forEach(value => {\n\n // create a new cell for each item in the object\n var cell = row.append(\"td\");\n\n // populate the td text with the value\n cell.text(value);\n cell.attr(\"class\", \"table-style\");\n }); // close second forEach\n\n }); // close first forEach\n\n}", "filter(f) {\n this.rows()\n }", "applyFilter(row, filterId, filterValue) {\n if (Object.keys(this.filters).length == 0) {\n return true;\n }\n let rowValue = this.filters[filterId].path(row);\n // convert string to bool\n if (filterValue == 'true' || filterValue == 'false') {\n filterValue = filterValue == 'true';\n }\n // convert string to null\n else if (filterValue == 'undefined' || filterValue == 'null') {\n filterValue = null;\n }\n\n if (filterValue == 'all') {\n return true;\n }\n // filter = 'none'\n if (\n filterValue == null &&\n (rowValue == 'undefined' ||\n rowValue == null ||\n rowValue == '' ||\n rowValue == undefined)\n ) {\n return true;\n }\n return rowValue == filterValue;\n }", "function ufoFiltering() {\n console.log(\"Event Fired\");\n d3.event.preventDefault();\n \n \n // Remove Table Body\n d3.select(\"tbody\").selectAll(\"tr\").remove();\n let ufoFilteredData = tableData.filter(dateFilter);\n\n\n// let ufoFilteredData = tableData.filter(function(dt){\n// console.log(dt.datetime);\n// return dt.datetime === inputSearchDateValue;});\n\n ufoFilteredData.forEach(ufoSighting => {\n var row = tableBody.append(\"tr\");\n row.append(\"td\").text(ufoSighting.datetime);\n row.append(\"td\").text(ufoSighting.city)\n row.append(\"td\").text(ufoSighting.state)\n row.append(\"td\").text(ufoSighting.country)\n row.append(\"td\").text(ufoSighting.shape)\n row.append(\"td\").text(ufoSighting.durationMinutes)\n row.append(\"td\").text(ufoSighting.comments) \n });\n}", "function applyFilters(){\n $(\"tr[id^='student-c']\").show();\n filterSection();\n filterTeam();\n filterEmails();\n}", "function filterBasedTrigger(dataSet, key, newText) {\n\n // Check if the data field is empty to decide how to populate the table\n if (newText === '') {\n // if the data field is empty load the whole table; assign filtered data as the whole data set\n var filteredData = dataSet;\n }\n else {\n // Use the form input to filter the data by datetime\n var filteredData = dataSet.filter(element => element[key] === newText);\n };\n\n return filteredData\n}", "function handleFilter(entry) {\n entry.forEach((UFOSighting) => {\n var row = tablebody.append(\"tr\");\n Object.entries(UFOSighting).forEach(([key, value]) => {\n var cell = tablebody.append(\"td\");\n cell.text(value);\n })\n })\n}", "function executeFilter()\n{\n\t// Get handle on markup to update...\n\tvar messages = document.getElementById(\"messages\");\n\tthis.filter = this.dataTable.runFilter();\n\t// Bolt on new filter (say category) starting next position after columns.\n\tif(this.filter.length > 0) {\n\t\tthis.filter = this.filter + this.dataTable.headerArray.length + \"%24\" + \"categoryValue\";\n\t}\n\tthis.getAjaxMessages();\n}", "function filterTable() {\n d3.event.preventDefault();\n\n tbody.html(\"\");\n\n // Select the input element and get the raw HTML node\n let inputElement = d3.select(\"#datetime\"),\n // Get the value property of the input element\n inputValue = inputElement.property(\"value\");\n // Use the form input to filter the data by blood type\n let filterData = tableData.filter(ufo => ufo.datetime === inputValue);\n\n filterData.forEach((ufo) => {\n let row = tbody.append(\"tr\");\n Object.values(ufo).forEach(value => {\n let cell = row.append(\"td\");\n cell.text(value);\n });\n });\n\n}", "function applyFilters( toData ) {\n var filterField = '', filterBy = '';\n\n if( args.query ) {\n if( args.query.type && args.query.type.$regex ) {\n filterField = 'type';\n filterBy = args.query.type.$regex;\n toData = toData.filter( reduceRows );\n }\n if( args.query.unit && args.query.unit.$regex ) {\n filterField = 'unit';\n filterBy = args.query.unit.$regex;\n toData = toData.filter( reduceRows );\n }\n if( args.query.max && args.query.max.$regex ) {\n filterField = 'max';\n filterBy = args.query.max.$regex;\n toData = toData.filter( reduceRows );\n }\n if( args.query.min && args.query.min.$regex ) {\n filterField = 'min';\n filterBy = args.query.min.$regex;\n toData = toData.filter( reduceRows );\n }\n }\n\n function reduceRows( row ) {\n var checkValue = row[filterField];\n if( !checkValue ) {\n return false;\n }\n return null !== checkValue.match( filterBy );\n }\n\n return toData;\n }", "function tableFilter(tableList){\n mydicts = testFilter()\n\nconsole.log(mydicts)\n if(mydicts.date){ if ( filteredData){\n\n var filteredData = filteredData.filter(ufo=> ufo.datetime==mydicts.date)}\n\n else{var filteredData = tableList.filter(ufo=> ufo.datetime==mydicts.date)\n\n }\n\n\n }\n if(mydicts.city){\n if ( filteredData){\n\n var filteredData = filteredData.filter(ufo=> ufo.city==mydicts.city)}\n \n else{var filteredData = tableList.filter(ufo=> ufo.city==mydicts.city)\n \n }}\n\n if(mydicts.state){if ( filteredData){\n\n var filteredData = filteredData.filter(ufo=> ufo.state==mydicts.state)}\n \n else{var filteredData = tableList.filter(ufo=> ufo.state==mydicts.state)\n \n }}\n \n if(mydicts.country){if ( filteredData){\n\n var filteredData = filteredData.filter(ufo=> ufo.country==mydicts.country)}\n \n else{var filteredData = tableList.filter(ufo=> ufo.country==mydicts.country)\n \n }}\n\n if(mydicts.shape){if (filteredData){\n\n var filteredData = filteredData.filter(ufo=> ufo.shape==mydicts.shape)}\n \n else{var filteredData = tableList.filter(ufo=> ufo.shape==mydicts.shape)\n \n }}\n \n\nconsole.log(filteredData)\n\n return filteredData\n }", "function myPillFilter(col, id) {\n var data = document.getElementById(id).value;\n manageProductTable.columns(col).search(data).draw();\n\n}", "function filterGlobal () {\n jq('#tblMain').dataTable().search(\n \tjq('#tblMain_filter').val()\n ).draw();\n }", "function filterByCheck(tableId, data, columnId, checkboxId) {\n\n var table, tr, td, i, txtValue;\n\n // check whether all the checkboxes are selected to check or uncheck Select All checkbox\n if (!checkAllSelected()) {\n var selectAll = document.getElementById(checkboxId);\n selectAll.checked = false;\n } else {\n var selectAll = document.getElementById(checkboxId);\n selectAll.checked = true;\n }\n\n var filter = getSelectedCheckboxes();\n\n table = document.getElementById(tableId);\n tr = table.getElementsByTagName(\"TR\");\n\n // traverse all the rows of the table\n for (i = 1; i < tr.length; i++) {\n td = tr[i].getElementsByTagName(\"TD\")[columnId];\n if (td) {\n txtValue = td.textContent || td.innerText;\n // if the filter doesn't match with the cell value it will be hidden\n if (checkMatches(txtValue, filter)) {\n tr[i].style.display = \"\";\n } else {\n tr[i].style.display = \"none\";\n }\n }\n }\n}", "_applyRowFilters() {\r\n const that = this;\r\n\r\n if (!that.filtering || !that.filterRow) {\r\n return;\r\n }\r\n\r\n const filterRow = that.$.tableContainer.querySelector('.smart-table-filter-row'),\r\n selectionColumnCorrection = that.selection ? 1 : 0,\r\n filters = [];\r\n\r\n for (let i = 0; i < that._columns.length; i++) {\r\n const dataField = that._columns[i].dataField,\r\n dataType = that._columns[i].dataType,\r\n container = filterRow.children[i + selectionColumnCorrection].firstElementChild,\r\n button = container.children[2];\r\n let filterValue = container.firstElementChild.value,\r\n filterCondition = container.children[1].value;\r\n\r\n if (dataType === 'string') {\r\n filterCondition = that._filterInfo.stringConditions.find(condition => condition.label === filterCondition).value;\r\n\r\n }\r\n else {\r\n filterCondition = that._filterInfo.numberAndDateConditions.find(condition => condition.label === filterCondition).value;\r\n\r\n if (filterValue !== '') {\r\n if (dataType === 'number') {\r\n filterValue = parseFloat(filterValue);\r\n\r\n if (isNaN(filterValue)) {\r\n container.firstElementChild.value = '';\r\n filterValue = '';\r\n }\r\n }\r\n else if (dataType === 'date') {\r\n filterValue = new Date(filterValue);\r\n filterValue.setHours(0, 0, 0);\r\n }\r\n }\r\n }\r\n\r\n const conditionWithEmptyValue = ['EMPTY', 'NOT_EMPTY', 'NULL', 'NOT_NULL'].indexOf(filterCondition) !== -1;\r\n\r\n if (filterValue !== '' || conditionWithEmptyValue) {\r\n const filterGroup = new Smart.Utilities.FilterGroup(),\r\n filterObject = filterGroup.createFilter(dataType, filterValue, filterCondition);\r\n\r\n filterGroup.addFilter('or', filterObject);\r\n filters.push([dataField, filterGroup]);\r\n\r\n button.classList.remove('smart-hidden');\r\n }\r\n else {\r\n button.classList.add('smart-hidden');\r\n }\r\n\r\n if (conditionWithEmptyValue) {\r\n container.firstElementChild.setAttribute('disabled', true);\r\n }\r\n else {\r\n container.firstElementChild.removeAttribute('disabled');\r\n }\r\n }\r\n\r\n if (filters.length > 0) {\r\n if (!that.dataSource.virtualDataSource) {\r\n that.dataSource._filter(filters, 'and');\r\n }\r\n\r\n that._filterInfo.rowFilters = filters;\r\n delete that._filterInfo.appliedFilters;\r\n that._fullRefresh('filter');\r\n that.$.fireEvent('filter', { action: 'add', filters: filters });\r\n }\r\n else if (that._filterInfo.rowFilters) {\r\n that.clearFilters();\r\n }\r\n }", "function fnFilterGlobal ( table_id )\n{\n\n $('#'+table_id).dataTable().fnFilter(\n\n $('body').find(\n '['+filter_table_find_attr+'='+table_id+']' \n ).val(),\n\n null,\n\n $('body').find(\n '['+filter_table_regex_attr+'='+table_id+']' \n )[0].checked,\n\n $('body').find(\n '['+filter_table_smart_attr+'='+table_id+']' \n )[0].checked\n\n );\n}", "function filterTullkontor () {\n \t\tjq('#tullkontorList').DataTable().search(\n \t\tjq('#tullkontorList_filter').val()\n \t\t).draw();\n }", "function filterTable() {\n // Prevent the page from refreshing\n d3.event.preventDefault();\n\n var rowfilter = [];\n\n // Select the input element and get the raw HTML node\n var dateElement = d3.select(\"#datetime\");\n var dateValue = dateElement.property(\"value\").trim();\n\n var cityElement = d3.select(\"#city\");\n var cityValue = cityElement.property(\"value\").toLowerCase().trim();\n\n var stateElement = d3.select(\"#state\");\n var stateValue = stateElement.property(\"value\").toLowerCase().trim();\n\n var countryElement = d3.select(\"#country\");\n var countryValue = countryElement.property(\"value\").toLowerCase().trim();\n\n var shapeElement = d3.select(\"#shape\");\n var shapeValue = shapeElement.property(\"value\").toLowerCase().trim();\n\n if (dateValue)\n {rowFilter = tableData.filter(dtRow => (dtRow.datetime === dateValue));}\n\n if (cityValue)\n {rowFilter = rowFilter.filter(dtRow => (dtRow.city === cityValue));}\n \n if (stateValue)\n {rowFilter = rowFilter.filter(dtRow => (dtRow.state === stateValue));}\n \n if (countryValue)\n {rowFilter = rowFilter.filter(dtRow => (dtRow.country === countryValue));}\n \n if (shapeValue)\n {rowFilter = rowFilter.filter(dtRow => (dtRow.shape === shapeValue));} \n\n console.log(rowFilter)\n\n if ((dateValue === \" \") && \n (cityValue === \" \") &&\n (stateValue === \" \") &&\n (countryValue === \" \") &&\n (shapeValue === \" \")) {\n buildTable(tableData);\n }\n\n if (rowFilter === \" \") {\n tbody.html(\"\");}\n else {\n tbody.html(\"\");\n buildTable(rowFilter);\n }\n}", "filterInput() {\n const input = this.table.querySelector('[js-table-filter-input]');\n \n input.addEventListener('input', (e) => {\n if (this.isPagination) this.paginateSetCurrent();\n this.tableRefresh();\n })\n }", "function fnFilterColumn ( table_id, i )\n{\n $('#'+table_id).dataTable().fnFilter(\n\n $('body').find(\n '.'+datatable_global_filter_class\n ).filter(\n '['+datatable_filter_target_table_attr+'='+table_id+']' \n ).filter(\n '['+datatable_filter_target_col_attr+'='+i+']' \n ).val(),\n\n i,\n\n $('body').find(\n '.'+datatable_global_regex_class\n ).filter(\n '['+datatable_filter_target_table_attr+'='+table_id+']' \n ).filter(\n '['+datatable_filter_target_col_attr+'='+i+']' \n )[0].checked,\n\n $('body').find(\n '.'+datatable_global_smart_class\n ).filter(\n '['+datatable_filter_target_table_attr+'='+table_id+']' \n ).filter(\n '['+datatable_filter_target_col_attr+'='+i+']' \n )[0].checked\n );\n}", "function runFilter() {\r\n // jQuery method for emptying the existing table each time\r\n // a new query is performed\r\n $(\"#tbody\").empty();\r\n // Select the input element and get the raw HTML node\r\n var inputElement = d3.select(\"#datetime\");\r\n // Get the value property of the input element\r\n var inputValue = inputElement.property(\"value\");\r\n // Only return values that match with input date\r\n var filteredData = data.filter(data => data.datetime === inputValue);\r\n // Prevent the page from refreshing after form submission\r\n d3.event.preventDefault();\r\n // Function to add filtered data to table\r\n filteredData.forEach((runFilteredData) => {\r\n // Add a row for each key/value pair found in filtered dataset\r\n var row = tbody.append(\"tr\");\r\n // Append values found in filtered data set to appropriate columns\r\n Object.entries(runFilteredData).forEach(([key, value]) => {\r\n var cell = row.append(\"td\");\r\n cell.text(value);\r\n });\r\n });\r\n // jQuery method for emptying the input field after click\r\n $(\"#datetime\").val('');\r\n}", "function filterData() {\n\n // get date filter value\n var date = d3.select(\"#datetime\").property(\"value\");\n var country = d3.select(\"#country\").property(\"value\").toLowerCase();\n var city = d3.select(\"#city\").property(\"value\").toLowerCase();\n var state = d3.select(\"#state\").property(\"value\").toLowerCase();\n var shape = d3.select(\"#shape\").property(\"value\").toLowerCase();\n\n // initialize filteredData\n var filteredData = tableData;\n\n // check that date field is valid\n if (date) {\n // if the date is a non-null / non-empty value, apply the filter\n filteredData = filteredData.filter(row => row.datetime == date);\n }\n // filter for country\n if (country) {\n // if the country is a non-null / non-empty value, apply the filter\n filteredData = filteredData.filter(row => row.country == country);\n }\n // filter for state\n if (state) {\n // if the state is a non-null / non-empty value, apply the filter\n filteredData = filteredData.filter(row => row.state == state);\n }\n // filter for city\n if (city) {\n // if the city is a non-null / non-empty value, apply the filter\n filteredData = filteredData.filter(row => row.city == city);\n }\n // filter for shape\n if (shape) {\n // if the shape is a non-null / non-empty value, apply the filter\n filteredData = filteredData.filter(row => row.shape == shape);\n }\n\n\n // rebuild table\n buildTable(filteredData);\n}", "function Filter_TableRows(set_filter_isactive) { // PR2019-06-09 PR2020-08-31 PR2022-03-03\n //console.log( \"===== Filter_TableRows=== \");\n //console.log( \"filter_dict\", filter_dict);\n\n // function filters by inactive and substring of fields\n // - iterates through cells of tblRow\n // - skips filter of new row (new row is always visible)\n // - if filter_name is not null:\n // - checks tblRow.cells[i].children[0], gets value, in case of select element: data-value\n // - returns show_row = true when filter_name found in value\n // - if col_inactive has value >= 0 and hide_inactive = true:\n // - checks data-value of column 'inactive'.\n // - hides row if inactive = true\n\n if (set_filter_isactive){\n HandleFilterInactive();\n };\n selected.item_count = 0;\n const data_inactive_field = (selected_btn !== \"btn_userpermit\") ? \"data-inactive\" : null;\n for (let i = 0, tblRow, show_row; tblRow = tblBody_datatable.rows[i]; i++) {\n tblRow = tblBody_datatable.rows[i]\n show_row = t_Filter_TableRow_Extended(filter_dict, tblRow, data_inactive_field);\n\n //console.log( \"show_row\", show_row);\n\n add_or_remove_class(tblRow, cls_hide, !show_row);\n if (show_row) {selected.item_count += 1};\n }\n\n// --- show total in sidebar\n t_set_sbr_itemcount_txt(loc, selected.item_count, loc.User, loc.Users, setting_dict.user_lang);\n }", "function filterAll() {\n\t// filter by date\n\td3.event.preventDefault();\n\tconst dateInput = d3.select('#datetime');\n\tconst date = dateInput.property('value');\n\tlet table = tableData;\n\tif (date !== '') {\n\t\ttable = table.filter((row) => row.datetime === date);\n\t}\n\n\t// filter by state\n\tconst state = stateDropdown.node().value;\n\tif (state !== '') {\n\t\ttable = table.filter((row) => row.state === state);\n\t}\n\n\t// filter by shape\n\tconst shape = shapeDropdown.node().value;\n\tif (shape !== '') {\n\t\ttable = table.filter((row) => row.shape === shape);\n\t}\n\n\t// show filtered table\n\tshowTable(table);\n}", "function UFOFilter() {\n\t\t\n\t\t// Prevent Page from Refreshing\n\t\td3.event.preventDefault();\n\t\t\n\t\t// Select Input Element\n\t\tvar inputElement = d3.select(\"#datetime\");\n\t\t\n\t\t// Select Input Value\n\t\tvar inputValue = inputElement.property(\"value\");\n\t\t\tconsole.log(inputValue);\n\t\t\t\t\n\t\t// Filter based on Input Value\n\t\tvar filteredDates = tableData.filter(observee => observee.datetime === inputValue);\n\t\t\t\n\t\t\t// Log filtered dates in console to ensure code is working\n\t\t\tconsole.log(filteredDates);\n\t\t\n\t\t// Rebuild table using function in Task 1, but with filtered dates only\t\n\t\tUFOData(filteredDates);\n\t}", "function setFilterActionTable(){\n\t//init table input filter\n\t$(\".data-filter-table\").keyup(function(){\n\t\tvar rows=$(\"#\"+$(this).data(\"filter\") + \" tr\");\n\t\tvar filterValue=$(this).val().toLowerCase();\n\t\trows.each(function(){\n\t\t\tif($(this).find(\"td\").text().toLowerCase().includes(filterValue)) $(this).show();\n\t\t\telse $(this).hide();\n\t\t})\n\t\t//show header row\n\t\t$(\"#\"+$(this).data(\"filter\") + \" tr:first-child\").show();\n\t});\n\t\n\t//checkbox click events\n\t$(\"input[name=days]\").click(function(){\n\t\tif($(this).val()==\"\"){\n\t\t\t//if All button\n\t\t\tif($(this).prop(\"checked\")){\n\t\t\t\t//check all days\n\t\t\t\t$(\"input[name=days]\").prop(\"checked\",true);\n\t\t\t\t$(\".dayrow\").hide();\n\t\t\t\t$(\".everyday_cell\").show();\n\t\t\t} else {\n\t\t\t\t//uncheck all days\n\t\t\t\t$(\"input[name=days]\").prop(\"checked\",false);\n\t\t\t\t$(\".dayrow\").show();\n\t\t\t\t$(\".everyday_cell\").hide();\n\t\t\t}\n\t\t} else {\n\t\t\t//rest of buttons\n\t\t\t$(\"input[name=days]:first\").prop(\"checked\",false);\n\t\t}\n\t});\n}", "function handleChange() {\n tbody.html(\"\");\n // Select input value\n var dateInputText = datetime.property(\"value\").toLowerCase();\n var cityInputText = city.property(\"value\").toLowerCase();\n var stateInputText = state.property(\"value\").toLowerCase();\n var countryInputText = country.property(\"value\").toLowerCase();\n var shapeInputText = shape.property(\"value\").toLowerCase();\n\n console.log(dateInputText);\n console.log(cityInputText);\n console.log(stateInputText);\n console.log(countryInputText);\n console.log(shapeInputText);\n\n filter_table = tableData\n // Filtered data from tableData\n if(dateInputText !== \"\"){\n var filter_table = filter_table.filter(filter_table => filter_table.datetime === dateInputText);\n } \n if(cityInputText !== \"\"){\n var filter_table = filter_table.filter(filter_table => filter_table.city === cityInputText);\n }\n if(stateInputText !== \"\"){\n var filter_table = filter_table.filter(filter_table => filter_table.state === stateInputText);\n }\n if(countryInputText !== \"\"){\n var filter_table = filter_table.filter(filter_table => filter_table.country === countryInputText);\n }\n if(shapeInputText !== \"\"){\n var filter_table = filter_table.filter(filter_table => filter_table.shape === shapeInputText);\n }\n\n console.log(filter_table.length);\n \n if (filter_table.length !== 0){\n table(filter_table);\n } else{\n alert(\"Results Not Found\");\n table(tableData);\n }\n}", "function dataFilter() { \n\n // Select the date from the in put\n var date = inputField.property(\"value\");\n\n // Set temporary variable to be written over with reduced data\n tempData = tableData;\n\n // Condition to check date goes here, if DNE or empty then load normally\n if (date) { // This will check if there is a value that have been passed\n tempData = tempData.filter(ufoData => ufoData.datetime === date)\n }\n\n tableTalk(tempData);\n}", "customFilter(filter, row) {\n return typeof row[filter.id] === \"string\"\n ? stringFrIncludes(filter.value, row[filter.id])\n : true;\n }", "customFilter(filter, row) {\n return typeof row[filter.id] === \"string\"\n ? stringFrIncludes(filter.value, row[filter.id])\n : true;\n }", "function filteredTable(){\n // Select the input element and get the raw HTML node\n var inputElement = d3.select(\"#datetime\");\n // Get the value property of the input element\n var inputValue = inputElement.property(\"value\");\n var newData = tableData.filter(ufoSight => ufoSight.datetime === inputValue);\n //call createTable with the data from filtered list to populate sighting data\n createTable(newData);\n}", "function setupFilterTable() {\n\t\t\tif($(\".filteredtable\").length) {\n\t\t\t\tvar classes = $(\".filteredtable\").attr(\"class\").split(' ');\n\t\t\t\tvar column = -1;\n\t\t\t\tvar keyword = -1;\n\t\t\t\tvar hideoption = -1;\n\t\t\t\tvar prefilter = -1;\n\t\t\t\tfor (var i in classes) {\n\t\t\t\t\tvar classdata = classes[i].match(/column(\\d)/);\n\t\t\t\t\tif (classdata != null) {\n\t\t\t\t\t\tcolumn = classdata[1];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclassdata = classes[i].match(/keyword(\\d)/);\n\t\t\t\t\t\tif (classdata != null) {\n\t\t\t\t\t\tkeyword = classdata[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif ($(\"#filteroptions\").length > 0) {\n\t\t\t\t var options = $(\"#filteroptions\").attr(\"class\").split(' ');\n\t\t\t\t for (var i in options) {\n\t\t\t\t\thidecolumn = options[i].match(/hidecolumn(\\d)/);\n\t\t\t\t\tif (hidecolumn != null) {\n\t\t\t\t\t hideoption = hidecolumn[1];\n\t\t\t\t\t} else if (options[i].match(/prefilter/)) {\n\t\t\t\t\t prefilter = $(\"#filteroptions\").attr(\"title\");\n\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\t$(\".filteredtable\").before(\"<div id=\\\"calendar-search\\\"><p class=\\\"dropdown\\\">\" + $(\".filteredtable thead th:nth-child(\" + column + \")\").text() + \": <select id=\\\"filter\\\"><option value=\\\"\\\">View All</option></select></p><p class=\\\"filtersearch\\\">Search: <input type=\\\"text\\\" id=\\\"filtersearch\\\"/></p></div>\");\n\t\t\t\tif (isMobile) {\n\t\t\t\t\t$(\"#calendar-search .filtersearch\").append(\"<input type=\\\"button\\\" value=\\\"Go\\\">\");\n\t\t\t\t}\n\t\t\t\tvar cats = new Array();\n\t\t\t\t$(\".filteredtable tbody tr td:nth-child(\" + column + \")\").each(function() {\n\t\t\t\t\tvar vals = $(this).text().split(\", \");\n\t\t\t\t\tfor (var i in vals) {\n\t\t\t\t\t\tif (jQuery.inArray($.trim(vals[i]), cats) == -1) {\n\t\t\t\t\t\t\tcats.push($.trim(vals[i]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (keyword > 0) {\n\t\t\t\t\t$(\".filteredtable tr td:nth-child(\" + keyword + \")\").css(\"display\", \"none\");\n\t\t\t\t\t$(\".filteredtable tr th:nth-child(\" + keyword + \")\").css(\"display\", \"none\");\n\t\t\t\t}\n\t\t\t\tif (hideoption > 0) {\n\t\t\t\t\t$(\".filteredtable tr td:nth-child(\" + hideoption + \")\").css(\"display\", \"none\");\n\t\t\t\t\t$(\".filteredtable tr th:nth-child(\" + hideoption + \")\").css(\"display\", \"none\");\n\t\t\t\t}\n\t\t\t\tcats.sort();\n\t\t\t\tfor (var i in cats) {\n\t\t\t\t\t$(\"#filter\").append(\"<option>\"+cats[i]+\"</option>\");\n\t\t\t\t}\n\t\t\t\n\t\t\t\t$(\"#filter\").change(function() {\n\t\t\t\t\tsearchtable();\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t$(\"#filtersearch\").keyup(function() {\n\t\t\t\t\tsearchtable();\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tfunction searchtable() {\n\t\t\t\t\t/* Filter the table */\n\t\t\t\t\t$.uiTableFilter( $('table.filteredtable'), $(\"#filtersearch\").val(), $(\"#filter\").val(), $(\".filteredtable thead th:nth-child(\" + column + \")\").text());\n\t\t\t\t\t/* Remove tints from all rows */\n\t\t\t\t\t$('table.filteredtable tr').removeClass(\"even\");\n\t\t\t\t\t/* Filter through what is still displaying and change the tints */\n\t\t\t\t\tvar counter = 0;\n\t\t\t\t\t$('table.filteredtable tr').each(function() {\n\t\t\t\t\t\t\t\t\t if($(this).css(\"display\") != \"none\") {\n\t\t\t\t\t\t\t\t\t\t if (counter % 2) {\n\t\t\t\t\t\t\t\t\t\t $(this).addClass(\"even\");\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t counter++;\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t });\n\t\t\t\t}\n\t\t\n\t\t\t\tif (prefilter != -1) {\n\t\t\t\t $(\"#filter\").val(prefilter);\n\t\t\t\t searchtable();\n\t\t\t\t}\n\t\t\t\tif ($(\"#filteroptions.hidefilters\").length) {\n\t\t\t\t $(\"#calendar-search\").hide();\n\t\t\t\t}\n\t\t\n\n\t\t\t\t$('#filter-form').submit(function(){\n\t\t\t\t\treturn false;\n\t\t\t\t}).focus(); //Give focus to input field\n\t\t\t}\n\t\t}", "updateTableLedgerFilter(state, {tableLedger, filters}) {\n tableLedger.filters = filters;\n }", "function updateFilters() {\n\n // Save the element, value, and id of the filter that was changed\n let date = d3.select('#datetime').property('value');\n let city = d3.select('#city').property('value');\n let state = d3.select('#state').property('value');\n let country = d3.select('#country').property('value');\n let shape = d3.select('#shape').property('value');\n\n // If a filter value was entered then add that filterId and value\n // to the filters list. Otherwise, clear that filter from the filters object\n if (date) {\n filters.date = date;\n }\n if (city) {\n filters.city = city;\n };\n if (state) {\n filters.state = state;\n };\n if (country) {\n filters.country = country;\n };\n if (shape) {\n filters.shape = shape;\n };\n // Call function to apply all filters and rebuild the table\n filterTable();\n}", "function myFilter() {\n var input, filter, table, tr, td, td1, i, txtValue;\n input = document.getElementById(\"datetime\");\n filter = input.value.toUpperCase();\n table = document.getElementById(\"ufo-table\");\n tr = table.getElementsByTagName(\"tr\");\n for (i = 0; i < tr.length; i++) {\n\n // determines what column to filter by. \"0\" is date, 1 is city, etc.\n td = tr[i].getElementsByTagName(\"td\")[0];\n\n if (td) {\n txtValue = td.textContent || td.innerText;\n if (txtValue.toUpperCase().indexOf(filter) > -1)\n\n {\n tr[i].style.display = \"\";\n } else {\n tr[i].style.display = \"none\";\n }\n } \n }\n }", "function filterMyTable(row) {\n\n //Filters\n //Date Input. \n var filterOuput = (new Date(row.datetime)).getTime() >= (new Date(dateInput.property(\"value\"))).getTime();\n\n // City\n if (citySelector.property(\"value\") != \"Select Parameter\") {\n filterOuput = (filterOuput && (row.city === citySelector.property(\"value\")));\n };\n\n // State\n if (stateSelector.property(\"value\") != \"Select Parameter\") {\n filterOuput = (filterOuput && (row.state === stateSelector.property(\"value\")));\n };\n\n // Country\n if (countrySelector.property(\"value\") != \"Select Parameter\") {\n filterOuput = (filterOuput && (row.country === countrySelector.property(\"value\")));\n };\n\n // Shape\n if (shapeSelector.property(\"value\") != \"Select Parameter\") {\n filterOuput = (filterOuput && (row.shape === shapeSelector.property(\"value\")));\n };\n\n return filterOuput;\n}", "applyFilter(dataField) {\n this.refs.myDataTable.clearFilters();\n let filtertype = 'stringfilter';\n if (dataField == 'date') filtertype = 'datefilter';\n if (dataField == 'price' || dataField == 'quantity') filtertype = 'numericfilter';\n // create a new group of filters.\n let filtergroup = new $.jqx.filter();\n // get listbox's checked items.\n let checkedItems = this.refs.filterbox.getCheckedItems();\n if (checkedItems.length == 0) {\n let filter_or_operator = 1;\n let filtervalue = 'Empty';\n let filtercondition = 'equal';\n let filter = filtergroup.createfilter(filtertype, filtervalue, filtercondition);\n filtergroup.addfilter(filter_or_operator, filter);\n }\n else {\n for (let i = 0; i < checkedItems.length; i++) {\n let filter_or_operator = 1;\n // set filter's value.\n let filtervalue = checkedItems[i].label;\n // set filter's condition.\n let filtercondition = 'equal';\n // create new filter.\n let filter = filtergroup.createfilter(filtertype, filtervalue, filtercondition);\n // add the filter to the filter group.\n filtergroup.addfilter(filter_or_operator, filter);\n }\n }\n // add the filters.\n this.refs.myDataTable.addFilter(dataField, filtergroup);\n // apply the filters.\n this.refs.myDataTable.applyFilters();\n }", "Filter() {\n var i, ln;\n\n if (!tp.IsEmpty(this.FilterInfoList)) {\n\n var Rows = this.GetWorkingRows();\n\n if (this.FilterInfoList.Count > 0) {\n this.fRows = tp.ListFilter(Rows, this.FilterInfoList.List, this.FilterInfoList.OrLogic);\n } else {\n this.fRows = Rows;\n }\n\n // if it was sorted, restore the sorting\n if (!tp.IsEmpty(this.SortInfoList) && this.SortInfoList.Count > 0) {\n tp.ListSort(this.fRows, this.SortInfoList.List);\n }\n\n if (this.fRows.length === 0) {\n this.fPosition = -1;\n } else if (!tp.InRange(this.fRows, this.Position)) {\n this.Position = 0;\n }\n\n if (!this.BindingSuspended) {\n for (i = 0, ln = this.fListeners.length; i < ln; i++) {\n this.fListeners[i].DataSourceFiltered();\n }\n\n this.OnFiltered();\n }\n }\n\n }", "function filter_1_3 (){\n filterType = \"\";\n filterAgeMin = 1;\n filterAgeMax = 3;\n loadTableWithFilters();\n\n}", "function filter_uf() {\n var input, filter, table, tr, td, i, txtValue, Td2;\n \n input = document.getElementById(\"filter_uf\");\n filter = input.value.toUpperCase();\n table = document.getElementById(\"table\");\n tr = table.getElementsByTagName(\"tr\");\n \n for (i = 0; i < tr.length; i++) {\n td = tr[i].getElementsByTagName(\"td\")[1];;\n \n if (td) {\n txtValue = td.textContent || td.innerText;\n \n if (txtValue.toUpperCase().indexOf(filter) > -1) {\n tr[i].style.display = \"\";\n } else {\n tr[i].style.display = \"none\";\n }\n } \n }\n }", "function plekit_table_filter(table_id,pattern_id,and_id) {\n clearTimeout(plekit_table_filter_timeout);\n plekit_table_filter_timeout = setTimeout(function() {\n plekit_lazy_table_filter(table_id,pattern_id,and_id)\n },\n 200);\n}", "function filterTable(val,col,ele){\n\n\tshowAjaxLoader();\n\n\t//construct query string\n\tvar order_string = col+\"=\"+val;\n\t\n\t//get the table we wish to display the results in\n\t\n\tvar table_ele = typeof window.loc !== 'undefined' ? \"#\"+window.loc : jQuery('.results');\t\n\t\n\t//determine any other variables we might need to pass such as team or member types\n\tvar input_type = jQuery(ele).attr('type');\n\tif ( input_type != 'text' ){ \n\t\tvar selected = jQuery(\"option:selected\", ele);\n\t if(jQuery(selected.parent()[0]).attr('class') == \"member\"){\n\t order_string += \"&owner_type=member\";\n\n\t } else if(jQuery(selected.parent()[0]).attr('class') == \"team\"){\n\t order_string += \"&owner_type=team\";\n\t \n\t }\n }\n\n order_string += \"&loc=\"+window.loc+\"&format=raw&tmpl=component\";\n\t\n\t//make ajax call\n\tjQuery.ajax({\n\t\ttype\t:\t'post',\n\t\turl\t\t:\torder_url,\n\t\tdata\t:\torder_string,\n\t\tdataType:\t'html',\n\t\tsuccess\t:\tfunction(data){\n\n\t\t\thideAjaxLoader();\n\n\t\t\t//update table html\n\t\t\tjQuery(table_ele).html(data);\n\t\t\t\n\t\t}\n\t})\n}", "function handleClick() {\n // get the datetime value from filter\n let date = d3.select(\"#datetime\").property(\"value\");\n // set the unfiltered data to the table data\n let filteredData=tableData;\n // check to see if date was entered and then filter with that date\n if (date){\n filteredData=filteredData.filter(row=>row.datetime===date);\n // rebuild the table with the filtered data\n // if no date entered, table will have original unfiltered values\n buildTable(filteredData);\n };\n}", "function searchButtonClick() {\n var dateFilter = $dateInput.value;\n var stateFilter = $stateInput.value.trim().toLowerCase();\n var cityFilter = $cityInput.value.trim().toLowerCase();\n var countryFilter = $countryInput.value.trim().toLowerCase();\n var shapeFilter = $shapeInput.value.trim().toLowerCase();\n\n // Date Filter\n if (dateFilter != \"\") {\n tableData = data.filter(function (sighting) {\n var sightingDate = sighting.datetime;\n return sightingDate === dateFilter;\n });\n }\n else { tableData };\n\n // State Filter\n if (stateFilter != \"\") {\n tableData = tableData.filter(function (sighting) {\n var sightingState = sighting.state;\n return sightingState === stateFilter;\n });\n }\n else { tableData };\n\n // City Filter\n if (cityFilter != \"\") {\n tableData = tableData.filter(function (sighting) {\n var sightingCity = sighting.city;\n return sightingCity === cityFilter;\n });\n }\n else { tableData };\n\n // Country Filter\n if (countryFilter != \"\") {\n tableData = tableData.filter(function (sighting) {\n var sightingCountry = sighting.country;\n return sightingCountry === countryFilter;\n });\n }\n else { tableData };\n\n // Shape Filter\n if (shapeFilter != \"\") {\n tableData = tableData.filter(function (sighting) {\n var sightingShape = sighting.shape;\n return sightingShape === shapeFilter;\n });\n }\n else { tableData };\n\n populateTable();\n}", "function updateFilters() {\n\n //resetting filter variable\n filters = {}\n\n // Save the element, value, and id of the filter that was changed\n let date = d3.select(\"#datetime\").property(\"value\");\n let city = d3.select('#city').property(\"value\")\n let state = d3.select('#state').property(\"value\")\n let country = d3.select('#country').property(\"value\")\n let shape = d3.select('#shape').property(\"value\")\n\n // If a filter value was entered then add that filter Id and value\n // to the filters list. Otherwise, clear that filter from the filters object\n if (date === \"\" ) {\n delete date\n }\n else {filters[\"datetime\"] = date}\n if (city === \"\" ) {\n delete city\n }\n else {filters[\"city\"] = city}\n if (state === \"\" ) {\n delete state\n }\n else {filters[\"state\"] = state}\n if (country === \"\" ) {\n delete country\n }\n else {filters[\"country\"] = country}\n if (shape === \"\" ) {\n delete shape\n }\n else {filters[\"shape\"] = shape}\n\n // Call function to apply all filters and rebuild the table\n filterTable(filters);\n}", "function filterAllPets (){\n filterType = \"\";\n filterAgeMin = 0;\n filterAgeMax = Number.MAX_VALUE;\n loadTableWithFilters();\n}", "filterRows(filterColumn, filterText) {\n if (filterText !== undefined && filterText !== null) {\n return function(tr) {\n return (\n tr[filterColumn].toLowerCase().trim() ===\n filterText.toLowerCase().trim()\n );\n };\n } else {\n return null;\n }\n }", "function filterTable(searchInputId, tBodyId, countId, alertId, tableId, countDisplay, queryString) {\n\n\tupdateCounting(searchInputId, tBodyId, countId, alertId, tableId, countDisplay, queryString);\n\n\t$(\"#\" + searchInputId).keyup(function(e) {\n\t\t\n\t\tvar data = this.value.trim().split(\" \");\n\t\t\t\t\t\t \n\t\tvar jo = $(\"#\" + tBodyId).find(\"tr\");\n\n\t\tif (this.value == \"\") {\n\t\t\tjo.show();\n\t\t\tupdateCounting(searchInputId, tBodyId, countId, alertId, tableId, countDisplay, queryString);\n\t\t\t$(\"#\" + alertId).hide();\n\t\t\t$(\"#\" + tableId).show();\n\t\t\treturn;\n\t\t}\n\t\t\t\t\t\t \n\t\tjo.hide();\n\t\t\n\t\tjo.filter(function (i, v) {\n\t\t\tvar $t = $(this);\n\t\t\tfor (var d = 0; d < data.length; ++d) {\n\t\t\t\tif ($t.text().toLowerCase().indexOf(data[d].toLowerCase()) > -1) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}).show();\n\t\t\n\t\t$(\"#\" + tableId).show();\n\t\tupdateCounting(searchInputId, tBodyId, countId, alertId, tableId, countDisplay, queryString);\n\t});\n}", "function onFilter() {\n if (component.filterChanged && component.visibleRows !== grid.api.core.getVisibleRows().length) {\n var visibleRows = grid.api.core.getVisibleRows();\n if (isFiltering()) {\n changeRecords(visibleRows.length);\n } else {\n changeRecords(component.model.values.length);\n }\n // Update row number column size\n updateRowNumberColumn();\n if (visibleRows.length > 0) {\n var columns = component.getColumns();\n grid.api.core.scrollToIfNecessary(visibleRows[0], columns[0]);\n }\n component.filterChanged = false;\n }\n }", "function buttonClick() {\n var inputElement = d3.select(\"#datetime\");\n var inputValue = inputElement.property(\"value\");\n let filteredData = tableData;\n\n console.log(inputValue);\n console.log(tableData);\n\n if (inputValue) {\n filteredData = tableData.filter(sightings => sightings.datetime === inputValue);\n}\nconsole.log(filteredData);\ncreateTable(filteredData);\n}", "function filterTable() {\n\n // stop reload\n // d3.event.presentDefault();\n // var userInputs = [];\n // create variable for storing input date \n // var storeValue = d3.selectAll(\".form-control\")\n var dateValue = d3.select(\"#datetime\").property(\"value\")\n var cityValue = d3.select(\"#city\").property(\"value\")\n var stateValue = d3.select(\"#state\").property(\"value\")\n var countryValue = d3.select(\"#country\").property(\"value\")\n var shapeValue = d3.select(\"#shape\").property(\"value\")\n // console.log(storeValue)\n // storeValue.forEach(userInput =>{\n // // userInputs.push(userInput)\n // console.log(userInput[0])\n // })\n // console.log(userInputs)\n //set variable to set a copy for data filtering\n var filterData = tableData;\n\n // do conditional statement to reset page when clicked button \n if (dateValue != \"\") {\n filterData = filterData.filter(function (sightingRow) {\n // need a conditional statement by using a boolean, to display table row\n if (dateValue === sightingRow.datetime) { return true; }\n })\n }\n\n if (cityValue != \"\") {\n filterData = filterData.filter(function (sightingRow) {\n // need a conditional statement by using a boolean, to display table row\n if (cityValue === sightingRow.city) { return true; }\n })\n }\n\n if (stateValue != \"\") {\n filterData = filterData.filter(function (sightingRow) {\n // need a conditional statement by using a boolean, to display table row\n if (stateValue === sightingRow.state) { return true; }\n })\n }\n if (countryValue != \"\") {\n filterData = filterData.filter(function (sightingRow) {\n // need a conditional statement by using a boolean, to display table row\n if (countryValue === sightingRow.country) { return true; }\n })\n }\n if (shapeValue != \"\") {\n filterData = filterData.filter(function (sightingRow) {\n // need a conditional statement by using a boolean, to display table row\n if (shapeValue === sightingRow.shape) { return true; }\n })\n }\n\n createTable(filterData);\n\n\n}", "function filterList() {\n var inputElement = d3.select(\".form-control\")\n var inputValue = inputElement.property(\"value\")\n \n //select table and body elements\n var table = d3.select(\".table\")\n var tbody = d3.select(\"tbody\")\n \n //clear table body\n tbody.text(\"\")\n \n //filter data for date entered\n filteredData = data.filter(d => d.datetime === inputValue)\n //populate table with filtered list data\n filteredData.forEach(function(UFOsiting) {\n \n // Prevent the page from refreshing\n var row = tbody.append(\"tr\")\n Object.entries(UFOsiting).forEach(function([key, value]) {\n var dataElement = row.append(\"td\")\n dataElement.text(value)\n });\n });\n}", "function _fnFilterData ( settings )\n\t\t{\n\t\t\tvar columns = settings.aoColumns;\n\t\t\tvar column;\n\t\t\tvar i, j, ien, jen, filterData, cellData, row;\n\t\t\tvar fomatters = DataTable.ext.type.search;\n\t\t\tvar wasInvalidated = false;\n\t\t\n\t\t\tfor ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\t\trow = settings.aoData[i];\n\t\t\n\t\t\t\tif ( ! row._aFilterData ) {\n\t\t\t\t\tfilterData = [];\n\t\t\n\t\t\t\t\tfor ( j=0, jen=columns.length ; j<jen ; j++ ) {\n\t\t\t\t\t\tcolumn = columns[j];\n\t\t\n\t\t\t\t\t\tif ( column.bSearchable ) {\n\t\t\t\t\t\t\tcellData = _fnGetCellData( settings, i, j, 'filter' );\n\t\t\n\t\t\t\t\t\t\tif ( fomatters[ column.sType ] ) {\n\t\t\t\t\t\t\t\tcellData = fomatters[ column.sType ]( cellData );\n\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t// Search in DataTables 1.10 is string based. In 1.11 this\n\t\t\t\t\t\t\t// should be altered to also allow strict type checking.\n\t\t\t\t\t\t\tif ( cellData === null ) {\n\t\t\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\tif ( typeof cellData !== 'string' && cellData.toString ) {\n\t\t\t\t\t\t\t\tcellData = cellData.toString();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t// If it looks like there is an HTML entity in the string,\n\t\t\t\t\t\t// attempt to decode it so sorting works as expected. Note that\n\t\t\t\t\t\t// we could use a single line of jQuery to do this, but the DOM\n\t\t\t\t\t\t// method used here is much faster http://jsperf.com/html-decode\n\t\t\t\t\t\tif ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {\n\t\t\t\t\t\t\t__filter_div.innerHTML = cellData;\n\t\t\t\t\t\t\tcellData = __filter_div_textContent ?\n\t\t\t\t\t\t\t\t__filter_div.textContent :\n\t\t\t\t\t\t\t\t__filter_div.innerText;\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\tif ( cellData.replace ) {\n\t\t\t\t\t\t\tcellData = cellData.replace(/[\\r\\n]/g, '');\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\tfilterData.push( cellData );\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\trow._aFilterData = filterData;\n\t\t\t\t\trow._sFilterRow = filterData.join(' ');\n\t\t\t\t\twasInvalidated = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn wasInvalidated;\n\t\t}", "function _fnFilterData ( settings )\n \t{\n \t\tvar columns = settings.aoColumns;\n \t\tvar column;\n \t\tvar i, j, ien, jen, filterData, cellData, row;\n \t\tvar fomatters = DataTable.ext.type.search;\n \t\tvar wasInvalidated = false;\n \t\n \t\tfor ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n \t\t\trow = settings.aoData[i];\n \t\n \t\t\tif ( ! row._aFilterData ) {\n \t\t\t\tfilterData = [];\n \t\n \t\t\t\tfor ( j=0, jen=columns.length ; j<jen ; j++ ) {\n \t\t\t\t\tcolumn = columns[j];\n \t\n \t\t\t\t\tif ( column.bSearchable ) {\n \t\t\t\t\t\tcellData = _fnGetCellData( settings, i, j, 'filter' );\n \t\n \t\t\t\t\t\tif ( fomatters[ column.sType ] ) {\n \t\t\t\t\t\t\tcellData = fomatters[ column.sType ]( cellData );\n \t\t\t\t\t\t}\n \t\n \t\t\t\t\t\t// Search in DataTables 1.10 is string based. In 1.11 this\n \t\t\t\t\t\t// should be altered to also allow strict type checking.\n \t\t\t\t\t\tif ( cellData === null ) {\n \t\t\t\t\t\t\tcellData = '';\n \t\t\t\t\t\t}\n \t\n \t\t\t\t\t\tif ( typeof cellData !== 'string' && cellData.toString ) {\n \t\t\t\t\t\t\tcellData = cellData.toString();\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tcellData = '';\n \t\t\t\t\t}\n \t\n \t\t\t\t\t// If it looks like there is an HTML entity in the string,\n \t\t\t\t\t// attempt to decode it so sorting works as expected. Note that\n \t\t\t\t\t// we could use a single line of jQuery to do this, but the DOM\n \t\t\t\t\t// method used here is much faster http://jsperf.com/html-decode\n \t\t\t\t\tif ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {\n \t\t\t\t\t\t__filter_div.innerHTML = cellData;\n \t\t\t\t\t\tcellData = __filter_div_textContent ?\n \t\t\t\t\t\t\t__filter_div.textContent :\n \t\t\t\t\t\t\t__filter_div.innerText;\n \t\t\t\t\t}\n \t\n \t\t\t\t\tif ( cellData.replace ) {\n \t\t\t\t\t\tcellData = cellData.replace(/[\\r\\n\\u2028]/g, '');\n \t\t\t\t\t}\n \t\n \t\t\t\t\tfilterData.push( cellData );\n \t\t\t\t}\n \t\n \t\t\t\trow._aFilterData = filterData;\n \t\t\t\trow._sFilterRow = filterData.join(' ');\n \t\t\t\twasInvalidated = true;\n \t\t\t}\n \t\t}\n \t\n \t\treturn wasInvalidated;\n \t}", "_filterData(data) {\n // If there is a filter string, filter out data that does not contain it.\n // Each data object is converted to a string using the function defined by filterTermAccessor.\n // May be overridden for customization.\n this.filteredData =\n !this.filter ? data : data.filter(obj => this.filterPredicate(obj, this.filter));\n if (this.paginator) {\n this._updatePaginator(this.filteredData.length);\n }\n return this.filteredData;\n }", "function applyFilter(gridData, filterField, filterValue) {\n\n // get currently applied filters from the Grid.\n var currFilterObj = gridData.dataSource.filter();\n\n // get current set of filters, which is supposed to be array.\n // if the oject we obtained above is null/undefined, set this to an empty array\n var currentFilters = currFilterObj ? currFilterObj.filters : [];\n\n // iterate over current filters array. if a filter for \"filterField\" is already\n // defined, remove it from the array\n // once an entry is removed, we stop looking at the rest of the array.\n if (currentFilters && currentFilters.length > 0) {\n for (var i = 0; i < currentFilters.length; i++) {\n if (currentFilters[i].field == filterField) {\n currentFilters.splice(i, 1);\n break;\n }\n }\n }\n\n // if \"filterValue\" is \"0\", meaning \"-- select --\" option is selected, we don't \n // do any further processing. That will be equivalent of removing the filter.\n // if a filterValue is selected, we add a new object to the currentFilters array.\n if (filterValue != \"0\") {\n currentFilters.push({ field: filterField, operator: \"eq\", value: filterValue });\n }\n\n // finally, the currentFilters array is applied back to the Grid, using \"and\" logic.\n gridData.dataSource.filter({ logic: \"and\", filters: currentFilters });\n}", "function updatedfilters() {\n // event listeners:element, value, id\n var changedElement = d3.select(this).select(\"input\");\n var elementValue = changedElement.property(\"value\");\n var filterId = changedElement.attr(\"id\");\n\n console.log(filterId);\n\n // event listener - add id and value when filter value is entered otherwise delete filter\n if (elementValue) {\n filters[filterId] = elementValue;\n }\n else {\n delete filters[filterId];\n }\n console.log(elementValue);\n\n // apply filter and build table again\n filterTable();\n}", "function handleClick() {\n //grab the datetime value from the filter\n let date = d3.select(\"#datetime\").property('value');\n let filteredData = tableData;\n\n //Check to see fi a date was entered and filter the data using that date.\n if (date) {\n //apply 'filter' to the table data to only keep the rows\n //where the 'datetime' value matches the filter value\n filteredData = filteredData.filter(row => row.datetime === date);\n }\n\n //Rebuild the table using the filtered data\n //@NOTE: if no date was entered, then filteredData will\n //just be the original tableData\n buildTable(filteredData);\n}", "function filtrar() {\n var input, filter, table, tr, td, i;\n input = $('#filtrar');\n filter = input.val().toUpperCase();\n table = $('#tabela');\n tr = $('tr');\n for (i = 0; i < tr.length; i++) {\n td = tr[i].getElementsByTagName('td')[0];\n if (td) {\n if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {\n tr[i].style.display = '';\n } else {\n tr[i].style.display = 'none';\n }\n }\n }\n}", "function handleSearchButtonClick() { \n var filterdt = datetimeInput.value.trim();\n \n filterData = dataSet.filter(function(ovni)\n {\n var dt = ovni.datetime;\n return dt === filterdt;\n });\n \nrenderTable();\n}", "function updateFilter () {\n upsertFilterForField(fieldName, filterEl.value);\n }", "function search_tested_soil_table(){\n // Declare variables \n var input, filter, table, tr, td, i;\n input = document.getElementById(\"search_tested_soil_table\");\n filter = input.value.toUpperCase();\n table = document.getElementById(\"editable-datatable\");\n tr = table.getElementsByTagName(\"tr\");\n\n // Loop through all table rows, and hide those who don't match the search query\n for (i = 0; i < tr.length; i++) {\n td = tr[i].getElementsByTagName(\"td\") ; \n for(j=0 ; j<td.length ; j++)\n {\n let tdata = td[j] ;\n if (tdata) {\n if (tdata.innerHTML.toUpperCase().indexOf(filter) > -1) {\n tr[i].style.display = \"\";\n break ; \n } else {\n tr[i].style.display = \"none\";\n }\n } \n }\n }\n}", "function filter_zero_1 (){\n filterType = \"\";\n filterAgeMin = 0;\n filterAgeMax = 1\n loadTableWithFilters();\n}", "function updateFilters() {\n // For steps 4 thru 5, we'll refactor code from the Module 11 Challenge hint.\n // 4a. Save the element that was changed as a variable.\n let changedElement = d3.select(this)\n\n // 4b. Save the value that was changed as a variable.\n let elementValue = changedElement.property(\"value\");\n console.log(elementValue);\n\n // 4c. Save the id of the filter that was changed as a variable.\n let filterId = changedElement.attr(\"id\");\n console.log(filterId);\n \n // 5. If a filter value was entered then add that filterId and value\n // to the filters list. Otherwise, clear that filter from the filters object.\n if (elementValue) {\n filters[filterId] = elementValue;\n }\n else {\n delete filters[filterId]\n }\n \n // 6. Call function to apply all filters and rebuild the table\n filterTable();\n \n }", "function updateTable() {\n\n let filtered = houses.filter(d => evalFilters(d));\n\n let rows = d3.select(\"table#places\").selectAll(\"tr\").data(filtered);\n\n rows.exit().remove();\n\n rows.enter().append(\"tr\")\n .merge(rows) // Merge in existing rows so we can affect all of them\n .html(\"\") // Clear contents of all rows so that we can put in some new <td> elements\n\n // Add some stuff to the contents of all of the rows (data can percolate down the DOM hierarchy)\n rows.append(\"td\").text(d => \"House \"+d.Entry);\n rows.append(\"td\").text(d => d3.format(\"$,\")(d[\"Sale Price\"]));\n rows.append(\"td\").text(d => d[\"Neighborhood\"]);\n\n\n }", "function filterSearch() {\n \n var input, filter, table, tr, td, i, txtValue;\n input = document.getElementById(\"myInput\");\n filter = input.value.toUpperCase();\n table = document.getElementById(\"myTable\");\n tr = table.getElementsByTagName(\"tr\");\n\n //hide rest of users// \n for (i = 0; i < tr.length; i++) {\n td = tr[i].getElementsByTagName(\"td\")[0];\n if (td) {\n txtValue = td.textContent || td.innerText;\n if (txtValue.toUpperCase().indexOf(filter) > -1) {\n tr[i].style.visibility = \"\";\n } else {\n tr[i].style.visibility = \"collapse\";\n }\n }\n }\n }", "function searchButtonClick() {\r\n var filterDate = $dateTimeInput.value.trim();\r\n var filterCity = $cityInput.value.trim().toLowerCase();\r\n var filterState = $stateInput.value.trim().toLowerCase();\r\n var filterCountry = $countryInput.value.trim().toLowerCase();\r\n var filterShape = $shapeInput.value.trim().toLowerCase();\r\n\r\n if (filterDate != \"\") {\r\n filteredData = filteredData.filter(function (date) {\r\n var dataDate = date.datetime;\r\n return dataDate === filterDate;\r\n });\r\n\r\n }\r\n\r\n if (filterCity != \"\") {\r\n filteredData = filteredData.filter(function (city) {\r\n var dataCity = city.city;\r\n return dataCity === filterCity;\r\n });\r\n }\r\n\r\n if (filterState != \"\") {\r\n filteredData = filteredData.filter(function (state) {\r\n var dataState = state.state;\r\n return dataState === filterState;\r\n });\r\n }\r\n\r\n if (filterCountry != \"\") {\r\n filteredData = filteredData.filter(function (country) {\r\n var dataCountry = country.country;\r\n return dataCountry === filterCountry;\r\n });\r\n }\r\n\r\n if (filterShape != \"\") {\r\n filteredData = filteredData.filter(function (shape) {\r\n var dataShape = shape.shape;\r\n return dataShape === filterShape;\r\n });\r\n }\r\n\r\n renderTable();\r\n}", "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < filteredData.length; i++) {\n // Get the current object and its fields\n var data = filteredData[i];\n var fields = Object.keys(data);\n // Create a new row in the tbody, set the index to be i + startingIndex\n var $row = $tbody.insertRow(i);\n for (var j = 0; j < fields.length; j++) {\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = data[field];\n }\n }\n}", "function _fnFilterData ( settings )\n\t{\n\t\tvar columns = settings.aoColumns;\n\t\tvar column;\n\t\tvar i, j, ien, jen, filterData, cellData, row;\n\t\tvar fomatters = DataTable.ext.type.search;\n\t\tvar wasInvalidated = false;\n\t\n\t\tfor ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\trow = settings.aoData[i];\n\t\n\t\t\tif ( ! row._aFilterData ) {\n\t\t\t\tfilterData = [];\n\t\n\t\t\t\tfor ( j=0, jen=columns.length ; j<jen ; j++ ) {\n\t\t\t\t\tcolumn = columns[j];\n\t\n\t\t\t\t\tif ( column.bSearchable ) {\n\t\t\t\t\t\tcellData = _fnGetCellData( settings, i, j, 'filter' );\n\t\n\t\t\t\t\t\tif ( fomatters[ column.sType ] ) {\n\t\t\t\t\t\t\tcellData = fomatters[ column.sType ]( cellData );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// Search in DataTables 1.10 is string based. In 1.11 this\n\t\t\t\t\t\t// should be altered to also allow strict type checking.\n\t\t\t\t\t\tif ( cellData === null ) {\n\t\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif ( typeof cellData !== 'string' && cellData.toString ) {\n\t\t\t\t\t\t\tcellData = cellData.toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// If it looks like there is an HTML entity in the string,\n\t\t\t\t\t// attempt to decode it so sorting works as expected. Note that\n\t\t\t\t\t// we could use a single line of jQuery to do this, but the DOM\n\t\t\t\t\t// method used here is much faster http://jsperf.com/html-decode\n\t\t\t\t\tif ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {\n\t\t\t\t\t\t__filter_div.innerHTML = cellData;\n\t\t\t\t\t\tcellData = __filter_div_textContent ?\n\t\t\t\t\t\t\t__filter_div.textContent :\n\t\t\t\t\t\t\t__filter_div.innerText;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif ( cellData.replace ) {\n\t\t\t\t\t\tcellData = cellData.replace(/[\\r\\n]/g, '');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tfilterData.push( cellData );\n\t\t\t\t}\n\t\n\t\t\t\trow._aFilterData = filterData;\n\t\t\t\trow._sFilterRow = filterData.join(' ');\n\t\t\t\twasInvalidated = true;\n\t\t\t}\n\t\t}\n\t\n\t\treturn wasInvalidated;\n\t}", "function _fnFilterData ( settings )\n\t{\n\t\tvar columns = settings.aoColumns;\n\t\tvar column;\n\t\tvar i, j, ien, jen, filterData, cellData, row;\n\t\tvar fomatters = DataTable.ext.type.search;\n\t\tvar wasInvalidated = false;\n\t\n\t\tfor ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\trow = settings.aoData[i];\n\t\n\t\t\tif ( ! row._aFilterData ) {\n\t\t\t\tfilterData = [];\n\t\n\t\t\t\tfor ( j=0, jen=columns.length ; j<jen ; j++ ) {\n\t\t\t\t\tcolumn = columns[j];\n\t\n\t\t\t\t\tif ( column.bSearchable ) {\n\t\t\t\t\t\tcellData = _fnGetCellData( settings, i, j, 'filter' );\n\t\n\t\t\t\t\t\tif ( fomatters[ column.sType ] ) {\n\t\t\t\t\t\t\tcellData = fomatters[ column.sType ]( cellData );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// Search in DataTables 1.10 is string based. In 1.11 this\n\t\t\t\t\t\t// should be altered to also allow strict type checking.\n\t\t\t\t\t\tif ( cellData === null ) {\n\t\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif ( typeof cellData !== 'string' && cellData.toString ) {\n\t\t\t\t\t\t\tcellData = cellData.toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// If it looks like there is an HTML entity in the string,\n\t\t\t\t\t// attempt to decode it so sorting works as expected. Note that\n\t\t\t\t\t// we could use a single line of jQuery to do this, but the DOM\n\t\t\t\t\t// method used here is much faster http://jsperf.com/html-decode\n\t\t\t\t\tif ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {\n\t\t\t\t\t\t__filter_div.innerHTML = cellData;\n\t\t\t\t\t\tcellData = __filter_div_textContent ?\n\t\t\t\t\t\t\t__filter_div.textContent :\n\t\t\t\t\t\t\t__filter_div.innerText;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif ( cellData.replace ) {\n\t\t\t\t\t\tcellData = cellData.replace(/[\\r\\n]/g, '');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tfilterData.push( cellData );\n\t\t\t\t}\n\t\n\t\t\t\trow._aFilterData = filterData;\n\t\t\t\trow._sFilterRow = filterData.join(' ');\n\t\t\t\twasInvalidated = true;\n\t\t\t}\n\t\t}\n\t\n\t\treturn wasInvalidated;\n\t}", "function _fnFilterData ( settings )\n\t{\n\t\tvar columns = settings.aoColumns;\n\t\tvar column;\n\t\tvar i, j, ien, jen, filterData, cellData, row;\n\t\tvar fomatters = DataTable.ext.type.search;\n\t\tvar wasInvalidated = false;\n\t\n\t\tfor ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\trow = settings.aoData[i];\n\t\n\t\t\tif ( ! row._aFilterData ) {\n\t\t\t\tfilterData = [];\n\t\n\t\t\t\tfor ( j=0, jen=columns.length ; j<jen ; j++ ) {\n\t\t\t\t\tcolumn = columns[j];\n\t\n\t\t\t\t\tif ( column.bSearchable ) {\n\t\t\t\t\t\tcellData = _fnGetCellData( settings, i, j, 'filter' );\n\t\n\t\t\t\t\t\tif ( fomatters[ column.sType ] ) {\n\t\t\t\t\t\t\tcellData = fomatters[ column.sType ]( cellData );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// Search in DataTables 1.10 is string based. In 1.11 this\n\t\t\t\t\t\t// should be altered to also allow strict type checking.\n\t\t\t\t\t\tif ( cellData === null ) {\n\t\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif ( typeof cellData !== 'string' && cellData.toString ) {\n\t\t\t\t\t\t\tcellData = cellData.toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// If it looks like there is an HTML entity in the string,\n\t\t\t\t\t// attempt to decode it so sorting works as expected. Note that\n\t\t\t\t\t// we could use a single line of jQuery to do this, but the DOM\n\t\t\t\t\t// method used here is much faster http://jsperf.com/html-decode\n\t\t\t\t\tif ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {\n\t\t\t\t\t\t__filter_div.innerHTML = cellData;\n\t\t\t\t\t\tcellData = __filter_div_textContent ?\n\t\t\t\t\t\t\t__filter_div.textContent :\n\t\t\t\t\t\t\t__filter_div.innerText;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif ( cellData.replace ) {\n\t\t\t\t\t\tcellData = cellData.replace(/[\\r\\n]/g, '');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tfilterData.push( cellData );\n\t\t\t\t}\n\t\n\t\t\t\trow._aFilterData = filterData;\n\t\t\t\trow._sFilterRow = filterData.join(' ');\n\t\t\t\twasInvalidated = true;\n\t\t\t}\n\t\t}\n\t\n\t\treturn wasInvalidated;\n\t}", "function _fnFilterData ( settings )\n\t{\n\t\tvar columns = settings.aoColumns;\n\t\tvar column;\n\t\tvar i, j, ien, jen, filterData, cellData, row;\n\t\tvar fomatters = DataTable.ext.type.search;\n\t\tvar wasInvalidated = false;\n\t\n\t\tfor ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\trow = settings.aoData[i];\n\t\n\t\t\tif ( ! row._aFilterData ) {\n\t\t\t\tfilterData = [];\n\t\n\t\t\t\tfor ( j=0, jen=columns.length ; j<jen ; j++ ) {\n\t\t\t\t\tcolumn = columns[j];\n\t\n\t\t\t\t\tif ( column.bSearchable ) {\n\t\t\t\t\t\tcellData = _fnGetCellData( settings, i, j, 'filter' );\n\t\n\t\t\t\t\t\tif ( fomatters[ column.sType ] ) {\n\t\t\t\t\t\t\tcellData = fomatters[ column.sType ]( cellData );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// Search in DataTables 1.10 is string based. In 1.11 this\n\t\t\t\t\t\t// should be altered to also allow strict type checking.\n\t\t\t\t\t\tif ( cellData === null ) {\n\t\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif ( typeof cellData !== 'string' && cellData.toString ) {\n\t\t\t\t\t\t\tcellData = cellData.toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// If it looks like there is an HTML entity in the string,\n\t\t\t\t\t// attempt to decode it so sorting works as expected. Note that\n\t\t\t\t\t// we could use a single line of jQuery to do this, but the DOM\n\t\t\t\t\t// method used here is much faster http://jsperf.com/html-decode\n\t\t\t\t\tif ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {\n\t\t\t\t\t\t__filter_div.innerHTML = cellData;\n\t\t\t\t\t\tcellData = __filter_div_textContent ?\n\t\t\t\t\t\t\t__filter_div.textContent :\n\t\t\t\t\t\t\t__filter_div.innerText;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif ( cellData.replace ) {\n\t\t\t\t\t\tcellData = cellData.replace(/[\\r\\n]/g, '');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tfilterData.push( cellData );\n\t\t\t\t}\n\t\n\t\t\t\trow._aFilterData = filterData;\n\t\t\t\trow._sFilterRow = filterData.join(' ');\n\t\t\t\twasInvalidated = true;\n\t\t\t}\n\t\t}\n\t\n\t\treturn wasInvalidated;\n\t}", "function _fnFilterData ( settings )\n\t{\n\t\tvar columns = settings.aoColumns;\n\t\tvar column;\n\t\tvar i, j, ien, jen, filterData, cellData, row;\n\t\tvar fomatters = DataTable.ext.type.search;\n\t\tvar wasInvalidated = false;\n\t\n\t\tfor ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\trow = settings.aoData[i];\n\t\n\t\t\tif ( ! row._aFilterData ) {\n\t\t\t\tfilterData = [];\n\t\n\t\t\t\tfor ( j=0, jen=columns.length ; j<jen ; j++ ) {\n\t\t\t\t\tcolumn = columns[j];\n\t\n\t\t\t\t\tif ( column.bSearchable ) {\n\t\t\t\t\t\tcellData = _fnGetCellData( settings, i, j, 'filter' );\n\t\n\t\t\t\t\t\tif ( fomatters[ column.sType ] ) {\n\t\t\t\t\t\t\tcellData = fomatters[ column.sType ]( cellData );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// Search in DataTables 1.10 is string based. In 1.11 this\n\t\t\t\t\t\t// should be altered to also allow strict type checking.\n\t\t\t\t\t\tif ( cellData === null ) {\n\t\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif ( typeof cellData !== 'string' && cellData.toString ) {\n\t\t\t\t\t\t\tcellData = cellData.toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// If it looks like there is an HTML entity in the string,\n\t\t\t\t\t// attempt to decode it so sorting works as expected. Note that\n\t\t\t\t\t// we could use a single line of jQuery to do this, but the DOM\n\t\t\t\t\t// method used here is much faster http://jsperf.com/html-decode\n\t\t\t\t\tif ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {\n\t\t\t\t\t\t__filter_div.innerHTML = cellData;\n\t\t\t\t\t\tcellData = __filter_div_textContent ?\n\t\t\t\t\t\t\t__filter_div.textContent :\n\t\t\t\t\t\t\t__filter_div.innerText;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif ( cellData.replace ) {\n\t\t\t\t\t\tcellData = cellData.replace(/[\\r\\n]/g, '');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tfilterData.push( cellData );\n\t\t\t\t}\n\t\n\t\t\t\trow._aFilterData = filterData;\n\t\t\t\trow._sFilterRow = filterData.join(' ');\n\t\t\t\twasInvalidated = true;\n\t\t\t}\n\t\t}\n\t\n\t\treturn wasInvalidated;\n\t}", "function _fnFilterData ( settings )\n\t{\n\t\tvar columns = settings.aoColumns;\n\t\tvar column;\n\t\tvar i, j, ien, jen, filterData, cellData, row;\n\t\tvar fomatters = DataTable.ext.type.search;\n\t\tvar wasInvalidated = false;\n\t\n\t\tfor ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\trow = settings.aoData[i];\n\t\n\t\t\tif ( ! row._aFilterData ) {\n\t\t\t\tfilterData = [];\n\t\n\t\t\t\tfor ( j=0, jen=columns.length ; j<jen ; j++ ) {\n\t\t\t\t\tcolumn = columns[j];\n\t\n\t\t\t\t\tif ( column.bSearchable ) {\n\t\t\t\t\t\tcellData = _fnGetCellData( settings, i, j, 'filter' );\n\t\n\t\t\t\t\t\tif ( fomatters[ column.sType ] ) {\n\t\t\t\t\t\t\tcellData = fomatters[ column.sType ]( cellData );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// Search in DataTables 1.10 is string based. In 1.11 this\n\t\t\t\t\t\t// should be altered to also allow strict type checking.\n\t\t\t\t\t\tif ( cellData === null ) {\n\t\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif ( typeof cellData !== 'string' && cellData.toString ) {\n\t\t\t\t\t\t\tcellData = cellData.toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// If it looks like there is an HTML entity in the string,\n\t\t\t\t\t// attempt to decode it so sorting works as expected. Note that\n\t\t\t\t\t// we could use a single line of jQuery to do this, but the DOM\n\t\t\t\t\t// method used here is much faster http://jsperf.com/html-decode\n\t\t\t\t\tif ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {\n\t\t\t\t\t\t__filter_div.innerHTML = cellData;\n\t\t\t\t\t\tcellData = __filter_div_textContent ?\n\t\t\t\t\t\t\t__filter_div.textContent :\n\t\t\t\t\t\t\t__filter_div.innerText;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif ( cellData.replace ) {\n\t\t\t\t\t\tcellData = cellData.replace(/[\\r\\n]/g, '');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tfilterData.push( cellData );\n\t\t\t\t}\n\t\n\t\t\t\trow._aFilterData = filterData;\n\t\t\t\trow._sFilterRow = filterData.join(' ');\n\t\t\t\twasInvalidated = true;\n\t\t\t}\n\t\t}\n\t\n\t\treturn wasInvalidated;\n\t}", "function _fnFilterData ( settings )\n\t{\n\t\tvar columns = settings.aoColumns;\n\t\tvar column;\n\t\tvar i, j, ien, jen, filterData, cellData, row;\n\t\tvar fomatters = DataTable.ext.type.search;\n\t\tvar wasInvalidated = false;\n\t\n\t\tfor ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\trow = settings.aoData[i];\n\t\n\t\t\tif ( ! row._aFilterData ) {\n\t\t\t\tfilterData = [];\n\t\n\t\t\t\tfor ( j=0, jen=columns.length ; j<jen ; j++ ) {\n\t\t\t\t\tcolumn = columns[j];\n\t\n\t\t\t\t\tif ( column.bSearchable ) {\n\t\t\t\t\t\tcellData = _fnGetCellData( settings, i, j, 'filter' );\n\t\n\t\t\t\t\t\tif ( fomatters[ column.sType ] ) {\n\t\t\t\t\t\t\tcellData = fomatters[ column.sType ]( cellData );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// Search in DataTables 1.10 is string based. In 1.11 this\n\t\t\t\t\t\t// should be altered to also allow strict type checking.\n\t\t\t\t\t\tif ( cellData === null ) {\n\t\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif ( typeof cellData !== 'string' && cellData.toString ) {\n\t\t\t\t\t\t\tcellData = cellData.toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// If it looks like there is an HTML entity in the string,\n\t\t\t\t\t// attempt to decode it so sorting works as expected. Note that\n\t\t\t\t\t// we could use a single line of jQuery to do this, but the DOM\n\t\t\t\t\t// method used here is much faster http://jsperf.com/html-decode\n\t\t\t\t\tif ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {\n\t\t\t\t\t\t__filter_div.innerHTML = cellData;\n\t\t\t\t\t\tcellData = __filter_div_textContent ?\n\t\t\t\t\t\t\t__filter_div.textContent :\n\t\t\t\t\t\t\t__filter_div.innerText;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif ( cellData.replace ) {\n\t\t\t\t\t\tcellData = cellData.replace(/[\\r\\n]/g, '');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tfilterData.push( cellData );\n\t\t\t\t}\n\t\n\t\t\t\trow._aFilterData = filterData;\n\t\t\t\trow._sFilterRow = filterData.join(' ');\n\t\t\t\twasInvalidated = true;\n\t\t\t}\n\t\t}\n\t\n\t\treturn wasInvalidated;\n\t}", "function _fnFilterData ( settings )\n\t{\n\t\tvar columns = settings.aoColumns;\n\t\tvar column;\n\t\tvar i, j, ien, jen, filterData, cellData, row;\n\t\tvar fomatters = DataTable.ext.type.search;\n\t\tvar wasInvalidated = false;\n\t\n\t\tfor ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\trow = settings.aoData[i];\n\t\n\t\t\tif ( ! row._aFilterData ) {\n\t\t\t\tfilterData = [];\n\t\n\t\t\t\tfor ( j=0, jen=columns.length ; j<jen ; j++ ) {\n\t\t\t\t\tcolumn = columns[j];\n\t\n\t\t\t\t\tif ( column.bSearchable ) {\n\t\t\t\t\t\tcellData = _fnGetCellData( settings, i, j, 'filter' );\n\t\n\t\t\t\t\t\tif ( fomatters[ column.sType ] ) {\n\t\t\t\t\t\t\tcellData = fomatters[ column.sType ]( cellData );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// Search in DataTables 1.10 is string based. In 1.11 this\n\t\t\t\t\t\t// should be altered to also allow strict type checking.\n\t\t\t\t\t\tif ( cellData === null ) {\n\t\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif ( typeof cellData !== 'string' && cellData.toString ) {\n\t\t\t\t\t\t\tcellData = cellData.toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// If it looks like there is an HTML entity in the string,\n\t\t\t\t\t// attempt to decode it so sorting works as expected. Note that\n\t\t\t\t\t// we could use a single line of jQuery to do this, but the DOM\n\t\t\t\t\t// method used here is much faster http://jsperf.com/html-decode\n\t\t\t\t\tif ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {\n\t\t\t\t\t\t__filter_div.innerHTML = cellData;\n\t\t\t\t\t\tcellData = __filter_div_textContent ?\n\t\t\t\t\t\t\t__filter_div.textContent :\n\t\t\t\t\t\t\t__filter_div.innerText;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif ( cellData.replace ) {\n\t\t\t\t\t\tcellData = cellData.replace(/[\\r\\n]/g, '');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tfilterData.push( cellData );\n\t\t\t\t}\n\t\n\t\t\t\trow._aFilterData = filterData;\n\t\t\t\trow._sFilterRow = filterData.join(' ');\n\t\t\t\twasInvalidated = true;\n\t\t\t}\n\t\t}\n\t\n\t\treturn wasInvalidated;\n\t}", "function _fnFilterData ( settings )\n\t{\n\t\tvar columns = settings.aoColumns;\n\t\tvar column;\n\t\tvar i, j, ien, jen, filterData, cellData, row;\n\t\tvar fomatters = DataTable.ext.type.search;\n\t\tvar wasInvalidated = false;\n\t\n\t\tfor ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\trow = settings.aoData[i];\n\t\n\t\t\tif ( ! row._aFilterData ) {\n\t\t\t\tfilterData = [];\n\t\n\t\t\t\tfor ( j=0, jen=columns.length ; j<jen ; j++ ) {\n\t\t\t\t\tcolumn = columns[j];\n\t\n\t\t\t\t\tif ( column.bSearchable ) {\n\t\t\t\t\t\tcellData = _fnGetCellData( settings, i, j, 'filter' );\n\t\n\t\t\t\t\t\tif ( fomatters[ column.sType ] ) {\n\t\t\t\t\t\t\tcellData = fomatters[ column.sType ]( cellData );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// Search in DataTables 1.10 is string based. In 1.11 this\n\t\t\t\t\t\t// should be altered to also allow strict type checking.\n\t\t\t\t\t\tif ( cellData === null ) {\n\t\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif ( typeof cellData !== 'string' && cellData.toString ) {\n\t\t\t\t\t\t\tcellData = cellData.toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// If it looks like there is an HTML entity in the string,\n\t\t\t\t\t// attempt to decode it so sorting works as expected. Note that\n\t\t\t\t\t// we could use a single line of jQuery to do this, but the DOM\n\t\t\t\t\t// method used here is much faster http://jsperf.com/html-decode\n\t\t\t\t\tif ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {\n\t\t\t\t\t\t__filter_div.innerHTML = cellData;\n\t\t\t\t\t\tcellData = __filter_div_textContent ?\n\t\t\t\t\t\t\t__filter_div.textContent :\n\t\t\t\t\t\t\t__filter_div.innerText;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif ( cellData.replace ) {\n\t\t\t\t\t\tcellData = cellData.replace(/[\\r\\n]/g, '');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tfilterData.push( cellData );\n\t\t\t\t}\n\t\n\t\t\t\trow._aFilterData = filterData;\n\t\t\t\trow._sFilterRow = filterData.join(' ');\n\t\t\t\twasInvalidated = true;\n\t\t\t}\n\t\t}\n\t\n\t\treturn wasInvalidated;\n\t}", "function _fnFilterData ( settings )\n\t{\n\t\tvar columns = settings.aoColumns;\n\t\tvar column;\n\t\tvar i, j, ien, jen, filterData, cellData, row;\n\t\tvar fomatters = DataTable.ext.type.search;\n\t\tvar wasInvalidated = false;\n\t\n\t\tfor ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\trow = settings.aoData[i];\n\t\n\t\t\tif ( ! row._aFilterData ) {\n\t\t\t\tfilterData = [];\n\t\n\t\t\t\tfor ( j=0, jen=columns.length ; j<jen ; j++ ) {\n\t\t\t\t\tcolumn = columns[j];\n\t\n\t\t\t\t\tif ( column.bSearchable ) {\n\t\t\t\t\t\tcellData = _fnGetCellData( settings, i, j, 'filter' );\n\t\n\t\t\t\t\t\tif ( fomatters[ column.sType ] ) {\n\t\t\t\t\t\t\tcellData = fomatters[ column.sType ]( cellData );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// Search in DataTables 1.10 is string based. In 1.11 this\n\t\t\t\t\t\t// should be altered to also allow strict type checking.\n\t\t\t\t\t\tif ( cellData === null ) {\n\t\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif ( typeof cellData !== 'string' && cellData.toString ) {\n\t\t\t\t\t\t\tcellData = cellData.toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// If it looks like there is an HTML entity in the string,\n\t\t\t\t\t// attempt to decode it so sorting works as expected. Note that\n\t\t\t\t\t// we could use a single line of jQuery to do this, but the DOM\n\t\t\t\t\t// method used here is much faster http://jsperf.com/html-decode\n\t\t\t\t\tif ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {\n\t\t\t\t\t\t__filter_div.innerHTML = cellData;\n\t\t\t\t\t\tcellData = __filter_div_textContent ?\n\t\t\t\t\t\t\t__filter_div.textContent :\n\t\t\t\t\t\t\t__filter_div.innerText;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif ( cellData.replace ) {\n\t\t\t\t\t\tcellData = cellData.replace(/[\\r\\n]/g, '');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tfilterData.push( cellData );\n\t\t\t\t}\n\t\n\t\t\t\trow._aFilterData = filterData;\n\t\t\t\trow._sFilterRow = filterData.join(' ');\n\t\t\t\twasInvalidated = true;\n\t\t\t}\n\t\t}\n\t\n\t\treturn wasInvalidated;\n\t}", "function _fnFilterData ( settings )\n\t{\n\t\tvar columns = settings.aoColumns;\n\t\tvar column;\n\t\tvar i, j, ien, jen, filterData, cellData, row;\n\t\tvar fomatters = DataTable.ext.type.search;\n\t\tvar wasInvalidated = false;\n\t\n\t\tfor ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\trow = settings.aoData[i];\n\t\n\t\t\tif ( ! row._aFilterData ) {\n\t\t\t\tfilterData = [];\n\t\n\t\t\t\tfor ( j=0, jen=columns.length ; j<jen ; j++ ) {\n\t\t\t\t\tcolumn = columns[j];\n\t\n\t\t\t\t\tif ( column.bSearchable ) {\n\t\t\t\t\t\tcellData = _fnGetCellData( settings, i, j, 'filter' );\n\t\n\t\t\t\t\t\tif ( fomatters[ column.sType ] ) {\n\t\t\t\t\t\t\tcellData = fomatters[ column.sType ]( cellData );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// Search in DataTables 1.10 is string based. In 1.11 this\n\t\t\t\t\t\t// should be altered to also allow strict type checking.\n\t\t\t\t\t\tif ( cellData === null ) {\n\t\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif ( typeof cellData !== 'string' && cellData.toString ) {\n\t\t\t\t\t\t\tcellData = cellData.toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// If it looks like there is an HTML entity in the string,\n\t\t\t\t\t// attempt to decode it so sorting works as expected. Note that\n\t\t\t\t\t// we could use a single line of jQuery to do this, but the DOM\n\t\t\t\t\t// method used here is much faster http://jsperf.com/html-decode\n\t\t\t\t\tif ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {\n\t\t\t\t\t\t__filter_div.innerHTML = cellData;\n\t\t\t\t\t\tcellData = __filter_div_textContent ?\n\t\t\t\t\t\t\t__filter_div.textContent :\n\t\t\t\t\t\t\t__filter_div.innerText;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif ( cellData.replace ) {\n\t\t\t\t\t\tcellData = cellData.replace(/[\\r\\n]/g, '');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tfilterData.push( cellData );\n\t\t\t\t}\n\t\n\t\t\t\trow._aFilterData = filterData;\n\t\t\t\trow._sFilterRow = filterData.join(' ');\n\t\t\t\twasInvalidated = true;\n\t\t\t}\n\t\t}\n\t\n\t\treturn wasInvalidated;\n\t}", "function _fnFilterData ( settings )\n\t{\n\t\tvar columns = settings.aoColumns;\n\t\tvar column;\n\t\tvar i, j, ien, jen, filterData, cellData, row;\n\t\tvar fomatters = DataTable.ext.type.search;\n\t\tvar wasInvalidated = false;\n\t\n\t\tfor ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {\n\t\t\trow = settings.aoData[i];\n\t\n\t\t\tif ( ! row._aFilterData ) {\n\t\t\t\tfilterData = [];\n\t\n\t\t\t\tfor ( j=0, jen=columns.length ; j<jen ; j++ ) {\n\t\t\t\t\tcolumn = columns[j];\n\t\n\t\t\t\t\tif ( column.bSearchable ) {\n\t\t\t\t\t\tcellData = _fnGetCellData( settings, i, j, 'filter' );\n\t\n\t\t\t\t\t\tif ( fomatters[ column.sType ] ) {\n\t\t\t\t\t\t\tcellData = fomatters[ column.sType ]( cellData );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// Search in DataTables 1.10 is string based. In 1.11 this\n\t\t\t\t\t\t// should be altered to also allow strict type checking.\n\t\t\t\t\t\tif ( cellData === null ) {\n\t\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif ( typeof cellData !== 'string' && cellData.toString ) {\n\t\t\t\t\t\t\tcellData = cellData.toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcellData = '';\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// If it looks like there is an HTML entity in the string,\n\t\t\t\t\t// attempt to decode it so sorting works as expected. Note that\n\t\t\t\t\t// we could use a single line of jQuery to do this, but the DOM\n\t\t\t\t\t// method used here is much faster http://jsperf.com/html-decode\n\t\t\t\t\tif ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {\n\t\t\t\t\t\t__filter_div.innerHTML = cellData;\n\t\t\t\t\t\tcellData = __filter_div_textContent ?\n\t\t\t\t\t\t\t__filter_div.textContent :\n\t\t\t\t\t\t\t__filter_div.innerText;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif ( cellData.replace ) {\n\t\t\t\t\t\tcellData = cellData.replace(/[\\r\\n]/g, '');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tfilterData.push( cellData );\n\t\t\t\t}\n\t\n\t\t\t\trow._aFilterData = filterData;\n\t\t\t\trow._sFilterRow = filterData.join(' ');\n\t\t\t\twasInvalidated = true;\n\t\t\t}\n\t\t}\n\t\n\t\treturn wasInvalidated;\n\t}" ]
[ "0.75973594", "0.7070443", "0.69540876", "0.6901481", "0.6877683", "0.6804805", "0.6795132", "0.67791307", "0.6707717", "0.6683838", "0.66523194", "0.6597533", "0.6552523", "0.6536657", "0.65260494", "0.6516366", "0.64702713", "0.64654106", "0.6413455", "0.63701373", "0.63606113", "0.6336927", "0.6312292", "0.6285093", "0.62647134", "0.6217065", "0.62082326", "0.61896217", "0.6179807", "0.6172903", "0.61690223", "0.61428064", "0.61269075", "0.61236453", "0.61094236", "0.6106492", "0.60792667", "0.6047122", "0.6033623", "0.60293055", "0.60183537", "0.59983504", "0.5998263", "0.5997749", "0.5980949", "0.5966101", "0.5956258", "0.594129", "0.59343714", "0.592171", "0.592171", "0.5917885", "0.5910592", "0.5909651", "0.58987635", "0.5885835", "0.5872329", "0.58663785", "0.5862132", "0.58368456", "0.5833065", "0.5827687", "0.58243316", "0.5820582", "0.5814968", "0.58052903", "0.5796006", "0.5788187", "0.5776277", "0.57709414", "0.57699245", "0.57679695", "0.5755182", "0.5742134", "0.57357794", "0.5732834", "0.5732238", "0.5726527", "0.5724991", "0.57066554", "0.5699515", "0.5691147", "0.56882375", "0.5684986", "0.56818837", "0.5679991", "0.5671624", "0.5665701", "0.5663657", "0.56609666", "0.56609666", "0.56609666", "0.56609666", "0.56609666", "0.56609666", "0.56609666", "0.56609666", "0.56609666", "0.56609666", "0.56609666", "0.56609666" ]
0.0
-1
Selects Fast Tab with a given name.
function NavSelectFastTab(/**string*/ tab, /**boolean*/ toggleAdditionalFields, /**string*/ additionalFieldsButtonName) { if (!tab) { LogAssert("NavSelectFastTab: tab is not set"); return; } var windows = g_util.FindWindows("regex:.*", "regex:WindowsForms10.*"); if (windows.length > 0) { for(var i = 0; i < windows.length; i++) { var wnd = windows[i]; if (wnd.ProcessName.indexOf("Microsoft.Dynamics.Nav.Client") != -1) { var windowName = wnd.Text; Log(windowName); var ae = SeSGetUIAutomationObject(wnd); if (ae) { var obj = SeSUIAutomationFindByAutomationId(ae, "ContentPlaceholder", DynamicsNAVFastTabsRule); if (obj) { obj.DoSelectTab(tab, toggleAdditionalFields, additionalFieldsButtonName); return; } } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jscoverage_selectTab(tab) {\n\t$(tab).tab('show');\n}", "function selectTab( name ) {\n\n // Get all elements with class=\"tabcontent\" and hide them\n\n let tabcontent = document.getElementsByClassName(\"tabcontent\");\n\n for (let i = 0; i < tabcontent.length; i++) {\n if ( tabcontent[i].id == name ) tabcontent[i].style.display = \"block\";\n else tabcontent[i].style.display = \"none\";\n }\n }", "function selectTab( name ) {\n\n let tabs = document.getElementsByClassName('tabs');\n\n for (let t of tabs ) {\n if( t.name == name ) {\n t.classList.toggle('selected');\n }\n else t.classList.remove('selected');\n }\n\n // Get all elements with class='tabcontent' and hide them\n // showing only the one selected\n let tabcontent = document.getElementsByClassName('tabcontent');\n\n for (let t of tabcontent ) {\n if ( t.id == name ) {\n t.style.display = 'block';\n }\n else t.style.display = 'none';\n }\n\n // Enable main tab contents if hidden\n\n tabs = document.getElementById('tab-contents');\n tabs.style.display = 'block';\n}", "function chooseTab(tabIndex) {\n\n var tablesArea\n = document.getElementById(TABLES_AREA);\n var tables\n = tablesArea.getElementsByTagName(TABLE_TAG);\n\n for (var tableIndex = 0; tableIndex < tables.length; ++tableIndex) {\n setVisibilityOfElement(tables[tableIndex], tableIndex == tabIndex);\n }\n\n changeTab(tabIndex);\n\n}", "function selectTab() {\n var href = tab.href.split('#')[1];\n var panel = layout.content_.querySelector('#' + href);\n layout.resetTabState_(tabs);\n layout.resetPanelState_(panels);\n tab.classList.add(layout.CssClasses_.IS_ACTIVE);\n panel.classList.add(layout.CssClasses_.IS_ACTIVE);\n }", "function selectTab() {\n var href = tab.href.split('#')[1];\n var panel = layout.content_.querySelector('#' + href);\n layout.resetTabState_(tabs);\n layout.resetPanelState_(panels);\n tab.classList.add(layout.CssClasses_.IS_ACTIVE);\n panel.classList.add(layout.CssClasses_.IS_ACTIVE);\n }", "function openTab(tabName) {\n //todo\n}", "function selectTab(what) {\n switch(what) {\n default:\n case 'top':\n case 'Most Fucked':\n $e = $('.tabs #top_thats_tab a');\n $('.tabs #top_thats_tab a').click();\n break;\n case 'mine':\n case 'My Fuck Thats':\n $('.tabs #my_thats_tab a').click();\n break;\n case 'month':\n case 'This Month':\n $('.tabs #month_thats_tab a').click();\n break;\n case 'week':\n case 'This Week':\n $('.tabs #week_thats_tab a').click();\n break;\n case 'today':\n case 'Today':\n $('.tabs #today_thats_tab a').click();\n break;\n }\n}", "function selectTab() {\n var href = tab.href.split('#')[1];\n var panel = layout._content.querySelector('#' + href);\n layout._resetTabState(tabs);\n layout._resetPanelState(panels);\n addClass(tab, layout._CssClasses.IS_ACTIVE);\n addClass(panel, layout._CssClasses.IS_ACTIVE);\n }", "function selectTab(ev, tabName)\n{\n if (prefs.debug)\n console.log(\"URL Link \" + tabName + \" selected\");\n\n // Set all buttons as non-current\n let tabContent = document.getElementsByClassName(\"tab-content\");\n for (let tab = 0; tab < tabContent.length; tab++)\n tabContent[tab].style.display = \"none\";\n\n // Hide all tabs\n let tabLinks = document.getElementsByClassName(\"tab-link\");\n for (let tab = 0; tab < tabLinks.length; tab++) {\n tabLinks[tab].className = tabLinks[tab].className.replace(/ active\\b/g, \"\");\n }\n\n // Show selected tab\n document.getElementById(tabName + \"-tab\").style.display = \"block\";\n\n // Flag active button\n ev.currentTarget.className += \" active\";\n}", "function selectTabAt(index, noUpdate) {\n\n if (list.inRange(index)) {\n var matches = list.findBy(\"$index\", index),\n it = matches ? matches[0] : null;\n\n if (it != selected) {\n\n // Tab must be selectable...\n if ( !isEnabled(it) ) {\n it = selectNext(it);\n }\n\n selectTab( it || list.first(), noUpdate );\n }\n }\n }", "function showTab(tabName) {\n\n if (tabName == \"_cargo\" || tabName == \"_damage\") {\n const playerId = document.getElementById(\"selectPlayer\") ? $('#selectPlayer').text() : $('#playerSelector').val();\n if (playerId == \"-\") {\n\t\t\tmodal.style.display = \"block\";\n return;\n }\n }\n $('._active_tab').removeClass('_active_tab');\n $('#' + tabName).addClass('_active_tab');\n\n $('._active_tab_button').removeClass('_active_tab_button');\n $('#' + tabName + '_button').addClass('_active_tab_button');\n}", "function openTab(tabName) {\n var i;\n var x = document.getElementsByClassName(\"tabPage\");\n for (i = 0; i < x.length; i++) {\n x[i].style.display = \"none\";\n }\n document.getElementById(tabName).style.display = \"block\";\n}", "function selectTab(aIndex) {\n return {\n oncommand: 'gBrowser.selectTabAtIndex(' + aIndex + ');'\n };\n }", "function selectS_tab(requestedTabName)\n{\n // STEP 1: Test validity of requested tab name. //////////////////////////////////////////////\n switch (requestedTabName)\n {\n case 'playerStats': break; // OK.\n case 'playerRankings': break; // OK.\n case 'teamStats': break; // OK.\n case 'teamRecords': break; // OK.\n case 'battPships': break; // OK.\n default: error( 'Unexpected tabName \"' + requestedTabName\n + '\" in function \\'icdb_data_retrieval_form.js\\'::selectS_Tab().');\n }\n\n\n // STEP 2: Test whether requested tab is currently selected. /////////////////////////////////\n var prevSelectedTabName = document.getElementById('s_tabSelectedTabId').value;\n if (requestedTabName == prevSelectedTabName)\n return;\n\n\n // Variables needed for steps 3 & 4 (select & unselect stages) below.\n var tabLabel; // Tab label (eg. 'Player<br />Statistics').\n var tabElemId; // Tab element ID in HTML page (eg. 's_tabPlayerStatsId' ).\n var className; // CSS class of replacement tab (no border is required for rightmost tab).\n var i = ' '; // Indent.\n\n\n // STEP 3: Unselect previously selected tab. /////////////////////////////////////////////////\n\n // Only unselect if a tab was previously selected\n // (on first load, prevSelectedTabName will be 'none').\n if (prevSelectedTabName != 'none')\n {\n tabLabel = getS_tabLabel(prevSelectedTabName);\n tabElemId = getS_tabElemId(prevSelectedTabName);\n className = (tabElemId == 's_tabBattPshipsId')? 'borders___B': 'borders__RB';\n\n // Find whether previously selected tab is light or dark coloured.\n var l_OR_d = ( prevSelectedTabName == 'playerRankings'\n || prevSelectedTabName == 'teamRecords' )? 'd': 'l';\n\n // Replace selected (highlighted) tab with unselected (unhighlighted) tab.\n document.getElementById(tabElemId).innerHTML\n = i + '<table class=\"' + className + '\" width=\"100%\" cellspacing=\"0\">\\n'\n // NOTE: cellspacing=\"0\" required by IE.\n + i + ' <tr><th class=\"h3' + l_OR_d + '\">' + tabLabel + '</th></tr>\\n'\n + i + '</table>\\n';\n }\n\n\n // STEP 4: Select new tab. ///////////////////////////////////////////////////////////////////\n\n tabLabel = getS_tabLabel(requestedTabName);\n tabElemId = getS_tabElemId(requestedTabName);\n className = (tabElemId == 's_tabBattPshipsId')? 'borders____': 'borders__R_';\n\n // Replace unselected (unhighlighted) tab with selected (highlighted) tab.\n document.getElementById(tabElemId).innerHTML\n = i + '<table class=\"' + className + '\" width=\"100%\" cellspacing=\"0\">\\n'\n // NOTE: cellspacing=\"0\" required by IE.\n + i + ' <tr><th class=\"colorTd\">' + tabLabel + '</th></tr>\\n'\n + i + '</table>\\n';\n\n\n // STEP 5: Update selected tab in HTML form hidden input. ////////////////////////////////////\n document.getElementById(\"s_tabSelectedTabId\").value = requestedTabName;\n\n // STEP 6: Pass control to init() function for newly selected tab. ///////////////////////////\n initSelectedS_tab();\n}", "selectNextTab() {\n const selectedTab = this.selectedTab;\n const tabs = this.tabs;\n const length = tabs.get('length');\n\n let idx = selectedTab.get('index');\n let tab;\n\n do {\n idx++;\n // Next from the last tab should select the first tab.\n if (idx === length) {\n idx = 0;\n }\n\n tab = tabs.objectAt(idx);\n } while (tab && tab.isDestroying && tab !== selectedTab);\n\n if (tab) {\n tab.select();\n }\n }", "function showTab(selectedTab, numTabs = NUM_TABS){\n console.log(`showTab for ${selectedTab}`);\n for(let i=1; i<=numTabs; i++){\n if(i == selectedTab){\n continue;\n }\n else{\n $(`#${i}a`).hide();\n $(`#tab${i}`).removeClass('active');\n $(`#${i}a`).removeClass('active');\n }\n }\n\n $(`#tab${selectedTab}`).show();\n $(`#${selectedTab}a`).show();\n $(`#tab${selectedTab}`).addClass('active');\n $(`#${selectedTab}a`).addClass('active');\n\n}", "function getTabName(tabNames, name) {\r\n //array containing information if name is used (true) or not (value undefined)\r\n var numersFound = [];\r\n //value currently assigned to new tab\r\n var numFound = 0;\r\n\r\n for (var l = 0; l < tabNames.length; l++) {\r\n //check if there is already tab with this name-index\r\n if (tabNames[l].indexOf(\"(\") != -1 && tabNames[l].substring(0, tabNames[l].indexOf(\"(\")) == name) {\r\n numFound = parseInt(tabNames[l].substring(tabNames[l].indexOf(\"(\") + 1, tabNames[l].indexOf(\")\")));\r\n numersFound[numFound] = true;\r\n //looks just for the name\r\n } else if (tabNames[l] == name) {\r\n numersFound[0] = true;\r\n }\r\n }\r\n numFound = 0;\r\n for (l = 0; l < numersFound.length; l++) {\r\n //free slot found, we do not need to search further\r\n if (numersFound[l] === undefined) {\r\n numFound = l;\r\n break;\r\n } else {\r\n numFound++;\r\n }\r\n }\r\n //if needed append index to name\r\n if (numFound !== 0) {\r\n name += \"(\" + numFound + \")\";\r\n }\r\n return name;\r\n}", "selectTabIfNeeded(path) {\n if (this.schemaKeyToTabName && path !== '') {\n const tabName = this.schemaKeyToTabName[this.pathUtilService.toPathArray(path)[0]];\n this.activeTabName$.next(tabName);\n }\n }", "function chooseTab() {\n // console.debug( \"pfFunctions.js:chooseTab\" );\n // see if the showTab variable points to tab that actually exists in\n // the page\n if( ! ( showTab === undefined ) && $(showTab) ) {\n // console.debug( \"chooseTab: using param setting: \" + showTab );\n\n // yes; show that tab\n show( showTab );\n\n } else {\n // console.debug( \"chooseTab: no param setting; checking cookie\" );\n \n // no; see if there's a cookie to tell us the last tab\n var cookieTab = readCookie( \"lastTab\" );\n // console.debug( \"cookieTab: |\" + cookieTab + \"|\" );\n\n if( cookieTab && $(cookieTab) ) {\n // console.debug( \"chooseTab: found a cookie; switching to |\" + cookieTab + \"|\" );\n \n // yes; show that tab\n show( cookieTab );\n } else {\n // console.debug( \"chooseTab: no cookie switching to default\" );\n\n // no; get the first block in the page and show that instead\n var block = document.getElementsByClassName( \"block\" )[0];\n if( block && block.id ) {\n show( block.id );\n }\n }\n }\n}", "function ItemsPageSetActiveTab( tabName )\n{\n\ttabs = new Array( \"basicSettings\", \"qualityDefs\", \"itemDefs\", \"attributeDefs\", \"timeRewards\", \"dailyRewards\", \"itemAdmin\" );\n\tfor ( i = 0; i < tabs.length; i++ )\n\t{\n\t\tcurTabDiv = $( tabs[i] + 'Tab' );\n\t\tcurTabBody = $( tabs[i] );\n\n\t\tif ( tabName == tabs[i] )\n\t\t{\n\t\t\tcurTabDiv.className = 'tab activetab';\n\t\t\tcurTabBody.style.display = 'block';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcurTabDiv.className = 'tab';\n\t\t\tcurTabBody.style.display = 'none';\n\t\t}\n\t}\n}", "async function tab(tab) {\n setLoading(true);\n setActiveTab(tab);\n setSecondTab(\"results\");\n setActiveTest(\"\");\n setPatientSelected(null);\n if (tab == \"new\") {\n setPatient(null);\n var result = await client.postApi(`${endpoints.user.getPatients}`, null, true);\n if (result.statusCode === 200) {\n setPatient(result.response);\n setLoading(false);\n } else {\n setLoading(false);\n }\n } else {\n setLoading(false);\n }\n }", "function doSelectTab(tabRoot,index){\r\n\t\t\tvar tabColumn = tabRoot.children(\"div.vtabs-tab-column\");\r\n\t\t\tvar tabContentColumn = tabRoot.children(\"div.vtabs-content-column\");\r\n\t\t\tvar selectLi = tabColumn.find(\"ul > li\").eq(index);\t\t\t\r\n\t\t\thandleTabClick(selectLi,index,tabRoot,true);\r\n\t\t}", "function goToSetChararcteristics(){\n tabsFrame.selectTab('page4');\n}", "function select_tab(which) {\n d3.select(\"#hourly_tab\").attr('class', 'inactive');\n d3.select(\"#day_tab\").attr('class', 'inactive');\n d3.select(\"#hourly_tab_cgm\").attr('class', 'inactive');\n d3.select(\"#day_tab_cgm\").attr('class', 'inactive');\n d3.select(which).attr('class', 'active');\n}", "function changeTab(tabName) {\n\n var i;\n var x = $(\".tab\");\n for (i = 0; i < x.length; i++) {\n x[i].style.display = \"none\"; \n }\n\t$('#'+tabName).css({'display' : 'block'}); \n\tcurTab = tabName;\n}", "function showTab(tabName, tableGroup, tableName){\n\n // store the index of tablegroup that was selected\n switch (tableGroup) {\n case \"owner2grpRestriction\":\n tabsFrame.selectedTableGroup = 2;\n break;\n case \"ownergrpRestriction\":\n tabsFrame.selectedTableGroup = 1;\n break;\n case \"datagrpRestriction\":\n tabsFrame.selectedTableGroup = 0;\n break;\n //\t\tdefault: tabsFrame.selectedTableGroup = 0;\n }\n \n // navigate to desired tab, applying appropriate restriction based on table name selected. \n switch (tabName) {\n case \"page4b\":\n // If the target frame is page4b (Select Fields), then restrict the records\n // according to the table name \n var restriction = new Ab.view.Restriction();\n restriction.addClause(\"afm_flds.table_name\", tableName, \"=\");\n tabsFrame.restriction = restriction;\n myTabsFrame.selectTab('page4b');\n break\n case \"page4c\":\n var restriction = new Ab.view.Restriction();\n restriction.addClause(\"afm_flds.table_name\", tableName, \"=\");\n tabsFrame.restriction = restriction;\n myTabsFrame.selectTab('page4c', restriction);\n break\n case \"page4d\":\n var restriction = new Ab.view.Restriction(); \n var inValues = []; \t\t\t\t\t\n // restriction = \"afm_flds.table_name IN (\";\n \n var parameters = {\n tableName: 'afm_flds',\n fieldNames: toJSON(['afm_flds.table_name', 'afm_flds.field_name', 'afm_flds.ref_table']),\n restriction: '{\"afm_flds.table_name\":' + tableName + '}',\n recordLimit: 0\n };\n var result = Workflow.runRuleAndReturnResult('AbCommonResources-getDataRecords', parameters);\n \n if (result.code == 'executed') { \n for (var i = 0; i < result.data.records.length; i++) {\n var record = result.data.records[i];\n if (record['afm_flds.ref_table'] != '') {\n inValues.push( record['afm_flds.ref_table']);\n }\n }\n }\n //restriction += \"' ')\";\n restriction.addClause(\"afm_flds.table_name\", inValues, \"IN\");\n \n var listOfRestrictedFields = tabsFrame.listOfRestrictionFields;\n if(listOfRestrictedFields){\n \trestriction = addFieldsToRestriction(restriction, listOfRestrictedFields);\n \t}\n myTabsFrame.refTable = tableName;\n tabsFrame.restriction = restriction;\n myTabsFrame.selectTab('page4d', restriction);\n break\n case \"page4e\":\n var restriction = new Ab.view.Restriction();\n restriction.addClause(\"afm_flds.table_name\", tableName, \"=\");\n tabsFrame.restriction = restriction;\n myTabsFrame.selectTab('page4e', restriction);\n break\n case \"page4f\":\n myTabsFrame.selectTab('page4f');\n var restriction = new Ab.view.Restriction();\n restriction.addClause(\"afm_flds.table_name\", tableName, \"=\");\n tabsFrame.restriction = restriction;\n myTabsFrame.selectTab('page4f', restriction);\n break\n }\n}", "function hit()\n {\n //switches to tab\n switchTab(name, number);\n }", "function start(tab)\n{\n\t\n}", "function selectTab(index)\r\n{\r\n var tab = $(\"ul.tabs li\");\r\n var pane = $(\"div.pane\");\r\n tab.removeClass(\"Selected\");\r\n tab.eq(index).addClass(\"Selected\");\r\n pane.addClass(\"hidden\");\r\n pane.eq(index).removeClass(\"hidden\");\r\n}", "function goToTab(tabName) {\n routingBase.goToMenuTab(tabName);\n }", "function activaTab(tab){\n $('.nav-tabs-chart-selector a[href=\"#' + tab + '\"]').tab('show');\n }", "AccessTab(tab) {\n cy.xpath(infoElmts.tabName(tab)).click()\n }", "function startTab1() {\n document.getElementById(\"default\").click();\n}", "function selectTab(tabId) {\r\n // #6 #taptab #remove selection from all buttons...\r\n $('#tab-bar button').removeClass('selected');\r\n\r\n //...#6 #taptab #log the new tab on change...\r\n console.log('Changing to tab', tabId);\r\n\r\n //...#6 #taptab #add selection to the given tab button, its id is passed via the #argument tabId\r\n $(tabId).addClass('selected');\r\n}", "function selectTab(tabId) {\r\n // #6 #taptab #remove selection from all buttons...\r\n $('#tab-bar button').removeClass('selected');\r\n\r\n //...#6 #taptab #log the new tab on change...\r\n console.log('Changing to tab', tabId);\r\n\r\n //...#6 #taptab #add selection to the given tab button, its id is passed via the #argument tabId\r\n $(tabId).addClass('selected');\r\n}", "function selectTab(tabId) {\r\n // #6 #taptab #remove selection from all buttons...\r\n $('#tab-bar button').removeClass('selected');\r\n\r\n //...#6 #taptab #log the new tab on change...\r\n console.log('Changing to tab', tabId);\r\n\r\n //...#6 #taptab #add selection to the given tab button, its id is passed via the #argument tabId\r\n $(tabId).addClass('selected');\r\n}", "function selectTab(tabId) {\r\n // #6 #taptab #remove selection from all buttons...\r\n $('#tab-bar button').removeClass('selected');\r\n\r\n //...#6 #taptab #log the new tab on change...\r\n console.log('Changing to tab', tabId);\r\n\r\n //...#6 #taptab #add selection to the given tab button, its id is passed via the #argument tabId\r\n $(tabId).addClass('selected');\r\n}", "function selectTab(tabId) {\r\n // #6 #taptab #remove selection from all buttons...\r\n $('#tab-bar button').removeClass('selected');\r\n\r\n //...#6 #taptab #log the new tab on change...\r\n console.log('Changing to tab', tabId);\r\n\r\n //...#6 #taptab #add selection to the given tab button, its id is passed via the #argument tabId\r\n $(tabId).addClass('selected');\r\n}", "function selectTab(tab) {\n $('#tabs').children().removeClass('selected');\n tab.addClass('selected');\n let contentId = '#' + tab.attr('id') + '-content';\n $('#tabs').children().each(function () {\n let ccid = '#' + $(this).attr('id') + '-content';\n if (ccid != contentId) {\n $(ccid).hide();\n }\n });\n $(contentId).show();\n}", "function selectTab(selectedTab) {\n console.log('Changing to tab ' + selectedTab);\n $(\"#tab-bar>button.selected\").removeClass(\"selected\");\n $(\"#\"+ selectedTab).addClass(\"selected\");\n}", "function openTab(tabName) {\r\n var i, x;\r\n x = document.getElementsByClassName(\"containerTab\");\r\n for (i = 0; i < x.length; i++) {\r\n x[i].style.display = \"none\";\r\n }\r\n document.getElementById(tabName).style.display = \"block\";\r\n }", "function initSelectedS_tab()\n{\n var selectedTabName = document.getElementById('s_tabSelectedTabId').value;\n\n switch (selectedTabName)\n {\n case 'playerStats': initS_tabPlayerStats(); break;\n case 'playerRankings': initS_tabPlayerRankings(); break;\n case 'teamStats': initS_tabTeamStats(); break;\n case 'teamRecords': initS_tabTeamRecords(); break;\n case 'battPships': initS_tabBattPships(); break;\n default: error( 'Unexpected selectedTabName \"' + selectedTabName\n + '\" in filename \\'icdb_data_retrieval_form.js\\'::initSelectedS_tab().');\n }\n}", "function changeTab (pressedTabIndex) {\n\n var tabsArea \n = document.getElementById(TABS_AREA);\n \n var tabs = tabsArea.getElementsByTagName(DIV_TAG);\n\n for (var tabIndex = 0; tabIndex < tabs.length; ++tabIndex) {\n tabs[tabIndex].className = TAB_CLASS;\n }\n\n tabs[pressedTabIndex].className = TAB_CLASS + ' ' + SELECTED_TAB_CLASS;\n}", "function selectTab(tab) {\n\t\t\t\t//unselect tabs\n\t\t\t\tvar selectedTab = tabsNav.getElement('li.tabs-selected');\n\t\t\t\t\n\t\t\t\tif ( selectedTab ) {\n\t\t\t\t\tselectedTab.removeClass('tabs-selected');\n\t\t\t\t}\n\t\t\t\t//set selected tab item\n\t\t\t\ttab.addClass('tabs-selected');\n\t\t\t\t//unselect panels\n\t\t\t\tvar selectedPanel = tabsBody.getElement('div.tabs-panel-selected');\n\t\t\t\t\n\t\t\t\tif ( selectedPanel ) {\n\t\t\t\t\tselectedPanel.set('aria-hidden', true).removeClass('tabs-panel-selected');\n\t\t\t\t}\n\t\t\t\t//select active panel\n\t\t\t\tdocument.getElement(tab.getElement('a').get('href') + tabIDsuffix).addClass('tabs-panel-selected');\n\t\t}", "function openTab(evt, tabName) {\r\n let i, tabcontent, tablinks;\r\n tabcontent = document.getElementsByClassName(\"tabcontent\");\r\n for (i = 0; i < tabcontent.length; i++) {\r\n tabcontent[i].style.display = \"none\";\r\n }\r\n tablinks = document.getElementsByClassName(\"tablinks\");\r\n for (i = 0; i < tablinks.length; i++) {\r\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\r\n }\r\n document.getElementById(tabName).style.display = \"block\";\r\n evt.currentTarget.className += \" active\";\r\n}", "function onclickForNamedTab(divId)\n{\n if(divId == 'discover')\n {\n onclickForTab_Discover();\n }\n \n else if(divId == 'search')\n {\n onclickForTab_Search();\n }\n \n else if(divId == 'write')\n {\n onclickForTab_Write();\n }\n}", "function openTab(evt, name) {\n var i, tabcontent, tablinks;\n tabcontent = document.getElementsByClassName(\"tabcontent\");\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n }\n\n tablinks = document.getElementsByClassName(\"tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\n }\n document.getElementById(name).style.display = \"block\";\n evt.currentTarget.className += \" active\";\n}", "function openTab(tabName) {\n let i;\n let tabContent;\n\n tabContent = document.getElementsByClassName(\"tab-content\");\n\n for (i = 0; i < tabContent.length; i++) {\n tabContent[i].style.display = \"none\";\n }\n\n document.getElementById(tabName).style.display = \"flex\";\n}", "function selectProductTab() {\n var tabName = \"product.salesorderid.salesorder\";\n MobileCRM.UI.EntityForm.selectTabEx(tabName, null, null);\n}", "function openTab(evt, tabName) {\n let i, x, tabLinks;\n\n x = document.querySelectorAll('.content-tab');\n for (i = 0; i < x.length; i++) x[i].style.display = \"none\";\n\n tabLinks = document.querySelectorAll('.tab');\n for (i = 0; i < x.length; i++) tabLinks[i].className = tabLinks[i].className.replace(' is-active', '');\n\n document.getElementById(tabName).style.display = \"block\";\n evt.currentTarget.className += ' is-active';\n}", "function openTab(evt, tabName) {\n let i, tabcontent, tablinks;\n tabcontent = document.getElementsByClassName(\"tabcontent\");\n\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n }\n \n tablinks = document.getElementsByClassName(\"tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\n }\n document.getElementById(tabName).style.display = \"block\";\n evt.currentTarget.className += \" active\";\n}", "function tabs(evt, tabName) {\n var i, tabcontent, tablinks;\n tabcontent = document.getElementsByClassName(\"tabcontent\");\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n }\n tablinks = document.getElementsByClassName(\"tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\n }\n document.getElementById(tabName).style.display = \"block\";\n evt.currentTarget.className += \" active\";\n document.getElementById(\"defaultOpen\").click();\n}", "function openTab(evt, TabName) {\n var i, tabcontent, tablinks;\n tabcontent = document.getElementsByClassName(\"tabcontent\");\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n }\n tablinks = document.getElementsByClassName(\"tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\n }\n document.getElementById(TabName).style.display = \"block\";\n evt.currentTarget.className += \" active\";\n}", "selectTab (tabData) {\n if (tabData.enabled) {\n this.selectedTab = tabData;\n this.DOMNodes.panel.dataset.selected = tabData.id;\n }\n }", "function GetFirstTab() {\n return TabList[0];\n}", "function setTab(name, cursel) {\r\n //tabs.removeClass(\"off\");\r\n var bqs;//标签个数\r\n if (name == \"one\") {\r\n bqs = 5;\r\n }\r\n if (name == \"two\") {\r\n bqs = 6;\r\n }\r\n if (name == \"three\") {\r\n bqs = 5;\r\n }\r\n for (var i = 1; i <= bqs; i++) {\r\n var menu = document.getElementById(name + i);\r\n var id = \"con_\" + name + \"_\" + i;\r\n\r\n var menudiv = document.getElementById(\"con_\" + name + \"_\" + i);\r\n if (i == cursel) {\r\n menu.className = \"off\";\r\n menudiv.style.display = \"block\";\r\n createEcharts(id);\r\n if (name == \"one\") {\r\n cid1 = id;\r\n }\r\n if (name == \"two\") {\r\n cid2 = id;\r\n }\r\n if (name == \"three\") {\r\n cid3 = id;\r\n }\r\n } else {\r\n menu.className = \"\";\r\n menudiv.style.display = \"none\";\r\n }\r\n }\r\n}", "function selectTab(tabId) {\n $('#tab-bar button').removeClass('selected');\n $(tabId).addClass('selected');\n console.log('Changing to tab: ' + tabId);\n}", "function switchTab(tab) {\n\tif ($('#toyName'+currentTabNumber).val()!=='') {\n\t\tvar toyName = $('#toyName'+currentTabNumber).val();\n\t\tif (toyName.length >10) {\n\t\t\ttoyName = toyName.substring(0,10) + \"...\";\n\t\t}\n\t\t$('#tab-toy'+currentTabNumber).html('<button type=\"button\" class=\"close\" onClick=\"closeTab(event, this.parentNode.id)\">&times;</button>'\n\t\t\t+ ' <a href=\"#toy\" data-toggle=\"tab\"><strong>'+ toyName + '</strong></a>');\n\t}\n\n\tvar tabID = tab.split(\"-\")[1];\n\tcurrentTabNumber = tabID.substring(3);\n\t\t// Update tab label to toy name\n\t// Remove active state from all tab labels and assign clicked label to be new active tab\n\t$('.tab-label').attr('class', 'tab-label');\n\t$('#tab-'+tabID).attr('class', 'tab-label active');\n\t// Remove active state from all tab pages and assign clicked tab to be new active tab\n\t$('.tab-pane').attr('class', 'tab-pane');\n\t$('#content-'+tabID).attr('class', 'tab-pane active');\n\n\tcheckTabDisplay();\n}", "function getActiveTab(var nameOfPage){\n\tif(nameOfPage.equals(\"home\")){\n\t\thome.className = home.className + \" active\"\n\t}else if(nameOfPage.equals(\"repo\")){\n\t\trepos.className = repos.className + \" active\"\n\t}\n}", "function selectIndex(_idx, _callback) {\n for (var i = 0, l = tabs.length; i<l; i++) {\n //select the tab and move the tab 'cursor'\n if (_idx === i) {\n //if the tab is already selected, do nothing\n if (!tabs[i].on) {\n Ti.API.info('selecting tab index: '+_idx);\n tabs[i].toggle();\n //set the current film strip index\n _callback(i);\n }\n } else if (tabs[i].on && (_idx !== i)) {\n tabs[i].toggle();\n }\n }\n }", "loadOneTab() { }", "function getSelectedTab(tabs) {\n const childId = window.location.hash.split(\"=\")[1];\n return tabs.find((tab) => tab.actor.includes(childId));\n}", "function openTab() {\n tabName = createNewTab();\n createContent(tabName);\n var tab = {id: tabName}\n tabs.push(tab);\n\n // Simular o evento do click clicando na nova aba aberta\n document.querySelectorAll(\"[href='#\" + tabName + \"']\")[0].click();\n}", "function openTab(evt, tabName) {\r\n\t\tvar i, tabcontenido, tablist, tabsActive;\r\n\t\ttabcontenido = document.getElementsByClassName(\"tabcontenido\");\r\n\t\tfor (i = 0; i < tabcontenido.length; i++) {\r\n\t\t\ttabcontenido[i].style.display = \"none\";\r\n\t\t}\r\n\r\n\t\ttablist = document.getElementsByClassName(\"tablist\");\r\n\t\tfor (i = 0; i < tablist.length; i++) {\r\n\t\t\ttablist[i].className = tablist[i].className.replace(\" active\", \"\");\r\n\t\t}\r\n\r\n\t\ttabsActive = document.getElementsByClassName(tabName);\r\n\t\tfor (i = 0; i < tabsActive.length; i++) {\r\n\t\t\ttabsActive[i].style.display='block';\r\n\t\t}\r\n\r\n\t\tevt.currentTarget.className += \" active\";\r\n\t}", "function openTab(tab){\n $('.nav-tabs a[href=\"#' + tab + '\"]').tab('show');\n }", "function selectTab(group, index)\n{\n let tabContents = group.getElementsByClassName('tabs-content');\n for (let i = 0, count = tabContents.length; i < count; i++)\n {\n let content = tabContents[i];\n if (i == index)\n {\n content.classList.remove('hidden');\n }\n else\n {\n content.classList.add('hidden');\n }\n }\n let titles = group.getElementsByClassName('tabs-title');\n for (let i = 0, count = titles.length; i < count; i++)\n {\n let content = titles[i];\n if (i == index)\n {\n content.classList.add('selected');\n }\n else\n {\n content.classList.remove('selected');\n }\n if (!content.classList.contains('inited'))\n {\n let pos = i;\n content.onclick = () =>\n {\n selectAllTabs(pos, true);\n };\n content.classList.add('inited');\n }\n }\n}", "activateTab(tab, setFocus) {\n setFocus = setFocus || true;\n // Deactivate all other tabs\n this.deactivateTabs();\n\n // Remove tabindex attribute\n tab.removeAttribute('tabindex');\n\n // Set the tab as selected\n tab.classList.add(\"selected\");\n\n // Get the id of the relevant tabpanel\n var controls = tab.getAttribute('id') + '-tab';\n\n // Remove hidden attribute from tab panel to make it visible\n document.getElementById(controls).removeAttribute('hidden');\n\n // Set focus when required\n if (setFocus) {\n tab.focus();\n };\n }", "function selectTab(tab, noUpdate) {\n if ( tab == selected ) return;\n\n var activate = makeActivator(true),\n deactivate = makeActivator(false);\n\n // Turn off all tabs (if current active)\n angular.forEach(list.items(), deactivate);\n\n if ( tab != null ) {\n // Activate the specified tab (or next available)\n selected = activate(tab.disabled ? list.next(tab, isEnabled) : tab);\n\n // update external models and trigger databinding watchers\n $scope.$selIndex = selected ? String(selected.$index || list.indexOf(selected)) : -1;\n\n // update the tabs ink to indicate the selected tab\n if (!noUpdate) {\n onSelectedChange();\n }\n }\n\n return selected;\n }", "setSelectedTab(selected) {\n this.selectedTab = selected;\n }", "function changeTabs(){\n $('.cruise-section li a').eq($(this).val()).tab('show');\n }", "select(tab) {\n const alreadySelected = this.outlet.getActiveStackId() === tab;\n const tabRootUrl = `${this.outlet.tabsPrefix}/${tab}`;\n if (alreadySelected) {\n const activeStackId = this.outlet.getActiveStackId();\n const activeView = this.outlet.getLastRouteView(activeStackId);\n // If on root tab, do not navigate to root tab again\n if (activeView.url === tabRootUrl) {\n return;\n }\n const rootView = this.outlet.getRootView(tab);\n const navigationExtras = rootView && tabRootUrl === rootView.url && rootView.savedExtras;\n return this.navCtrl.navigateRoot(tabRootUrl, Object.assign({}, (navigationExtras), { animated: true, animationDirection: 'back' }));\n }\n else {\n const lastRoute = this.outlet.getLastRouteView(tab);\n /**\n * If there is a lastRoute, goto that, otherwise goto the fallback url of the\n * selected tab\n */\n const url = lastRoute && lastRoute.url || tabRootUrl;\n const navigationExtras = lastRoute && lastRoute.savedExtras;\n return this.navCtrl.navigateRoot(url, Object.assign({}, (navigationExtras), { animated: true, animationDirection: 'back' }));\n }\n }", "select(tab, force) {\n var selection = this.state.selection;\n\n if ((tab.url in selection && force === undefined) || force === false) {\n delete selection[tab.url];\n } else {\n selection[tab.url] = tab;\n }\n\n this.setState({\n selection: selection,\n });\n }", "function focusTab(tab) {\n let browserWindow = tab.ownerDocument.defaultView;\n browserWindow.focus();\n browserWindow.gBrowser.selectedTab = tab;\n}", "function onClickTab(tab) {\n if (d3.select(\"#tab_\"+tab).classed(\"active\")) { return; }\n active_tab = tab;\n // hide all tab_content\n d3.selectAll(\".tab_content\").style(\"display\", \"none\");\n // show selected tab_content\n d3.select(\"#div_\"+tab).style(\"display\", \"unset\");\n // mark tab as selected\n d3.selectAll(\".tab\").classed(\"active\", false);\n d3.select(\"#tab_\"+tab).classed(\"active\", true);\n drawgraphs();\n}", "function getCurrentTab() {\r\n try {\r\n var li = jQuery(\".tabOn\");\r\n if (li.length != 1) return -1;\r\n var links = jQuery('a', li);\r\n if (links.length != 1) return -1;\r\n var p = new SimpleParser(links[0].href);\r\n var tab = new Number(p.extract(\"javascript:goToTab(\", \");\"));\r\n if (tab < 1 || tab > 9) return -1;\r\n return tab;\r\n } catch (ex) {\r\n return -1;\r\n }\r\n}", "function setTab(i) {\n\t\t\t//vm.activeTab = i;\n\t\t}", "clickRaceListTab(){\n this.raceListTab.waitForExist();\n this.raceListTab.click();\n }", "function showFriendTab()\r\n{\r\n\t\r\n\tvar open=getTabIndexByTitle('My Friends');\r\n\tif (open<0)// if the tab is not open yet\r\n\t{\t\r\n\t\tvar aTab= createFriendTab('tabPanel','My Friends', true);\r\n\t}\r\n\telse\r\n\t{\r\n\t\tshowTab('tabPanel',open[1]);\r\n\t}\r\n}", "function showMyAuctionTab()\r\n{\r\n\r\n\tvar open=getTabIndexByTitle('My Auction');\r\n\tif (open<0)// if the tab is not open yet\r\n\t{\t\r\n\t\tvar aTab= createMyAuctionTab('tabPanel','My Auction', true);\r\n\t}\r\n\telse\r\n\t{\r\n\t\tshowTab('tabPanel',open[1]);\r\n\t}\r\n}", "function getTable(nomTab) {\n tab = nomTab;\n choisirTable();\n}// fin getTable", "function select_loop_get_tab(listener, table, attempts, callback) {\n if (attempts > 4) {\n callback(null)\n } else {\n let valid = is_alphanum(table)\n if (valid) {\n callback(table)\n } else {\n console.log()\n console.log('dp: Invalid table name. Please try again.\\n')\n listener.question('', (table_1) => {\n select_loop_get_tab(listener, table_1, attempts + 1, callback)\n })\n }\n }\n}", "clickOverviewTab(){\n this.overviewTab.waitForExist();\n this.overviewTab.click();\n }", "function openTab(evt, cityName) {\n var i, tabcontent, tablinks;\n tabcontent = document.getElementsByClassName(\"tabcontent\");\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n }\n tablinks = document.getElementsByClassName(\"tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\n }\n document.getElementById(cityName).style.display = \"block\";\n evt.currentTarget.className += \" active\";\n}", "function chooseStrategyTab(allCount, openCount) {\n var openTabName = 'strategy_results';\n var allTabName = 'search_history';\n // set tab state from query param, if present, and remove query param from url\n var tabQueryParamMatches = location.search.match(/\\btab=(\\w+)/);\n if (tabQueryParamMatches) {\n wdk.stratTabCookie.setCurrentTabCookie('application', tabQueryParamMatches[1]);\n }\n var current = wdk.stratTabCookie.getCurrentTabCookie('application');\n\n if (!current || current === null) {\n // no cookie set\n return (openCount > 0 || allCount === 0 ? openTabName : allTabName);\n }\n else {\n // cookie set\n if (current == allTabName) {\n return (allCount > 0 ? allTabName : openTabName);\n }\n else if (current == openTabName) {\n return (openCount > 0 || allCount === 0 ? openTabName : allTabName);\n }\n else {\n return current;\n }\n }\n }", "focusSelectedTab() {\n this.selectedTab.element.focus();\n }", "function tab_gold_select(i)\n {\n\t document.getElementById(\"tab_1\").className=\" \"; \n\t document.getElementById(\"tab_2\").className=\" \";\n\t document.getElementById(\"tab_\"+i).className=\"cm-act\";\n\t if (document.getElementById(\"div_gold0\"+i)==null)\n\t {\n\t\t return;\n\t }\n\t if (document.getElementById(\"div_gold01\")!=null){\n\t\t document.getElementById(\"div_gold01\").style.display=\"none\";\n\t }\n\t if (document.getElementById(\"div_gold02\")!=null){\n\t\t document.getElementById(\"div_gold02\").style.display=\"none\";\n\t }\n\n\n\t if (document.getElementById(\"div_gold0\"+i)!=null){\n\t\t document.getElementById(\"div_gold0\"+i).style.display=\"\";\n\t }\n }", "function openTab(th) {\n window.open(th.name, '_blank');\n}", "function openTab(th) {\n window.open(th.name, '_blank');\n}", "function focusFirstTab(tabs) {\n tabs[0].focus();\n }", "currentPageSelect(activeTab, displayTab) {\r\n if (displayTab === activeTab) {\r\n return \"selected tab-button\";\r\n } else return \"not-selected tab-button\";\r\n }", "function setTab(elem) {\n\t\t for (var i = 0; i < selectors.length; i++) {\n\t\t selectors[i].className = selectors[i].className.replace('on',' ');\n\t\t }\n\t\t elem.className += ' on';\n\t\t}", "function openTab(evt, cityName) {\n var i, tabcontent, tablinks;\n tabcontent = document.getElementsByClassName(\"tabcontent\");\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n\n }\n tablinks = document.getElementsByClassName(\"tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\n }\n document.getElementById(cityName).style.display = \"block\";\n evt.currentTarget.className += \" active\";\n}", "function switchtab(tab, offset) {\n var winid = tab.windowId;\n var tabid = tab.id;\n chrome.tabs.getAllInWindow(winid, function(tabs) {\n for (var j = 0; j < tabs.length; ++j) {\n if (tabs[j].id == tabid) {\n chrome.tabs.update(tabs[(j + tabs.length + offset) % tabs.length].id, {\n 'selected': true\n });\n break;\n }\n }\n });\n}", "function set_tab_title (uuid, f_name) {\n\t\tvar info = {\n\t\t\tuuid : uuid,\n\t\t\ttitle : f_name\n\t\t};\n\t\ttoolbar.update_title(info);\n\n\t\tf_handle_cached.send_info ('*', 'title-change', info, 0);\n\t}", "function openTab(evt, cityName) {\n var i, tabcontent, tablinks;\n tabcontent = document.getElementsByClassName(\"tabcontent\");\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n }\n tablinks = document.getElementsByClassName(\"tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\n }\n document.getElementById(cityName).style.display = \"block\";\n evt.currentTarget.className += \" active\";\n\n}", "function selectR_tab(requestedTabName)\n{\n // STEP 1: Test validity of requested tab name. //////////////////////////////////////////////\n switch (requestedTabName)\n {\n case 'Period': break; // OK.\n case 'Opposition': break; // OK.\n case 'Players': break; // OK.\n case 'Matches': break; // OK.\n case 'Overs': break; // OK.\n default: error( 'Unexpected tabName \"' + requestedTabName\n + '\" function \\'icdb_data_retrieval_form.js\\'::in selectR_Tab().');\n }\n\n\n // STEP 2: Test whether requested tab is currently selected. /////////////////////////////////\n var prevSelectedTabName = document.getElementById('r_tabSelectedTabId').value;\n if (requestedTabName == prevSelectedTabName)\n return;\n\n\n // Variables needed for steps 3 & 4 (select & unselect stages) below.\n var checked; // Whether checkbox in tab to be replaced was checked (boolean).\n var tabElemId; // Tab element ID in HTML page (eg. 'r_tabPeriodId').\n var className; // CSS class of replacement tab (no border is required for rightmost tab).\n var newInnerHTML; // HTML text of replacement tab.\n var i = ' '; // Indent.\n\n\n // STEP 3: Unselect previously selected tab. /////////////////////////////////////////////////\n\n if (prevSelectedTabName != 'none')\n {\n checked = document.getElementById('r_tab' + prevSelectedTabName + 'CheckboxId').checked;\n tabElemId = getR_tabElemId(prevSelectedTabName);\n className = (tabElemId == 'r_tabOversId')? 'borders___B': 'borders__RB';\n\n // Find whether previously selected tab is light or dark coloured.\n var l_OR_d\n = (prevSelectedTabName == 'Opposition' || prevSelectedTabName == 'Matches')? 'd': 'l';\n\n newInnerHTML\n = i + '<table class=\"' + className + '\" width=\"100%\" cellspacing=\"0\">\\n'\n // NOTE: cellspacing=\"0\" required by IE.\n + i + ' <tbody>\\n'\n + i + ' <tr>\\n'\n + i + ' <th class=\"h3' + l_OR_d + '\">\\n'\n + i + ' &nbsp;\\n'\n + i + ' <input type=\"checkbox\"'\n newInnerHTML += (checked)? ' checked=\"checked\"\\n': '\\n';\n newInnerHTML\n += i + ' id=\"r_tab' + prevSelectedTabName + 'CheckboxId\"\\n'\n + i + ' name=\"r_tab' + prevSelectedTabName + 'CheckboxId\"\\n'\n + i + ' onclick=\"onClickR_tabCheckBox(\\'' + prevSelectedTabName + '\\')\" />\\n'\n + i + ' &nbsp;\\n'\n + i + ' <br />\\n'\n + i + ' ' + prevSelectedTabName + '\\n'\n + i + ' </th>\\n'\n + i + ' </tr>\\n'\n + i + ' </tbody>\\n';\n + i + '</table>\\n';\n document.getElementById(tabElemId).innerHTML = newInnerHTML;\n }\n\n\n // STEP 4: Select new tab. ///////////////////////////////////////////////////////////////////\n\n // ('var className' is needed because no border is required for rightmost tab.)\n checked = document.getElementById('r_tab' + requestedTabName + 'CheckboxId').checked;\n tabElemId = getR_tabElemId(requestedTabName);\n className = (tabElemId == 'r_tabOversId')? 'borders____': 'borders__R_';\n newInnerHTML\n = i + '<table class=\"' + className + '\" width=\"100%\" cellspacing=\"0\">\\n'\n // NOTE: cellspacing=\"0\" required by IE.\n + i + ' <tbody>\\n'\n + i + ' <tr>\\n'\n + i + ' <th class=\"colorTd\">\\n'\n + i + ' &nbsp;\\n'\n + i + ' <input type=\"checkbox\"';\n newInnerHTML += (checked)? ' checked=\"checked\"\\n': '\\n';\n newInnerHTML\n += i + ' id=\"r_tab' + requestedTabName + 'CheckboxId\"\\n'\n + i + ' name=\"r_tab' + requestedTabName + 'CheckboxId\"\\n'\n + i + ' onclick=\"onClickR_tabCheckBox(\\'' + requestedTabName + '\\')\" />\\n'\n + i + ' &nbsp;\\n'\n + i + ' <br />\\n'\n + i + ' ' + requestedTabName + '\\n'\n + i + ' </th>\\n'\n + i + ' </tr>\\n'\n + i + ' </tbody>\\n'\n + i + '</table>\\n';\n document.getElementById(tabElemId).innerHTML = newInnerHTML;\n\n // STEP 5: Update selected tab in HTML form hidden input. ////////////////////////////////////\n document.getElementById(\"r_tabSelectedTabId\").value = requestedTabName;\n\n // STEP 6: Pass control to init() function for newly selected tab. ///////////////////////////\n initSelectedR_tab();\n}", "function set_title_and_active_tab(project_name, locator) {\n var div = $(locator);\n\n if (locator == '#index-tab') {\n document.title = project_name;\n }\n else {\n document.title = project_name + ' - ' + div.text();\n }\n\n div.addClass('active');\n\n return;\n}", "function openTab(tabName) {\r\n // Hide all elements with class=\"tabcontent\" by default */\r\n var tabcontent = document.getElementsByClassName(\"tabcontent\");\r\n\tvar i;\r\n for (i = 0; i < tabcontent.length; i++) {\r\n tabcontent[i].style.display = \"none\";\r\n }\r\n\r\n // Show the specific tab content\r\n document.getElementById(tabName).style.display = \"block\";\r\n}", "function findTab() {\n var tabs = browser.tabs.query({\n currentWindow: true,\n active: true\n })\n return tabs;\n}" ]
[ "0.70152086", "0.68212795", "0.6809615", "0.6603124", "0.6571218", "0.6571218", "0.6546387", "0.65253663", "0.6461223", "0.63936466", "0.6258325", "0.62546784", "0.61930007", "0.6180969", "0.6179517", "0.61211926", "0.60409516", "0.60393304", "0.60382205", "0.60322106", "0.6006078", "0.59873503", "0.59504175", "0.59474236", "0.5945811", "0.5930659", "0.5927461", "0.5925178", "0.5925123", "0.5918977", "0.5917719", "0.5867358", "0.5855246", "0.58550906", "0.5849074", "0.5849074", "0.5849074", "0.5849074", "0.5849074", "0.58371854", "0.58124864", "0.5809772", "0.5799921", "0.57947254", "0.5790427", "0.57793486", "0.57788944", "0.57713497", "0.5762586", "0.57589084", "0.57580435", "0.5752589", "0.57354516", "0.57339656", "0.5733593", "0.5725244", "0.5723933", "0.5723458", "0.57229245", "0.57182664", "0.5707538", "0.57060444", "0.56823534", "0.56788254", "0.567857", "0.56764275", "0.56758267", "0.56709987", "0.56671536", "0.5666734", "0.5659338", "0.5655276", "0.56410897", "0.563487", "0.5622403", "0.5616037", "0.56059074", "0.55938506", "0.55887645", "0.558554", "0.55854505", "0.5582743", "0.5577894", "0.55690104", "0.5566407", "0.55643874", "0.55566555", "0.5554148", "0.5554148", "0.5545283", "0.5538585", "0.55365634", "0.553105", "0.55300725", "0.55297685", "0.5525244", "0.5520306", "0.5517885", "0.5513424", "0.5506886" ]
0.6543697
7
Maximizes window with a given object.
function NavMaximizeWindow(/**objectId*/ objectId) { SeS(objectId).getDesktopWindow().Maximized = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async maximizeWindow() {\n return this.resizeWindow();\n }", "function constrain(obj) {\n if (obj.x < 0) {\n obj.x = 0;\n //the five comes from the border width\n } else if (obj.x > windowX - obj.diameter - 5) {\n obj.x = windowX - obj.diameter - 5;\n }\n if (obj.y < 0) {\n obj.y = 0;\n } else if (obj.y > windowY - obj.diameter - 5) {\n obj.y = windowY - obj.diameter - 5;\n }\n}", "maximize() {\r\n this.native.maximize();\r\n }", "function _sh_maximized(){\n\tif( in_overview ) paused_preserve = true;\n\telse pause();\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n scaleMaximums();\n}", "function max(object) {\n//create a variable for max value\n//loop through and look at values. If max value undefined or \n//if value of obj is bigger than max value update max value and return max value.\n//...spread syntax goes through each number and then returns the smallest number.\n// console.log(arrayOfvalues);\n const arrayOfvalues =Object.values(object);\n return Math.max(...arrayOfvalues)\n}", "function SetLayersExtent(obj) {\n\t// Get the bounds for the current layer\n\tvar curLeftB = obj.getDataExtent().left;\n\tvar curRightB = obj.getDataExtent().right;\n\tvar curTopB = obj.getDataExtent().top;\n\tvar curBottomB = obj.getDataExtent().bottom;\n\t\n\t// Set the max bound as the current bound if it's undefined\n\tif (maxLeftB == undefined)\n\t\tmaxLeftB = curLeftB;\n\tif (maxRightB == undefined)\n\t\tmaxRightB = curRightB;\n\tif (maxTopB == undefined)\n\t\tmaxTopB = curTopB;\n\tif (maxBottomB == undefined)\n\t\tmaxBottomB = curBottomB;\n\t\n\t// Change the max bound if the current bound makes the bounding box larger\n\tif (curLeftB < maxLeftB)\n\t\tmaxLeftB = curLeftB;\n\tif (curRightB > maxRightB)\n\t\tmaxRightB = curRightB;\n\tif (curTopB > maxTopB)\n\t\tmaxTopB = curTopB;\n\tif (curBottomB < maxBottomB)\n\t\tmaxBottomB = curBottomB;\t\t\n}", "updateMaxCanvasRegion() {\n this.maxCanvasRegion.width = this.windowWidth;\n this.maxCanvasRegion.height = this.windowHeight;\n if (this.node === document.body)\n return;\n const containerRect = this.node.getBoundingClientRect();\n this.maxCanvasRegion.width = containerRect.width;\n this.maxCanvasRegion.height = containerRect.height;\n }", "updateMaxCanvasRegion() {\n this.maxCanvasRegion.width = this.windowWidth;\n this.maxCanvasRegion.height = this.windowHeight;\n if (this.node === document.body)\n return;\n const containerRect = this.node.getBoundingClientRect();\n this.maxCanvasRegion.width = containerRect.width;\n this.maxCanvasRegion.height = containerRect.height;\n }", "updateMaxCanvasRegion() {\n this.maxCanvasRegion.width = this.windowWidth;\n this.maxCanvasRegion.height = this.windowHeight;\n if (this.node === document.body)\n return;\n const containerRect = this.node.getBoundingClientRect();\n this.maxCanvasRegion.width = containerRect.width;\n this.maxCanvasRegion.height = containerRect.height;\n }", "function resizeLG(object){\n if(object.resizeLG){\n object.resizeLG();\n }\n }", "function maxRestoreWindow () {\n if (!winMax) {\n ipcRenderer.send('win-max')\n winMax = true\n } else {\n ipcRenderer.send('win-restore')\n winMax = false\n }\n}", "function max(obj, compareFn) {\n\t return arrMax(values(obj), compareFn);\n\t }", "function maximize()\n\t{\n\t\tif (_container != null)\n\t\t{\n\t\t\t_container.css({\"overflow\": \"\", \"height\": \"\"});\n\t\t\t_minimized = false;\n\t\t}\n\t}", "function resizeMD(object){\n if(object.resizeMD){\n object.resizeMD();\n }else if(object.resizeLG){\n object.resizeLG();\n }\n }", "function resizeArea(curObj, min, max, limit, limitcnt){\n\t\n\tupdateCharter(curObj,limit,300);\n\t\n\ttextarea = curObj;\n\tif (navigator.userAgent.indexOf(\"SV1\") > 0){ } \n\telse if(navigator.userAgent.indexOf(\"MSIE 7\")>0) { }\n\telse { max = 300; }\n\n\tif (navigator.userAgent.indexOf(\"Chrome/2\") > 0){\n\t\tscrollheight = curObj.scrollHeight - 4;\n\t} \n\telse { scrollheight = curObj.scrollHeight; }\n\n\tif(scrollheight<=min) {\n\t\ttextarea.style.height = min + 'px';\n\t\ttextarea.style.overflowY = \"hidden\";\n\t}else if(scrollheight>max){\n\t\ttextarea.style.height = max + 'px';\n\t\ttextarea.style.overflowY = \"auto\";\n\t}else{\n\t\ttextarea.style.height = scrollheight + 'px';\n\t\ttextarea.style.overflowY = \"hidden\";\n\t}\n}", "function windowsize(){\n$(window).height(); // New height // New width \n$(\"#frame\").css(\"max-width\",$(window).width());\n$(\"#frame\").css(\"height\",$(window).height()-60);\n}", "function maximizeCanvas(gl) {\n \"use strict\";\n gl.canvas.width = document.body.clientWidth;\n gl.canvas.height = document.body.clientHeight;\n gl.viewport(0, 0, gl.canvas.width, gl.canvas.height);\n}", "function findObjKeyWithMaxValue (object) {\n let keyNameWithMax = ''\n let maxVal = -1\n Object.getOwnPropertyNames(object).map(function (eachKey, index) {\n if (object[eachKey] > maxVal) {\n maxVal = object[eachKey]\n keyNameWithMax = eachKey\n }\n })\n return {keyNameWithMax, maxVal}\n}", "resize(windowRect) {}", "function resizeSM(object){\n if(object.resizeSM){\n object.resizeSM();\n }else if(object.resizeMD){\n object.resizeMD();\n }else if(object.resizeLG){\n object.resizeLG();\n }\n }", "function MaximizeDetector( workspace ){\n\tthis._init( workspace );\n}", "maximize(legend_id) { return this.$sciris.maximize(this, legend_id) }", "function resizeTextarea (object) {\n\t\tvar a = object;\n\t\ta.style.height = 'auto';\n\t\ta.style.height = a.scrollHeight+'px';\n\t}", "function resizeThreeJsObject(object, targetRadius) {\n // --------------------------------------------------------------------------->>>\n var biggestSphereRadius = Math.pow(10, -10);\n object.traverse(function (child) {\n if (child instanceof THREE.Mesh) {\n child.geometry.computeBoundingSphere(); // Need to run this, else `child.geometry.boundingSphere.radius` will be undefined\n\n if (!!child.geometry && !!child.geometry.boundingSphere && child.geometry.boundingSphere.radius > biggestSphereRadius) {\n biggestSphereRadius = child.geometry.boundingSphere.radius;\n }\n }\n });\n var s = targetRadius / biggestSphereRadius;\n object.scale.set(s, s, s);\n}", "function resizeMe(obj){ \r\n\t//alert(obj.style.height);\r\n\r\n\t var viewportwidth;\r\n\t var viewportheight;\r\n\t \r\n\t // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight\r\n\t \r\n\t if (typeof window.innerWidth != 'undefined')\r\n\t {\r\n\t viewportwidth = window.innerWidth,\r\n\t viewportheight = window.innerHeight\r\n\t }\r\n\t \r\n\t// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)\r\n\r\n\t else if (typeof document.documentElement != 'undefined'\r\n\t && typeof document.documentElement.clientWidth !=\r\n\t 'undefined' && document.documentElement.clientWidth != 0)\r\n\t {\r\n\t viewportwidth = document.documentElement.clientWidth,\r\n\t viewportheight = document.documentElement.clientHeight\r\n\t }\r\n\t \r\n\t // older versions of IE\r\n\t \r\n\t else\r\n\t {\r\n\t viewportwidth = document.getElementsByTagName('body')[0].clientWidth,\r\n\t viewportheight = document.getElementsByTagName('body')[0].clientHeight\r\n\t }\r\n\t\r\n\t//docHeight = mainContent.document.height || mainContent.document.body.scrollHeight; \r\n\tobj.style.height = viewportheight + 'px';\r\n\t//obj.style.height = '50px';\r\n//\talert(obj.style.height);\r\n}", "function maxSize (x) {\r\n var pref = size(x);\r\n if ( pref === null ) {return null;}\r\n return filter(x) ? filter(x).call(this, {\r\n edge : edge(x), \r\n result : { width : pref.maxWidth, height : pref.maxHeight },\r\n size : { width : width, height : height }\r\n }) : minSize(x);\r\n }", "function setMinMaxResize() {\n opts['resizeMax'] = opts.max.substr(-1) === '%' ? ((win.parseInt(opts['max']) / 100) * opts.containerSize) : win.parseInt(opts['max']);\n opts['resizeMin'] = opts.min.substr(-1) === '%' ? ((win.parseInt(opts['min']) / 100) * opts.containerSize) : win.parseInt(opts['min']);\n\n var diff = parentContainerDiff();\n if (opts['panel-before'].prev().length > 0 && diff > 0) {\n opts.resizeMax += diff;\n opts.resizeMin += diff;\n }\n }", "function handleWindowResize(){\n\t\t//iterate over all windows and adjust their size based on their proportion of the screen\n\t\tvar oldMaxCols = maxCols, oldMaxHeight = maxHeight;\n\t\tcalcMaxSize();\n \t\tboardSetup(maxCols, maxHeight);\n\n \t\tfor(var i = 0; i < tiles.length; i++){\n \t\t\tvar curTile = $('#'+tiles[i]);\n \t\t\tvar layout = layoutFix({\n \t\t\t\ttileName: tiles[i],\n \t\t\t\tx: parseInt(curTile.attr('col')),\n \t\t\t\ty: parseInt(curTile.attr('row')),\n \t\t\t\tsizex: parseInt(curTile.attr('sizex')),\n \t\t\t\tsizey: parseInt(curTile.attr('sizey'))\n \t\t\t})\n \t\t\tcurTile.attr({\n \t\t\t\t'col':layout.y,\n \t\t\t\t'row':layout.x,\n \t\t\t\t'sizex':layout.sizex,\n \t\t\t\t'sizey':layout.sizey\n \t\t\t});\n \t\t\tcurTile.css({\n \t\t\t\t'top':(layout.y - 1)*tileHeight + $('.tile-board').offset().top,\n \t\t\t\t'left':(layout.x - 1)*tileWidth + $('.tile-board').offset().left,\n \t\t\t\t'width':layout.sizex*tileWidth,\n \t\t\t\t'height':layout.sizey*tileHeight\n \t\t\t});\n \t\t\tupdate_board(tiles[i]);\n \t\t}\n \t\t$('.tile-board').height(maxHeight * tileHeight);\n \t\t$('.wrapper').height(maxHeight * tileHeight);\n\t}", "resizeGameWindow() {\n // utworzenie stałych z destrukturyzacji obiektu, tj. wyciągnięcie z window.innerWidth/window.innerHeigth zmiennych bezpośrednio do innerWidth (pod nazwą width) i innerHeigth(pod nazwą height)\n const { innerWidth: width, innerHeight: height } = window;\n const scale = Math.min(width / CANVAS_WIDTH, height / CANVAS_HEIGHT);\n\n //ustawienie aktualnej skali do wartości skali\n document.documentElement.style.setProperty(SCALE_PROPERTY, scale);\n }", "function mediaQueryAdd(object){\n resizableObjects.push(object);\n }", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n // use same temp array apporach with boundary\n var tempBoundary = [];\n for (var i = 0; i < boundary.length; i++) {\n boundary[i].removeFromWorld();\n // get rid of old boundary\n }\n boundary = tempBoundary;\n // then add a new one with recently resized window specs to the now empty array\n boundary.push(new Boundary());\n}", "function resizeRect() {\n changeCursor(\"nw-resize\")\n coordinates = getCanvasMousePosition(canvas, event)\n if(coordinates.x > panels[whichPanel][i].x && coordinates.y > panels[whichPanel][i].y)\n {\n resizeRectangle(canvas, event, i)\n }\n }", "resize(windowRect) {\n }", "function scaleMaximums() {\n maxBubbles = width * height / 2000 + 2;\n}", "function maximizeSelection(options, img) {\n return getRealSize(img).then(function (size) {\n options.data = size;\n return options;\n });\n }", "function windowResize() {\n dbC = getDBC();\n winSize = {x:(dbC[0])? dbC[0]:window.innerWidth, y:(dbC[1])? dbC[1]:window.innerHeight}\n}", "function mediaQueryRemove(object){\n resizableObjects.remove(object);\n }", "function adjustMaxCanvasSize() {\n var windowWidth = window.innerWidth;\n var numFitSm = parseInt(0.8 * windowWidth / state.inputSize, 10); // for smaller screens\n var numFitLg = parseInt(0.65 * windowWidth / state.inputSize, 10); // for large screens\n function update(widthText, heightText, maxWidth, maxHeight) {\n widthText = document.createTextNode(widthText);\n heightText = document.createTextNode(heightText);\n $(\"#width-label\").html(widthText.data);\n $(\"#height-label\").html(heightText.data);\n $(\"#input-width\").attr(\"max\", maxWidth);\n $(\"#input-height\").attr(\"max\", maxHeight);\n }\n if (windowWidth >= 768) {\n update(\n \"Width (max \" + numFitLg + \"): \",\n \"Height (max \" + numFitLg * 2 + \"): \",\n numFitLg,\n numFitLg * 2\n );\n } else {\n update(\n \"Width (max \" + numFitSm + \"): \",\n \"Height (max \" + numFitLg * 2 + \"): \",\n numFitSm,\n numFitSm * 2\n );\n }\n }", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n addModelButton.position(windowWidth - 150, 30);\n}", "function onWindowResize() {\n\tonAggregateResize();\n}", "function MinMaxCloseBtn() {\r\n const closeBtn = document.getElementById('close-btn')\r\n const minBtn = document.getElementById('min-btn')\r\n const resizeBtn = document.getElementById('resize-btn')\r\n\r\n minBtn.addEventListener('click', (event) => {\r\n let window = remote.getCurrentWindow()\r\n window.minimize()\r\n })\r\n\r\n resizeBtn.addEventListener('click', (event) => {\r\n let window = remote.getCurrentWindow()\r\n if(window.isMaximized()) {\r\n window.unmaximize()\r\n } else {\r\n window.maximize()\r\n }\r\n })\r\n\r\n closeBtn.addEventListener('click', (event) => {\r\n let window = remote.getCurrentWindow()\r\n window.close()\r\n })\r\n}", "function windowResized() {\n\n getWrapperWidth();\n resizeCanvas(wrapperWide, wrapperWide);\n\n widthVar = (width - 40) / 100;\n drawArea = (width - 40);\n\n switchBox();\n}", "function resizeToWindow() {\n\tcanvas.width = window.innerWidth;\n\tcanvas.height = window.innerHeight;\n\tvar width = ((i_max - i_min) * canvas.width / canvas.height);\n\tvar r_mid = (r_max + r_min) / 2;\n\tr_min = r_mid - width/2;\n\tr_max = r_mid + width/2;\n\trowData = ctx.createImageData(canvas.width, 1);\n\n\tstartWorkers();\n}", "function onWindowMinimise() { \n console.log('window minimise'); \n win.minimize();\n}", "function max(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n }", "function max(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n }", "function max(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n }", "function max(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n }", "function max(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n }", "function max(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n }", "function max(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n }", "function max(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n }", "function max(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n }", "function windowResized() {\n setup();\n}", "function windowResized() {\n\tlet w = window.innerWidth / 2;\n\tlet h = window.innerWidth / 2 / 475 * 600;\n\tresizeCanvas(w, h);\n\tcnv.position(window.innerWidth / 2, 0, \"absolute\");\n\t// reposition all shapes back in initial position relative to canvas\n\tinit_shapes();\n}", "function resizeWindows(\n/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/\n /**\n * No argument. */\n)\n/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/\n{\n /*\n * Get the window height and width. */\n var winH = $(window).height(),\n winW = $(window).width(),\n jqW, meetW, meetOff;\n /*\n * Set mask height and width to fill the whole screen. */\n $('#mask').css({'width': winW, 'height': winH});\n /*\n * Update resizable windows. */\n $('#boxes .window.resizable').each(function(i, e) {\n $(e).css('top', winH / 2 - $(e).height() / 2);\n $(e).css('left', winW / 2 - $(e).width() / 2);\n });\n /*\n * Update window #meeting. */\n jqW = $('#meeting');\n meetW = jqW.width();\n meetOff = winW / 2 - meetW / 2;\n jqW.css('left', meetOff);\n\n // resize carousel\n if (app.carousel)\n {\n app.carousel.resize();\n }\n resizeZoom();\n return false;\n}", "function resizedw(){\n\t\n}", "function mediaResize(){\n var doc_width = window.innerWidth;\n\n for(var i = 0; i < resizableObjects.length; i++){\n\n before(resizableObjects[i]);\n\n if(doc_width <= xs){\n resizeXS(resizableObjects[i]);\n }else if(doc_width <= sm){\n resizeSM(resizableObjects[i]);\n }else if(doc_width <= md){\n resizeMD(resizableObjects[i]);\n }else{\n resizeLG(resizableObjects[i]);\n }\n\n after(resizableObjects[i]);\n }\n }", "function windowResized() {\r\n canvas_resize();\r\n set_origin();\r\n set_speed();\r\n bars[it].display();\r\n}", "function resize() {}", "function do_resize(){\n WMOD = 50;\n HMOD = 100;\n image_width = get_photo_data(\"photo\",\"width\");\n image_height = get_photo_data(\"photo\",\"height\");\n if(!(!image_width || !image_height)){\n window.resizeTo(image_width+WMOD,image_height+HMOD);\n }\n self.focus();\n }", "function msMax() {\n\t\tlet max1 = msSingle.reduce((a, b) => {\n\t\t\treturn a[1] > b[1] ? a : b;\n\t\t});\n\n\t\treturn parseInt(max1[0]); //function being reduced has 2 key/value pairs in each object. reducing to max in value index 1 then returning value index 0;\n\t}", "function onWindowResize() {\n updateSizes();\n }", "function dialogMinMax() {\n if (maximize) {\n dialog.className += ' minimize';\n dialog_minmax.innerHTML = '+';\n dialog_minmax.title = dialog_title.innerHTML.replace(/<.*?>/g,\"\");\n maximize = false;\n } else {\n dialog.className = dialog.className.replace(/(^| )minimize($| )/g, \"\");\n dialog_minmax.innerHTML = '&ndash;';\n dialog_minmax.title = 'Minimize';\n maximize = true;\n }\n }", "function fit_wallpaper_to_window()\n {\n const window_aspect_ratio = window.innerWidth / window.innerHeight;\n const wallpaper_aspect_ratio = DOM.wallpaper.naturalWidth / DOM.wallpaper.naturalHeight;\n\n if (window_aspect_ratio > wallpaper_aspect_ratio)\n {\n DOM.wallpaper.classList.remove('wide');\n DOM.wallpaper.classList.add('tall');\n }\n else\n {\n DOM.wallpaper.classList.remove('tall');\n DOM.wallpaper.classList.add('wide');\n }\n }", "function windowResized() {\n resizeCanvas(canvasX, canvasY);\n}", "function windowResized(){\n canvas.resize(windowWidth, windowHeight - canvasadjust);\n}", "function _sh_unmaximized(){\n\tif( in_overview ) paused_preserve = false;\n\telse resume();\n}", "function sizeCanvas($obj) {\n CW = $obj.width();\n CH = $obj.height();\n CScale = CW / scaleFactor;\n canvas.width = CW;\n canvas.height = CH;\n}", "function windowResized () {\n resizeCanvas(windowWidth, windowHeight);\n resize=1;\n}", "function windowResized () {\n\tresizeCanvas(windowWidth, windowHeight);\n }", "function windowResized() {\n\tlet container = document.getElementById(containerID);\n\tif (!container) {\n\t\treturn;\n\t}\n\tresizeCanvas(Math.floor(container.clientWidth), Math.floor(container.clientHeight));\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight - 50);\n}", "function windowResized() {\n widthElement = document.getElementById('game-holder').getBoundingClientRect().width;\n resizeCanvas(widthElement, widthElement);\n}", "function windowResized(){\n resizeCanvas($(\"#recordBox\").width(), $(\"#recordBox\").height());\n\n w = $(\"#recordBox\").width();\n h = $(\"#recordBox\").height();\n}", "function windowResized() {\n repositionCanvas();\n}", "function sizeChanged() {\n for (var id in windowObjects) {\n windowObjects[id].sizeChanged();\n }\n //alert(\"resize\");\n }", "maxOrMinimize() {\n const { isEditorMaxed, maxingEditor, miningEditor, transitioning } = this.props;\n if (transitioning) return;\n\n sounds.playBeep();\n if (isEditorMaxed ) {\n miningEditor();\n }\n else maxingEditor();\n }", "static maximize(icon) {\n\t\t//Validate\n\t\tif(!icon) { return; }\n\t\t//Hide the icon\n\t\ticon.style.display = \"none\";\n\t\t//Get the card\n\t\tvar card = CardManager.getCard(icon.getAttribute(\"cardname\"));\n\t\t//Move the card to the last slot in the box because that's fair\n\t\tCardManager.placeCard(card);\n\t\t//Set the attribute\n\t\tcard.setAttribute(\"cardvisible\",\"true\");\n\t\t//Save the card state\n\t\tCardManager.saveState();\n\t\t//Get the number of cards\n\t\tvar cardcount = CardManager.getCardsByNumber().length;\n\t\t//Set the card number\n\t\tcard.setAttribute(\"number\",cardcount+1);\n\t}", "function minimize_textarea(obj_id)\r\n{\r\n\tif ('228px' == $('#'+obj_id).css('height'))\r\n\t\t$('#'+obj_id).animate({height:'40px'});\r\n}", "function windowResized() {\n resizeCanvas(width, height);\n}", "setmaxFrondSize (maxFrondSize) {\n this.maxFrondSize = maxFrondSize\n }", "function resizeWindow() {\n window.setTimeout(function() {\n chrome.tabs.getCurrent(function (tab) {\n var newHeight = Math.min(document.body.offsetHeight + 140, 700);\n chrome.windows.update(tab.windowId, {\n height: newHeight,\n width: 520\n });\n });\n }, 150);\n}", "set maxWidth(value) {}", "function heightsizeeneuf($obj){\n \tvar height = $obj.parent().width() / 1.77;\n\n \t$obj.height(height);\n }", "maximize() {\n const that = this;\n\n if (!that._minimized) {\n return;\n }\n\n that._positionDetection.removeOverlay();\n that._minimized = false;\n\n if (that._minimizedDropDownOpened) {\n that.$hamburgerIcon.removeClass('jqx-close-button');\n that._minimizedDropDownOpened = false;\n }\n\n if (that.dropDownAppendTo !== null) {\n that._appendMinimizedContainerToMenu(that.$.view, null);\n }\n\n that.$view.removeClass('jqx-visibility-hidden');\n that.$view.removeClass('jqx-list-menu-view-minimized');\n that.$hamburgerIcon.addClass('jqx-hidden');\n\n that.removeAttribute('minimized');\n\n if (that.enableShadowDOM) {\n that.$.view.id = that.$.view.getAttribute('jqx-id');\n\n const templateElements = that.$.view.querySelectorAll('[jqx-id]');\n\n for (let i = 0; i < templateElements.length; i++) {\n templateElements[i].id = templateElements[i].getAttribute('jqx-id');\n }\n }\n\n that.$.mainContainer.scrollTop = 0;\n that._checkOverflow();\n }", "function windowResized() {\n\tresizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n\tresizeCanvas(windowWidth, windowHeight);\n}", "maximizeNodeflow($event) {\n\t\t\tthis.el.find('.closeSpan').remove();\n\t\t\tlet container = this.el.find('.workflow-draw-box')[0];\n\t\t\tcontainer.style.transform = 'scale(1)';\n\t\t\tthis.nodeflowSize = 1;\n\t\t\tlet e = document.documentElement, g = document.getElementsByTagName('body')[0],\n\t\t\t\tw = window.innerWidth || e.clientWidth || g.clientWidth,\n\t\t\t\th = window.innerHeight || e.clientHeight || g.clientHeight;\n\t\t\tcontainer.style.position = \"fixed\";\n\t\t\tcontainer.style.top = \"0\";\n\t\t\tcontainer.style.left = \"0\";\n\t\t\tcontainer.style.right = \"0\";\n\t\t\tcontainer.style.bottom = \"0\";\n\t\t\tcontainer.style.backgroundColor = \"#fff\";\n\t\t\tcontainer.style.width = w + 'px';\n\t\t\tcontainer.style.height = h + 'px';\n\t\t\tcontainer.style.marginTop = 0;\n\t\t\tcontainer.style.margin = 0;\n\t\t\tcontainer.style.zIndex = '111';\n\t\t\tcontainer.style.overflow = 'auto';\n\t\t\tlet ocloseSpan = document.createElement('span');\n\t\t\tocloseSpan.className = 'closeSpan';\n\t\t\tocloseSpan.style['float'] = 'right';\n\t\t\tocloseSpan.style.cursor = 'pointer';\n\t\t\tocloseSpan.style.fontSize = '30px';\n\t\t\tocloseSpan.style.border = '1px solid #ddd';\n\t\t\tocloseSpan.innerHTML = '&nbsp;×&nbsp;';\n\t\t\tocloseSpan.addEventListener('click', (event) => {\n\t\t\t\tcontainer.style.height = this.data.containerheight;\n\t\t\t\tcontainer.style.width = this.data.containerwidth;\n\t\t\t\tcontainer.style.position = \"relative\";\n\t\t\t\tcontainer.style.zIndex = '0';\n\t\t\t\tcontainer.style.overflow = 'visible';\n\t\t\t\tocloseSpan.style.display = 'none';\n\t\t\t});\n\t\t\tcontainer.appendChild(ocloseSpan);\n\t\t}", "function windowResized() {\n b=0;\n plasticIf();\n c=(800+b);\n console.log(c, \"windowresized\");\n resizeCanvas(1200, c);\n}", "function dialogMinMax() {\n\t\t\tif (maximize) {\n\t\t\t\tdialog.className += ' minimize';\n\t\t\t\tdialog_minmax.innerHTML = '+';\n\t\t\t\tdialog_minmax.title = dialog_title.innerHTML.replace(/<.*?>/g,\"\");\n\t\t\t\tmaximize = false;\n\t\t\t} else {\n\t\t\t\tdialog.className = dialog.className.replace(/(^| )minimize($| )/g, \"\");\n\t\t\t\tdialog_minmax.innerHTML = '&ndash;';\n\t\t\t\tdialog_minmax.title = 'Minimize';\n\t\t\t\tmaximize = true;\n\t\t\t}\n\t\t}", "function windowResized() {\n resizeCanvas(canvasWidth, canvasHeight);\n}", "calcMaxLength () {\n let maxima = [0.0, 0.0, 0.0]\n let minima = [0.0, 0.0, 0.0]\n let spans = [0.0, 0.0, 0.0]\n\n function comp (v, i) {\n if (i === 0) return v.x\n if (i === 1) return v.y\n if (i === 2) return v.z\n }\n\n let atom = this.getAtomProxy()\n for (let iDim = 0; iDim < 3; iDim++) {\n for (let iAtom = 0; iAtom < this.getAtomCount(); iAtom += 1) {\n let pos = atom.load(iAtom).pos\n if (minima[iDim] > comp(pos, iDim)) {\n minima[iDim] = comp(pos, iDim)\n }\n if (maxima[iDim] < comp(pos, iDim)) {\n maxima[iDim] = comp(pos, iDim)\n }\n }\n spans[iDim] = maxima[iDim] - minima[iDim]\n }\n this.maxLength = Math.max(spans[0], spans[1], spans[2])\n }", "function windowResized () {\n resizeCanvas(windowWidth, windowHeight);\n}", "function setSize()\n {\n //styler.styleImageMaxSize(vm.element, vm.moverStyle);\n vm.moverStyle.width = hasWidth = vm.themeStyle.width || vm.themeStyle['max-width'];\n vm.moverStyle.height = hasHeight = vm.themeStyle.height || vm.themeStyle['max-height'];\n setBorder();\n }", "function createWindow(object){\r\n\tvar Height = 400, Width\t= 550, Position\t=\t'center', Bindings\t=\tfunction(){}, Heading\t= \"Venera Technologies\";\r\n\tif(IsValueNull(object.id))\r\n\t\treturn false;\r\n\telse{\r\n\t\tif(!IsValueNull(object.Heading))\r\n\t\t\tHeading\t=\tobject.Heading;\r\n\t\tif(object.ok != \"\")\r\n\t\t\tvar okbuttonID = object.ok;\r\n\t\tif(object.cancel != \"\")\r\n\t\t\tvar cancelbuttonID = object.cancel;\r\n\t\tif(!IsValueNull(object.WindowHeight))\r\n\t\t\tHeight\t=\tobject.WindowHeight;\r\n\t\tif(!IsValueNull(object.WindowWidth))\r\n\t\t\tWidth\t=\tobject.WindowWidth;\r\n\t\t\t\r\n\t\tvar ContentDiv\t= $(object.id).wrap('<div class=\"windowContentDiv\">').parent('div');\r\n\t\tvar HeaderDiv\t= $(ContentDiv).before('<div class=\"windowHeaderDiv\">'+Heading+'</div>').prev('div');\r\n\t\tvar OuterDiv\t= $('<div>');\r\n\t\t$(OuterDiv).append(HeaderDiv);\r\n\t\t$(OuterDiv).append(ContentDiv);\r\n\t\t\r\n\t\tif(!IsValueNull(object.Height))\r\n\t\t\tHeight\t\t=\tobject.Height;\r\n\t\tif(!IsValueNull(object.Width))\r\n\t\t\tWidth\t\t=\tobject.Width;\r\n\t\tif(!IsValueNull(object.Position))\r\n\t\t\tPosition\t=\tobject.Position;\r\n\t\tif(!IsValueNull(object.Bindings))\r\n\t\t\tBindings\t=\tobject.Bindings;\r\n\t\t\t\r\n\t\t$(OuterDiv).jqxWindow({\r\n\t\t height: Height,\r\n\t\t width: Width,\r\n\t\t theme: JQXTHEME,\r\n\t\t position: Position,\r\n\t\t autoOpen: false,\r\n\t\t isModal: true,\r\n\t\t modalOpacity:0.1,\r\n\t\t initContent : Bindings,\r\n\t\t resizable: false,\r\n\t\t draggable: false,\r\n\t\t okButton: $('#'+okbuttonID)\r\n\t\t});\r\n\t var cancelButton\t=\t'#'+cancelbuttonID;\r\n\t\t$(OuterDiv).jqxWindow('open');\r\n\t\t$(cancelButton).on('click', function (event) { \r\n\t\t\t$(OuterDiv).jqxWindow('close');\r\n\t\t}); \r\n/*\t\t$(OuterDiv).on('close', function (event) { \r\n\t\t\trefreshdata(object.tab); \r\n\t\t});\r\n*/\t}\r\n}", "getMaxWidth(){return this.__maxWidth}", "function windowScaled(frame) {\n var iframe = frame.firstChild;\n\n // Set displayedApp to the new value\n displayedApp = iframe.dataset.frameOrigin;\n\n var app = runningApps[displayedApp];\n\n app.addClearRotateTransition();\n // Set orientation for the new app\n setOrientationForApp(displayedApp);\n\n }", "function winResize() {\n window.addEventListener(\"resize\", debounce(function() {\n }, 500));\n }" ]
[ "0.59619653", "0.58762854", "0.58754814", "0.58564436", "0.5752497", "0.5654529", "0.56461996", "0.5621655", "0.5621655", "0.5621655", "0.5620569", "0.55897766", "0.55318266", "0.550819", "0.54425085", "0.54362637", "0.5400215", "0.539367", "0.5359999", "0.5345955", "0.53375524", "0.53328145", "0.5317352", "0.5304927", "0.52934164", "0.52850974", "0.52651703", "0.5262925", "0.5259257", "0.5239616", "0.5213883", "0.52108306", "0.5192917", "0.51832587", "0.5176738", "0.51592714", "0.51473045", "0.51333994", "0.51312506", "0.51220703", "0.51180655", "0.51132625", "0.50778985", "0.50503457", "0.50380445", "0.5035458", "0.5035458", "0.5035458", "0.5035458", "0.5035458", "0.5035458", "0.5035458", "0.5035458", "0.5035458", "0.50209", "0.50205475", "0.50069946", "0.5005793", "0.5004761", "0.5001156", "0.49919948", "0.4980098", "0.49735558", "0.49675533", "0.49594712", "0.49586594", "0.49534217", "0.49518293", "0.49514532", "0.49487752", "0.49447387", "0.49339682", "0.49271977", "0.4907405", "0.48992637", "0.48976347", "0.48837602", "0.4883622", "0.4882906", "0.48764274", "0.4868933", "0.4868294", "0.4865799", "0.48655775", "0.48628822", "0.48584473", "0.4855961", "0.48448062", "0.48448062", "0.48418593", "0.48404056", "0.48383868", "0.4838024", "0.48367622", "0.48317975", "0.48293164", "0.48287797", "0.48173916", "0.48171443", "0.48166496" ]
0.6621788
0
Builds full file path.
function NavMakeFileName(/**string*/ root, /**string*/ baseName, /**string*/ number, /**string*/ extension) { return root + "\\" + baseName + number + "." + extension; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static FilePath(file) {\n\t\tfile = file.charAt(0) == \"/\" ? file.substr(1) : file;\n\t\t\n\t\tvar path = [Net.AppPath(), file];\n\t\t\t\t\n\t\treturn path.join(\"/\");\n\t}", "function fullyQualifiedPath(filename) {\n\treturn path.join(OTRTALK_ROOT, filename);\n}", "get fullPath() {\n return path.join(this.assembly.directory, this.directoryName);\n }", "build() {\n var _a;\n const pathParts = [];\n if (this.timeframe != null) {\n pathParts.push(timeframeToString(this.timeframe));\n }\n if (((_a = this.format) === null || _a === void 0 ? void 0 : _a.monotype) != null) {\n pathParts.push(\"monotype\" /* MONOTYPE */);\n }\n if (this.subPath != null) {\n pathParts.push(this.subPath);\n }\n if (this.format != null) {\n let fileName = formatToString(this.format);\n if (this.fileType != null) {\n fileName += \".\" + this.fileType;\n }\n pathParts.push(fileName);\n }\n const path = pathParts.join(\"/\");\n return new URL(path, this.baseUrl);\n }", "function generatePath(file_id) {\n return path.join(base, file_id);\n}", "formAbsolutePath (filename) {\n if (path.isAbsolute(filename)) {\n return filename\n }\n\n return path.join(process.cwd(), '..', '..', filename)\n }", "function pathJoin( dirname, filename ) { return dirname + '/' + filename }", "function genPath(root, fname) {\n let bname = pathFn.basename(fname);\n let ext = pathFn.extname(bname).toLowerCase();\n let outDir = extToType[ext] || 'res';\n\n return pathFn.join(root, outDir, bname);\n}", "get fullpath()\t{ return \"\" + this.prefix + this.path }", "buildPath(path = '') {\n if (path.indexOf('http') === 0) {\n return path;\n }\n\n return this.baseUrl + path;\n }", "get templateFullPath() {\n return path.join(this.assembly.directory, this.templateFile);\n }", "fullpath() {\n if (this.#fullpath !== undefined) {\n return this.#fullpath;\n }\n const name = this.name;\n const p = this.parent;\n if (!p) {\n return (this.#fullpath = this.name);\n }\n const pv = p.fullpath();\n const fp = pv + (!p.parent ? '' : this.sep) + name;\n return (this.#fullpath = fp);\n }", "function getFilePath(file) {\r\n var path = file;\r\n path = path.match(/(.*)[\\/\\\\]/)[1] || ''; // extract the directory from the path\r\n path += '/';\r\n return path;\r\n }", "_buildFilePath(filename){\n\t\t/*\n\t\tBuilds the file path for where the key/store JSON file is stored.\n\t\t@param {string} filename: The name of the file.\n\t\t@return {string} The full path of the key/store file.\n\t\t*/\n\t\tvar dirPath = process.env.KEY_STORE_PATH;\n\t\tif (!dirPath){\n\t\t\tthrow new Error(\"Set the KEY_STORE_PATH environment variable.\");\n\t\t}\n\t\treturn path.join(dirPath, filename);\n\t}", "_fullPath(relativePath) {\n return (0, path_1.join)(this.$root, (0, path_1.join)(path_1.sep, relativePath));\n }", "function makeFilePath(filename) {\n return Rho.RhoFile.join(Rho.Application.modelFolderPath('Printing'), Rho.RhoFile.join('PrinterFiles', filename));\n }", "formArtifactPathFromFullyQualifiedName(fullyQualifiedName) {\n const { sourceName, contractName } = (0, contract_names_1.parseFullyQualifiedName)(fullyQualifiedName);\n return path.join(this._artifactsPath, sourceName, `${contractName}.json`);\n }", "function formatPathname(urlobj)\n{\n\tvar pathname = joinDirs(urlobj.extra.directory, urlobj.extra.directoryLeadingSlash);\n\t\n\tif (urlobj.extra.filename !== null)\n\t{\n\t\tpathname += urlobj.extra.filename;\n\t}\n\t\n\treturn pathname;\n}", "function findFullPath( filename )\n{\n // determine the full path from the advDir\n // expected that all links are directories below the rootDir\n let fullFileName = filename;\n let firstDirMatch = filename.match( /^[^\\/]+/ );\n if ( firstDirMatch && firstDirMatch.length > 0 ) {\n let path = advDir.split( firstDirMatch[0] )[0];\n fullFileName = `${path}${filename}`;\n }\n return fullFileName;\n}", "async function getActualPath(fileID) {\n var file = await getFile(fileID);\n var user = await db.readDataPromise('user', { id: file.owner });\n var username = user[0].username;\n var homePath = `${__dirname}/../UserFiles/${username}/`;\n var filePath = file.name;\n\n if (file.isFolder) {\n return join(homePath);\n } else {\n return join(homePath + filePath);\n }\n\n}", "function GeneratePath()\n{\n\n\n\n}", "function getPdfPath() {\n let buildPathPdf = path.resolve(`./${username}.pdf`);\n //Remove the .pdf extension using slice()\n buildPathPdf = buildPathPdf.slice(0,-4);\n var count = 1;\n while(fs.existsSync(buildPathPdf + \".pdf\")) {\n if(count == 1)\n buildPathPdf += `_${count}`;\n else if(count < 10) {\n buildPathPdf = buildPathPdf.slice(0,-2);\n buildPathPdf += `_${count}`;\n }\n else if(count > 9) {\n buildPathPdf = buildPathPdf.slice(0,-3);\n buildPathPdf += `_${count}`;\n }\n count++;\n }\n buildPathPdf += \".pdf\";\n return buildPathPdf;\n }", "function fullpath (pathname) {\n\n return join(_cwd, _root, pathname);\n }", "function fullpath (pathname) {\n\n return join(_cwd, _root, pathname);\n }", "function makePath(var_args){\n\t var result = join(slice(arguments), '/');\n\t // need to disconsider duplicate '/' after protocol (eg: 'http://')\n\t return result.replace(/([^:\\/]|^)\\/{2,}/g, '$1/');\n\t }", "_getArtifactPathFromFullyQualifiedName(fullyQualifiedName) {\n const { sourceName, contractName } = (0, contract_names_1.parseFullyQualifiedName)(fullyQualifiedName);\n return path.join(this._artifactsPath, sourceName, `${contractName}.json`);\n }", "buildURL(){\n var url = this._super(...arguments);\n if (url.lastIndexOf('/') !== url.length - 1) {\n url += '/';\n }\n return url;\n }", "function relativeFilename(file)\r\n{\r\n\tif(file == \"./\") return file;\r\n\t\r\n\treturn file.substr(shell.CurrentDirectory.length+1);\r\n}", "function makePath(var_args){\n var result = join(slice(arguments), '/');\n // need to disconsider duplicate '/' after protocol (eg: 'http://')\n return result.replace(/([^:\\/]|^)\\/{2,}/g, '$1/');\n }", "function makePath(var_args){\n var result = join(slice(arguments), '/');\n // need to disconsider duplicate '/' after protocol (eg: 'http://')\n return result.replace(/([^:\\/]|^)\\/{2,}/g, '$1/');\n }", "function getNewFilePath() {\n //choose a name\n var fileName = getCurrentDateTime() + \".txt\";\n \n if (!folderLocation) {\n folderLocation = os.tmpdir();\n folderLocation = path.join(folderLocation, 'vslogcat');\n }\n\n var filePath = path.join(folderLocation, fileName);\n console.log(\"File path is \" + filePath);\n return filePath;\n\n}", "function _newPath(p){\n return path.join(dcat.root, path.relative(rootTargz, p));\n }", "get path() {\n return this.constructor.buildPath(\n this._org,\n this._type,\n this._name,\n this._version,\n this._extra,\n );\n }", "function getRealPath(filePath) {\n return cwd ? path.join(cwd, filePath) : filePath;\n }", "function get_file (file){\n return path.resolve(temp_dir + '/' + file);\n }", "function join() {\n var result = path.join.apply(this, arguments);\n return path.normalize(result);\n}", "function filename() {\r\n var rutaAbsoluta = self.location.href;\r\n var posicionUltimaBarra = rutaAbsoluta.lastIndexOf(\"/\");\r\n var rutaRelativa = rutaAbsoluta.substring(posicionUltimaBarra + \"/\".length, rutaAbsoluta.length);\r\n return rutaRelativa;\r\n}", "get pathname()\t{ return \"\" + this.path + this.file}", "function genetatePath(path) {\n if (!path) path = [];\n try {\n return pathConverter.join(directory + '/' + path.join('/'));\n } catch (error) {\n console.log(error);\n return '';\n }\n}", "get pathname() {\n return this.constructor.buildPathname(\n this._org,\n this._type,\n this._name,\n this._version,\n this._extra,\n );\n }", "fullpathPosix() {\n if (this.#fullpathPosix !== undefined)\n return this.#fullpathPosix;\n if (this.sep === '/')\n return (this.#fullpathPosix = this.fullpath());\n if (!this.parent) {\n const p = this.fullpath().replace(/\\\\/g, '/');\n if (/^[a-z]:\\//i.test(p)) {\n return (this.#fullpathPosix = `//?/${p}`);\n }\n else {\n return (this.#fullpathPosix = p);\n }\n }\n const p = this.parent;\n const pfpp = p.fullpathPosix();\n const fpp = pfpp + (!pfpp || !p.parent ? '' : '/') + this.name;\n return (this.#fullpathPosix = fpp);\n }", "function getBuildPath() {\r\n return config.build.path;\r\n}", "path (fileName, { title, published, meta = {} }) {\n if (meta.slug) {\n return meta.slug\n }\n\n const slug = slugify(title || fileName)\n const date = published.toString().split(/\\s+/).slice(1, 4).reverse()\n return `${date[0]}/${date[2].toLowerCase()}/${date[1]}/${slug}/`\n }", "getAbsoluteDataPath(path = \"\") {\r\n // Get the path from the root to the indicated file\r\n return path_1.default.join(process.cwd(), this.dataPath, path);\r\n }", "function makePath() {\n var path = [''];\n for (var i=0,l=arguments.length,arg,argType; i<l; i++) {\n arg = arguments[i];\n argType = typeof arg;\n if (argType === 'string' || (argType === 'number' && !isNaN(arg))) {\n arg = String(arg);\n if (arg.length) path.push(arg.replace(/^\\/|\\/$/g, ''));\n }\n }\n return path.join('/').replace(/\\/$/, '');\n}", "function path() {\n return new Path(join.apply(null, arguments));\n}", "toPathString(path) {\n if (path.length === 0) {\n return '';\n }\n else {\n return `${this.separator}${path.join(this.separator)}`;\n }\n }", "function getPathByFile(file){\r\n\t\t\r\n\t\tvar path = g_activePath;\r\n\t\t\r\n\t\tif(file == \"..\"){\t\t//get parent path\r\n\t\t\tpath = getParentFolder(path);\r\n\t\t}else{\r\n\t\t\tvar isWinSlash = (path.indexOf(\"\\\\\") !== -1);\r\n\t\t\tif(isWinSlash == true)\r\n\t\t\t\tpath = path + \"\\\\\" + file;\r\n\t\t\telse\r\n\t\t\t\tpath = path + \"/\" + file;\r\n\t\t}\r\n\t\t\r\n\t\tpath = path.replace(\"//\",\"/\");\r\n\t\tpath = path.replace(\"\\\\\\\\\",\"\\\\\");\r\n\t\t\r\n\t\treturn(path);\r\n\t}", "function buildAssetPath(imgSrc) {\n return `./dist/${imgSrc}`;\n}", "get pathname() {\n return this.constructor.buildPathname(\n this._org,\n this._type,\n this._name,\n this._version,\n );\n }", "function build_path(path) {\r\n var paths = config.dir['base'] + \",\" + (config.dir[program.architec] || '') + ',' + (config.custum_dir.tpl[program.template] || '') + ',' + (config.custum_dir.css[program.css] || 'less');\r\n return paths.replace(/,+/g, ',').split(',');\r\n}", "function generatePath(path,params){if(path===void 0){path=\"/\";}if(params===void 0){params={};}return path===\"/\"?path:compilePath(path)(params,{pretty:true});}", "function deriveAbsolutePathFromContext(from, context) {\n // Drop the trailing slash, require.context should always be matched against a folder\n // and we want to normalize the folder name as much as possible to prevent duplicates.\n // This also makes the files show up in the correct location when debugging in Chrome.\n const filePath = from.endsWith(_path.default.sep) ? from.slice(0, -1) : from;\n return (\n filePath +\n \"?ctx=\" +\n toHash(\n [\n context.mode,\n context.recursive ? \"recursive\" : \"\",\n new RegExp(context.filter.pattern, context.filter.flags).toString(),\n ]\n .filter(Boolean)\n .join(\" \")\n )\n );\n}", "function getFileBasePath(fullPath, withLeadingSlash) {\n var result = fullPath.slice(0, fullPath.lastIndexOf('/'));\n\tif ((!withLeadingSlash) && (result.indexOf('/') == 0)) {\n\t\tresult = result.slice(1);\n\t}\n\treturn result;\n }", "get sourceBookFullPath() {\n return path.normalize(path.join(this.configDirPath, this.bookroot ? this.bookroot : \"\"));\n }", "static getFullPath() {\n return this.baseUrl() + this.apiRoute() + '/' + this.route() + '/'\n }", "function pathBuilder(startTime, sourceId) {\n\treturn path.join(sourceId, getCurrentDate(startTime), nameBuilder(startTime, sourceId));\n}", "function makePath(relativePath) {\n return path.join(path.dirname(import.meta.url.replace('file:', '')), relativePath)\n}", "function makeFilename(project_id){\n var date = dateFormat(Date.now(), \"isoDateTime\");\n return \"ResearchPortal_SponsoredProject_\" + (project_id || \"report\") + \".\" + date + \".xlsx\";\n }", "function toFilePath(pathArray){\n\tif (typeof(pathArray) === 'string') return pathArray;\n\tvar expanded = '';\n\tfor(var i=0; i < pathArray.length; i++){\n\t\texpanded = OS.Path.join(pathArray, dirName[i]);\n\t}\n\treturn expanded;\n}", "function pathtourl (path) {\n\t\t\t\treturn (pagetable.opmlLink + path + appPrefs.cmsFileSuffix);\n\t\t\t\t}", "function resolveFile (file) {\n return path.join(APP_ROOT, file)\n}", "static getWriteOutPath(dirAndFilename) {\n const writeOutPath = Page_1.default.writeOutDir + `/` + dirAndFilename[0] + dirAndFilename[1];\n return writeOutPath;\n }", "function GetNormalizedPath() {\n}", "getPath (opts) {\n return BaseFS.getWorkingDir(opts) + this.getFolderName() + path.sep;\n }", "function relPath() {\n return '.' + path.sep + path.join.apply(null, arguments);\n}", "function FilePath() {\n\n}", "function absolutePath( inputPath ){\n return /^\\//.test(inputPath) ? inputPath : path.join(process.cwd(), inputPath)\n}", "toUrlPath() {\r\n return this.urlPath + this._stringifyAux() +\r\n (isPresent(this.child) ? this.child._toNonRootUrl() : '');\r\n }", "filePath({ dir, name }) {\n return join(dir, `${name}.json`)\n }", "function getFilename() {\n var dt = new Date();\n toString()\n \n return 'oya' + dt.getTime().toString().substr(-8) + '.ino';\n}", "static makeRelative(basePath, fullPath) {\n return fullPath.replace(Path.wrapDirectoryPath(basePath), \"\");\n }", "function buildModulePath(file, moduleName) {\n const name = normalizeModuleFilename(trimStringChars(moduleName));\n return path.resolve(path.dirname(file), name);\n}", "function _makeFsPath(uri) {\n var value;\n if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {\n // unc path: file://shares/c$/far/boo\n value = \"//\" + uri.authority + uri.path;\n }\n else if (uri.path.charCodeAt(0) === 47 /* Slash */\n && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)\n && uri.path.charCodeAt(2) === 58 /* Colon */) {\n // windows drive letter: file:///c:/far/boo\n value = uri.path[1].toLowerCase() + uri.path.substr(2);\n }\n else {\n // other path\n value = uri.path;\n }\n if (isWindows) {\n value = value.replace(/\\//g, '\\\\');\n }\n return value;\n}", "getProperPath(a_src) {\n\t\tif (!Utils.IsAbsolutePath(a_src)) {\n\t\t\treturn this.path;\n\t\t} else return \"\";\n\t}", "function absPath(filepath) {\n return filepath.match(/^[\\/~]/) ? filepath : require('path').join(process.cwd(), filepath);\n}", "function getFilePath(option, path) {\n var fileName = getFileName(path);\n\n return p.join(shell.pwd().stdout, path, fileName + '.' + option.suffix + '.' + option.ext);\n}", "function getAbsolutePath(relative) {\n\treturn getBaseURL() + relative\n}", "getFile(){\n\t\tif(!this.settings.outputFile)return false;\n if(this.settings.singleFile)return this.settings.singleFile;\n if(this.settings.folder){\n\t\t\tvar date = new Date();\n\t\t\tif(!fs.existsSync(this.settings.folder))fs.mkdirSync(this.settings.folder);\n var filePath = path.join(this.settings.folder, [\n date.getFullYear(), \n date.getMonth()+1, \n date.getDate()\n ].join('-') + '.log');\n try{\n fs.readFileSync(filePath);\n }catch(e){\n fs.writeFileSync(filePath, \"\");\n }\n return filePath;\n }else{\n return false;\n }\n }", "function whistle_short_path($p) {\n return strcat(substr($p,9,1),\n ydtosdf(substr($p,0,8),3),\n numtosxg(substr($p,10,3)));\n}", "function fileName (dir, file) {\n return baseDir() + dir + '/' + file + '.json'\n}", "static getFilename(path) {\n let index = Math.max(path.lastIndexOf(\"/\"), path.lastIndexOf(\"\\\\\"));\n return path.substring((index >= 0 && index < path.length - 1 ? index + 1 : 0), path.length);\n }", "static join() {\n // Split the inputs into a list of path commands.\n var parts = [];\n for (var i = 0, l = arguments.length; i < l; i++) {\n parts = parts.concat(arguments[i].split('/'));\n }\n // Interpret the path commands to get the new resolved path.\n var newParts = [];\n for (i = 0, l = parts.length; i < l; i++) {\n var part = parts[i];\n // Remove leading and trailing slashes\n // Also remove '.' segments\n if (!part || part === '.') {\n continue;\n }\n // Interpret '..' to pop the last segment\n if (part === '..') {\n newParts.pop();\n }\n // Push new path segments.\n else {\n newParts.push(part);\n }\n }\n // Preserve the initial slash if there was one.\n if (parts[0] === '') {\n newParts.unshift('');\n }\n // Turn back into a single string path.\n return newParts.join('/') || (newParts.length ? '/' : '.');\n }", "function getAbsolutePath(prefix, path) {\n return join(prefix, path);\n}", "function getRelativeFileName(filename, relTo) {\n if (filename.startsWith(relTo + path.sep)) {\n return filename.slice(relTo.length + 1);\n } else {\n return filename;\n }\n}", "get pathBuild() {\n\t\treturn this._options['pathBuild'];\n\t}", "function file_GetDailyBuildFolderName()\n{\n\tvar strDir = \"FW_\";\n\n\tvar today = new Date();\n\tvar month = today.getMonth() + 1;\n\tvar day = today.getDate();\n\n\t//FW_%4d-%02d-%02d\n\tstrDir += today.getFullYear();\n\tif (month < 10)\n\t{\n\t\tstrDir += \"-0\" + month;\n\t}\n\telse\n\t{\n\t\tstrDir += \"-\" + month;\n\t}\n\tif (day < 10)\n\t{\n\t\tstrDir += \"-0\" + day;\n\t}\n\telse\n\t{\n\t\tstrDir += \"-\" + day;\n\t}\n\treturn(strDir);\n}", "function getNewFilePath(newPackageName) {\n return newPackageName.split('.').join('/'); \n}", "static encodePath(filePath) {\n filePath = filePath.replace(/\\\\/g, \"/\");\n const encodePathConfig = this.getConfig().encodePath;\n if (encodePathConfig == \"encodeURI\") {\n filePath = encodeURI(filePath);\n }\n else if (encodePathConfig == \"encodeSpaceOnly\") {\n filePath = filePath.replace(/ /g, \"%20\");\n }\n return filePath;\n }", "function _fixFilePath( file )\n{\n\tif( file.indexOf(\"/Sys/\")==0 ) {\n\t\tif( _isWebView ) file = \"file:///android_asset\" + file.replace(\"/Sys/\",\"/\"); \n\t\telse if( !_isGles ) file = file.substring(1);\n\t}\n\treturn file;\n}", "get __generateRequestURL() {\n const {\n folderName,\n name\n } = this.fsProcessor.file;\n\n return String(`${this.resource}/_api/web/GetFolderByServerRelativeUrl('${folderName}')/Files('${name}')/$value`);\n }", "buildPathFromArray(pathArray, subFolder) {\n return pathArray.join(\"/\") + \"/\";\n }", "function normalizeFilePath (x) {\n if (!x || typeof x !== 'string') {\n throw new TypeError(`Invalid file path ${x}`)\n }\n return x.charAt(0) === '/' ? x : path.join(__dirname, '../..', x)\n}", "resolveAsPath() { }", "get path() {\n return this.constructor.buildPath(\n this._org,\n this._type,\n this._name,\n this._alias,\n );\n }", "function correctPath (filePath) {\n if (!filePath) {\n return\n }\n filePath = filePath.replace(/\\\\/g, '/')\n if (path.isAbsolute(filePath)) {\n return filePath\n }\n return path.join(process.cwd(), filePath)\n}", "_createLogFilepath(spawnInfo) {\n const spawnConfig = spawnInfo.config;\n const renderLocationCode = spawnConfig.renderingLocation === SpawnerTypes_1.RenderingLocation.Client ? \"csr\" : \"ssr\";\n const now = new Date();\n // Filename format: comm_scserver_<ssr|csr>_YYYY_MM_DD_HH_MM_SS_<id>.log\n const filename = `\\\ncomm_scserver_${renderLocationCode}_\\\n${now.getFullYear()}_\\\n${kTwoDigitFormatter.format(now.getMonth() + 1)}_\\\n${kTwoDigitFormatter.format(now.getDate())}_\\\n${kTwoDigitFormatter.format(now.getHours())}_\\\n${kTwoDigitFormatter.format(now.getMinutes())}_\\\n${kTwoDigitFormatter.format(now.getSeconds())}_\\\n${spawnInfo.id}.log`;\n const filepath = path.join(this._config.logAbsDir, filename);\n return filepath;\n }", "function getShortFileName(fullName){\n\tif(fullName==null || fullName == undefined){\n\t\treturn '';\n\t}\n\tif(fullName.indexOf(\"/\") < 0){\n\t\treturn fullName;\n\t}\n\treturn fullName.substring(fullName.lastIndexOf('/') + 1);\n}", "buildFileName ( type ) {\n return JSON_ROOT + type + '.json';\n }", "function initPath(){\n\tvar date = new Date(),\n\t\tyear = date.getFullYear(),\n\t\tmonth = date.getMonth() + 1,\n\t\tday = date.getDay() + 2,\n\t\tpath = ''; // path to file with CSV\n\n\tif ( month*1 < 10){\n\t\tmonth = \"0\" + month;\n\t}\n\tif ( day*1 < 10){\n\t\tday = \"0\" + day;\n\t}\n\tpath = \"ZG/\" + year + \"/\" + month + \"/\" + day + \".CSV\";\n\n\treturn path;\n}", "function newPath(image){\n var image_upload_name = makeid(20);\n var extension = path.extname(image.name);\n console.log(image_upload_path_new);\n var image_upload_path_name = image_upload_path_new +\"/\"+image_upload_name + extension;\n\n name = image_upload_name;\n ext = extension;\n\n return image_upload_path_name;\n}" ]
[ "0.6890731", "0.6834741", "0.6696569", "0.66571444", "0.65933967", "0.6580046", "0.65006447", "0.6359272", "0.62721187", "0.6223872", "0.6173546", "0.6162433", "0.6151421", "0.61438316", "0.60890055", "0.60409427", "0.6025332", "0.6024435", "0.5931289", "0.59081966", "0.5892217", "0.5868156", "0.5840167", "0.5840167", "0.5829583", "0.57941866", "0.5786418", "0.5734413", "0.57320935", "0.57320935", "0.5727598", "0.5720762", "0.57146025", "0.57057524", "0.56998533", "0.569878", "0.56952643", "0.56922084", "0.5685408", "0.5684851", "0.5658542", "0.56493586", "0.56423914", "0.5606198", "0.5586743", "0.55833733", "0.55807793", "0.55633205", "0.55593634", "0.5549477", "0.5537581", "0.5535647", "0.55337423", "0.55277884", "0.55100125", "0.55095303", "0.5502856", "0.5500807", "0.54786056", "0.54772675", "0.54743", "0.54430157", "0.54378766", "0.5427819", "0.5425231", "0.54203326", "0.5413923", "0.5413764", "0.54132074", "0.5405421", "0.53984565", "0.5360869", "0.5356683", "0.534228", "0.5328155", "0.5324686", "0.5320413", "0.5319595", "0.5314851", "0.5299004", "0.5292458", "0.52850723", "0.5278874", "0.5277564", "0.52758944", "0.5249981", "0.5247512", "0.5247383", "0.5246502", "0.52443343", "0.5229993", "0.5219112", "0.5206538", "0.52043855", "0.5196539", "0.51955765", "0.51955456", "0.51894116", "0.5188121", "0.5183608", "0.51828957" ]
0.0
-1
Prints/saves document to PDF into OutputFiles folder.
function NavPrintPdf(/**string*/ baseName, /**string*/ number) { SeS('G_PrintMenu').DoClick(); SeS('G_PDFMenuItem').DoClick(); SeS('G_SavePrintedDocument').DoClick(); var outputFolder = Global.GetFullPath("OutputFiles"); var filePath = NavMakeFileName(outputFolder, baseName, number, "pdf"); Tester.Message("Printing file: " + filePath); SeS('G_SaveDialogFileName').DoSendKeys(filePath); SeS('G_SaveDialogSaveButton').DoClick(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "save_pdf () {\n this.pdf_canvass.save(\"offer_tag_document.pdf\"); // will save the file in the current working directory\n\t}", "function RenderPdf() {\n console.log(\"Writing file....\");\n conversion({\n html: dataContent,\n pdf: {\n pageSize: 'Letter',\n printBackground: true\n }\n }, (error, result) => {\n if(error) {\n \n throw error;\n }\n result.stream.pipe(fs.createWriteStream('./'+userName+'.pdf'));\n console.log(\"Profile Generated!\");\n conversion.kill();\n \n });\n\n}", "function createPDF(theDoc) {\n var myPath = folderPath;\n var theDocname = theDoc.name+\"-Labeled\";\n var prefs = app.pdfExportPreferences;\n var pdfPath = myPath+\"/\"+theDocname+\".pdf\";\n var preset = app.pdfExportPresets.itemByName(\"[Smallest File Size]\");\n preset.exportReaderSpreads = true;\n app.activeDocument.asynchronousExportFile(ExportFormat.pdfType, File(new File(pdfPath)), false, preset).waitForTask();\n theDoc.close();\n}", "async saveToPdf(fileUrl){\n\n\t}", "function savePDF(domElement, options, callback) {\n\t if (options === void 0) { options = {}; }\n\t new KendoDrawingAdapter_1.default(kendo_drawing_1.drawDOM, kendo_drawing_1.exportPDF, kendo_file_saver_1.saveAs, domElement, options).savePDF(callback);\n\t}", "function savePDF(domElement, options, callback) {\n if (options === void 0) { options = {}; }\n new __WEBPACK_IMPORTED_MODULE_2__KendoDrawingAdapter__[\"a\" /* default */](__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__[\"a\" /* drawDOM */], __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__[\"b\" /* exportPDF */], __WEBPACK_IMPORTED_MODULE_1__progress_kendo_file_saver__[\"a\" /* saveAs */], domElement, options).savePDF(callback);\n}", "function savePDF(domElement, options, callback) {\n if (options === void 0) { options = {}; }\n new __WEBPACK_IMPORTED_MODULE_2__KendoDrawingAdapter__[\"a\" /* default */](__WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__[\"a\" /* drawDOM */], __WEBPACK_IMPORTED_MODULE_0__progress_kendo_drawing__[\"b\" /* exportPDF */], __WEBPACK_IMPORTED_MODULE_1__progress_kendo_file_saver__[\"a\" /* saveAs */], domElement, options).savePDF(callback);\n}", "function writePDF(fs, award_ID, awardInfo){\n filename = require('path').resolve(__dirname, '../awardCert.tex');\n \n\t//code adapted from node-latex github example\n const latex = require('../node_modules/node-latex/');\n\tconst input = fs.createReadStream(filename);\n var output_filename = \"award_\" + award_ID + \".pdf\";\n const output = fs.createWriteStream(output_filename);\n\n const pdf = latex(input);\n pdf.pipe(output);\n pdf.on('error', function (error) {\n if (error) throw error;\n });\n pdf.on('finish', function () {\n console.log('PDF generated.');\n sendPDF(output_filename, awardInfo);\n });\n }", "async savePDF() {\n // if no PDF has been generated, do nothing\n if (!fse.pathExistsSync(this.pdfPathname)) {\n return\n }\n // offer to save with current savename\n result = await electron.remote.dialog.showSaveDialog(\n electron.remote.BrowserWindow.getFocusedWindow(), {\n 'title': 'Save PDF',\n 'defaultPath': this.pdfSavePathname,\n 'buttonLabel': 'Save'\n })\n // if pathname selected or accepted\n if (result && !result.canceled) {\n // set (new) savename\n this.pdfSavePathname = result.filePath\n console.log(\"saving '\" + this.pdfPathname + \"' to '\" + this.pdfSavePathname + \"'\")\n // save PDF, i.e. copy to destination\n fse.copySync(this.pdfPathname, this.pdfSavePathname)\n }\n }", "function exportPDF() {\n console.log(\"Going to export a PDF\");\n viz.showExportPDFDialog();\n}", "function exportPdf() {\n // get current doc\n var doc = DocumentApp.getActiveDocument();\n var clearFileName = doc.getName() + '_clear';\n var fileName = doc.getName() + '_pdf';\n \n var articleFolder = getFileFolder(doc);\n if (isFileExists(fileName, articleFolder)) {\n // remove old verstion of file\n // logger.log('Remove ' + fileName + ' from ' + articleFolder + ' folder');\n isFileExists(fileName, articleFolder).setTrashed(true);\n }\n \n // update clear copy\n var clearFile = makeClearCopy(doc, clearFileName);\n \n // make a clear PDF copy\n var copyFile = DriveApp.createFile(clearFile.getAs('application/pdf'));\n var copyId = copyFile.getId();\n copyFile.setName(fileName);\n \n // add file to article folder and remove file from root folder\n var articleFolder = clearFile.getParents().next();\n articleFolder.addFile(copyFile);\n DriveApp.getRootFolder().removeFile(copyFile);\n \n DocumentApp.getUi().alert('New PDF file with the name ' \n + clearFile.getName() \n + ' created in the article folder');\n}", "function saveAsPDF(){\n\t\t\t$('.savepdf').css('visibility','hidden');\n\t\t\tcreate_jpg_web();\t// create JPG file from canvas\n\t\t\tif (widthCanvas < heightCanvas) {\t\t\t\n\t\t\tflipCanvas = true;\n\t\t\tvar wC = heightCanvas;\n\t\t\tvar hC = widthCanvas;\n\t\t\twCmm = height_in_mm;\n\t\t\thCmm = width_in_mm;\n\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\tflipCanvas = false;\n\t\t\tvar wC = widthCanvas;\n\t\t\tvar hC = heightCanvas;\n\t\t\twCmm = width_in_mm;\n\t\t\thCmm = height_in_mm;\n\t\t\t\n\t\t\t}\t\n\t\t\t\n\t\t\topenPDF();\n\n\t\t}", "function createDoc()\n {\n //ccc( 'knocking ...' )\n if( pdfMake_is_in_busy_state ) return;\n\n //---------------------------------------\n // //\\\\ disables button\n //---------------------------------------\n pdfMake_is_in_busy_state = true;\n var button = document.getElementById( 'generate-pdf' );\n if( button ) {\n button.style.opacity = \"0.3\";\n //button.style.display = 'none'; }\n button.innerHTML = \"Please Wait\";\n }\n //---------------------------------------\n // \\\\// disables button\n //---------------------------------------\n\n //---------------------------------------\n // //\\\\ doing the job\n //---------------------------------------\n\n //.this is a key operation which make\n //.multipe button click working\n //.creates a duplicate of document definition\n //.for case if maker will corrupt it ...\n var dup = ns.paste( {}, ddDef );\n pdfCreated = pdfMake.createPdf( dup );\n pdfCreated.open();\n\n //disabling browser's pop-up blocker may be vital to open() this:\n //pdfMake.createPdf(docDefinition).getDataUrl(function(url) { alert('your pdf is done'); });\n\n //this approach fails for multiple clicks: images get corrupt\n //pdfCreated = pdfCreated || pdfMake.createPdf( dup );\n\n //.https://pdfmake.github.io/docs/getting-started/client-side/methods/\n //.open( {}, window );\n //---------------------------------------\n // \\\\// doing the job\n //---------------------------------------\n\n ///solution seems works without time out, but\n ///timeout does not hurt ....\n setTimeout( function() {\n //---------------------------------------\n // //\\\\ enables button\n //---------------------------------------\n if( button ) {\n button.style.opacity = \"1\";\n button.innerHTML = \"Generate Document\";\n if( !fconf.setAnOpenButton ) {\n button.style.display = 'none';\n }\n }\n pdfMake_is_in_busy_state = false;\n //---------------------------------------\n // \\\\// enables button\n //---------------------------------------\n },\n 3000\n );\n }", "function printInp() {\r\n html2pdf(document.body, { margin: 10,\r\n filename: 'TADEE_Project_Input.pdf',\r\n image: { type: 'jpeg', quality: 0.98 },\r\n html2canvas: { scale: 1, logging: true, dpi: 192, letterRendering: true },\r\n jsPDF: { unit: 'mm', format: 'a3', orientation: 'portrait' }});\r\n }", "function print() {\n\tvar text = editor.getText();\n var compiler = new SlickCompiler();\n const input = compiler.compile(text);\n dialog.showSaveDialog({filters: [{name: 'pdf', extensions: ['pdf']},\n]}, function(filename){\n\tconsole.log(filename.toString())\n\t\tprintHelper(filename, input);\n });\n}", "function sendPDF(output_filename, awardInfo){\n\tconsole.log('in sendPDF');\n const nodemailer = require('nodemailer');\n\n nodemailer.createTestAccount((err, account) => {\n \n\t\t// create reusable transporter object using the default SMTP transport\n \t\tlet transporter = nodemailer.createTransport({\n \thost: 'smtp.gmail.com', \n \tport: 465,\n \tsecure: true,\n \tauth: {\n \tuser: '[email protected]', \n \tpass: 'Gemini_Password2018' \n\t\t\t}\t\n });\n\n // Get path of award certificate\n\tcur_path = require('path').resolve(__dirname, '../');\n\t\n\t// Set up mail options\n let mailOptions = {\n from: '\"Team Gemini\" <[email protected]>', // sender address\n to: awardInfo.email, // list of receivers\n subject: \"Award Certificate from \" + awardInfo.AwName, // Subject line\n text: 'Congrats, ' + awardInfo.first_name + ', you have received an award for being the '+ awardInfo.type, // plain text body\n attachments: [\n { // file on disk as an attachment\n filename: output_filename,\n path: cur_path + \"/\" + output_filename // stream this file\n }\n ]\n };\n\n // Send mail with defined transport object\n transporter.sendMail(mailOptions, (error, info) => {\n if (error) {\n\t\t\tconsole.log(error);\n \t\tremoveCertificate(output_filename);\n\t\t\treturn console.log(error);\n\t\t}\n console.log('Message sent: %s response was %s', info.messageId, info.response);\n \n\t\tremoveCertificate(output_filename);\t\n\t\t});\n });\t\n }", "savePDFDialog() {\n dialog.showSaveDialog({ filters: [\n { name: 'PDF-Dokument', extensions: ['pdf'] }\n ]},(fileName) => {\n if (fileName === undefined) {\n console.log(\"Du hast die Datei nicht gespeichert\");\n return;\n }\n\n communicator.pdfPrint(fileName);\n });\n }", "function downloadPdf() \n\t{\n\tdownload('pdf');\n\t}", "async function generatePdf(data) {\n // Build the PDF\n var pdfDoc = printer.createPdfKitDocument(data)\n // Writing to Disk - dataPdf.pdf\n pdfDoc.pipe(fs.createWriteStream('dataPdf.pdf'))\n pdfDoc.end()\n}", "function convertWordsIntoPages(){\n return ()=>{\n return new Promise((resolve,reject)=>{\n let doc = new PDFDocument;\n doc.pipe(fs.createWriteStream('definitions.pdf'));\n allWords.forEach((wordObject)=>{\n if((wordObject)&&(wordObject.length>0)){\n doc.addPage();\n doc.font('SourceSansPro-Regular.ttf')\n .fontSize(40)\n .text(wordObject[0].word, 100, 100);\n wordObject[0].definitions.forEach((definition)=>{\n let examples = definition.split(';');\n examples.forEach((example)=>{\n //first example is title\n doc.fontSize(30).text(example.trim() + '\\n');\n });\n });\n }\n });\n console.log('Done converting to PDF');\n doc.end();\n setTimeout(()=>{\n resolve();\n },2000);\n });\n }\n}", "printToPdf() {\n controller.printToPdf();\n }", "function openPDF() {\n\t\t\t$(\".loadfile\").css({visibility: 'visible', height: '100px'});\n \t\t$(\".savepdf\").css({visibility: 'hidden', height: '0px'});\t\t \n\n\t\t\tvar dataURL = canvas.toDataURL({\n\t\t\t\tformat: 'jpg',\n\t\t\t\tquality: 1, \n\t\t\t\t//multiplier: 1.494\n\t\t\t\tmultiplier: loadJSON.Dimension.zoomkprint\n\t\t\t});\n\n\t\t\t$.ajax({\n\t\t\t\turl: \"../tcpdf/examples/pdf-gen-jpg.php\",\n\t\t\t\tdata: {imageurl:dataURL,widthObj:wCmm,heightObj:hCmm, wPaper: wPaper, hPaper: hPaper, fObj: flipCanvas},\n\t\t\t\tcache: false,\n\t\t\t\tdataType: 'json',\n\t\t\t\ttype : 'POST',\n\t\t\t\tsuccess: function(data) {\t\t\n\t\t\t\t//console.log('return from PHP = ' +data.result+' file name = '+data.filename);\t\t\n\t\t\tif (data.result) {\t\t\t\n\t\t\t\t$(\".loadfile\").css({visibility: 'hidden', height: '0px'});\n\t\t\t\t$(\".savepdf\").css({visibility: 'visible', height: '100px'});\n\t\t\t\t$(\"#savepdfbtn\").attr({ href: data.filename});\n\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t}", "function createPDF(path, filePath) {\n return new Promise((resolve, reject) => {\n let win = captureWindow();\n\n win.webContents.on(\"did-stop-loading\", () => {\n setTimeout(() => {\n win.webContents\n .printToPDF({\n marginsType: 0,\n scaleFactor: 100,\n printBackground: true,\n })\n .then((buffer) => {\n fs.writeFileSync(filePath, buffer);\n win.close();\n resolve(filePath);\n });\n }, 1000);\n });\n\n if (path.includes(\"?\")) {\n path = `${path}&print=true`;\n } else {\n path = `${path}?print=true`;\n }\n win.loadURL(`${startUrl}#${path}`);\n });\n}", "weasyprint( markup, fOut, opts, on_error ) {\n // Save the markup to a temporary file\n const tempFile = fOut.replace(/\\.pdf$/i, '.pdf.html');\n FS.writeFileSync(tempFile, markup, 'utf8');\n\n SPAWN('weasyprint', [tempFile, fOut], false, on_error, this);\n }", "function downloadpdf(){\n console.log('Scarica PDF');\n html2canvas(document.getElementById('exportthis'), {\n onrendered: function (canvas) {\n var data = canvas.toDataURL();\n var docDefinition = {\n content: [{\n\n image: data,\n width: 500,\n }]\n };\n pdfMake.createPdf(docDefinition).download(\"requirements.pdf\");\n }\n });\n }", "async function createPDF(pdfDoc, invoiceId) {\n pdfDoc.fontSize(26).text(\"Your Invoice\");\n pdfDoc.fontSize(15).text(SEPARATOR);\n pdfDoc.fontSize(15).text(SEPARATOR);\n const order = await Order.findById(invoiceId).populate('cart.products.productId');\n order.cart.products.forEach(prod => {\n pdfDoc.fontSize(15).text(`${prod.quantity} X ${prod.productId.title} $${prod.productId.price * prod.quantity}`);\n });\n pdfDoc.fontSize(15).text(SEPARATOR);\n pdfDoc.fontSize(15).text(SEPARATOR);\n pdfDoc.text(`\\n\\nTotal: $${order.cart.totalPrice}`);\n pdfDoc.end();\n}", "function printDiv() {\r\n html2pdf(document.body, { margin: 10,\r\n filename: 'TADEE_Project_Output.pdf',\r\n image: { type: 'jpeg', quality: 0.98 },\r\n html2canvas: { scale: 1, logging: true, dpi: 192, letterRendering: true },\r\n jsPDF: { unit: 'mm', format: 'a3', orientation: 'portrait' }});\r\n }", "function callPrintToPDF() {\n let win = BrowserWindow.getFocusedWindow();\n win.webContents.send('print-pdf-click');\n}", "function downloadPDF(index) {\n\tvar templateName = $(\"#page-template-\" + index).val();\n\tvar fileName = getFileName(index);\n\t\n var stream = generatePDF(templates[templateName]);\n\n // Download the blob as PDF.\n stream.on('finish', function() {\n saveAs(stream.toBlob('application/pdf'), fileName);\n });\n}", "function downloadPDF() {\n var units = $(\"#unit\").val();\n \n $(\"#printDialog\").modal('hide');\n $(\"#progressDialog\").modal('show');\n piecesToPDF(\n {\n cropped: $(\"#cropped\").prop('selected'),\n trapezoidal: $(\"#trapezoidal\").prop('selected')\n },\n {\n orient: $(\"[name='orient']:checked\").val(), \n format: $(\"[name='format']:checked\").val(),\n sides: $(\"[name='sides']:checked\").val(),\n\n // Always use pt units, so do conversions upfront.\n unit: 'pt',\n margins: {\n top: Math.round(parseFloat($(\"#marginTop\").val()) * unitPt[units]),\n bottom: Math.round(parseFloat($(\"#marginBottom\").val()) * unitPt[units]),\n left: Math.round(parseFloat($(\"#marginLeft\").val()) * unitPt[units]),\n right: Math.round(parseFloat($(\"#marginRight\").val()) * unitPt[units]),\n },\n padding: Math.round(parseFloat($(\"#padding\").val()) * unitPt[units]),\n \n justif: $(\"[name='justif']:checked\").val(),\n cols: $(\"#printColumns\").val(),\n rows: $(\"#printRows\").val(),\n \n compoPos: $(\"[name='compoPos']:checked\").val(),\n pageNbPos: $(\"[name='pageNbPos']:checked\").val(),\n labelPos: $(\"[name='labelPos']:checked\").val(),\n },\n {\n maxPieces: parseInt($(\"#maxPieces\").val()),\n maxPiecesPerDoc: parseInt($(\"#maxPiecesPerDoc\").val()),\n maxPagesPerDoc: parseInt($(\"#maxPagesPerDoc\").val()),\n },\n progress,\n function() {$(\"#progressDialog\").modal('hide');}\n );\n}", "function createPDF(){\n $('body').addClass('printpdf');\n $('#chart').width(orChartSize);\n $('#chart').height(orChartSize);\n\n html2pdf().set(opt).from(element).save().then(function(pdf){\n resizeChart();\n $('body').removeClass('printpdf');\n });;\n}", "function PdfWriter(stream){this.streamWriter=stream;}", "function printToFile() {\n\t\tif (isLoaded()) {\n\t\t\t// Any printer is ok since we are writing to the filesystem instead\n\t\t\tqz.findPrinter();\n\t\t\t\n\t\t\t// Automatically gets called when \"qz.findPrinter()\" is finished.\n\t\t\twindow['qzDoneFinding'] = function() {\n\t\t\t\t// Send characters/raw commands to qz using \"append\"\n\t\t\t\t// Hint: Carriage Return = \\r, New Line = \\n, Escape Double Quotes= \\\"\n\t\t\t\tqz.append(\"A590,1600,2,3,1,1,N,\\\"QZ Print Plugin \" + qz.getVersion() + \" sample.html\\\"\\n\");\n\t\t\t\tqz.append(\"A590,1570,2,3,1,1,N,\\\"Testing qz.printToFile() function\\\"\\n\");\n\t\t\t\tqz.append(\"P1\\n\");\n\t\t\t\t\n\t\t\t\t// Send characters/raw commands to file\n\t\t\t\t// i.e. qz.printToFile(\"\\\\\\\\server\\\\printer\");\n\t\t\t\t// qz.printToFile(\"/home/user/test.txt\");\n\t\t\t\tqz.printToFile(\"C:\\\\qz-print_test-print.txt\");\n\t\t\t\t\n\t\t\t\t// Remove reference to this function\n\t\t\t\twindow['qzDoneFinding'] = null;\n\t\t\t};\n\t\t}\n\t}", "function createPDF(){\n\texec(\"cd reports && pdflatex -interaction=nonstopmode -halt-on-error ../\"+reportfile,function(err,stdout,stderr){\n\t\tif(err){\n\t\t\treturn 1;\n\t\t}else{\n\t\t\treturn 0;\n\t\t}\n\t});\n}", "function makepdf(req, res, next) {\n var fonts = {\n Roboto: {\n normal: './controllers/reports/fonts/Roboto-Regular.ttf',\n bold: './controllers/reports/fonts/Roboto-Medium.ttf'\n }\n };\n // Initialize PDFMake\n const pdfmake = require('pdfmake');\n var printer = new pdfmake(fonts);\n var fs = require('fs');\n\n // When editing, ensure that new users are appended to correct index number at docDefinition.content[4].text\n var docDefinition = {\n content: [{\n text: 'ZBudgeT User Report\\n',\n style: 'header'\n },\n {\n text: 'Generated on ' + dateFormat(now, 'longDate') + ' at ' + dateFormat(now, 'longTime') + '\\n\\n',\n fontSize: 9\n },\n {\n text: 'This report will print out a list of users that are currently registered on the website.\\n\\n'\n },\n {\n text: 'Users:\\n\\n',\n style: 'subHeader'\n },\n {\n text: [\n // The users are appended here on docDefinition.content[4].text\n // 'Name: John Doe\\n',\n // 'Email: [email protected]\\n',\n // 'Roles: admin, user\\n'\n ]\n }\n // ,\n // {\n // text: [\n // 'It is however possible to provide an array of texts ',\n // 'to the paragraph (instead of a single string) and have ',\n // {text: 'a better ', fontSize: 15, bold: true},\n // 'control over it. \\nEach inline can be ',\n // {text: 'styled ', fontSize: 20},\n // {text: 'independently ', italics: true, fontSize: 40},\n // 'then.\\n\\n'\n // ]\n // },\n // {\n // text: 'Mixing named styles and style-overrides',\n // style: 'header'\n // },\n // {\n // style: 'bigger',\n // italics: false,\n // text: [\n // 'We can also mix named-styles and style-overrides at both paragraph and inline level. ',\n // 'For example, this paragraph uses the \"bigger\" style, which changes fontSize to 15 and sets italics to true. ',\n // 'Texts are not italics though. It\\'s because we\\'ve overriden italics back to false at ',\n // 'the paragraph level. \\n\\n',\n // 'We can also change the style of a single inline. Let\\'s use a named style called header: ',\n // {\n // text: 'like here.\\n',\n // style: 'header'\n // },\n // 'It got bigger and bold.\\n\\n',\n // 'OK, now we\\'re going to mix named styles and style-overrides at the inline level. ',\n // 'We\\'ll use header style (it makes texts bigger and bold), but we\\'ll override ',\n // 'bold back to false: ',\n // {\n // text: 'wow! it works!',\n // style: 'header',\n // bold: false\n // },\n // '\\n\\nMake sure to take a look into the sources to understand what\\'s going on here.'\n // ]\n // }\n ],\n styles: {\n header: {\n fontSize: 18,\n bold: true\n },\n subHeader: {\n fontSize: 14,\n bold: true\n }\n }\n };\n\n // Add users to the report\n User.find({}, (err, allUsers) => {\n if (err) next(err);\n allUsers.forEach((user) => {\n docDefinition.content[4].text.push(\n `Name: ${user.name}\\n`,\n `Email: ${user.email}\\n`,\n `Roles: ${user.roles.join()}\\n`,\n `Last signed in: ${dateFormat(user.lastSignedIn, 'shortDate')}\\n\\n`\n );\n });\n var pdfDoc = printer.createPdfKitDocument(docDefinition);\n // If using GCS, then redirect to publicLink\n if (featuretoggles.isFeatureEnabled('reportsUseGoogleCloudStorage')) {\n pdfDoc.pipe(file.createWriteStream(writeStreamOptions)\n .on('finish', () => {\n var publicLink = 'https://storage.googleapis.com/zbudget/' + name;\n res.redirect(publicLink);\n }));\n pdfDoc.end();\n }\n // If not using GCS, then write directly to response\n if (!featuretoggles.isFeatureEnabled('reportsUseGoogleCloudStorage')) {\n res.writeHead(200, 'OK', {\n 'Content-type': 'application/pdf'\n });\n pdfDoc.on('data', (data) => {\n res.write(data);\n });\n pdfDoc.end();\n pdfDoc.on('end', () => res.end());\n }\n });\n}", "function writeToFile(svgdump, pageNum) {\n var name = getFileNameFromPath(pdfPath);\n fs.mkdir('./svgdump/', function(err) {\n if (!err || err.code === 'EEXIST') {\n fs.writeFile('./svgdump/' + name + \"-\" + pageNum + '.svg', svgdump,\n function(err) {\n if (err) {\n console.log('Error: ' + err);\n } else {\n console.log('Page: ' + pageNum);\n }\n });\n }\n });\n}", "function createPdf(report) {\n return report.pdf().then((output) => {\n const { pdf, browser } = output;\n const wstream = fs.createWriteStream(`generated/pdf/${report.kind}-${report.id}.pdf`);\n wstream.write(pdf);\n wstream.end();\n browser.close();\n });\n}", "function writeToFile(svgdump, pageNum) {\n var name = getFileNameFromPath(pdfPath);\n fs.mkdir('./svgdump/', function(err) {\n if (!err || err.code === 'EEXIST') {\n fs.writeFile('./svgdump/' + name + \"-\" + pageNum + '.svg', svgdump,\n function(err) {\n if (err) {\n console.log('Error: ' + err);\n } else {\n console.log('Page: ' + pageNum);\n }\n });\n }\n });\n }", "async function pdf() {\n\n try {\n\n const browser = await puppeteer.launch();\n const page = await browser.newPage();\n \n await page.setContent(html);\n await page.emulateMedia('screen');\n console.log(\"Saved pdf successfully.\");\n await page.pdf({\n path: pdfname + '.pdf', \n format: 'A4',\n printBackground: true,\n });\n console.log('done');\n await browser.close();\n process.exit();\n\n } catch (e) {\n console.log(\"Please try closing the pdf file if it is open.\");\n console.log(\"This is the error from generate pdf function:\", e);\n }\n\n}", "function saveSurveyToPdf(filename, surveyModel, pdfWidth, pdfHeight) {\n var options = {\n fontSize: 14,\n margins: {\n left: 10,\n right: 10,\n top: 10,\n bot: 10\n },\n format: [pdfWidth, pdfHeight]\n };\n var surveyPDF = new SurveyPDF.SurveyPDF(json, options);\n surveyPDF.data = surveyModel.data;\n surveyPDF.save(filename);\n }", "handleGeneratePDF() {\n $('.ignore').hide();\n\n // var pdf = new jsPDF('p','pt','a4');\n //\n // new jsPDF(\"a4\").addHTML($('html'), function () {\n // pdf.save('spel.pdf');\n // notificationManager.alert(\"success\", 'Uw spel wordt gedownload!');\n // });\n\n var pdf = new jsPDF('p','pt','a4');\n pdf.addHTML(document.body,function() {\n pdf.save('spel.pdf');\n });\n\n $('.ignore').show();\n }", "function saveFile()\n{\n // Save document\n var tmpFile = new File( '/tmp/temp.psd');\n psdOpts = new PhotoshopSaveOptions();\n psdOpts.embedColorProfile = true;\n psdOpts.alphaChannels = true;\n psdOpts.layers = true;\n app.activeDocument.saveAs(tmpFile, psdOpts, true, Extension.LOWERCASE);\n}", "generatePDF(name) {\n return new Promise(next => {\n const html = this.generateHtmlOutput();\n \n var doc = new jsPDF();\n doc.fromHTML(html, 15, 15, {\n 'width': 170,\n });\n doc.save(name);\n next();\n });\n }", "function exportToPdf() {\n scope.isLoading = true;\n\n $log.debug('benchmark - export to pdf - start');\n html2canvas(element, {\n onrendered: function (canvas) {\n $log.debug('benchmark - export to pdf - onrendered');\n\n var imgData = canvas.toDataURL('image/png');\n $log.debug('benchmark - export to pdf - converted canvas');\n\n var doc = new jsPDF('p', 'mm');\n $log.debug('benchmark - export to pdf - created jspdf doc');\n\n var imgWidth = doc.internal.pageSize.width; //210;\n $log.debug('benchmark - export to pdf - imgWidth');\n\n var pageHeight = doc.internal.pageSize.height; //295;\n $log.debug('benchmark - export to pdf - pageHeight');\n\n var imgHeight = canvas.height * imgWidth / canvas.width;\n $log.debug('benchmark - export to pdf - imgHeight');\n\n var heightLeft = imgHeight;\n $log.debug('benchmark - export to pdf - heightLeft');\n\n var position = 0;\n $log.debug('benchmark - export to pdf - position');\n\n // addimage(imageData, format, x, y, w, h, alias, compression, rotation)\n doc.addImage(imgData, 'PNG', 0, position, imgWidth, imgHeight);\n $log.debug('benchmark - export to pdf - added first image');\n\n heightLeft -= pageHeight;\n\n while (heightLeft >= 0) {\n $log.debug('benchmark - export to pdf - adding page');\n\n position = heightLeft - imgHeight;\n doc.addPage();\n doc.addImage(imgData, 'PNG', 0, position, imgWidth, imgHeight);\n heightLeft -= pageHeight;\n }\n\n $log.debug('benchmark - export to pdf - saving');\n doc.save(scope.fileName);\n\n scope.isLoading = false;\n scope.$apply();\n $log.debug('benchmark - export to pdf - done');\n }\n });\n }", "function print(master){\n \n var sourceSheet = master;\n var outputSheet = sourceSheet.getSheetByName(\"Master\");\n var parentFolder; //Folder to save PDF in\n var currentDate = new Date();\n \n //Checks if folder exists, if it doesn't, create it\n try {\n //Folder exists\n parentFolder = DriveApp.getFoldersByName('Lab Software Change Reports').next(); \n Logger.log('folder exists');\n }\n catch(e) {\n //Folder doesn't exist, create folder\n parentFolder = DriveApp.createFolder('Lab Software Change Reports');\n Logger.log('folder does not exist, creating folder');\n }\n \n //nane PDF\n var PDFName = \"Lab Software Change Report-\" + currentDate;\n SpreadsheetApp.getActiveSpreadsheet().toast('Creating PDF '+PDFName);\n \n // export url\n var PDFurl = 'https://docs.google.com/spreadsheets/d/'+sourceSheet.getId()+'/export?exportFormat=pdf&format=pdf' // export as pdf\n + '&size=letter' // paper size legal / letter / A4\n + '&portrait=true' // orientation, false for landscape\n + '&fitw=true' // fit to page width, false for actual size\n + '&sheetnames=true&printtitle=true' // hide optional headers and footers\n + '&pagenum=CENTER&gridlines=false' // hide page numbers and gridlines\n + '&fzr=false' // do not repeat row headers (frozen rows) on each page\n + '&top_margin=.75&bottom_margin=.75&left_margin=.25&right_margin=.25' //Narrow margins\n + '&gid='+outputSheet.getSheetId(); // the sheet's Id\n \n //authorize script\n var token = ScriptApp.getOAuthToken();\n \n // request export url\n var response = UrlFetchApp.fetch(PDFurl, {\n headers: {\n 'Authorization': 'Bearer ' + token\n }\n });\n \n //name PDF blob\n var PDFBlob = response.getBlob().setName(PDFName+'.pdf');\n \n // delete pdf if it already exists\n var files = parentFolder.getFilesByName(PDFName);\n while (files.hasNext())\n {\n files.next().setTrashed(true);\n }\n \n // create pdf file from blob\n var createPDFFile = parentFolder.createFile(PDFBlob); \n var folderURL = parentFolder.getUrl();\n emailPDF(PDFBlob, folderURL);\n}", "function writeToFile(fileName, userInput) {\n fs.writeFile(`` + fileName, generatesite(userInput), function (err) {\n if (err) {\n return console.log(err);\n }\n\n console.log(\"Generating HTML...\");\n });\n}", "function convertPdfToJson(dir, filename, successCallback, errorCallback, saveToDisk, targetDir) {\n\tconst pdfParser = new PDFParser();\n\n\tpdfParser.on(\"pdfParser_dataReady\", jsonObj => {\n\t\tif (saveToDisk)\n\t\t\tfs.writeFile(targetDir + \"/\" + filename + \".to.json\", JSON.stringify(jsonObj, null, \"\\t\"), \"utf8\", e => {\n\t\t\t\terrorCallback(e, jsonObj);\n\t\t\t});\n\t\telse\n\t\t\tsuccessCallback(jsonObj);\n\t});\n\n\tpdfParser.on(\"pdfParser_error\", errorCallback);\n\tpdfParser.loadPDF(dir + \"/\" + filename);\n}", "function createPdf (response) {\n return new Promise((resolve, reject) => {\n pdf(response.options).from(response.path).to(response.pathToPdf, () => {\n winston.log('info', `Create new file ${response.pathToPdf}`);\n resolve(response);\n });\n });\n}", "function downloadFile(){\r\n\tvar link = document.getElementById('generateURL');\r\n\t//link.setAttribute(\"href\", \"../../user/confirmation/downloadFile/\"+sessionStorage.getItem(\"jobReferenceNo\")+\".pdf\");\r\n\tlink.setAttribute(\"href\", generatePDFLink());\r\n\tlink.submit();\r\n}", "downloadPdf() {\n const data = this.chart.getAllDataPoints();\n PdfDownloadService.createDownloadPdf(data);\n }", "function parsePdf(filename) {\n var pdfParser = new PDFParser();\n\n // Error event\n pdfParser.on('pdfParser_dataError', function (err) {\n console.log(err.parserError);\n });\n\n // Success event\n pdfParser.on('pdfParser_dataReady', function (pdfData) {\n // Output file as JSON\n var outputJson = Utils.removeDiacritics(JSON.stringify(pdfData.formImage.Pages[0].Texts, null, 2));\n\n // Check if user wants to write into a JSON file\n if (args[1]) {\n Utils.writeToJson(baseName, outputJson);\n } else {\n console.log(outputJson);\n }\n });\n\n // Loads the PDF file into the parser\n pdfParser.loadPDF(\"./input_files/\" + filename);\n}", "function createPDF() {\n\t\tvar sTable = document.getElementById('pdfTable').innerHTML;\n\n\t\tvar style = \"<style>\";\n\t\tstyle = style + \"table {width: 100%;font: 17px Calibri;}\";\n\t\tstyle = style + \"table, th, td {border: solid 1px #DDD; border-collapse: collapse;\";\n\t\tstyle = style + \"padding: 2px 3px;text-align: center;}\";\n\t\tstyle = style + \"</style>\";\n\n\t\t// CREATE A WINDOW OBJECT.\n\t\tvar win = window.open('', '', 'height=700,width=700');\n\n\t\twin.document.write('<html><head>');\n\t\twin.document.write('<title>Profile</title>'); // <title> FOR PDF HEADER.\n\t\twin.document.write(style); // ADD STYLE INSIDE THE HEAD TAG.\n\t\twin.document.write('</head>');\n\t\twin.document.write('<body>');\n\t\twin.document.write(sTable); // THE TABLE CONTENTS INSIDE THE BODY TAG.\n\t\twin.document.write('</body></html>');\n\n\t\twin.document.close(); \t// CLOSE THE CURRENT WINDOW.\n\n\t\twin.print(); // PRINT THE CONTENTS.\n\t}", "function pdfGenerator(html) {\n let conversion = convertFactory({\n\n converterPath: convertFactory.converters.PDF\n\n });\n\n conversion({\n html: html,\n //waiting for confirmation before converting\n waitForJs: true,\n waitForJsVarName: readyToConvert,\n },\n //Using this function to run through the two parameters err and result. response on err or on results, on err console will log the err \n function (err, result) {\n if (err) {\n return console.log(err);\n }\n \n result.return.download(fs.createWriteStream(`${username}.pdf`));\n //will stop running if theres an error\n conversion.kill();\n \n console.log(`${username}.pdf is ready to download!`);\n});\n}", "function generateProposalPdf(req, res) {\n if (req.body.htmlContent) {\n\n if (!mongoose.Types.ObjectId.isValid(req.body.proposalId)) {\n res.json({ code: Constant.ERROR_CODE, message: Constant.REQUIRED_FILED_MISSING });\n } else {\n var todayDate = new Date();\n var currentTime = todayDate.getTime();\n var fileName = req.body.pdfName + '.pdf';\n var filePath = \"./pdf/proposal_pdf/\" + fileName;\n var finalHtml = req.body.htmlContent;\n phantom.create([\n '--ignore-ssl-errors=yes',\n '--load-images=yes',\n '--local-to-remote-url-access=yes'\n ]).then(function (ph) {\n ph.createPage().then(function (page) {\n page.property(\n 'paperSize', {\n width: 1250,\n height: 1500,\n margin: {\n top: '0.1cm',\n left: '0.1cm',\n right: '0.1cm',\n bottom: '2cm'\n },\n }).then(function () {\n page.property('content', finalHtml).then(function () {\n setTimeout(function () {\n page.render(filePath).then(function () {\n page.close();\n ph.exit();\n ContactProposal.findOneAndUpdate({ _id: req.body.proposalId }, { $set: { formatId: req.body.configId } }, function (err) {\n if (err) {\n res.json({ code: Constant.ERROR_CODE, message: Constant.INTERNAL_ERROR });\n } else {\n res.json({ code: Constant.SUCCESS_CODE, message: Constant.PDF_GENRATED_SUCESS, pdfurl: Config.webUrl + \"/pdf/proposal_pdf/\" + fileName });\n }\n });\n });\n }, 2000);\n }).catch(function (err) {\n console.log('Err:- ', err);\n });\n }).catch(function (err) {\n console.log('Err:- ', err);\n });\n }).catch(function (err) {\n console.log('Err:- ', err);\n });\n });\n\n }\n }\n else {\n res.json({ code: Constant.ERROR_CODE, message: Constant.REQUIRED_FILED_MISSING });\n }\n\n}", "function doExport() {\n\tvar item;\n\twhile(item = Zotero.nextItem()) {\n\t\t\n\t\tvar creatorsS = item.creators[0].lastName;\n\t\t\t\tif (item.creators.length>2)\n\t\t\t\t\tcreatorsS += \" et al.\";\n\t\t\t\telse if (item.creators.length==2)\n\t\t\t\t\tcreatorsS += \" and \" + item.creators[1].lastName;\n\t\t\n\t\tvar date = Zotero.Utilities.strToDate(item.date);\n\t\tvar dateS = (date.year) ? date.year : item.date;\n\t\t\n\t\tvar titleS = (item.title) ? item.title.replace(/&/g,'&amp;').replace(/\"/g,'&quot;') : \"(no title)\";\n\t\t\n\t\tZotero.write(\"Zotero PDF(s):: [\" + creatorsS + '_' + dateS + \"_\" + titleS + \"]\" + \"(zotero://open-pdf/library/items/\"+item.key+\")\");\n\t}\n}", "function onClickPDF(){\n if(compname === \"\"){\n notification['warning']({\n message: 'Function Error',\n description:\n 'There is no company selected.',\n });\n }else{\n notification['success']({\n message: 'File Download',\n description:\n `PDF file of ${compname} has been exported. `,\n });\n }\n }", "function downloadFormsAsPDF() {\n var doc = new jsPDF('p', 'pt');\n\n var formList = $('.multi-day-form-exercises-info-container .data-form').get();\n\n var formsPerPage = 3;\n\n for(var formGroup = 0; formGroup < formList.length; formGroup+=formsPerPage) {\n \n if(formGroup > 0) {\n doc.addPage();\n }\n\n var yStart = 50;\n var xStart = 20;\n\n var metaDataInfo = addMetaDataToPDF(doc, xStart, yStart);\n\n yStart = metaDataInfo.yStart;\n xStart = metaDataInfo.xStart;\n\n var order = ['Table-Exercises', 'Stretches', 'Thera-Band', 'Machines', 'Floor-Exercises'];\n\n var rowLabelSize = 10;\n doc.setFontSize(rowLabelSize);\n\n var pdfInfo = calculateSizes(doc, formGroup, formsPerPage);\n\n var createTableInfo = createTable(doc, pdfInfo, order, xStart, yStart, formsPerPage);\n \n for(var form = 0; form < formsPerPage && form + formGroup < formList.length; form++) {\n \n fillTable(doc, $(formList[formGroup + form]), form, formsPerPage, pdfInfo, xStart, yStart);\n \n }\n\n doc.text(xStart, 820, \"Powered by Diagraphic Technologies\");\n }\n\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./) || /Edge\\/12./i.test(navigator.userAgent))\n doc.output('save', \"patient_data.pdf\");\n else\n doc.output('dataurlnewwindow');\n}", "generatePdf(toPdf) {\n this.setState({displayPdf: true});\n this.forceUpdate();\n setTimeout(() => {\n // Create the PDF\n toPdf();\n this.setState({displayPdf : false});\n }, 10);\n }", "function writeFile(fileData) {\n //check if directory exists. if not, create it \n if (!fs.existsSync(OUTPUT_DIR)) {\n fs.mkdirSync(OUTPUT_DIR);\n }\n\n ///write to file \n fs.writeFile(outputPath, render(employeeArr), function (error) {\n if (error) {\n console.log(error);\n }\n else {\n console.log(\"html file is created in the output folder\")\n }\n });\n}", "function doSaveDocument() {\n var presenter = new mindmaps.SaveDocumentPresenter(eventBus,\n mindmapModel, new mindmaps.SaveDocumentView(), autosaveController, filePicker);\n presenter.go();\n }", "async function creatPDF() {\n try {\n \n const readHtml = fs.readFileSync('./pdf/newPDF.html', 'utf-8');\n const options = {height: '900px',width: '800px', renderDelay:'1000'};\n \n pdf.create(readHtml, options).toFile('./pdf/newPDF.pdf', function(err, res) {\n if (err) return console.log(err);\n console.log(res); \n });\n \n console.log(\"Successfully wrote to newPDF.html\");\n } catch (err) {\n console.log(err);\n }\n }", "function exportPDFfunction() {\n viz.showExportPDFDialog();\n}", "function GeneratePdf(InvoiceId) {\n var request = { InvoicesIds: InvoiceId };\n\n $.ajax({\n type: \"POST\",\n url: baseURL + \"Invoice/PrepareInvoicePdf\",\n data: JSON.stringify(request),\n contentType: \"application/json; charset=utf-8\",\n dataType: \"json\",\n success: function (msg) {\n var data;\n if (msg.hasOwnProperty(\"d\")) {\n data = msg.d;\n }\n else\n data = msg;\n if (data.success) {\n Notify1(data.message + \"Path to the Document is: <a href='/Documents/Invoices/)\" + data.invoiceName + \"' target='_blank'>Click to Download the Pdf.</a>\", 'success', data.filePath);\n }\n else {\n Notify(data.message, 'error');\n }\n },\n error: function () { CommunicationError(); }\n });\n}", "function SavePSD(saveFile){\n\n psdSaveOptions = new PhotoshopSaveOptions();\n\n psdSaveOptions.embedColorProfile = true;\n\n psdSaveOptions.alphaChannels = true;\n\n activeDocument.saveAs(saveFile, psdSaveOptions, false,\n\nExtension.LOWERCASE);\n\n}", "function Documents() {\n return (\n <div className=\"documentsPage\">\n <img src={brain} alt=\"brain logo\" id=\"logo\"></img>\n <p>\n If you are new to our clinic, please download, print and fill out the \"New patient forms\". \n In addition, if you are seeing Dr. Peterson for a sleep evaluation, please also fill out the \n \"Sleep Health Questionnaire\" If you are seeing Dr. Peterson for chronic headaches, please fill \n out the \"Headache medication list\" form. The Epworth Sleepiness Scale score is included in the \n Sleep Health Questionnaire but provided here separately if needed for sleep disorder screening. \n These forms are to be used in conjunction with your visit with Dr. Peterson and are not intended \n for any other use. \n </p>\n <div className=\"docContainer\">\n <h3>New Patient Forms</h3>\n <a href={newPatientForms} type=\"application/pdf\" width=\"65%\" height=\"600px\" className=\"hidden\">Click here to download/print</a>\n <br/>\n <br/>\n <br/>\n <h3>Sleep Health Questionnaire</h3>\n <a href={sleepHealthQuestionnaire} type=\"application/pdf\" width=\"65%\" height=\"600px\" className=\"hidden\">Click here to download/print</a>\n <br/>\n <br/>\n <br/>\n <h3>Headache Medication List</h3>\n <a href={headacheMedication} type=\"application/pdf\" width=\"65%\" height=\"600px\" className=\"hidden\">Click here to download/print</a>\n <br/>\n <br/>\n <br/>\n <h3>Epworth Sleepiness Scale Score</h3>\n <a href={sleepinessScoreForm} type=\"application/pdf\" width=\"65%\" height=\"600px\" className=\"hidden\">Click here to download/print</a>\n <br/>\n <br/>\n <br/>\n <br/>\n </div>\n <Footer />\n </div>\n )\n}", "function copyPdfToWorkDir(parms, cb) {\n\n\tvar cmd = 'cp /home/pdfdata/' + parms.jcfndfuf2 + ' /home/shareddata/' + parms.jcfndfuf2.trim() + '_ORIGINAL';\n\n\tconsole.log('Processing PDF ' + parms.jcfndfuf2 + ' - Copy JDE PDF file to work Directory');\n\tconsole.log(cmd);\n\texec(cmd, function(error, stdout, stderr) {\n\t\tif (error !== null) {\n\t\t\t\tcb(error, cmd + ' - Failed');\n\t\t\t} else {\n\t\t\t\tcb(null, cmd + ' - Done');\n\t\t\t}\n\t\t}\n\t);\n}", "function viewCorresDocInPdf(corresponid)\n \t\t {\n \t\t \t \n \t\t \t$(\"#corresponid\").val(corresponid);\n \t\t \t$(\"#gencorpdfForm\").submit();\n \t\t }", "function exportPDF(){\r\n let doc = new jsPDF();\r\n let areaCanvas = document.querySelector('#area');\r\n let barCanvas = document.querySelector('#bar');\r\n \r\n // take screenshot of 'area' and 'bar' canvas\r\n if(areaCanvas){\r\n let img1 = areaCanvas.toDataURL('image/png', 1);\r\n doc.addImage(img1, 'PNG', 5, 5);\r\n }\r\n \r\n if(barCanvas){\r\n let img2 = barCanvas.toDataURL('image/png', 1);\r\n doc.addImage(img2, 'PNG', 5, 100);\r\n }\r\n\r\n doc.save('charts.pdf');\r\n}", "function generateReportPDF(absentWorkers, lateWorkers, activeHoursForWorkers, inactiveHoursForWorkers, siteName, clientName) {\n\tabsentWorkers.map(e => delete e.siteDetail);//no needed\n\tlet data = { absentWorkers, lateWorkers, activeHoursForWorkers, inactiveHoursForWorkers };\n\n\tlet day = new Date();\n\tlet fileName = day.getDate() + \"-\" + monthNames[(day.getMonth())] + \"-\" + day.getFullYear();\n\tconst dir = `${global.__base}/reports/${clientName}`;\n\tconst fullPath = `${dir}/${siteName}-${fileName}.json`\n\tif (!fs.existsSync(dir)) {\n\t\tfs.mkdirSync(dir, { recursive: true });\n\t}\n\tfs.writeFile(fullPath, JSON.stringify(data, null, 4), (err) => {\n\t\tif (err) console.log(err);\n\t\telse console.log(`Report Generated ${global.__base}/reports/${siteName}-${fileName}.json`);\n\t}); //enhancemt for JasperReport PDF\n}", "createPDFFile(uid, barcodeArray, barcodePNGArray, real, qr) {\r\n var doc = new PDFDocument({\r\n layout: \"landscape\",\r\n size: [595.28, 841.89]\r\n });\r\n let filename;\r\n if (real) {\r\n filename = \"../pdf/production/\" + uid + \".pdf\";\r\n }\r\n else {\r\n filename = \"../pdf/test/\" + uid + \".pdf\";\r\n }\r\n let stream = doc.pipe(fs.createWriteStream(filename));\r\n let total_double_pages = Math.ceil(barcodePNGArray.length / (this.Card_Layout[0] * this.Card_Layout[1]));\r\n //For each double page, generate front and back side\r\n for (let i = 0; i < total_double_pages; i++) {\r\n //Front Page\r\n if (i != 0) {\r\n doc.addPage({\r\n layout: \"landscape\",\r\n size: [595.28, 841.89]\r\n });\r\n }\r\n //For each card (row, column)\r\n for (let j = 0; j < this.Card_Layout[0]; j++) {\r\n for (let k = 0; k < this.Card_Layout[1]; k++) {\r\n let barcode_index = i * (this.Card_Layout[0] * this.Card_Layout[1]) + j * this.Card_Layout[1] + k;\r\n if (barcode_index < barcodePNGArray.length) {\r\n let x = j * (240 + 18) + 18;\r\n let y = k * (150 + 40) + 20;\r\n // Add the Card Border\r\n doc.image(\"../assets/img/front.jpg\", x, y, {\r\n height: this.Card_Size.height,\r\n width: this.Card_Size.width\r\n });\r\n //Add the QR Code\r\n if (qr) {\r\n doc.image(barcodePNGArray[barcode_index], x + this.QR_Coords[0], y + this.QR_Coords[1], {\r\n width: this.QR_Width,\r\n height: this.QR_Width\r\n });\r\n // Add the Barcode Number\r\n doc.text(\"\" + barcodeArray[barcode_index], x + this.QR_Coords[0], y + this.QR_Coords[1] + this.QR_Width, {\r\n width: 75,\r\n height: 15,\r\n align: \"center\"\r\n });\r\n }\r\n else {\r\n doc.image(barcodePNGArray[barcode_index], x + this.Barcode_Coords[0], y + this.Barcode_Coords[1], {\r\n width: this.Barcode_Width\r\n });\r\n }\r\n }\r\n }\r\n }\r\n //Back Page\r\n /*\r\n doc.addPage({\r\n layout: \"landscape\",\r\n size: [595.28, 841.89]\r\n });\r\n //For each card (row, column)\r\n for (let j = 0; j < this.Card_Layout[0]; j++) {\r\n for (let k = 0; k < this.Card_Layout[1]; k++) {\r\n let barcode_index = i * (this.Card_Layout[0] * this.Card_Layout[1]) + j * this.Card_Layout[1] + k;\r\n if (barcode_index < barcodeArray.length) {\r\n let x = 841.89 - (j * (240 + 18) + 18) - 240;\r\n let y = k * (150 + 40) + 20;\r\n // Add the Card Border\r\n doc.image(\"../assets/img/back.jpg\", x, y, {\r\n height: this.Card_Size.height,\r\n width: this.Card_Size.width\r\n });\r\n }\r\n }\r\n }\r\n */\r\n }\r\n /*\r\n for (var i = 0; i < barcodeArray.length; i++) {\r\n let pageIndex = i % 9;\r\n let rowIndex = pageIndex % 3;\r\n let columnIndex = (pageIndex - rowIndex) / 3;\r\n //Add new Pages\r\n if (pageIndex == 0 && i != 0) {\r\n doc.addPage({\r\n layout: \"landscape\"\r\n });\r\n }\r\n // Calculate Coordinates\r\n let x = rowIndex * (241 + 18) + 18\r\n let y = columnIndex * (150 + 40) + 41\r\n \n // Add the Card Border\r\n doc.image(\"../assets/img/box.jpg\", x, y, {\r\n height: this.Card_Size.height,\r\n width: this.Card_Size.width\r\n });\r\n doc.image(barcodeArray[i], x + this.Barcode_Coords[0], y + this.Barcode_Coords[1], {\r\n width: this.Barcode_Width\r\n });\r\n }\r\n */\r\n doc.end();\r\n return filename;\r\n }", "orderRepair() {\n repairService.updateStatus(this.props.match.params.id, bicycle => {\n this.FrameType = bicycle.Frametype;\n this.BrakeType = bicycle.Braketype;\n this.Wheelsize = bicycle.Wheelsize;\n });\n var pdf = new jsPDF();\n \n var comment = '' + document.getElementById('comment').value;\n var type = this.BicycleType;\n var frame = this.FrameType;\n var brake = this.BrakeType;\n var wheel = this.Wheelsize;\n var text =\n 'AS SykkelUtleie \\n\\nRepair confirmation: \\n \\n' +\n 'Bicycle Type: ' +\n type +\n '\\nFrametype: ' +\n frame +\n '\\nBrake type: ' +\n brake +\n '\\nWheel size:' +\n wheel +\n '\\n\\nExtra comments: ' +\n comment;\n \n pdf.text(text, 10, 10);\n pdf.save('Repair_order.pdf');\n }", "function compileReport(countryCode, options, targetStream) {\n let doc = new PDFDocument({\n size: 'A4',\n layout: 'portrait', // can be 'landscape',\n margin: 25,\n info: {\n Title: 'GBIF Country Report ' + countryCode,\n Author: 'The GBIF Secretariat', // the name of the author\n Subject: '', // the subject of the document\n Keywords: 'Annual report;GBIF;' + countryCode, // keywords associated with the document\n CreationDate: 'DD/MM/YYYY', // the date the document was created (added automatically by PDFKit)\n ModDate: 'DD/MM/YYYY' // the date the document was last modified\n }\n });\n doc.registerFont('Arial', __dirname + '/fonts/Arial-Unicode.ttf');\n doc.registerFont('Arial-Bold', __dirname + '/fonts/Arial-Unicode-Bold.ttf');\n doc.registerFont('Arial-Italic', __dirname + '/fonts/Arial-Unicode-Italic.ttf');\n\n let isInvolvedInprojects = options.projectsWithCountryAsPartner.length > 0;\n let totalNumpages = (isInvolvedInprojects) ? 6 : 5;\n doc.pipe(targetStream);\n\n documentGenerator.header(doc, options);\n documentGenerator.accessAndUsage(doc, options);\n documentGenerator.datAvailability(doc, options);\n documentGenerator.dataMobilization(doc, options);\n doc.addPage();\n documentGenerator.secondaryPageHeader(doc, options, 2, totalNumpages);\n documentGenerator.dataDownloads(doc, options);\n documentGenerator.recentPeerReviewed(doc, options);\n doc.addPage();\n documentGenerator.secondaryPageHeader(doc, options, 3, totalNumpages);\n documentGenerator.selectedTaxonomicGroups(doc, options);\n documentGenerator.getChangeOverTime(doc, options);\n doc.addPage();\n documentGenerator.secondaryPageHeader(doc, options, 4, totalNumpages);\n documentGenerator.recentDatasets(doc, options);\n documentGenerator.recentPublishers(doc, options);\n doc.addPage();\n documentGenerator.secondaryPageHeader(doc, options, 5, totalNumpages);\n documentGenerator.dataSharingWithCountryOfOrigin(doc, options);\n documentGenerator.topDataContributors(doc, options);\n if (isInvolvedInprojects) {\n doc.addPage();\n documentGenerator.secondaryPageHeader(doc, options, 6, totalNumpages);\n documentGenerator.projectParticipation(doc, options);\n }\n doc.end();\n}", "function createPdf(pdfName) {\n if (openSheetMusicDisplay.backendType !== BackendType.SVG) {\n console.log(\"[OSMD] createPdf(): Warning: createPDF is only supported for SVG background for now, not for Canvas.\" +\n \" Please use osmd.setOptions({backendType: SVG}).\");\n return;\n }\n\n if (pdfName === undefined) {\n pdfName = openSheetMusicDisplay.sheet.FullNameString + \".pdf\";\n }\n\n const backends = openSheetMusicDisplay.drawer.Backends;\n let svgElement = backends[0].getSvgElement();\n\n let pageWidth = 210;\n let pageHeight = 297;\n const engravingRulesPageFormat = openSheetMusicDisplay.rules.PageFormat;\n if (engravingRulesPageFormat && !engravingRulesPageFormat.IsUndefined) {\n pageWidth = engravingRulesPageFormat.width;\n pageHeight = engravingRulesPageFormat.height;\n } else {\n pageHeight = pageWidth * svgElement.clientHeight / svgElement.clientWidth;\n }\n\n const orientation = pageHeight > pageWidth ? \"p\" : \"l\";\n // create a new jsPDF instance\n const pdf = new jsPDF(orientation, \"mm\", [pageWidth, pageHeight]);\n const scale = pageWidth / svgElement.clientWidth;\n for (let idx = 0, len = backends.length; idx < len; ++idx) {\n if (idx > 0) {\n pdf.addPage();\n }\n\n svgElement = backends[idx].getSvgElement();\n\n // render the svg element\n html2canvas(svgElement.parentElement).then(canvas => {\n let oImg = new Image();\n oImg.src = canvas.toDataURL(); // 导出图片\n document.body.appendChild(oImg); // 将生成的图片添加到body\n\n });\n\n }\n\n\n\n // note that using jspdf with svg2pdf creates unnecessary console warnings \"AcroForm-Classes are not populated into global-namespace...\"\n // this will hopefully be fixed with a new jspdf release, see https://github.com/yWorks/jsPDF/pull/32\n}", "function PdfExport(parent) {\n Grid.Inject(GridPdf);\n this.parent = parent;\n this.dataResults = {};\n this.addEventListener();\n }", "function writeToFile(fileName, rendered) {\n fs.writeFile(fileName, rendered, (err) =>\n err ? console.log(err) : console.log('Success!')\n );\n}", "function generatePDF(){\n $('#invoice tr:first th').each(function() {\n var value = $(this).css(\"position\", \"static\");\n });\n const element = document.getElementById(\"invoice\");\n $(\"#check\").hide();\n $(\"table td:nth-child(\"+($(\"#check\").index() + 1)+\")\").hide();\n \n var opt = {\n margin: 1,\n filename: 'report.pdf',\n image: { type: 'jpeg', quality: 0.98 },\n html2canvas: { scale: 2 },\n enableLinks: false,\n pagebreak: {mode: \"avoid-all\"},\n jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' }\n };\n html2pdf()\n .set(opt)\n .from(element)\n .save();\n html2pdf().set(opt).from(element).toPdf().get('pdf').then(function (pdf) {\n $('#invoice tr:first th').each(function() {\n var value = $(this).css(\"position\", \"sticky\");\n $(\"#check\").show();\n $(\"table td:nth-child(\"+($(\"#check\").index() + 1)+\")\").show();\n $(\"input:checkbox[name=check]\").prop(\"checked\",true);\n });\n });\n}", "saveAsOneFile() {\r\n // HTML exportation\r\n this.saveFile('index', 'HTML', this.content)\r\n // We show the export result\r\n setTimeout(this.showOutput, 2500)\r\n }", "async function getPDFPreview(ctx) {\n\ttry {\n\n\t\tconst { shop } = ctx.session\n\t\t// Generate random file name\n\t\tlet tempFileName = `${UUIDv4()}.pdf`;\n\n\t\tconst {\n\t\t\theaderTemplateText,\n\t\t\torderTemplateText,\n\t\t\tproductTemplateText,\n\t\t\tfooterTemplateText\n\t\t} = await getUserSettings(shop)\n\n\t\tconst pdfText = createPreviewText(headerTemplateText, orderTemplateText, productTemplateText, footerTemplateText)\n\n\t\tawait writePDF(tempFileName, pdfText)\n\n\t\t// Read the created file\n\t\tconst readStream = fs.createReadStream(tempFileName);\n\t\t// Create an array of buffers \n\t\tlet data = [];\n\t\treadStream.on('data', (d) => data.push(d));\n\n\t\t// Wait until the read stream finishes\n\t\tawait streamEnd(readStream);\n\n\t\t// Delete the pdf file\n\t\tfs.unlinkSync(tempFileName);\n\n\t\tconst pdfBinary = Buffer.concat(data)\n\t\tconst pdfBase64 = pdfBinary.toString('base64')\n\n\t\tctx.type = 'application/pdf';\n\t\tctx.body = pdfBase64;\n\n\t} catch (err) {\n\t\tconsole.log('Failed getting pdf preview: ', err)\n\t}\n}", "Print() {\n var self = this;\n self.updatePDF((res) => {\n // console.log(res)\n // const newPdfBytes = res;\n let bin = String.fromCharCode.apply(null, res);\n console.log(bin)\n const base64 = btoa(bin);\n printJS({printable: base64, type: 'pdf', base64: true});\n })\n }", "function turnPDFintoImage(){\n return ()=>{\n return new Promise((resolve,reject)=>{\n console.log('Attempting to convert to images and paste into DropBox.');\n exec('convert -monitor -density 300 definitions.pdf -quality 100 ~/Dropbox/Backgrounds/Words/word.jpg', function(err, out, code) {\n if (err instanceof Error){\n process.stderr.write('Error:' + err);\n throw err;\n }\n process.stdout.write('out'+ out);\n console.log('Converted to images');\n resolve();\n });\n });\n }\n}", "function reportDownload (snapshot) {\n console.log(snapshot.val());\n var values = snapshot.val();\n var doc = new jsPDF(\"p\", \"mm\", \"a4\");\n var timeSplit = values.timeStart.split(\" \")[0].split(\"/\");\n \n // Title of the DOC\n var title = values.short + \"_\" + values.jobNum + \"_\" + timeSplit[2] + timeSplit[0] + timeSplit[1] + \"_\" + values.submittedInitials;\n console.log(title);\n \n // Job Type\n var type;\n if(values.type == 'DPR') type = \"Daily Progress Report\";\n else type = values.type;\n \n // Report Type\n doc.text(type, 110, 36, 'center');\n \n // Main Info\n var mainCol = [\n {datakey: \"1\"},\n {datakey: \"2\"},\n {datakey: \"3\"},\n {datakey: \"4\"}\n ];\n var mainRows = [\n {\"0\": \"PROJECT NAME: \", \"1\": values.jobName, \"2\": \"JOB NUMBER:\", \"3\": values.jobNum},\n {\"0\": \"SUBMITTED BY: \", \"1\": values.submittedBy, \"2\": \"CONTRACTOR: \", \"3\": values.contractor},\n {\"0\": \"START TIME: \", \"1\": values.timeStart, \"2\": \"END TIME: \", \"3\": values.timeEnd},\n {\"0\": \"TIME TOTAL: \", \"1\": values.timeTotal, \"2\": \"FOREMAN: \", \"3\": values.foreman}\n ];\n \n // Table for Main Info\n doc.autoTable(mainCol, mainRows, {\n theme: \"grid\",\n startY: 40,\n showHeader: \"never\",\n styles: {overflow: 'linebreak', fontSize: 8},\n margin: {horizontal: 20},\n columnStyles: {text: {columnWidth: 'auto'}},\n createdCell: function(cell, dataRows) {\n if(dataRows.column.index === 0 || dataRows.column.index === 2) { \n cell.styles.fontStyle = 'bold'; \n cell.styles.fillColor = [178, 8, 175]; // 26, 188, 156\n cell.styles.textColor = [255, 255, 255];\n }\n }\n });\n \n // Table for DPR Lunch\n if(values.type == \"DPR\") {\n var lunchRows = [\n {\"0\": values.tasks.lunch}\n ]\n var lunchCols= [\n {title: \"LUNCH LENGTH (Minutes)\", datakey: \"lunch\"}\n ];\n\n doc.autoTable(lunchCols, lunchRows, {\n theme: \"grid\",\n startY: doc.autoTable.previous.finalY+5,\n styles: {overflow: 'linebreak', fontSize: 8},\n fontSize: 8,\n margin: {horizontal: 20},\n columnStyles: {text: {columnWidth: 'auto'}}\n });\n \n // Table for DPR Employee's Hours\n if(values.employees != null) {\n var employeeRows = [];\n for(var i = 0; i < values.employees.length; i++) {\n employeeRows.push({\"0\": values.employees[i].name, \"1\": values.employees[i].hours});\n }\n var employeeCols= [\n {title: \"EMPLOYEE NAME\", datakey: \"name\"}, {title: \"HOURS\", datakey: \"hours\"}\n ];\n\n doc.autoTable(employeeCols, employeeRows, {\n theme: \"grid\",\n startY: doc.autoTable.previous.finalY + 5,\n styles: {overflow: 'linebreak', fontSize: 8},\n fontSize: 8,\n margin: {horizontal: 20},\n columnStyles: {text: {columnWidth: 'auto'}}\n });\n }\n \n var materialRows = [];\n for(var i = 0; i < values.materials.length; i++) {\n materialRows.push({\"0\": values.materials[i].needed, \"1\": values.materials[i].by});\n }\n var materialCols= [\n {title: \"MATERIALS NEEDED\", datakey: \"needed\"}, {title: \"BY\", datakey: \"by\"}\n ];\n \n doc.autoTable(materialCols, materialRows, {\n theme: \"grid\",\n startY: doc.autoTable.previous.finalY+5,\n styles: {overflow: 'linebreak', fontSize: 8},\n fontSize: 8,\n margin: {horizontal: 20},\n columnStyles: {text: {columnWidth: 'auto'}}\n });\n \n var workRows = [];\n for(var i = 0; i < values.work.length; i++) {\n workRows.push({\"0\": values.work[i].performed, \"1\": values.work[i].location});\n }\n var workCols= [\n {title: \"WORK PERFORMED\", datakey: \"performed\"}, {title: \"LOCATION\", datakey: \"location\"}\n ];\n \n doc.autoTable(workCols, workRows, {\n theme: \"grid\",\n startY: doc.autoTable.previous.finalY+5,\n styles: {overflow: 'linebreak', fontSize: 8},\n fontSize: 8,\n margin: {horizontal: 20},\n columnStyles: {text: {columnWidth: 'auto'}}\n });\n }\n \n /*\n var progressRows = [];\n for(var i = 0; i < values.progress.length; i++) {\n progressRows.push({\"0\": values.progress[i].location, \"1\": values.progress[i].description, \"2\": values.progress[i].percent});\n }\n var progressCols= [\n {title: \"PROGRESS LOCATION\", datakey: \"progress\"}, {title: \"DESCRIPTION\", datakey: \"description\"}, {title: \"PERCENT\", datakey: \"percent\"}\n ];\n\n doc.autoTable(progressCols, progressRows, {\n theme: \"grid\",\n startY: doc.autoTable.previous.finalY,\n styles: {overflow: 'linebreak', fontSize: 8},\n fontSize: 8,\n margin: {horizontal: 20},\n columnStyles: {text: {columnWidth: 'auto'}}\n });\n */\n \n \n // Table for DPR Tasks\n if(values.type == \"DPR\" && values.tasks != null) {\n var i = 0;\n while(values.tasks[i] != null) {\n var tasksARows = [\n {\"0\": values.tasks[i].location}\n ]\n var tasksACols = [\n {title: \"TASK LOCATION\", datakey: \"location\"}\n ];\n\n doc.autoTable(tasksACols, tasksARows, {\n theme: \"grid\",\n startY: doc.autoTable.previous.finalY+5,\n styles: {overflow: 'linebreak', fontSize: 8},\n fontSize: 8,\n margin: {horizontal: 20},\n columnStyles: {text: {columnWidth: 'auto'}}\n });\n var tasksBRows = [\n {\"0\": values.tasks[i].tr,\n \"1\": values.tasks[i].pathways,\n \"2\": values.tasks[i].roughin,\n \"3\": values.tasks[i].terminations,\n \"4\": values.tasks[i].testing}\n ]\n var tasksBCols= [\n {title: \"Tr %\", datakey: \"tr\"},\n {title: \"Pathways %\", datakey: \"pathways\"},\n {title: \"Roughin %\", datakey: \"roughin\"},\n {title: \"Terminations %\", datakey: \"terminations\"},\n {title: \"Testing %\", datakey: \"testing\"}\n ];\n\n doc.autoTable(tasksBCols, tasksBRows, {\n theme: \"grid\",\n startY: doc.autoTable.previous.finalY,\n styles: {overflow: 'linebreak', fontSize: 8},\n fontSize: 8,\n margin: {horizontal: 20},\n columnStyles: {text: {columnWidth: 'auto'}}\n });\n i++;\n }\n }\n \n \n // Table for IQR\n var iqrRows = [\n {\"0\": values.iqr}\n ]\n var iqrCols= [\n {title: \"Issues / Questions / Remarks\", datakey: \"iqr\"}\n ];\n\n doc.autoTable(iqrCols, iqrRows, {\n theme: \"grid\",\n startY: doc.autoTable.previous.finalY+5,\n styles: {overflow: 'linebreak', fontSize: 8},\n fontSize: 8,\n margin: {horizontal: 20},\n columnStyles: {text: {columnWidth: 'auto'}}\n });\n \n \n // Non-DPR List\n if(values.type != \"DPR\" && values.lunch != null) {\n var lunchRows = [\n //{\"0\": values.lunch}\n {\"0\": \"LUNCH LENGTH (Minutes): \", \"1\": values.lunch}\n ]\n var lunchCols= [\n //{title: \"LUNCH LENGTH (Minutes)\", datakey: \"lunch\"},\n {datakey: \"0\"},\n {datakey: \"1\"}\n ];\n\n doc.autoTable(lunchCols, lunchRows, {\n theme: \"grid\",\n startY: doc.autoTable.previous.finalY+5,\n styles: {overflow: 'linebreak', fontSize: 8},\n fontSize: 8,\n showHeader: \"never\",\n margin: {horizontal: 20},\n columnStyles: {text: {columnWidth: 'auto'}},\n createdCell: function(cell, dataRows) {\n if(dataRows.column.index === 0) { \n cell.styles.fontStyle = 'bold'; \n cell.styles.fillColor = [178, 8, 175]; // 26, 188, 156\n cell.styles.textColor = [255, 255, 255];\n }\n }\n });\n }\n for(var i = 0; values.list != null && i < values.list.length; i++) {\n if(values.list[i].type != null) {\n switch(values.list[i].type) {\n case \"title\":\n var listCols = [\n {title: values.list[i].work, datakey: (\"title_\" + i)}\n ];\n var listRows = [\n ];\n doc.autoTable(listCols, listRows, {\n theme: \"grid\",\n startY: doc.autoTable.previous.finalY+5,\n styles: {overflow: 'linebreak', fontSize: 8},\n fontSize: 8,\n margin: {horizontal: 20},\n columnStyles: {text: {columnWidth: 'auto'}}\n });\n break;\n case \"costCode\":\n case \"costCodeFillable\":\n var listCols = [\n {datakey: \"5\"},\n {datakey: \"6\"},\n {datakey: \"7\"},\n {datakey: \"8\"}\n ];\n var listRows = [\n {\"0\": values.list[i].work, \"1\": \"Cost Code: \" + values.list[i].code, \"2\": \"Hours: \" + values.list[i].hours, \"3\": \"Overtime Hours: \" + values.list[i].ot},\n {\"0\": \"ISSUED MATERIALS: \", \"1\": values.list[i].issued, \"2\": \"INSTALLED MATERIALS: \", \"3\": values.list[i].installed}\n ];\n doc.autoTable(listCols, listRows, {\n theme: \"grid\",\n startY: doc.autoTable.previous.finalY,\n styles: {overflow: 'linebreak', fontSize: 8},\n fontSize: 8,\n margin: {horizontal: 20},\n showHeader: \"never\",\n columnStyles: {text: {columnWidth: 'auto'}}\n });\n break;\n }\n }\n else {\n if(values.list[i].title == true) {\n var listCols = [\n {title: values.list[i].work, datakey: (\"title_\" + i)}\n ];\n var listRows = [\n ];\n doc.autoTable(listCols, listRows, {\n theme: \"grid\",\n startY: doc.autoTable.previous.finalY+5,\n styles: {overflow: 'linebreak', fontSize: 8},\n fontSize: 8,\n margin: {horizontal: 20},\n columnStyles: {text: {columnWidth: 'auto'}}\n });\n }\n else{\n var listCols = [\n {datakey: \"5\"},\n {datakey: \"6\"},\n {datakey: \"7\"},\n {datakey: \"8\"}\n ];\n var listRows = [\n {\"0\": values.list[i].work, \"1\": \"Cost Code: \" + values.list[i].code, \"2\": \"Hours: \" + values.list[i].hours, \"3\": \"Overtime Hours: \" + values.list[i].ot},\n {\"0\": \"ISSUED MATERIALS: \", \"1\": values.list[i].issued, \"2\": \"INSTALLED MATERIALS: \", \"3\": values.list[i].installed}\n ];\n doc.autoTable(listCols, listRows, {\n theme: \"grid\",\n startY: doc.autoTable.previous.finalY,\n styles: {overflow: 'linebreak', fontSize: 8},\n fontSize: 8,\n margin: {horizontal: 20},\n showHeader: \"never\",\n columnStyles: {text: {columnWidth: 'auto'}}\n });\n }\n }\n }\n\n // Download Document\n doc.save(title);\n}", "function OutFile() {\r\n}", "function previewFile()\n{\n /* Initialize the AdobeDC View object */\n var adobeDCView = new AdobeDC.View({\n /* Pass your registered client id */\n clientId: \"0150757769224f6787a0ae67e2698795\"\n });\n\n /* Invoke the file preview API on Adobe DC View object */\n adobeDCView.previewFile({\n /* Pass information on how to access the file */\n content: {\n /* Location of file where it is hosted */\n location: {\n if(btnChoice === \"view-pdf-btn\"){\n url: \"https://dl.dropboxusercontent.com/s/350jqdhkd3kcqgw/conversationPits.pdf\"\n } ,\n /*\n If the file URL requires some additional headers, then it can be passed as follows:-\n header: [\n {\n key: \"<HEADER_KEY>\",\n value: \"<HEADER_VALUE>\",\n }\n ]\n */\n },\n },\n /* Pass meta data of file */\n metaData: {\n /* file name */\n fileName: \"Conversation Pits.pdf\"\n }\n }, viewerConfig);\n}", "function backupPdfFile(parms, cb) {\n\n\tvar cmd = 'cp /home/pdfdata/' + parms.jcfndfuf2 + ' /home/shareddata/backup/' + parms.jcfndfuf2;\n\n\tconsole.log('Processing PDF ' + parms.jcfndfuf2 + ' - Copy JDE PDF file to Backup Directory');\n\tconsole.log(cmd);\n\texec(cmd, function(error, stdout, stderr) {\n\t\tif (error !== null) {\n\t\t\t\tcb(error, cmd + ' - Failed');\n\t\t\t} else {\n\t\t\t\tcb(null, cmd + ' - Done');\n\t\t\t}\n\t\t}\n\t);\n\n}", "async function runMyProccess() {\n const fs = require(\"fs\");\n\n let buf = fs.readFileSync(\"resource/source.xml\", {\n encoding: \"utf8\",\n flag: \"r\",\n });\n const matches = buf\n .toString()\n .match(/(href=\")([^\"]*)(\")/g)\n .map(\n (cStr) => `${BASEURL}/${cStr.replace(/^href=\"/, \"\").replace(/\"/, \"\")}`\n );\n const textResult = matches.reduce(\n (str, cStr) => str + (str ? \"\\r\" : \"\") + cStr,\n \"\"\n );\n if(!fs.existsSync(\"output\")) {\n fs.mkdirSync(\"output\");\n }\n if(!fs.existsSync(outputFolder)) {\n fs.mkdirSync(outputFolder);\n }\n if(!fs.existsSync(outputFolderJSON)) {\n fs.mkdirSync(outputFolderJSON);\n }\n if(!fs.existsSync(outputFolderTEXT)) {\n fs.mkdirSync(outputFolderTEXT);\n }\n fs.writeFileSync(outputLinksTEXT, textResult, (err) => {\n if (err) console.log(err);\n console.log(\"Result text doc links saved!\");\n });\n fs.writeFileSync(\n outputLinksJSON,\n JSON.stringify({ matches }),\n async (err) => {\n if (err) {\n console.log(`NotOk: ${outputLinksJSON}, ${JSON.stringify({ err })}`);\n exit();\n }\n console.log(`Json saved!`);\n }\n );\n await downloadHtml();\n await htmlToPdf();\n exit(\"\\n ok\");\n}", "function BuildPDF(data, file) {\n\tlet PDFLayout = {\n\t\tpath: OutputDir + UpdateFileName(file, \"pdf\"),\n\t\tformat: 'A4',\n\t\tscale: .9,\n\t\tdisplayHeaderFooter: false,\n\t\tmargin: { top: 50, bottom: 50, right: '50', left: '50' }\n\t};\n\n\t// Async function as this is event/time sensitive\n\t(async () => {\n\t\tconst browser = await puppeteer.launch({\n\t\t\targs: [\n\t\t\t\t'--headless',\n\t\t\t\t'--no-sandbox',\n\t\t\t\t'--disable-setuid-sandbox'\n\t\t\t]\n\t\t})\n\t\tconst page = await browser.newPage();\n\t\tawait page.goto(`data:text/html;,${encodeURIComponent(data)}`, { waitUntil: 'networkidle0' });\n\t\tawait page.pdf(PDFLayout);\n\t\tawait browser.close();\n\t})();\n\n\tconsole.log(\"Built PDF file: \" + UpdateFileName(file, \"pdf\"));\n}", "function file_pdf(path) {\n const url = window.location.origin + path;\n const inline_url = `${url}?inline=true`\n const file_name = decodeURI(path.slice(path.lastIndexOf('/') + 1, path.length))\n var content = `\n <div class=\"container\"><br>\n <div class=\"card\">\n <div class=\"card-body text-center\">\n <div class=\"alert alert-danger\" id=\"folderne\" role=\"alert\"></div><script>document.getElementById(\"folderne\").innerHTML=decodeURI(this.window.location.href.substring(window.location.href.lastIndexOf('/',window.location.href.lastIndexOf('/')+1))).replace('/','').replace('?a=view','');</script>\n <object data=\"${inline_url}\" type=\"application/pdf\" name=\"${file_name}\" style=\"width:100%;height:94vh;\"><embed src=\"${inline_url}\" type=\"application/pdf\"/></object>\n </div>\n <p class=\"card-text text-center\"><a href=\"${url}\" class=\"btn btn-primary\">Download</a></p><br>\n </div>\n </div>\n `;\n $('#content').removeClass('mdui-container').addClass('mdui-container-fluid').css({\n padding: 0\n }).html(content);\n}", "function saveDocumentAs() {\n if (checkLocalStorage()) {\n var saveName = prompt(\"Save file as...\", getCurrentFileName());\n if (saveName && saveName !== UnsavedFileName) {\n setCurrentFileName(saveName);\n saveDiagramProperties()\n window.localStorage.setItem(saveName, myDiagram.model.toJson());\n myDiagram.isModified = false;\n }\n }\n}", "function PDF_evaluation(callback){\n\tconsole.log(\"Start evaluating PDF\");\n\texecFile('./eval.sh', ['upload/pdf', 'grey'], (err, stdout, stderr) => {\n\t\tif (err){\n\t\t\tconsole.log(\"Error occur\");\n\t\t\tcallback(err);\n\t\t}\n\t\tconsole.log(\"Finish evaluating\");\n\t\tconsole.log(`stdout: ${stdout}`);\n\t\tcallback(stdout);\n\t});\n}", "function processPDF() {\n\t// lock process and prevent user resubmission\n\tprocessing = true;\n\tvar progress = $(\"#progressDisplay\");\n\t$(\"#uploadPDFDiv\").addClass(\"disableButtons\");\n\t\n\t// convert file to text\n\tvar file = document.getElementById(\"pdfInput\").files[0];\n\tif(file == null || !(\"name\" in file) || !file.name.endsWith(\".pdf\")) {\n\t\tprogress.text(\"No file selected or invalid format\");\n\t}\n\tprogress.text(\"Converting file to text\");\n\tPdf2TextClass().convertPDF(file, function(page, total) {}, function(pages) {\n\t\t// called when the pdf is fully converted to text. Finds all unique words\n\t\t\n\t\tprogress.text(\"finding unique words and chapters\");\n\t\tvar start = $(\"#startPageNumber\").val();\n\t\tvar end = $(\"#endPageNumber\").val();\n\t\tvar auto = $(\"#autoChidCheck\").prop(\"checked\");\n\t\tvar prefix = $(\"#prefixInput\").val();\n\t\t\n\t\t// check for bad ch_id prefix\n\t\tif(!prefix.match(/^([1-8]((M|N|S|SS|EN)([0-9][0-9]\\.)?([0-9][0-9])?)?)?$/)) {\n\t\t\tprogress.text(\"chapter prefix isn't formatted correctly\");\n\t\t\tfinishProcessingPDF();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\tvar words = findUniqueWordsFromString(pages, auto, $(\"#chapInput\").val(), prefix,\n\t\t\t\t\t\t\t\t\t\t\tstart, end);\n\t\tif(words === false) {\n\t\t\tprogress.text(\"You can't autogenerate ch_ids if you specify 'start' and 'end'\");\n\t\t\tfinishProcessingPDF();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tupdateContext(pages, start, end);\n\t\t\n\t\t\n\t\tprogress.text(\"uploading...\");\n\t\t\n\t\tmaxProgress = 0;\n\t\t// uploads the words to the backend to be added to the dictionary\n\t\t$.post(\"backend.php\",\n\t\t\t\t{'loginInfo': {\"allowed\": true, 'user': 'me'},\n\t\t\t\t'wordList': JSON.stringify(words)},\n\t\t\t\tfunction(data, status, jqXHR) {\n\t\t\t\t\t// called when the post request returns (whether successful or not)\n\t\t\t\t\tif('status' in data && data['status']['type'] == 'error') {\n\t\t\t\t\t\t// after a non-fatal error\n\t\t\t\t\t\tprogress.text(\"Failed with error: \" + data['status']['value']);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprogress.html(\"Done!<br>Success: \" + (data['success'] || \"\")\n\t\t\t\t\t\t\t+ \"<br>Fully skipped for unknown reason: \" + (data['fullSkip'] || \"\")\n\t\t\t\t\t\t\t+ \"<br>Some definitions skipped for unknown reason: \" + (data['partSkip'] || \"\")\n\t\t\t\t\t\t\t+ \"<br>Some definitions missing vital data: \" + (data['partMissing'] || \"\")\n\t\t\t\t\t\t\t+ \"<br>Already Existed: \" + (data['exists'] || \"\")\n\t\t\t\t\t\t\t+ \"<br>Connection error: \" + (data[\"noCon\"] || \"\")\n\t\t\t\t\t\t\t+ \"<br>Canceled: \" + (data['canceled'] || \"\"));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// show the first instance of the word in context\n\t\t\t\t\tmoveContext(0);\n\t\t\t\t\t\n\t\t\t\t\tfinishProcessingPDF();\n\t\t\t\t\t\n\t\t\t\t}, \"json\").fail(function(){\n\t\t\t\t\t\t// called after a fatal error\n\t\t\t\t\t\tprogress.text(\"Network or Internal Error while connecting to server. Check with the developers!\");\n\t\t\t\t\t\tfinishProcessingPDF();\n\t\t\t\t\t});\n\t\t\n\t\t// start allowing cancelation\n\t\t$(\"#cancelUploadButton\").show();\n\t\t\n\t\t// start updating the progress bar\n\t\tprogressTimer = setInterval(function() {\n\t\t\t$.get(\"backend.php\",\n\t\t\t\t\t{'loginInfo': {\"allowed\": true, 'user': 'me'}, \"progress\": true},\n\t\t\t\t\tfunction(data, status, jqXHR) {\n\t\t\t\t\t\tvar output = data['progress'];\n\t\t\t\t\t\tif(!output || output[\"position\"] < maxProgress) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmaxProgress = output[\"position\"];\n\t\t\t\t\t\tprogress.text(\"Adding definition: \" + output[\"position\"] + \" / \" + output['length']);\n\t\t\t\t\t}, \"json\");\n\t\t}, 1000);\n\t});\n}", "function writeFile(fileName, data) {\n const pageMD = generateMarkdown(data);\n fs.writeFile(fileName, pageMD, function(err) {\n if (err) {\n return console.log(err);\n }\n \n console.log('Success!');\n }); \n}", "function downloadPdf(req, res) {\n var path = require('path');\n var mime = require('mime');\n\n var file = './public/pdf/'+protocol+'.pdf';\n\n var filename = path.basename(file);\n var mimetype = mime.lookup(file);\n\n res.setHeader('Content-disposition', 'attachment; filename=' + filename);\n res.setHeader('Content-type', mimetype);\n\n var filestream = fs.createReadStream(file);\n filestream.pipe(res);\n}", "async setupPDF() {\n\n\t\tconst config = this.Reveal.getConfig();\n\t\tconst slides = queryAll( this.Reveal.getRevealElement(), SLIDES_SELECTOR )\n\n\t\t// Compute slide numbers now, before we start duplicating slides\n\t\tconst injectPageNumbers = config.slideNumber && /all|print/i.test( config.showSlideNumber );\n\n\t\tconst slideSize = this.Reveal.getComputedSlideSize( window.innerWidth, window.innerHeight );\n\n\t\t// Dimensions of the PDF pages\n\t\tconst pageWidth = Math.floor( slideSize.width * ( 1 + config.margin ) ),\n\t\t\tpageHeight = Math.floor( slideSize.height * ( 1 + config.margin ) );\n\n\t\t// Dimensions of slides within the pages\n\t\tconst slideWidth = slideSize.width,\n\t\t\tslideHeight = slideSize.height;\n\n\t\tawait new Promise( requestAnimationFrame );\n\n\t\t// Let the browser know what page size we want to print\n\t\tcreateStyleSheet( '@page{size:'+ pageWidth +'px '+ pageHeight +'px; margin: 0px;}' );\n\n\t\t// Limit the size of certain elements to the dimensions of the slide\n\t\tcreateStyleSheet( '.reveal section>img, .reveal section>video, .reveal section>iframe{max-width: '+ slideWidth +'px; max-height:'+ slideHeight +'px}' );\n\n\t\tdocument.documentElement.classList.add( 'print-pdf' );\n\t\tdocument.body.style.width = pageWidth + 'px';\n\t\tdocument.body.style.height = pageHeight + 'px';\n\n\t\tconst viewportElement = document.querySelector( '.reveal-viewport' );\n\t\tlet presentationBackground;\n\t\tif( viewportElement ) {\n\t\t\tconst viewportStyles = window.getComputedStyle( viewportElement );\n\t\t\tif( viewportStyles && viewportStyles.background ) {\n\t\t\t\tpresentationBackground = viewportStyles.background;\n\t\t\t}\n\t\t}\n\n\t\t// Make sure stretch elements fit on slide\n\t\tawait new Promise( requestAnimationFrame );\n\t\tthis.Reveal.layoutSlideContents( slideWidth, slideHeight );\n\n\t\t// Batch scrollHeight access to prevent layout thrashing\n\t\tawait new Promise( requestAnimationFrame );\n\n\t\tconst slideScrollHeights = slides.map( slide => slide.scrollHeight );\n\n\t\tconst pages = [];\n\t\tconst pageContainer = slides[0].parentNode;\n\t\tlet slideNumber = 1;\n\n\t\t// Slide and slide background layout\n\t\tslides.forEach( function( slide, index ) {\n\n\t\t\t// Vertical stacks are not centred since their section\n\t\t\t// children will be\n\t\t\tif( slide.classList.contains( 'stack' ) === false ) {\n\t\t\t\t// Center the slide inside of the page, giving the slide some margin\n\t\t\t\tlet left = ( pageWidth - slideWidth ) / 2;\n\t\t\t\tlet top = ( pageHeight - slideHeight ) / 2;\n\n\t\t\t\tconst contentHeight = slideScrollHeights[ index ];\n\t\t\t\tlet numberOfPages = Math.max( Math.ceil( contentHeight / pageHeight ), 1 );\n\n\t\t\t\t// Adhere to configured pages per slide limit\n\t\t\t\tnumberOfPages = Math.min( numberOfPages, config.pdfMaxPagesPerSlide );\n\n\t\t\t\t// Center slides vertically\n\t\t\t\tif( numberOfPages === 1 && config.center || slide.classList.contains( 'center' ) ) {\n\t\t\t\t\ttop = Math.max( ( pageHeight - contentHeight ) / 2, 0 );\n\t\t\t\t}\n\n\t\t\t\t// Wrap the slide in a page element and hide its overflow\n\t\t\t\t// so that no page ever flows onto another\n\t\t\t\tconst page = document.createElement( 'div' );\n\t\t\t\tpages.push( page );\n\n\t\t\t\tpage.className = 'pdf-page';\n\t\t\t\tpage.style.height = ( ( pageHeight + config.pdfPageHeightOffset ) * numberOfPages ) + 'px';\n\n\t\t\t\t// Copy the presentation-wide background to each individual\n\t\t\t\t// page when printing\n\t\t\t\tif( presentationBackground ) {\n\t\t\t\t\tpage.style.background = presentationBackground;\n\t\t\t\t}\n\n\t\t\t\tpage.appendChild( slide );\n\n\t\t\t\t// Position the slide inside of the page\n\t\t\t\tslide.style.left = left + 'px';\n\t\t\t\tslide.style.top = top + 'px';\n\t\t\t\tslide.style.width = slideWidth + 'px';\n\n\t\t\t\tthis.Reveal.slideContent.layout( slide );\n\n\t\t\t\tif( slide.slideBackgroundElement ) {\n\t\t\t\t\tpage.insertBefore( slide.slideBackgroundElement, slide );\n\t\t\t\t}\n\n\t\t\t\t// Inject notes if `showNotes` is enabled\n\t\t\t\tif( config.showNotes ) {\n\n\t\t\t\t\t// Are there notes for this slide?\n\t\t\t\t\tconst notes = this.Reveal.getSlideNotes( slide );\n\t\t\t\t\tif( notes ) {\n\n\t\t\t\t\t\tconst notesSpacing = 8;\n\t\t\t\t\t\tconst notesLayout = typeof config.showNotes === 'string' ? config.showNotes : 'inline';\n\t\t\t\t\t\tconst notesElement = document.createElement( 'div' );\n\t\t\t\t\t\tnotesElement.classList.add( 'speaker-notes' );\n\t\t\t\t\t\tnotesElement.classList.add( 'speaker-notes-pdf' );\n\t\t\t\t\t\tnotesElement.setAttribute( 'data-layout', notesLayout );\n\t\t\t\t\t\tnotesElement.innerHTML = notes;\n\n\t\t\t\t\t\tif( notesLayout === 'separate-page' ) {\n\t\t\t\t\t\t\tpages.push( notesElement );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tnotesElement.style.left = notesSpacing + 'px';\n\t\t\t\t\t\t\tnotesElement.style.bottom = notesSpacing + 'px';\n\t\t\t\t\t\t\tnotesElement.style.width = ( pageWidth - notesSpacing*2 ) + 'px';\n\t\t\t\t\t\t\tpage.appendChild( notesElement );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// Inject page numbers if `slideNumbers` are enabled\n\t\t\t\tif( injectPageNumbers ) {\n\t\t\t\t\tconst numberElement = document.createElement( 'div' );\n\t\t\t\t\tnumberElement.classList.add( 'slide-number' );\n\t\t\t\t\tnumberElement.classList.add( 'slide-number-pdf' );\n\t\t\t\t\tnumberElement.innerHTML = slideNumber++;\n\t\t\t\t\tpage.appendChild( numberElement );\n\t\t\t\t}\n\n\t\t\t\t// Copy page and show fragments one after another\n\t\t\t\tif( config.pdfSeparateFragments ) {\n\n\t\t\t\t\t// Each fragment 'group' is an array containing one or more\n\t\t\t\t\t// fragments. Multiple fragments that appear at the same time\n\t\t\t\t\t// are part of the same group.\n\t\t\t\t\tconst fragmentGroups = this.Reveal.fragments.sort( page.querySelectorAll( '.fragment' ), true );\n\n\t\t\t\t\tlet previousFragmentStep;\n\n\t\t\t\t\tfragmentGroups.forEach( function( fragments, index ) {\n\n\t\t\t\t\t\t// Remove 'current-fragment' from the previous group\n\t\t\t\t\t\tif( previousFragmentStep ) {\n\t\t\t\t\t\t\tpreviousFragmentStep.forEach( function( fragment ) {\n\t\t\t\t\t\t\t\tfragment.classList.remove( 'current-fragment' );\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Show the fragments for the current index\n\t\t\t\t\t\tfragments.forEach( function( fragment ) {\n\t\t\t\t\t\t\tfragment.classList.add( 'visible', 'current-fragment' );\n\t\t\t\t\t\t}, this );\n\n\t\t\t\t\t\t// Create a separate page for the current fragment state\n\t\t\t\t\t\tconst clonedPage = page.cloneNode( true );\n\n\t\t\t\t\t\t// Inject unique page numbers for fragments\n\t\t\t\t\t\tif( injectPageNumbers ) {\n\t\t\t\t\t\t\tconst numberElement = clonedPage.querySelector( '.slide-number-pdf' );\n\t\t\t\t\t\t\tconst fragmentNumber = index + 1;\n\t\t\t\t\t\t\tnumberElement.innerHTML += '.' + fragmentNumber;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpages.push( clonedPage );\n\n\t\t\t\t\t\tpreviousFragmentStep = fragments;\n\n\t\t\t\t\t}, this );\n\n\t\t\t\t\t// Reset the first/original page so that all fragments are hidden\n\t\t\t\t\tfragmentGroups.forEach( function( fragments ) {\n\t\t\t\t\t\tfragments.forEach( function( fragment ) {\n\t\t\t\t\t\t\tfragment.classList.remove( 'visible', 'current-fragment' );\n\t\t\t\t\t\t} );\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\t\t\t\t// Show all fragments\n\t\t\t\telse {\n\t\t\t\t\tqueryAll( page, '.fragment:not(.fade-out)' ).forEach( function( fragment ) {\n\t\t\t\t\t\tfragment.classList.add( 'visible' );\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}, this );\n\n\t\tawait new Promise( requestAnimationFrame );\n\n\t\tpages.forEach( page => pageContainer.appendChild( page ) );\n\n\t\t// Re-run JS-based content layout after the slide is added to page DOM\n\t\tthis.Reveal.slideContent.layout( this.Reveal.getSlidesElement() );\n\n\t\t// Notify subscribers that the PDF layout is good to go\n\t\tthis.Reveal.dispatchEvent({ type: 'pdf-ready' });\n\n\t}", "saveAsMultipleFiles() {\r\n // Load the needed data for text file exportation\r\n let head = this.editorHTML.getValue().substr(0, this.editorHTML.getValue().indexOf('</head>')-1)\r\n let style = '\\n\\t<link rel=\"stylesheet\" href=\"style.css\">'\r\n let chead = '\\n</head>\\n'\r\n let bodyTag = this.editorHTML.getValue().indexOf('<body>')\r\n let bodyLines = this.editorHTML.getValue().substr(bodyTag)\r\n let html = bodyLines.substr(0, bodyLines.length-15)\r\n let script = '\\t<script src=\"script.js\"></script>\\n'\r\n let endDoc = '</body>\\n</html>'\r\n \r\n let todo = head\r\n \r\n // CSS exportation\r\n if (this.editorCSS.getValue().length > 0) {\r\n todo += style\r\n this.saveFile('style', 'CSS', this.editorCSS.getValue())\r\n }\r\n\r\n todo += chead\r\n todo += html\r\n\r\n // JS exportation\r\n if (this.editorJS.getValue().length > 0) {\r\n todo += script\r\n this.saveFile('script', 'JS', this.editorJS.getValue())\r\n }\r\n\r\n todo += endDoc\r\n\r\n // HTML exportation\r\n this.saveFile('index', 'HTML', todo)\r\n // We show the export result\r\n setTimeout(this.showOutput, 2500)\r\n\r\n }", "async function extractPDFFile(input, output) {\n let pdf = await pdfjsLib.getDocument({\n data: input.array\n });\n\n // pdf files can have embedded properties; extract those\n const meta = await pdf.getMetadata();\n\n if (meta.info) {\n if (meta.info.Author) {\n output.author = meta.info.Author;\n }\n if (meta.info.Title) {\n output.datasetTitle = meta.info.Title;\n }\n\n if (meta.info.Keywords) {\n output.keywords = meta.info.Keywords.split(/,\\s+/g);\n }\n\n if (meta.info.Subject) {\n output.themes = [meta.info.Subject];\n }\n }\n\n // extract text\n let text = [];\n\n for (let i = 1; i <= pdf.numPages; i++) {\n let page = await pdf.getPage(i);\n page = await page.getTextContent({\n normalizeWhitespace: true\n });\n page = page.items.map(txt => txt.str).join(\"\\n\");\n text.push(page);\n }\n\n input.text = text.join(\"\\n\\n\");\n}", "function exportDocx() {\n Logger.log('export');\n var doc = DocumentApp.getActiveDocument();\n var clearFileName = doc.getName() + '_clear';\n var fileName = doc.getName() + '_docx';\n \n var articleFolder = getFileFolder(doc);\n if (isFileExists(fileName, articleFolder)) {\n // remove old verstion of file\n // logger.log('Remove ' + fileName + ' from ' + articleFolder + ' folder');\n isFileExists(fileName, articleFolder).setTrashed(true);\n }\n \n // update clear copy\n var clearFile = makeClearCopy(doc, clearFileName);\n \n var clearId = clearFile.getId();\n var clearFile = DriveApp.getFileById(clearId);\n \n // get blob with DOCX content and save into file\n var content = convertToDocx(clearId);\n var docxFile = DriveApp.createFile(content);\n docxFile.setName(fileName);\n \n // add file to article folder and remove file from root folder\n var articleFolder = clearFile.getParents().next();\n articleFolder.addFile(docxFile);\n DriveApp.getRootFolder().removeFile(docxFile);\n \n DocumentApp.getUi().alert('New DOCX file with the name ' \n + clearFile.getName() \n + ' created in the article folder');\n}", "function showFile(blob){\r\n // It is necessary to create a new blob object with mime-type explicitly set\r\n // otherwise only Chrome works like it should\r\n var newBlob = new Blob([blob], {type: \"application/pdf\"})\r\n\r\n // IE doesn't allow using a blob object directly as link href\r\n // instead it is necessary to use msSaveOrOpenBlob\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n window.navigator.msSaveOrOpenBlob(newBlob);\r\n return;\r\n } \r\n\r\n // For other browsers: \r\n // Create a link pointing to the ObjectURL containing the blob.\r\n const data = window.URL.createObjectURL(newBlob);\r\n var link = document.createElement('a');\r\n link.href = data;\r\n\r\n var filename = 'scorecard-'+vm.examID+'-'+attemptId+'.pdf';\r\n\r\n link.download=filename;\r\n link.click();\r\n setTimeout(function(){\r\n // For Firefox it is necessary to delay revoking the ObjectURL\r\n window.URL.revokeObjectURL(data);\r\n }, 100);\r\n}", "function saveFile( output, file )\r\n{\r\n // retrieve current file \r\n try {\r\n \r\n var current = loadFile(file);\r\n if ( current == output )\r\n {\r\n //WScript.StdOut.WriteLine( output );\r\n WScript.StdOut.WriteLine( file + \" not changed, skipping ...\"); \r\n return;\r\n }\r\n }\r\n catch(e)\r\n {}\r\n\r\n // create text file for output\r\n var f = fso.CreateTextFile(file, true);\r\n\r\n // write transformation result to file\r\n f.Write(output);\r\n f.Close();\r\n // WScript.StdOut.WriteLine( \"finished writting to \" + file );\r\n}", "function mergePDFDocumentsUsingPDFco(allURLs){\n\n // Prepare Payload\n const data = {\n \"async\": true, // As we have large volumn of PDF files, Enabling async mode\n \"name\": resultFileName,\n \"url\": allURLs\n };\n\n // Prepare Request Options\n const options = {\n 'method' : 'post',\n 'contentType': 'application/json',\n 'headers': {\n \"x-api-key\": pdfCoAPIKey\n },\n // Convert the JavaScript object to a JSON string.\n 'payload' : JSON.stringify(data)\n };\n \n // Get Response\n // https://developers.google.com/apps-script/reference/url-fetch\n const resp = UrlFetchApp.fetch('https://api.pdf.co/v1/pdf/merge', options);\n\n // Response Json\n const respJson = JSON.parse(resp.getContentText());\n\n if(respJson.error){\n console.error(respJson.message);\n }\n else{\n\n // Job Success Callback\n const successCallbackFn = function(){\n // Upload file to Google Drive\n saveURLToCurrentFolder(respJson.url);\n }\n\n // Check PDF.co Job Status\n checkPDFcoJobStatus(respJson.jobId, successCallbackFn);\n }\n}", "function saveToFile(privewHtml) {\n try {\n fs.mkdirSync(PREVIEW_DIR);\n } catch(err) {\n if (err.code != 'EEXIST')\n throw err;\n }\n fs.writeFile(PREVIEW_PATH, privewHtml);\n }" ]
[ "0.66669685", "0.6274513", "0.62232", "0.60531455", "0.5991982", "0.5874803", "0.5874803", "0.5780644", "0.5668605", "0.5661981", "0.5573991", "0.55679095", "0.5554109", "0.551543", "0.5482569", "0.547929", "0.5430002", "0.5394576", "0.537884", "0.5373136", "0.53509504", "0.53333277", "0.532167", "0.53188574", "0.5273235", "0.5250999", "0.52443534", "0.52155906", "0.52127457", "0.51740736", "0.51658845", "0.51613736", "0.5134322", "0.51335895", "0.51332474", "0.51303136", "0.51175314", "0.5113305", "0.5079059", "0.50644207", "0.5051376", "0.5031094", "0.50177413", "0.5008034", "0.49947238", "0.4980609", "0.49641153", "0.49611264", "0.49606827", "0.49423602", "0.49297002", "0.4925622", "0.49197188", "0.4889967", "0.48823702", "0.48817232", "0.48757637", "0.4870253", "0.4865234", "0.48554996", "0.48544815", "0.48517126", "0.48501083", "0.48233095", "0.4815514", "0.48149854", "0.4799267", "0.47970113", "0.47918126", "0.4784658", "0.47764164", "0.47519395", "0.47438824", "0.47226682", "0.4715194", "0.4714467", "0.47118184", "0.47089234", "0.46883845", "0.46808454", "0.46691445", "0.46671745", "0.46621522", "0.4658607", "0.46585646", "0.46505964", "0.46313262", "0.46296516", "0.46230403", "0.46014926", "0.45974776", "0.45909882", "0.45903352", "0.45878056", "0.4586303", "0.45837948", "0.45821238", "0.4581148", "0.4575", "0.45662892" ]
0.6216627
3
Ensures that specific columns are visible. When you call this function the grid should be visible on screen.
function NavAddColumns(/**objectId*/ grid, /**string*/ list) { SeS(grid).DoRClick(); SeS("G_Choose_Columns").DoClick(); var items = list.split(","); for(var i = 0; i < items.length; i++) { var item = Global.DoTrim(items[i]); var columns = SeS('G_Available_Columns'); var index = columns.GetItemIndexByName(item); if (index >= 0) { columns.DoSelectItem(item); SeS('G_Add_Column').DoClick(); } } SeS('G_Columns_OK').DoClick(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set visibleColumns(visibleColumns) {\n this._visibleColumns = visibleColumns;\n }", "get visibleColumns() {\n return this._visibleColumns;\n }", "function setColumnVisibility(columns,index,visible) {\n if(index<columns.length) {\n columns[index].visible = visible;\n }\n}", "function handleScrollEvent () {\n let viewportTop = window.pageYOffset,\n viewportBottom = viewportTop + viewportHeight;\n\n for (let i=0; i < num_cols; i++) {\n let colId = columns[i].id,\n col = columnData[colId],\n colTop = col.top,\n colMiddle = col.middle,\n colBottom = col.bottom;\n\n if (col.isVisible) {\n let colTopIsVisible = (viewportTop < colTop) && (colTop < viewportBottom ),\n colMiddleIsVisible = (viewportTop < colMiddle) && (colMiddle < viewportBottom),\n colBottomIsVisible = (viewportTop < colBottom) && (colBottom < viewportBottom);\n\n if (colTopIsVisible && col.seen_top === false) {\n console.log('Column with id:', colId, 'started to become visible on the page.');\n columnData[colId]['seen_top'] = true;\n }\n if (colMiddleIsVisible && col.seen_middle === false) {\n console.log('Column with id:', colId, 'is now more than 50% visible on the page.');\n columnData[colId]['seen_middle'] = true;\n }\n if (colBottomIsVisible && col.seen_bottom === false) {\n console.log('Column with id:', colId, 'is now fully visible on the page.');\n columnData[colId]['seen_bottom'] = true;\n }\n }\n }\n }", "function assert_visible_columns(aDesiredColumns) {\n let cols = mc.e(\"threadTree\").columns;\n let iDesired = 0;\n\n let visibleColumnIds = [];\n let failCol = null;\n for (let col = cols.getFirstColumn(); col != null; col = col.getNext()) {\n if (!col.element.hidden) {\n visibleColumnIds.push(col.id);\n if (!failCol) {\n if (aDesiredColumns[iDesired] != col.id) {\n failCol = col;\n } else {\n iDesired++;\n }\n }\n }\n }\n if (failCol) {\n throw new Error(\n \"Found visible column '\" +\n failCol.id +\n \"' but was \" +\n \"expecting '\" +\n aDesiredColumns[iDesired] +\n \"'!\" +\n \"\\ndesired list: \" +\n aDesiredColumns +\n \"\\n actual list: \" +\n visibleColumnIds\n );\n }\n}", "function showColumns(){\n\t\n\t//loop through the column filter inputs to determine which ones are checked or not to display the areas\n\tjQuery(\"#column_filter\").children('ul').children('li').each(function(){\n\t\tinitColumn(jQuery(this).children('input').attr('id'));\n\t});\t\n}", "hideAllColumns(){\n\t\t\tthis.properties.forEach(function(entry){\n\t\t\t\tset(entry,'isVisible',false);\n\t\t\t});\n\t\t\tthis.handleVisibility(true);\n\t\t}", "function chooseColumnsToView(selectedCol){\n\t\n\t // find the grid\n\t var grid = dijit.byId(\"grid\");\n\t \n\t var z;\n\t var zz;\n\t \n\t for (z in grid.layout.cells) {\n\t \tif (grid.layout.cells[z].field === \"datetime\") {\n\t \t\tgrid.layout.setColumnVisibility(z, selectedCol.timestamp.length !== 0);\n\t \t} else if (grid.layout.cells[z].field === \"threadid\") {\n\t \t\tgrid.layout.setColumnVisibility(z,selectedCol.threadid.length !== 0);\t \t\t\n\t \t} else if (grid.layout.cells[z].field === \"logger\") {\n\t \t\tgrid.layout.setColumnVisibility(z, selectedCol.logger.length !== 0);\n\t \t} else if (grid.layout.cells[z].field === \"event\") {\t \t\t\n\t \t\tgrid.layout.setColumnVisibility(z, selectedCol.event.length !== 0);\n\t \t} else if (grid.layout.cells[z].field === \"message\") {\t \t\t\n\t \t\tgrid.layout.setColumnVisibility(z, selectedCol.message.length !== 0);\n\t \t\tif(grid.layout.cells[z].hidden) {\n for (zz in grid.layout.cells) {\n if (grid.layout.cells[zz].field === \"logger\") {\n grid.layout.cells[zz].width = '60em';\n }\n }\n } else {\n for (zz in grid.layout.cells) {\n if (grid.layout.cells[zz].field === \"logger\") {\n grid.layout.cells[zz].width = '55px';\n }\n }\n \t\n }\n\t \t} \n\t \t\n\t }\n\t \n\t}", "checkVisible() {\r\n let squares = this.state.squares;\r\n let mapLevel = this.state.mapLevel;\r\n let p = this.state.playerIndex;\r\n let n = 20;\r\n let visible = [];\r\n const aura = [p, p-2, p-1, p+1, p+2, p+3, p-3,\r\n p-n, p-n-2, p-n-1, p-n+1, p-n+2,\r\n p+n, p+n-2, p+n-1, p+n+1, p+n+2,\r\n p-n*2, p-n*2-1, p-n*2+1,\r\n p+n*2, p+n*2-1, p+n*2+1,\r\n p-4, p+4];\r\n\r\n //only set visible what is on grid and eliminate overflow to other rows\r\n for (let i=0; i<aura.length; i++) {\r\n if (Math.abs(aura[i] % n - p % n) < 4 && aura[i] >= 0 && aura[i] < squares[mapLevel].length) {\r\n visible.push(aura[i]);\r\n }\r\n }\r\n let hidden = [];\r\n for (let i=0; i<squares[mapLevel].length; i++) {\r\n if (!visible.includes(i)) {\r\n hidden.push(i);\r\n }\r\n }\r\n this.setHidden(hidden);\r\n this.setVisible(visible);\r\n }", "function _fnVisbleColumns(oS) {\n\t\t\tvar iVis = 0;\n\t\t\tfor (var i = 0; i < oS.aoColumns.length; i++) {\n\t\t\t\tif (oS.aoColumns[i].bVisible === true) {\n\t\t\t\t\tiVis++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn iVis;\n\t\t}", "isValidPosition (column, row) {\n // add logic that checks if the column and row exist in the grid\n // return true if they are valid and false if they are not\n var validColumn = column >= 0 && column < this.numberOfColumns;\n var validRow = row >= 0 && row < this.numberOfRows;\n\n return validColumn && validRow;\n \n}", "showAll() {\n\n\t\tthis._gridIterator( col => {\n\t\t\tcol.$elem.show();\n\t\t});\n\t}", "function _fnVisbleColumns( oS )\n\t\t{\n\t\t\tvar iVis = 0;\n\t\t\tfor ( var i=0 ; i<oS.aoColumns.length ; i++ )\n\t\t\t{\n\t\t\t\tif ( oS.aoColumns[i].bVisible === true )\n\t\t\t\t{\n\t\t\t\t\tiVis++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn iVis;\n\t\t}", "function _fnVisbleColumns( oS )\n\t\t{\n\t\t\tvar iVis = 0;\n\t\t\tfor ( var i=0 ; i<oS.aoColumns.length ; i++ )\n\t\t\t{\n\t\t\t\tif ( oS.aoColumns[i].bVisible === true )\n\t\t\t\t{\n\t\t\t\t\tiVis++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn iVis;\n\t\t}", "function showChooseColumnDialog(){\n\t // find the grid\n\t var grid = dijit.byId(\"grid\");\n\t \n\t for (var z in grid.layout.cells) {\n\t \t//console.debug(grid.structure[z].field);\n\t \tif (grid.layout.cells[z].field === \"datetime\") {\n\t \t\tdijit.byId('timestamp').set('checked', !grid.layout.cells[z].hidden);\n\t \t} else if (grid.layout.cells[z].field === \"threadid\") {\n\t \t\tdijit.byId('threadid').set('checked', !grid.layout.cells[z].hidden);\n\t \t} else if (grid.layout.cells[z].field === \"logger\") {\n\t \t\tdijit.byId('logger').set('checked', !grid.layout.cells[z].hidden);\n\t \t} else if (grid.layout.cells[z].field === \"event\") {\t \t\t\n\t \t\tdijit.byId('event').set('checked', !grid.layout.cells[z].hidden);\n\t \t} else if (grid.layout.cells[z].field === \"message\") {\t \t\t\n\t \t\tdijit.byId('message').set('checked', !grid.layout.cells[z].hidden);\n\t \t} \n\t }\n\n\t\tdijit.byId('selectColumnDialog').show();\n\t}", "visible_column_count() {\n return this.state.columns.filter(function (item) {\n return item.hide_column != true;\n }).length;\n }", "function iterateSucceedingColumns() {\r\n\t\tvar x = editableFieldsList.indexOf(currentColTitle) + 1;\r\n\t\tvar nextEditableCol = editableFieldsList[x];\r\n\t\tif (null === nextEditableCol || undefined === nextEditableCol) {\r\n\t\t\tgetNextEditableRow();\r\n\t\t}\r\n\t\tnextEditableFieldId = getNextGridFieldId(rowNum, nextEditableCol);\r\n\r\n\t\tfindAndSetFocus();\r\n\t\tfunction findAndSetFocus() {\r\n\r\n\t\t\tif (!isGridElementPresent(nextEditableFieldId) || isVisible(nextEditableFieldId)) {\r\n\t\t\t\tvar xpos = 0;\r\n\t\t\t\tvar nxtEditableFound = false;\r\n\t\t\t\t$(columnList).each(function () {\r\n\t\t\t\t\tif ($(this).attr('_headerText') === nextEditableCol) {\r\n\t\t\t\t\t\txpos = $(this).attr('_x');\r\n\t\t\t\t\t\tnxtEditableFound = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tif (nxtEditableFound) {\r\n\t\t\t\t\t$(gridBlockElem).animate({\r\n\t\t\t\t\t\t'scrollLeft': xpos\r\n\t\t\t\t\t}, 500, '', function () {\r\n\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\tnextGridElem = $(document.getElementById(nextEditableFieldId));\r\n\t\t\t\t\t\t\tif (nextGridElem && nextGridElem.length > 0)\r\n\t\t\t\t\t\t\t\tsetFocus();\r\n\t\t\t\t\t\t\telse if (grid.getBodyContainer().maxVerticalScrollPosition > $(gridBlockElem).scrollTop()) {\r\n\t\t\t\t\t\t\t\tvar ypos = $(gridBlockElem).scrollTop() + grid.getBodyContainer().height - grid.getBodyContainer().verticalMask;\r\n\t\t\t\t\t\t\t\tif (grid.getBodyContainer()._calculatedTotalHeight > ypos) {\r\n\t\t\t\t\t\t\t\t\t$(gridBlockElem).animate({\r\n\t\t\t\t\t\t\t\t\t\t'scrollTop': ypos\r\n\t\t\t\t\t\t\t\t\t}, 300, '', function () {\r\n\t\t\t\t\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t\t\t\t\tif (!isGridElementPresent(nextEditableFieldId)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t$(columnList).each(function () {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($(this).attr('_headerText') === nextEditableCol)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\txpos = $(this).attr('_x');\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t\t$(gridBlockElem).animate({\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t'scrollLeft': xpos\r\n\t\t\t\t\t\t\t\t\t\t\t\t}, 300, '', function () {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function () {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextGridElem = $(document.getElementById(nextEditableFieldId));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextGridElem && nextGridElem.length > 0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetFocus();\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}, 400);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextGridElem = $(document.getElementById(nextEditableFieldId));\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextGridElem && nextGridElem.length > 0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetFocus();\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}, 400);\r\n\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}, 500);\r\n\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnmsp.isTabbed = false;\r\n\t\t\t\t\tfocusOutFromLastGridField();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tnextGridElem = $(document.getElementById(nextEditableFieldId));\r\n\t\t\t\tif (nextGridElem && nextGridElem.length > 0)\r\n\t\t\t\t\tsetFocus();\r\n\t\t\t}\r\n\t\t}\r\n\t\t/**\r\n\t\t * Checks whether there is an editable field in the current row if not finds the net row with editable field\r\n\t\t */\r\n\t\tfunction getNextEditableRow() {\r\n\t\t\trowNum = parseInt(rowNum) + 1;\r\n\t\t\teditableFieldsList = getEditableFieldListInOrder(nmsp, rowNum);\r\n\t\t\tvar maxVisibleRowNum = parseInt(grid.getRowCount()) + parseInt(initRowNum);\r\n\t\t\tif (editableFieldsList && editableFieldsList.length > 0) {\r\n\t\t\t\tnextEditableCol = editableFieldsList[0];\r\n\t\t\t\tnextEditableFieldId = getNextGridFieldId(rowNum, nextEditableCol);\r\n\t\t\t} else if (maxVisibleRowNum < rowNum && grid.getBodyContainer().maxVerticalScrollPosition > $(gridBlockElem).scrollTop()) { // if maximum number visible rows exceeded then scroll write the next set\r\n\t\t\t\tvar ypos = $(gridBlockElem).scrollTop() + grid.getBodyContainer().height - grid.getBodyContainer().verticalMask;\r\n\t\t\t\tif (grid.getBodyContainer()._calculatedTotalHeight > ypos) {\r\n\t\t\t\t\t$(gridBlockElem).animate({\r\n\t\t\t\t\t\t'scrollTop': ypos\r\n\t\t\t\t\t}, 300, '', function () {\r\n\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\trowNum = initRowNum;\r\n\t\t\t\t\t\t\tgetNextEditableRow();\r\n\t\t\t\t\t\t}, 400);\r\n\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else if ((grid.getBodyContainer().maxVerticalScrollPosition > $(gridBlockElem).scrollTop()) || (Object.keys(nmsp.rowEditableColumnMap).length > rowNum))\r\n\t\t\t\tgetNextEditableRow();\r\n\t\t}\r\n\r\n\t}", "function xTableCellVisibility(bShow, sec, nRow, nCol)\r\n{\r\n sec = xGetElementById(sec);\r\n if (sec && nRow < sec.rows.length && nCol < sec.rows[nRow].cells.length) {\r\n sec.rows[nRow].cells[nCol].style.visibility = bShow ? 'visible' : 'hidden';\r\n }\r\n}", "function set_columns_hidden() {\n //console.log( \"===== set_columns_hidden === \");\n //console.log( \" permit_dict\", permit_dict);\n\n if (permit_dict.requsr_role_system) {\n columns_hidden = [];\n } else if (permit_dict.requsr_role_admin) {\n // PR2023-05-30 admin must approve secret exams, dont hide auth3 auth4\n //columns_hidden = [\"group_auth3\", \"group_auth4\"];\n } else if (permit_dict.requsr_role_insp) {\n columns_hidden = [\"group_auth3\", \"group_auth4\"];\n } else if (permit_dict.requsr_role_corr) {\n columns_hidden = [\"sb_code\", \"school_abbrev\", \"group_auth3\", \"group_anlz\"];\n } else if (permit_dict.requsr_role_school) {\n columns_hidden = [\"sb_code\", \"school_abbrev\", \"group_anlz\", \"allowed_schoolbases\"];\n };\n }", "function emptyColumnCheck() {\n\t\t\tvar data = grid.getData().getItems() || [];\n //Avoiding Resize functionality when there is no data.\n if (data.length === 0) {\n return;\n }\n var headerColumns = $('.slick-header-column', $(container));\n var flag = [];\n var updateGrid = false;\n for (i = 0; i < headerColumns.length; i++) {\n \tif(grid.getColumns()[i].hasOwnProperty('editor')){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n flag[i] = true;\n\t\t\t\tfor(j = 0; j < data.length; j++){\n\t\t\t\t\tif($.trim(data[j][grid.getColumns()[i].field])){\n\t\t\t\t\t\tflag[i] = false;\n if (grid.getColumns()[i].originalWidth)\n grid.getColumns()[i].width = grid.getColumns()[i].originalWidth;\n break;\n\t\t\t\t\t}\n\t\t\t\t}\n if (flag[i] && grid.getColumns()[i]) {\n grid.getColumns()[i].originalWidth = grid.getColumns()[i].width;\n // grid.getColumns()[i].width = 40;\n updateGrid = true;\n }\n }\n if (updateGrid) {\n grid.setColumns(grid.getColumns(), true);\n }\n }", "handleVisibility(hidden){\n\t\tif ( hidden ) {\n\t\t\tset(this,'actionsColumn', false);\n\t\t\tset(this,'showTableFooter', false);\n\t\t\tset(this,'showGlobalFilter', false);\n\t\t\tset(this,'showActionNew', false);\n\t\t\tset(this,'allColumnsAreHidden',true);\n\t\t} else {\n\t\t\tset(this,'actionsColumn', true);\n\t\t\tset(this,'showTableFooter', true);\n\t\t\tset(this,'showGlobalFilter', true);\n\t\t\tset(this, 'showActionNew', true);\n\t\t\tset(this,'allColumnsAreHidden',false);\n\t\t}\n\t}", "function gridViewChecker() {\n var item = $('.grid .grid-item');\n item.removeClass('ml-15');\n if ( $('.grid').hasClass('grid-view') ) {\n item.not('.hidden').each(function(index) {\n if ( index % 2 !== 0 ) {\n $(this).addClass('ml-15');\n }\n });\n }\n AOS.refresh();\n}", "determineMatrixVisibility () {\n if (!this.hglSelectionViewDomains) {\n return;\n }\n\n fgmState.matrices.forEach((matrix) => {\n matrix.visible = false;\n\n if (\n matrix.locus.globalStart1 >= this.hglSelectionViewDomains[0] &&\n matrix.locus.globalEnd1 <= this.hglSelectionViewDomains[1] &&\n matrix.locus.globalStart2 >= this.hglSelectionViewDomains[2] &&\n matrix.locus.globalEnd2 <= this.hglSelectionViewDomains[3]\n ) {\n matrix.isVisibleInSelection = true;\n } else {\n matrix.isVisibleInSelection = false;\n }\n });\n }", "leftColumnEnemyIsInCanvasLeftColumn() {\n var mostLeftColumnWithEnemyAlive;\n for (let j = 0; j < game.model.siEnemiesPerRow; j++) {\n for (let i = 0; i < game.model.siEnemies.length; i++) {\n mostLeftColumnWithEnemyAlive = game.model.siEnemies[i][j];\n if (mostLeftColumnWithEnemyAlive.elem.style.display !== \"none\") {\n break;\n }\n }\n if (mostLeftColumnWithEnemyAlive.elem.style.display !== \"none\") {\n break;\n }\n }\n\n if (!mostLeftColumnWithEnemyAlive)\n return false;\n\n return mostLeftColumnWithEnemyAlive.x > 0 && mostLeftColumnWithEnemyAlive.x < this.canvasColumnWidth;\n }", "function cargarColumnasVisibles(){\n\t$(\".itemColumna .checkColumna\").each(function(){\n\t\tvar id = $(this).parent().data('id-columna');\n\t\tvisibilidadColumna(id,0);\n\t});\n\t$(\".itemColumna .checkColumna:checked\").each(function(){\n\t\tvar id = $(this).parent().data('id-columna');\n\t\tvisibilidadColumna(id,1);\n\t});\n}", "hideAll() {\n\n\t\tthis._gridIterator( col => {\n\t\t\tcol.$elem.hide();\n\t\t});\n\t}", "renderContents() {\n // columns shown, hidden or reordered\n this.init();\n }", "renderContents() {\n // columns shown, hidden or reordered\n this.init();\n }", "generateColumns() {\r\n this.columns = _(this.getColumns())\r\n .map(this.getColumnOptions)\r\n .filter(\r\n o => {\r\n return _.isFunction(o.hidden) ? !o.hidden(o) : !o.hidden;\r\n }\r\n )\r\n .sortBy([\r\n o => {\r\n return _.isFunction(o.order) ? o.order(o) : o.order;\r\n }\r\n ])\r\n .value();\r\n\r\n this.fireSlimGridEvent(\"onColumnsGenerated\", {});\r\n }", "function show(row, col) {\n\t\tdocument.getElementById(row+\"_\"+col).style.visibility=\"\";\n\t}", "getVisibleColumns() {\n return this.sharedService.visibleColumns || [];\n }", "function setColumnVisibilities(fieldHiddenValues,targetGridId) {\n\t$('#'+targetGridId).jqxGrid('beginupdate',true)\n\tfor (field in fieldHiddenValues) { \n\t\tif ($('#'+targetGridId).jqxGrid('getcolumn',field)!==null) { \n\t\t\tif (fieldHiddenValues[field]==true) {\n\t\t\t\tif ($('#'+targetGridId).jqxGrid('getcolumnproperty',field,'hidable')==true) { \n\t\t\t\t\t$('#'+targetGridId).jqxGrid('hidecolumn',field);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$('#'+targetGridId).jqxGrid('showcolumn',field);\n\t\t\t}\n\t\t}\n\t}\n\t$('#'+targetGridId).jqxGrid('endupdate')\n}", "render() {\n // columns shown, hidden or reordered\n this.init();\n }", "render() {\n // columns shown, hidden or reordered\n this.init();\n }", "function checkVisible() {\r\n var $items = ['registration', 'messages', 'sponsors'];\r\n $('.ipWidget').find('.myl-module-game').each(function(){\r\n var $name = $(this).attr('data-module-name');\r\n var $active = $(this).children('div').data('module-visible');\r\n\r\n if(($.inArray($name, $items) !== -1) && $active == 'no') {\r\n $(this).parent().css('display', 'none');\r\n }\r\n });\r\n }", "function get_column_is_hidden() {\n //console.log(\" --- get_column_is_hidden ---\")\n\n// --- get list of hidden columns\n // copy col_hidden from mod_MCOL_dict.cols_hidden\n const col_hidden = [];\n // can also add multiple values with push:\n // was:\n // col_hidden.push( \"srgrade\", \"sr_status\", \"pescore\", \"pe_status\", \"pegrade\");\n\n b_copy_array_noduplicates(mod_MCOL_dict.cols_hidden, col_hidden);\n\n// - hide level when not level_req\n //if(!setting_dict.sel_dep_level_req){col_hidden.push(\"lvl_abbrev\")};\n return col_hidden;\n }", "function onchangeShowCol(){\n\tvar fn = \"onchangeShowCol() \";\n\tvar szVal = selectGetSelVal(getElementById2(\"selectShowCol\"));\n\tjslog (JSLOG_DEBUG, fn + \"szVal=\" + szVal);\n\tfor (var iRow=0; iRow<=SAMPLE_MAX_NUM; iRow++){\n\t\tfor (var iCol=1; iCol<=2; iCol++){\n\t\t\tvar szColId = \"col_\" + iRow + \"_\" + iCol;\n\t\t\tjslog (JSLOG_DEBUG, fn + \"szColId=\" + szColId + \" bShow=\" + bShow);\n\t\t\tvar el = getElementById2(szColId,false);\n\t\t\tif (el){\n\t\t\t\tvar bShow = (szVal == SAMPLE_COL_ALL || szVal == iCol+\"\");\n\t\t\t\tel.style.display = (bShow) ? \"\" : \"none\";\n\t\t\t\tel.style.visibility = bShow;\n\t\t\t}else{\n\t\t\t\tjslog (JSLOG_DEBUG, fn + \"szColId=\" + szColId + \" NOT PRESENT in THIS Feature sample\");\n\t\t\t}\n\t\t}\n\t}\n}", "setColumns() {\r\n if (!this.slickGrid) return;\r\n\r\n this.slickGrid.setColumns(this.columns);\r\n this.fireSlimGridEvent(\"onColumnsSet\", { columns: this.columns });\r\n }", "function xTableColDisplay(bShow, sec, nCol)\r\n{\r\n var r;\r\n sec = xGetElementById(sec);\r\n if (sec && nCol < sec.rows[0].cells.length) {\r\n for (r = 0; r < sec.rows.length; ++r) {\r\n sec.rows[r].cells[nCol].style.display = bShow ? '' : 'none';\r\n }\r\n }\r\n}", "function onColumnsClicked(num) {\n LayoutShowcaseState.columns = num;\n setColumnButtonActive(num);\n renderVisuals();\n}", "function checkColumns(){\n for (var i=0; i<boardByColumns.length; i++){\n check4InRow(boardByColumns[i].content)\n };\n}", "function showGrid() {\n setTimeout(() => {\n grid.classList.remove('hidden')\n intro.classList.add('hidden')\n liveDIV.classList.remove('hidden')\n highScoreDIVPM.classList.remove('hidden')\n scroreDiv.classList.remove('hidden')\n scoreSpan.classList.remove('hidden')\n liveLost.classList.add('hidden')\n pacmanHeader.classList.remove('hidden')\n }, 1500)\n}", "function visible(dimension) {return !('visible' in dimension) || dimension.visible;}", "function visible(dimension) {return !('visible' in dimension) || dimension.visible;}", "function isVisible() {\n\t\t\treturn visible;\n\t\t}", "renderFilterBar() {\n this.grid.columns.visibleColumns.forEach(column => this.renderColumnFilterField(column));\n this.rendered = true;\n }", "function showCol(obj, col_id) {\n\tvar tb = document.getElementById(obj);\n\tvar trow = tb.rows;\n\tfor (var i = 0; i < trow.length; i++) {\n\t\ttrow[i].cells[col_id].style.display == 'block';\n\t}\n}", "function whileColumnsNotSet() {\n // Only act when the data has been filled in\n if ($scope.data.length > 0) {\n // Auto-generate columns if the user hasn't created them yet.\n if ($scope.columns.length === 0) {\n $scope.columns = Object.keys($scope.data[0])\n .map(function(columnName) {\n return {key: columnName};\n });\n }\n clearWatch();\n }\n }", "function visibilidadColumna(col,acc){\n\tif(acc == 0){\n\t\t$('td:nth-child('+col+'),th:nth-child('+col+')').addClass('d-none');\n\t}else if(acc == 1){\n\t\t$('td:nth-child('+col+'),th:nth-child('+col+')').removeClass('d-none');\n\t}\n}", "checkColumns(player) {\n //player\n\n /* Check all column in that row */\n if (\n (this.board[0][0] === player && this.board[1][0] === player && this.board[2][0] === player) ||\n\n (this.board[0][1] === player && this.board[1][1] === player && this.board[2][1] === player) ||\n (this.board[0][2] === player && this.board[1][2] === player && this.board[2][2] === player)\n ) {\n return true;\n }\n return false;\n }", "function isVisible() {\n return visible;\n }", "function isVisible() {\n return visible;\n }", "function updateColumns(e) {\n\t\tvar offset = parseInt(document.querySelector('input[name=\"filter_acct\"]:checked').value) + \n\t\t\tparseInt(document.querySelector('input[name=\"filter_rare\"]:checked').value);\n\t\t\n\t\tfor (var i = 0; i < 8; i++) {\n\t\t\tvar c = document.getElementsByClassName(\"cost_\" + i);\n\t\t\tfor(var j = 0; j < c.length; j++){\n\t\t\t\tif (i === offset || i === offset + 1) {\n\t\t\t\t\tc[j].style.display = \"table-cell\";\n\t\t\t\t} else {\n\t\t\t\t\tc[j].style.display = \"none\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tupdateDescription();\n\t}", "function visibility(){\n\t\tvar window_top = $(window).scrollTop();\n\t\tvar window_height = $(window).height();\n\t\tvar start_visibility = window_top + window_height;\n\t\t\n\t\t$(\".visibility\").each(function(){\n\t\t\t\n\t\t\tvar block_position = $(this).offset().top;\n\t\t\t\n\t\t\tif(start_visibility >= block_position){\n\t\t\t\t$(this).addClass('is-visible');\n\t\t\t}\n\t\t});\n\t}", "function mainGridOrientationCheck() {\n if (window.innerHeight >= window.innerWidth) {\n mainGridDOM.style.display = 'none';\n orientationWarningDOM.style.display = 'block';\n return;\n } \n mainGridDOM.style.removeProperty('display');\n orientationWarningDOM.style.removeProperty('display');\n}", "function setGridInvisible() {\n grid.style.transition = \"none\";\n grid.style.visibility = \"hidden\";\n}", "_checkColumnCellsAlive(playerID, column) {\n let base = column + playerID*9;\n return !(this.cells[base].isDead && this.cells[base+3].isDead && this.cells[base+6].isDead);\n }", "static updateColumns() {\n if (ftables.length === 0) {\n return;\n }\n for (const column of ftables[0]._columns.children) {\n if (column.value === \"\") {\n continue;\n }\n ftables[0]._tables.querySelectorAll(`.${column.value}`)\n .forEach(e => e.style.display = column.selected ? \"\" : \"none\");\n }\n\n // Reponsive table fix.\n fixResponsiveTh();\n }", "function grid() {\r\n\t\tvar grid = document.getElementById(\"grid\"); \r\n\t\tif (grid.checked === true) {\r\n\t\t myDiagram.grid.visible = true;\r\n\t\t return;\r\n\t\t} else {\r\n\t\t myDiagram.grid.visible = false; \r\n\t\t}\r\n\t }", "function shouldBeVisible() {\n return visibleValues > 1;\n}", "renderFilterBar() {\n const me = this;\n\n me.grid.columns.visibleColumns.forEach((column) => me.renderColumnFilterField(column));\n }", "function showAllBricks() {\r\n bricks.forEach(column => {\r\n column.forEach(brick => {\r\n brick.visible = true;\r\n })\r\n })\r\n}", "function showGrid() {\n\n /**If grid was visible and snap to was check we need to take measures*/\n if (gridVisible) {\n if (snapTo) {\n snapTo = false;\n document.getElementById(\"snapCheckbox\").checked = false;\n }\n }\n\n gridVisible = !gridVisible;\n backgroundImage = null; // reset cached background image of canvas\n\n //trigger a repaint;\n draw();\n}", "function mainGridOrientationCheck() {\n if (window.innerHeight >= window.innerWidth) {\n mainGridDOM.style.display = 'none';\n orientationWarningDOM.style.display = 'block';\n return;\n }\n\n mainGridDOM.style.removeProperty('display');\n orientationWarningDOM.style.removeProperty('display');\n}", "deadGrid() {\n for(let col = 0; col < this.width; col ++) {\n for(let row = 0; row < this.height; row++) {\n if(this.grid[col][row] == ALIVE){\n return false\n }\n }\n }\n return true\n }", "function showHideContentGrids(ww, rows, $el) {\n var contentType = $el.closest('.tg-content-grid').attr('data-content-grid-type');\n\n $el.find('.l-gi').show();\n\n if (contentType == '2') {\n switch (true) {\n case ww > 760:\n break;\n default:\n $el.find('.l-gi').slice(-rows).hide();\n }\n }\n \n if (contentType == '3') {\n switch (true) {\n case ww > 1140:\n $el.find('.tg-list-no-border').removeClass('tg-list-no-border');//Alignment ticket\n break;\n case ww > 760:\n $el.find('.l-gi').slice(-rows).hide();\n $el.find('.l-gi').not(':hidden').slice(-2).addClass('tg-list-no-border');//Alignment ticket\n break;\n default:\n $el.find('.l-gi').slice(-rows * 2).hide();\n $el.find('.tg-list-no-border').removeClass('tg-list-no-border');//Alignment ticket\n }\n }\n\n // Rests load more button on resize\n if (ww <= 760) {\n $el.siblings('.tg-load-more').show();\n }\n }", "function getColumnVisibility(listenName) {\r\n\tlistenName = $defined(listenName) ? listenName : this.getAktListe();\r\n\tvar result = $defined(this.columnVisibility[listenName]) ? this.columnVisibility[listenName] : new MoCheck.ColumnVisibility(true, true, true, true);\r\n\treturn result;\r\n}", "validateGridView() {\n return this\n .waitForElementVisible('@gridViewContainer')\n .assert.elementPresent('@gridViewContainer', 'Grid View Displayed');\n }", "visibleCells() {\n const z = 1 / this.camera.zoom\n const cs = this.grid.cellSize\n const left = Math.floor((this.camera.x - this.viewport.x / 2 * z) / cs)\n const top = Math.floor((this.camera.y - this.viewport.y / 2 * z) / cs)\n const right = Math.ceil ((this.camera.x + this.viewport.x / 2 * z) / cs) + 1\n const bottom = Math.ceil ((this.camera.y + this.viewport.y / 2 * z) / cs) + 1\n\n const cells = []\n for (let x = left; x <= right; x++) {\n for (let y = top; y <= bottom; y++) {\n cells.push(this.grid.cell(x, y))\n }\n }\n\n return cells\n }", "isVisible() {\n\t\tlet y = this.getY();\n\t\treturn y >= -100 && y <= dh + 100;\n\t}", "function checkSubGridForWin(beginCol, endCol, beginRow, endRow, checkFunction) {\n var allColumns = $('div.column');\n for (var i = beginCol; i <= endCol; i++) {\n var currentColumnCircles = allColumns.eq(i).children();\n for(var j = beginRow; j <= endRow; j++) {\n var currentCircle = currentColumnCircles.eq(j);\n if(checkFunction(currentCircle)) { return true; };\n };\n };\n return false;\n}", "function showAllBricks() {\n bricks.forEach(column => {\n column.forEach(brick => (brick.visible = true));\n });\n}", "showRows (states) {\r\n this.bottomRows.forEach((row, idx) => {\r\n row.hidden = !states[idx]\r\n })\r\n }", "function isLegalMove(col) {\n return stats.moveStart != null && stats.openRows[col] < 6 && stats.winner == null;\n }", "function getColumnVisibility(listenName) {\r\n\tlistenName = $defined(listenName) ? listenName : this.aktListe;\r\n\tvar result = $defined(this.columnVisibility[listenName]) ? this.columnVisibility[listenName] : new MoCheck.ColumnVisibility(true, true, true, true);\r\n\treturn result;\r\n}", "_renderUpdatedColumns() {\n const columnsDiffReducer = (acc, def) => acc || !!def.getColumnsDiff();\n // Force re-render data rows if the list of column definitions have changed.\n const dataColumnsChanged = this._rowDefs.reduce(columnsDiffReducer, false);\n if (dataColumnsChanged) {\n this._forceRenderDataRows();\n }\n // Force re-render header/footer rows if the list of column definitions have changed.\n const headerColumnsChanged = this._headerRowDefs.reduce(columnsDiffReducer, false);\n if (headerColumnsChanged) {\n this._forceRenderHeaderRows();\n }\n const footerColumnsChanged = this._footerRowDefs.reduce(columnsDiffReducer, false);\n if (footerColumnsChanged) {\n this._forceRenderFooterRows();\n }\n return dataColumnsChanged || headerColumnsChanged || footerColumnsChanged;\n }", "isPartiallyVisible() {\n\t\treturn !this.isVisible() && !this.isHidden();\n\t}", "function initColumns() {\n var columns = new Array();\n \n columns.push(new Ab.grid.Column('col1', getMessage(\"DateStart\"), 'date'));\n columns.push(new Ab.grid.Column('col2', getMessage(\"BuildingCode\"), 'text'));\n columns.push(new Ab.grid.Column('col3', getMessage(\"FloorCode\"), 'text'));\n columns.push(new Ab.grid.Column('col4', getMessage(\"RoomCode\"), 'text'));\n columns.push(new Ab.grid.Column('col5', getMessage(\"ConfigCode\"), 'text'));\n columns.push(new Ab.grid.Column('col6', getMessage(\"RoomArrangementType\"), 'text'));\n columns.push(new Ab.grid.Column('col7', getMessage(\"TimeStart\"), 'time'));\n columns.push(new Ab.grid.Column('col8', getMessage(\"TimeEnd\"), 'time'));\n \n return columns;\n}", "recalculateColumnWidths(){if(!this._columnTree){return;// No columns\n}const cols=this._getColumns().filter(col=>!col.hidden&&col.autoWidth);this._recalculateColumnWidths(cols)}", "function setOneColumnView() {\n\t\t\t\tconsole.log(\"Set one column view called\");\n\t\t\t\t$scope.isTwoColumns = false;\n\t\t\t}", "function show_column(aColumnId) {\n mc.e(aColumnId).removeAttribute(\"hidden\");\n}", "function findSpotForCol(x,event) {\n for (let y = HEIGHT - 1; y >= 0; y--){\n if(!board[y][x]) {\n return y\n }\n if (y === 1) {\n event.target.parentElement.classList.add('fullColumn');//fade the drop button when column fills\n }\n }\n \n return null\n}", "get isColumn() {\n return this.startColumn === this.endColumn && this.startRow === 0 && this.endRow === null\n }", "function isValidCellDev(row, col)\n{\n // IS IT OUTSIDE THE GRID?\n if ( (row < 0) ||\n (col < 0) ||\n (row >= gridHeightDev) ||\n (col >= gridWidthDev))\n {\n return false;\n }\n // IT'S INSIDE THE GRID\n else\n {\n return true;\n }\n}", "static set visible(value) {}", "function filterColumns() {\r\n\t\tlet filterText=document.getElementById('grades-filter').value\r\n\t\trevealAllHidden()\r\n\t\tdocument.getElementById('grades-filter').classList.remove('no-matches')\r\n\t\tif(filterText==='') return\r\n\t\thideNonMatching(filterText)\r\n\t}", "function checkVisible()\n{\n\tcheckElementRunThough(\"slide-card\");\n\tcheckElementRunThough(\"cardSec\");\n}", "function toggleGrid()\n{\n\tconsole.log(\"Show Grid: \" + !showGrid);\n\tshowGrid = !showGrid;\n}", "function displayGrid() {\r\n for (i = 0; i < cols; i++) {\r\n for (j = 0; j < rows; j++) {\r\n grid[i][j].display(w, h, 255);\r\n }\r\n }\r\n}", "function checkSize() {\n if ($(\".menu-toggle\").css(\"display\") == \"block\") {\n numbers(shortCol, tallCol);\n }\n if ($(\".col-md-4, .col-md-5\").css(\"float\") == \"left\") {\n numbers(shortCol, tallCol);\n }\n}", "toggleHidden (prop) {\n\t\t\tvar isVisible = true;\n\t\t\tif (!isNone(prop['isVisible'])) {\n\t\t\t\tisVisible = prop['isVisible'];\n\t\t\t}\n\t\t\tset(prop,'isVisible', isVisible?false:true);\n\t\t\t//comprobamos si queda alguna columna como visible, si no ocultamos acciones\n\t\t\tvar visible = false;\n\t\t\tvisible = this.properties.some(function(entry){\n\t\t\t\tif ( entry['isVisible'] ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t\tvisible?this.handleVisibility(false):this.handleVisibility(true);\n\t\t}", "function ResizeColumns() {\n if ($(\".GridContainer\").data(\"resizemode\") == \"overflow\") {\n if ($(\".HeaderGridView:visible\").length > 0) $(\".HeaderGridView\").mCustomScrollbar(\"update\");\n else $(\".DetailsGridView\").mCustomScrollbar(\"update\");\n }\n SetConfigTimer();\n }", "function isColOk(grid, col, num) {\n for (var row = 0; row < 9; row++) {\n if (grid[row][col] === num) {\n return false;\n }\n }\n return true;\n }", "function validateGrid() {\n\tvar rowsNum = mygrid.getRowsNum();\n\n\tfor ( var lineNum = 1; lineNum <= (rowsNum); lineNum++) {\n\t\tif (!validateLine(lineNum)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}", "rightColumnEnemyIsInCanvasRightColumn() {\n let mostLeftColumnWithEnemyAlive;\n for (let j = game.model.siEnemiesPerRow - 1; j >= 0; j--) {\n for (let i = 0; i < game.model.siEnemies.length; i++) {\n mostLeftColumnWithEnemyAlive = game.model.siEnemies[i][j];\n if (mostLeftColumnWithEnemyAlive.elem.style.display !== \"none\") {\n break;\n }\n }\n if (mostLeftColumnWithEnemyAlive.elem.style.display !== \"none\") {\n break;\n }\n }\n\n if (!mostLeftColumnWithEnemyAlive)\n return false;\n\n return mostLeftColumnWithEnemyAlive.x > this.canvasColumnWidth * (this.canvasColumns - 1) &&\n mostLeftColumnWithEnemyAlive.x < this.canvasColumnWidth * this.canvasColumns;\n }", "function setGridState(visible, enabled) {\n var gridContents = document.getElementsByClassName('grid-content');\n var grid = document.getElementById('grid');\n\n if (enabled) {\n grid.setAttribute('enabled', '');\n } else {\n grid.removeAttribute('enabled');\n }\n\n for (var i = 0; i < gridContents.length; i++) {\n if (!visible) {\n gridContents[i].classList.add('invisible');\n } else {\n gridContents[i].classList.remove('invisible');\n }\n }\n}", "function responsCol(){\n if(globItemdiv===''){\n globItemdiv = items;\n }\n\n if(expCol===6){\n if($(window).width()>991){\n col = 6;\n }\n else{\n respDevice();\n }\n }\n else if(expCol===5){\n if($(window).width()>991){\n col = 5;\n }\n else{\n respDevice();\n }\n }\n else if(expCol===3){\n if($(window).width()>991){\n col = 3;\n }\n else{\n respDevice();\n }\n }\n else{\n if($(window).width()>991){\n col = 4;\n }\n else{\n respDevice();\n }\n\n }\n function respDevice(){\n if($(window).width()>767){\n col = medCol;\n }\n else if($(window).width()>479){\n col = smCol;\n }\n else if($(window).width()<=480){\n col = tinyCol;\n }\n }\n if(startgroup !=''){\n globThisData = '.dc-pf-'+ startgroup;\n globItemdiv = $this.children(globThisData);\n }\n if(animationtype !='classic'){\n thisDefault(col, globItemdiv, items, globThisData); \n }\n else{\n thisDefault2(col, globItemdiv, items, globThisData); \n }\n $this.dcLightBox({\n portfolio:true,\n section: globThisData\n })\n }", "get HasColumnSettings() {\n return !tp.IsEmpty(this.fColumnSettings) && (this.fColumnSettings.length > 0);\n }", "visible() {\n let numberOfPoints = this.props.kernelElement.requiredPointCount()\n return this.points().filter((p) => p.initialized).length == numberOfPoints\n }", "_hideRowsOutOfView() {\n const rect = this.dom.getBoundingClientRect();\n const scrollTop = this.dom.scrollTop;\n this._prevScrollTop = scrollTop;\n\n this._resizingVisibleRows.length = 0;\n const visible = this._resizingVisibleRows;\n\n // Find all the rows that are inside the scroll view\n // and store them in _resizingVisibleRows.\n // We will hide the rest.\n let foundFirst = false;\n let row = this.body.dom.childNodes[0];\n while (row) {\n if (row.ui instanceof TableRow && !row.ui.hidden) {\n const rowRect = row.getBoundingClientRect();\n\n if (rowRect.bottom >= rect.top && rowRect.top <= rect.bottom) {\n visible.push(row);\n foundFirst = true;\n } else if (foundFirst) {\n // early break as if this rect is not visible\n // but we have already added one this means we are\n // beyond the bottom bounds of the scroll view.\n break;\n }\n }\n\n row = row.nextSibling;\n }\n\n if (visible.length) {\n // calculate the height before the first visible row\n // and the height after the last visible row.\n const bodyRect = this.body.dom.getBoundingClientRect();\n const firstRect = visible[0].getBoundingClientRect();\n const lastRect = visible[visible.length - 1].getBoundingClientRect();\n const beforeHeight = firstRect.top - bodyRect.top;\n const afterHeight = bodyRect.bottom - lastRect.bottom;\n\n requestAnimationFrame(() => {\n if (!visible.length) return;\n\n // Set custom CSS properties for before and after heights so that we fill\n // the table with a pseudo-element row before the first visible row and one\n // after the last visible row. This will ensure that our scrollview remains\n // the same height and the scroll position remains at the same place. The user\n // should not see any movement or changes to the scrollview that way.\n this.body.style.setProperty(CSS_PROPERTY_HEIGHT_BEFORE, beforeHeight + 'px');\n this.body.style.setProperty(CSS_PROPERTY_HEIGHT_AFTER, afterHeight + 'px');\n visible.forEach((dom) => dom.classList.add(CLASS_RESIZING_VISIBLE));\n this.dom.scrollTop = scrollTop;\n });\n }\n }", "function isVisibleOnScreen()/*:Boolean*/ {\n var result/*:Boolean*/ = true;\n var current/*:Component*/ = this;\n while (current) {\n com.coremedia.ui.data.dependencies.DependencyTracker.dependOnObservable(current, \"hide\");\n com.coremedia.ui.data.dependencies.DependencyTracker.dependOnObservable(current, \"show\");\n com.coremedia.ui.data.dependencies.DependencyTracker.dependOnObservable(current, \"render\");\n com.coremedia.ui.data.dependencies.DependencyTracker.dependOnObservable(current, \"layout\");\n com.coremedia.ui.data.dependencies.DependencyTracker.dependOnObservable(current, \"resize\");\n if (AS3.is(current, Ext.tab.Panel)) {\n com.coremedia.ui.data.dependencies.DependencyTracker.dependOnObservable(current, \"tabchange\");\n }\n if (!current.isVisible(true)) {\n result = false;\n }\n if (!current.getEl() || current.getEl().getWidth() <= 0) {\n result = false;\n }\n current =AS3.as( current.up(), Ext.Component);\n }\n\n return result;\n }" ]
[ "0.7021732", "0.6973777", "0.69236207", "0.6890815", "0.67806596", "0.6661221", "0.66592777", "0.66036105", "0.6538971", "0.64363", "0.6370961", "0.63411266", "0.6324636", "0.6324636", "0.6254044", "0.62467706", "0.6231791", "0.6197518", "0.617568", "0.6136398", "0.6096665", "0.60959363", "0.6046345", "0.60392106", "0.60336125", "0.6030836", "0.601367", "0.601367", "0.60009205", "0.59970427", "0.5987798", "0.5985035", "0.5964204", "0.5964204", "0.5946555", "0.5935992", "0.59338987", "0.5913439", "0.58849925", "0.5884517", "0.5875352", "0.58477527", "0.5837293", "0.5837293", "0.58275837", "0.58218086", "0.58140975", "0.5790473", "0.57874656", "0.578565", "0.57509804", "0.57509804", "0.5719143", "0.5713489", "0.57109356", "0.57072526", "0.56800264", "0.5679257", "0.56781316", "0.56761086", "0.56751406", "0.56597227", "0.56466407", "0.5646524", "0.5624233", "0.5599481", "0.5598815", "0.55893147", "0.55781287", "0.55713004", "0.5570288", "0.55607235", "0.5557198", "0.5555358", "0.5544286", "0.55429274", "0.55415046", "0.55389446", "0.55359155", "0.55355394", "0.55243945", "0.55190426", "0.55111516", "0.54963577", "0.5479656", "0.5471466", "0.5468001", "0.5460839", "0.54559636", "0.54507506", "0.54449016", "0.54386073", "0.5437599", "0.54225516", "0.5420836", "0.54192984", "0.54113626", "0.5406231", "0.540536", "0.54010344", "0.5398919" ]
0.0
-1
Ensures that specific columns are NOT visible. When you call this function the grid should be visible on screen.
function NavRemoveColumns(/**objectId*/ grid, /**string*/ list) { SeS(grid).DoRClick(); SeS("G_Choose_Columns").DoClick(); var items = list.split(","); for(var i = 0; i < items.length; i++) { var item = Global.DoTrim(items[i]); var columns = SeS('G_Show_Columns'); var index = columns.GetItemIndexByName(item); if (index >= 0) { columns.DoSelectItem(item); SeS('G_Remove_Column').DoClick(); } } SeS('G_Columns_OK').DoClick(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hideAllColumns(){\n\t\t\tthis.properties.forEach(function(entry){\n\t\t\t\tset(entry,'isVisible',false);\n\t\t\t});\n\t\t\tthis.handleVisibility(true);\n\t\t}", "function setGridInvisible() {\n grid.style.transition = \"none\";\n grid.style.visibility = \"hidden\";\n}", "function assert_visible_columns(aDesiredColumns) {\n let cols = mc.e(\"threadTree\").columns;\n let iDesired = 0;\n\n let visibleColumnIds = [];\n let failCol = null;\n for (let col = cols.getFirstColumn(); col != null; col = col.getNext()) {\n if (!col.element.hidden) {\n visibleColumnIds.push(col.id);\n if (!failCol) {\n if (aDesiredColumns[iDesired] != col.id) {\n failCol = col;\n } else {\n iDesired++;\n }\n }\n }\n }\n if (failCol) {\n throw new Error(\n \"Found visible column '\" +\n failCol.id +\n \"' but was \" +\n \"expecting '\" +\n aDesiredColumns[iDesired] +\n \"'!\" +\n \"\\ndesired list: \" +\n aDesiredColumns +\n \"\\n actual list: \" +\n visibleColumnIds\n );\n }\n}", "hideAll() {\n\n\t\tthis._gridIterator( col => {\n\t\t\tcol.$elem.hide();\n\t\t});\n\t}", "noGrid() {\n this._gridParams = false;\n }", "function set_columns_hidden() {\n //console.log( \"===== set_columns_hidden === \");\n //console.log( \" permit_dict\", permit_dict);\n\n if (permit_dict.requsr_role_system) {\n columns_hidden = [];\n } else if (permit_dict.requsr_role_admin) {\n // PR2023-05-30 admin must approve secret exams, dont hide auth3 auth4\n //columns_hidden = [\"group_auth3\", \"group_auth4\"];\n } else if (permit_dict.requsr_role_insp) {\n columns_hidden = [\"group_auth3\", \"group_auth4\"];\n } else if (permit_dict.requsr_role_corr) {\n columns_hidden = [\"sb_code\", \"school_abbrev\", \"group_auth3\", \"group_anlz\"];\n } else if (permit_dict.requsr_role_school) {\n columns_hidden = [\"sb_code\", \"school_abbrev\", \"group_anlz\", \"allowed_schoolbases\"];\n };\n }", "deadGrid() {\n for(let col = 0; col < this.width; col ++) {\n for(let row = 0; row < this.height; row++) {\n if(this.grid[col][row] == ALIVE){\n return false\n }\n }\n }\n return true\n }", "isValidPosition (column, row) {\n // add logic that checks if the column and row exist in the grid\n // return true if they are valid and false if they are not\n var validColumn = column >= 0 && column < this.numberOfColumns;\n var validRow = row >= 0 && row < this.numberOfRows;\n\n return validColumn && validRow;\n \n}", "function get_column_is_hidden() {\n //console.log(\" --- get_column_is_hidden ---\")\n\n// --- get list of hidden columns\n // copy col_hidden from mod_MCOL_dict.cols_hidden\n const col_hidden = [];\n // can also add multiple values with push:\n // was:\n // col_hidden.push( \"srgrade\", \"sr_status\", \"pescore\", \"pe_status\", \"pegrade\");\n\n b_copy_array_noduplicates(mod_MCOL_dict.cols_hidden, col_hidden);\n\n// - hide level when not level_req\n //if(!setting_dict.sel_dep_level_req){col_hidden.push(\"lvl_abbrev\")};\n return col_hidden;\n }", "checkVisible() {\r\n let squares = this.state.squares;\r\n let mapLevel = this.state.mapLevel;\r\n let p = this.state.playerIndex;\r\n let n = 20;\r\n let visible = [];\r\n const aura = [p, p-2, p-1, p+1, p+2, p+3, p-3,\r\n p-n, p-n-2, p-n-1, p-n+1, p-n+2,\r\n p+n, p+n-2, p+n-1, p+n+1, p+n+2,\r\n p-n*2, p-n*2-1, p-n*2+1,\r\n p+n*2, p+n*2-1, p+n*2+1,\r\n p-4, p+4];\r\n\r\n //only set visible what is on grid and eliminate overflow to other rows\r\n for (let i=0; i<aura.length; i++) {\r\n if (Math.abs(aura[i] % n - p % n) < 4 && aura[i] >= 0 && aura[i] < squares[mapLevel].length) {\r\n visible.push(aura[i]);\r\n }\r\n }\r\n let hidden = [];\r\n for (let i=0; i<squares[mapLevel].length; i++) {\r\n if (!visible.includes(i)) {\r\n hidden.push(i);\r\n }\r\n }\r\n this.setHidden(hidden);\r\n this.setVisible(visible);\r\n }", "hideAllColumnsExcept(index) {\n if (this.data.headers.length == 0) {\n return;\n }\n let hiddenColumns = this.data.headers\n .map((header, idx) => idx)\n .filter((i) => i != 0 && i != index);\n this.hiddenColumns = hiddenColumns;\n }", "function setColumnVisibility(columns,index,visible) {\n if(index<columns.length) {\n columns[index].visible = visible;\n }\n}", "function whileColumnsNotSet() {\n // Only act when the data has been filled in\n if ($scope.data.length > 0) {\n // Auto-generate columns if the user hasn't created them yet.\n if ($scope.columns.length === 0) {\n $scope.columns = Object.keys($scope.data[0])\n .map(function(columnName) {\n return {key: columnName};\n });\n }\n clearWatch();\n }\n }", "get visibleColumns() {\n return this._visibleColumns;\n }", "set visibleColumns(visibleColumns) {\n this._visibleColumns = visibleColumns;\n }", "function grabNonFilledColumns(board) {\r\n let nonFilledColumns = []\r\n board.forEach((value, index) => {\r\n if (value.length < heightLimit)\r\n nonFilledColumns.push(index)\r\n })\r\n return nonFilledColumns\r\n}", "function notBlockHorizontally(row, col1, col2) {\n for (var i = col1 + 1; i < col2; i++) {\n if (all_numbers[row][i]) {\n return false;\n }\n }\n return true;\n}", "function fixExcessCells () {\n var dumb_fix = document.getElementsByClassName(\"no_room_class\");\n dumb_fix[0].style.display = \"none\";\n dumb_fix[1].style.display = \"none\";\n dumb_fix[2].style.display = \"none\";\n}", "_isHidden() {\n return !(\n isPageProviderDisplayBehavior(this.documents) ||\n (this.documents &&\n this.documents.length > 0 &&\n this.documents.every((doc) => !this.hasFacet(doc, 'NotCollectionMember')))\n );\n }", "function emptyColumnCheck() {\n\t\t\tvar data = grid.getData().getItems() || [];\n //Avoiding Resize functionality when there is no data.\n if (data.length === 0) {\n return;\n }\n var headerColumns = $('.slick-header-column', $(container));\n var flag = [];\n var updateGrid = false;\n for (i = 0; i < headerColumns.length; i++) {\n \tif(grid.getColumns()[i].hasOwnProperty('editor')){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n flag[i] = true;\n\t\t\t\tfor(j = 0; j < data.length; j++){\n\t\t\t\t\tif($.trim(data[j][grid.getColumns()[i].field])){\n\t\t\t\t\t\tflag[i] = false;\n if (grid.getColumns()[i].originalWidth)\n grid.getColumns()[i].width = grid.getColumns()[i].originalWidth;\n break;\n\t\t\t\t\t}\n\t\t\t\t}\n if (flag[i] && grid.getColumns()[i]) {\n grid.getColumns()[i].originalWidth = grid.getColumns()[i].width;\n // grid.getColumns()[i].width = 40;\n updateGrid = true;\n }\n }\n if (updateGrid) {\n grid.setColumns(grid.getColumns(), true);\n }\n }", "function unUsedInCol(solutionGrid, j, num) \n { \n for (let i = 0; i<9; i++) \n if (solutionGrid[i][j] == num) \n return false; \n return true; \n }", "function isNotVisible(visible) {\n\tif (visible == false) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function visibilidadColumna(col,acc){\n\tif(acc == 0){\n\t\t$('td:nth-child('+col+'),th:nth-child('+col+')').addClass('d-none');\n\t}else if(acc == 1){\n\t\t$('td:nth-child('+col+'),th:nth-child('+col+')').removeClass('d-none');\n\t}\n}", "function cell_unblocked(grid, row, col) {\n if (grid[row][col] === 1) return true;\n else return false;\n}", "function mainGridOrientationCheck() {\n if (window.innerHeight >= window.innerWidth) {\n mainGridDOM.style.display = 'none';\n orientationWarningDOM.style.display = 'block';\n return;\n } \n mainGridDOM.style.removeProperty('display');\n orientationWarningDOM.style.removeProperty('display');\n}", "function mainGridOrientationCheck() {\n if (window.innerHeight >= window.innerWidth) {\n mainGridDOM.style.display = 'none';\n orientationWarningDOM.style.display = 'block';\n return;\n }\n\n mainGridDOM.style.removeProperty('display');\n orientationWarningDOM.style.removeProperty('display');\n}", "function noRecordCheck() {\n\t\t\tvar viewPort = '.grid-canvas';\n if (data.length === 0) {\n\t\t\t\tif(!grid.getOptions().isHeaderColumnRequired){\n\t\t\t\t\tviewPort = '.slick-viewport';\n\t\t\t\t}\n\t\t\t\t$(viewPort, $(container)).html('<div class=\"noRecord\">' + xenos.i18n.message.no_record_found_message + '</div>');\n }\n }", "function handleScrollEvent () {\n let viewportTop = window.pageYOffset,\n viewportBottom = viewportTop + viewportHeight;\n\n for (let i=0; i < num_cols; i++) {\n let colId = columns[i].id,\n col = columnData[colId],\n colTop = col.top,\n colMiddle = col.middle,\n colBottom = col.bottom;\n\n if (col.isVisible) {\n let colTopIsVisible = (viewportTop < colTop) && (colTop < viewportBottom ),\n colMiddleIsVisible = (viewportTop < colMiddle) && (colMiddle < viewportBottom),\n colBottomIsVisible = (viewportTop < colBottom) && (colBottom < viewportBottom);\n\n if (colTopIsVisible && col.seen_top === false) {\n console.log('Column with id:', colId, 'started to become visible on the page.');\n columnData[colId]['seen_top'] = true;\n }\n if (colMiddleIsVisible && col.seen_middle === false) {\n console.log('Column with id:', colId, 'is now more than 50% visible on the page.');\n columnData[colId]['seen_middle'] = true;\n }\n if (colBottomIsVisible && col.seen_bottom === false) {\n console.log('Column with id:', colId, 'is now fully visible on the page.');\n columnData[colId]['seen_bottom'] = true;\n }\n }\n }\n }", "function isLegalMove(col) {\n return stats.moveStart != null && stats.openRows[col] < 6 && stats.winner == null;\n }", "function HideGridColumn(gridName, columns) {\n var grid = $('#' + gridName);\n grid.jqGrid('hideCol', columns);\n\n $.each(columns, function (index, item) {\n grid.jqGrid('setColProp', item, { classes: 'Hide' });\n });\n\n}", "function visible(dimension) {return !('visible' in dimension) || dimension.visible;}", "function visible(dimension) {return !('visible' in dimension) || dimension.visible;}", "function gridViewChecker() {\n var item = $('.grid .grid-item');\n item.removeClass('ml-15');\n if ( $('.grid').hasClass('grid-view') ) {\n item.not('.hidden').each(function(index) {\n if ( index % 2 !== 0 ) {\n $(this).addClass('ml-15');\n }\n });\n }\n AOS.refresh();\n}", "handleVisibility(hidden){\n\t\tif ( hidden ) {\n\t\t\tset(this,'actionsColumn', false);\n\t\t\tset(this,'showTableFooter', false);\n\t\t\tset(this,'showGlobalFilter', false);\n\t\t\tset(this,'showActionNew', false);\n\t\t\tset(this,'allColumnsAreHidden',true);\n\t\t} else {\n\t\t\tset(this,'actionsColumn', true);\n\t\t\tset(this,'showTableFooter', true);\n\t\t\tset(this,'showGlobalFilter', true);\n\t\t\tset(this, 'showActionNew', true);\n\t\t\tset(this,'allColumnsAreHidden',false);\n\t\t}\n\t}", "function isColSafe(grid, col, num) {\r\n for (var row = 0; row < 9; row++)\r\n if (grid[row][col] == num)\r\n return false;\r\n\r\n return true;\r\n}", "unvalidateCells() {\n for (let i = 0; i < this.view.board.cells.length; i++)\n this.view.board.cells[i].valid = false;\n }", "function chooseColumnsToView(selectedCol){\n\t\n\t // find the grid\n\t var grid = dijit.byId(\"grid\");\n\t \n\t var z;\n\t var zz;\n\t \n\t for (z in grid.layout.cells) {\n\t \tif (grid.layout.cells[z].field === \"datetime\") {\n\t \t\tgrid.layout.setColumnVisibility(z, selectedCol.timestamp.length !== 0);\n\t \t} else if (grid.layout.cells[z].field === \"threadid\") {\n\t \t\tgrid.layout.setColumnVisibility(z,selectedCol.threadid.length !== 0);\t \t\t\n\t \t} else if (grid.layout.cells[z].field === \"logger\") {\n\t \t\tgrid.layout.setColumnVisibility(z, selectedCol.logger.length !== 0);\n\t \t} else if (grid.layout.cells[z].field === \"event\") {\t \t\t\n\t \t\tgrid.layout.setColumnVisibility(z, selectedCol.event.length !== 0);\n\t \t} else if (grid.layout.cells[z].field === \"message\") {\t \t\t\n\t \t\tgrid.layout.setColumnVisibility(z, selectedCol.message.length !== 0);\n\t \t\tif(grid.layout.cells[z].hidden) {\n for (zz in grid.layout.cells) {\n if (grid.layout.cells[zz].field === \"logger\") {\n grid.layout.cells[zz].width = '60em';\n }\n }\n } else {\n for (zz in grid.layout.cells) {\n if (grid.layout.cells[zz].field === \"logger\") {\n grid.layout.cells[zz].width = '55px';\n }\n }\n \t\n }\n\t \t} \n\t \t\n\t }\n\t \n\t}", "function hideButtons(grid){\n\tvar numRows = grid.rows.length;\n\tfor (var j = 0; j < numRows; j++) {\n\t\tvar buttonCell = getCellElement(grid, 0, 0);\n\t\tvar button = buttonCell.firstChild;\n\t\tbutton.style.display = \"none\";\n }\t\n}", "leftColumnEnemyIsInCanvasLeftColumn() {\n var mostLeftColumnWithEnemyAlive;\n for (let j = 0; j < game.model.siEnemiesPerRow; j++) {\n for (let i = 0; i < game.model.siEnemies.length; i++) {\n mostLeftColumnWithEnemyAlive = game.model.siEnemies[i][j];\n if (mostLeftColumnWithEnemyAlive.elem.style.display !== \"none\") {\n break;\n }\n }\n if (mostLeftColumnWithEnemyAlive.elem.style.display !== \"none\") {\n break;\n }\n }\n\n if (!mostLeftColumnWithEnemyAlive)\n return false;\n\n return mostLeftColumnWithEnemyAlive.x > 0 && mostLeftColumnWithEnemyAlive.x < this.canvasColumnWidth;\n }", "visible_column_count() {\n return this.state.columns.filter(function (item) {\n return item.hide_column != true;\n }).length;\n }", "function gridOutOfBounds(pgX, pgY) {\n return pgX < 0 || pgX >= currentLevel.size.x || pgY < 0 || pgY >= currentLevel.size.y;\n }", "function show(row, col) {\n\t\tdocument.getElementById(row+\"_\"+col).style.visibility=\"\";\n\t}", "function xTableCellVisibility(bShow, sec, nRow, nCol)\r\n{\r\n sec = xGetElementById(sec);\r\n if (sec && nRow < sec.rows.length && nCol < sec.rows[nRow].cells.length) {\r\n sec.rows[nRow].cells[nCol].style.visibility = bShow ? 'visible' : 'hidden';\r\n }\r\n}", "determineMatrixVisibility () {\n if (!this.hglSelectionViewDomains) {\n return;\n }\n\n fgmState.matrices.forEach((matrix) => {\n matrix.visible = false;\n\n if (\n matrix.locus.globalStart1 >= this.hglSelectionViewDomains[0] &&\n matrix.locus.globalEnd1 <= this.hglSelectionViewDomains[1] &&\n matrix.locus.globalStart2 >= this.hglSelectionViewDomains[2] &&\n matrix.locus.globalEnd2 <= this.hglSelectionViewDomains[3]\n ) {\n matrix.isVisibleInSelection = true;\n } else {\n matrix.isVisibleInSelection = false;\n }\n });\n }", "function checkDraw() {\n for(i = 0; i < 7; i++){\n for(j = 0; j < 6; j++){\n if(grid[i][j] == null) \n return false;\n }\n }\n return true;\n}", "function hideCol(obj, col_id) {\n\tvar tb = document.getElementById(obj);\n\tvar trow = tb.rows;\n\tfor (var i = 0; i < trow.length; i++) {\n\t\ttrow[i].cells[col_id].style.display == '';\n\t}\n}", "function hide(row, col) {\n\t\tdocument.getElementById(row+\"_\"+col).style.visibility=\"hidden\";\n\t}", "function isValidCellDev(row, col)\n{\n // IS IT OUTSIDE THE GRID?\n if ( (row < 0) ||\n (col < 0) ||\n (row >= gridHeightDev) ||\n (col >= gridWidthDev))\n {\n return false;\n }\n // IT'S INSIDE THE GRID\n else\n {\n return true;\n }\n}", "function checkVisible() {\r\n var $items = ['registration', 'messages', 'sponsors'];\r\n $('.ipWidget').find('.myl-module-game').each(function(){\r\n var $name = $(this).attr('data-module-name');\r\n var $active = $(this).children('div').data('module-visible');\r\n\r\n if(($.inArray($name, $items) !== -1) && $active == 'no') {\r\n $(this).parent().css('display', 'none');\r\n }\r\n });\r\n }", "hideFilterBar() {\n const me = this,\n columns = me.grid.columns;\n\n // we don't want to hear back store \"filter\" event while we're resetting store filters\n me.clearStoreFiltersOnHide && me.suspendStoreTracking();\n\n // hide the fields, each silently - no updating of the store's filtered state until the end\n columns && columns.forEach((col) => me.hideColumnFilterField(col, true));\n\n // Now update the filtered state\n me.grid.store.filter();\n\n me.clearStoreFiltersOnHide && me.resumeStoreTracking();\n\n me.hidden = true;\n }", "function initGrid (){\n for (var row = 0; row < numRows; row += 1) {\n for (var col = 0; col < numCols; col += 1) {\n drawCustomCell(row, col, window.cells[row][col].state,'none', true);\n }\n }\n}", "function IsDraw(cells) {\n // return cells.filter(c => c === null).length == 0;\n}", "function testUnprotectEmptycolumns() {\n var columnsToUnprotect = [communityCommentsCol, contactsCol];\n unprotectRange(columnsToUnprotect);\n}", "function checkForWin () {\nvar unhiddenCells = board.cells.filter(cell => {\n return ((cell.isMine && !cell.isMarked) || (!cell.isMine && cell.isHidden))\n})\nif (unhiddenCells.length === 0) {\n lib.displayMessage('You win!')\n }\n}", "function setColumnVisibilities(fieldHiddenValues,targetGridId) {\n\t$('#'+targetGridId).jqxGrid('beginupdate',true)\n\tfor (field in fieldHiddenValues) { \n\t\tif ($('#'+targetGridId).jqxGrid('getcolumn',field)!==null) { \n\t\t\tif (fieldHiddenValues[field]==true) {\n\t\t\t\tif ($('#'+targetGridId).jqxGrid('getcolumnproperty',field,'hidable')==true) { \n\t\t\t\t\t$('#'+targetGridId).jqxGrid('hidecolumn',field);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$('#'+targetGridId).jqxGrid('showcolumn',field);\n\t\t\t}\n\t\t}\n\t}\n\t$('#'+targetGridId).jqxGrid('endupdate')\n}", "_hideRowsOutOfView() {\n const rect = this.dom.getBoundingClientRect();\n const scrollTop = this.dom.scrollTop;\n this._prevScrollTop = scrollTop;\n\n this._resizingVisibleRows.length = 0;\n const visible = this._resizingVisibleRows;\n\n // Find all the rows that are inside the scroll view\n // and store them in _resizingVisibleRows.\n // We will hide the rest.\n let foundFirst = false;\n let row = this.body.dom.childNodes[0];\n while (row) {\n if (row.ui instanceof TableRow && !row.ui.hidden) {\n const rowRect = row.getBoundingClientRect();\n\n if (rowRect.bottom >= rect.top && rowRect.top <= rect.bottom) {\n visible.push(row);\n foundFirst = true;\n } else if (foundFirst) {\n // early break as if this rect is not visible\n // but we have already added one this means we are\n // beyond the bottom bounds of the scroll view.\n break;\n }\n }\n\n row = row.nextSibling;\n }\n\n if (visible.length) {\n // calculate the height before the first visible row\n // and the height after the last visible row.\n const bodyRect = this.body.dom.getBoundingClientRect();\n const firstRect = visible[0].getBoundingClientRect();\n const lastRect = visible[visible.length - 1].getBoundingClientRect();\n const beforeHeight = firstRect.top - bodyRect.top;\n const afterHeight = bodyRect.bottom - lastRect.bottom;\n\n requestAnimationFrame(() => {\n if (!visible.length) return;\n\n // Set custom CSS properties for before and after heights so that we fill\n // the table with a pseudo-element row before the first visible row and one\n // after the last visible row. This will ensure that our scrollview remains\n // the same height and the scroll position remains at the same place. The user\n // should not see any movement or changes to the scrollview that way.\n this.body.style.setProperty(CSS_PROPERTY_HEIGHT_BEFORE, beforeHeight + 'px');\n this.body.style.setProperty(CSS_PROPERTY_HEIGHT_AFTER, afterHeight + 'px');\n visible.forEach((dom) => dom.classList.add(CLASS_RESIZING_VISIBLE));\n this.dom.scrollTop = scrollTop;\n });\n }\n }", "full() {\r\n for (let i = 0; i < DIMENSIONS; i++) {\r\n for (let j = 0; j < DIMENSIONS; j++) {\r\n if (!this.grid[i][j]) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }", "_safeCell(x, y) {\r\n if (x < 0 || x >= this.grid.length) return false\r\n if (y < 0 || y >= this.grid[x].length) return false\r\n return true\r\n }", "function disableGrid() {\r\n // Get all cells\r\n let cells = $(\".cell\");\r\n\r\n // Remove their click and hover function\r\n cells.unbind(\"click\");\r\n cells.unbind(\"mouseenter mouseleave\");\r\n\r\n // Add a disabled state\r\n cells.addClass(\"cellDisabled\");\r\n $(\".arrow\").addClass(\"arrowDisabled\");\r\n}", "function notBlockVertically(col, row1, row2) {\n for (var i = row1 + 1; i < row2; i++) {\n if (all_numbers[i][col]) {\n return false;\n }\n }\n return true;\n}", "preservesDesiredColumn() {\n return false;\n }", "function iterateSucceedingColumns() {\r\n\t\tvar x = editableFieldsList.indexOf(currentColTitle) + 1;\r\n\t\tvar nextEditableCol = editableFieldsList[x];\r\n\t\tif (null === nextEditableCol || undefined === nextEditableCol) {\r\n\t\t\tgetNextEditableRow();\r\n\t\t}\r\n\t\tnextEditableFieldId = getNextGridFieldId(rowNum, nextEditableCol);\r\n\r\n\t\tfindAndSetFocus();\r\n\t\tfunction findAndSetFocus() {\r\n\r\n\t\t\tif (!isGridElementPresent(nextEditableFieldId) || isVisible(nextEditableFieldId)) {\r\n\t\t\t\tvar xpos = 0;\r\n\t\t\t\tvar nxtEditableFound = false;\r\n\t\t\t\t$(columnList).each(function () {\r\n\t\t\t\t\tif ($(this).attr('_headerText') === nextEditableCol) {\r\n\t\t\t\t\t\txpos = $(this).attr('_x');\r\n\t\t\t\t\t\tnxtEditableFound = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tif (nxtEditableFound) {\r\n\t\t\t\t\t$(gridBlockElem).animate({\r\n\t\t\t\t\t\t'scrollLeft': xpos\r\n\t\t\t\t\t}, 500, '', function () {\r\n\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\tnextGridElem = $(document.getElementById(nextEditableFieldId));\r\n\t\t\t\t\t\t\tif (nextGridElem && nextGridElem.length > 0)\r\n\t\t\t\t\t\t\t\tsetFocus();\r\n\t\t\t\t\t\t\telse if (grid.getBodyContainer().maxVerticalScrollPosition > $(gridBlockElem).scrollTop()) {\r\n\t\t\t\t\t\t\t\tvar ypos = $(gridBlockElem).scrollTop() + grid.getBodyContainer().height - grid.getBodyContainer().verticalMask;\r\n\t\t\t\t\t\t\t\tif (grid.getBodyContainer()._calculatedTotalHeight > ypos) {\r\n\t\t\t\t\t\t\t\t\t$(gridBlockElem).animate({\r\n\t\t\t\t\t\t\t\t\t\t'scrollTop': ypos\r\n\t\t\t\t\t\t\t\t\t}, 300, '', function () {\r\n\t\t\t\t\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t\t\t\t\tif (!isGridElementPresent(nextEditableFieldId)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t$(columnList).each(function () {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($(this).attr('_headerText') === nextEditableCol)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\txpos = $(this).attr('_x');\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t\t$(gridBlockElem).animate({\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t'scrollLeft': xpos\r\n\t\t\t\t\t\t\t\t\t\t\t\t}, 300, '', function () {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function () {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextGridElem = $(document.getElementById(nextEditableFieldId));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextGridElem && nextGridElem.length > 0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetFocus();\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}, 400);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextGridElem = $(document.getElementById(nextEditableFieldId));\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextGridElem && nextGridElem.length > 0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetFocus();\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}, 400);\r\n\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}, 500);\r\n\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnmsp.isTabbed = false;\r\n\t\t\t\t\tfocusOutFromLastGridField();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tnextGridElem = $(document.getElementById(nextEditableFieldId));\r\n\t\t\t\tif (nextGridElem && nextGridElem.length > 0)\r\n\t\t\t\t\tsetFocus();\r\n\t\t\t}\r\n\t\t}\r\n\t\t/**\r\n\t\t * Checks whether there is an editable field in the current row if not finds the net row with editable field\r\n\t\t */\r\n\t\tfunction getNextEditableRow() {\r\n\t\t\trowNum = parseInt(rowNum) + 1;\r\n\t\t\teditableFieldsList = getEditableFieldListInOrder(nmsp, rowNum);\r\n\t\t\tvar maxVisibleRowNum = parseInt(grid.getRowCount()) + parseInt(initRowNum);\r\n\t\t\tif (editableFieldsList && editableFieldsList.length > 0) {\r\n\t\t\t\tnextEditableCol = editableFieldsList[0];\r\n\t\t\t\tnextEditableFieldId = getNextGridFieldId(rowNum, nextEditableCol);\r\n\t\t\t} else if (maxVisibleRowNum < rowNum && grid.getBodyContainer().maxVerticalScrollPosition > $(gridBlockElem).scrollTop()) { // if maximum number visible rows exceeded then scroll write the next set\r\n\t\t\t\tvar ypos = $(gridBlockElem).scrollTop() + grid.getBodyContainer().height - grid.getBodyContainer().verticalMask;\r\n\t\t\t\tif (grid.getBodyContainer()._calculatedTotalHeight > ypos) {\r\n\t\t\t\t\t$(gridBlockElem).animate({\r\n\t\t\t\t\t\t'scrollTop': ypos\r\n\t\t\t\t\t}, 300, '', function () {\r\n\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\trowNum = initRowNum;\r\n\t\t\t\t\t\t\tgetNextEditableRow();\r\n\t\t\t\t\t\t}, 400);\r\n\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} else if ((grid.getBodyContainer().maxVerticalScrollPosition > $(gridBlockElem).scrollTop()) || (Object.keys(nmsp.rowEditableColumnMap).length > rowNum))\r\n\t\t\t\tgetNextEditableRow();\r\n\t\t}\r\n\r\n\t}", "_checkColumnCellsAlive(playerID, column) {\n let base = column + playerID*9;\n return !(this.cells[base].isDead && this.cells[base+3].isDead && this.cells[base+6].isDead);\n }", "function validateGrid() {\n\tvar rowsNum = mygrid.getRowsNum();\n\n\tfor ( var lineNum = 1; lineNum <= (rowsNum); lineNum++) {\n\t\tif (!validateLine(lineNum)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}", "function makeUnwritable(playerNumber){\n\t\tvar colNumber = playerNumber - 1;\n\t\t\n\t\tgetColumnCells(column).slice(7,10).removeClass(\"setMe\").css(\"background\",\"#EEE\");\n\t\t\n\t\tgetColumnCells(column).slice(17,19).removeClass(\"setMe\").css(\"background\",\"#EEE\");\n\t}", "function hideInputBox(col) {\n addBtns[col].style.visibility = \"visible\";\n saveItemBtns[col].style.display = \"none\";\n addItemContainers[col].style.display = \"none\";\n addToColumn(col);\n}", "function showColumns(){\n\t\n\t//loop through the column filter inputs to determine which ones are checked or not to display the areas\n\tjQuery(\"#column_filter\").children('ul').children('li').each(function(){\n\t\tinitColumn(jQuery(this).children('input').attr('id'));\n\t});\t\n}", "function show_column(aColumnId) {\n mc.e(aColumnId).removeAttribute(\"hidden\");\n}", "function cell_valid(row, col) {\n return row >= 0 && row < 12 && col >= 0 && col < 12;\n}", "_empty_grid() {\n\t\t\tfor (var x = 0; x < this._internal_grid_size[0]; x++) {\n\t\t\t\tfor (var y = 0; y < this._internal_grid_size[1]; y++) {\n\t\t\t\t\tthis._set_grid_value(x, y, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function admissible(row, col, num, grid) {\r\n for (var i = 0; i < 9; i++) {\r\n\t\t\tif(i != col && grid[row][i] == num)\r\n\t\t\t\treturn 0;\r\n if(i != row && grid[i][col] == num)\r\n\t\t\t\treturn 0;\r\n\t\t\tvar r = Math.floor(row / 3) * 3 + Math.floor(i / 3);\r\n\t\t\tvar c = Math.floor(col / 3) * 3 + (i % 3); //sub-grid co-ordinates\r\n if(!(row == r && col == c) && grid[r][c] == num)\r\n return 0;\r\n }\r\n return 1;\r\n}", "function disableColumn(colNum) {\r\n // Get all cells in the provided colNum\r\n let column = $(\".cell\").filter(function() {\r\n let re = new RegExp(\"cell_\\\\d\\-\" + colNum);\r\n return $(this).attr(\"name\").match(re);\r\n });\r\n\r\n // Remove their click and hover function\r\n column.unbind(\"click\");\r\n column.unbind(\"mouseenter mouseleave\");\r\n\r\n // Add a disabled state\r\n column.addClass(\"cellDisabled\");\r\n $(\".cell[name=cell_\" + colNum).addClass(\"columnDisabled\");\r\n}", "hideFilterBar() {\n const me = this,\n columns = me.grid.columns; // we don't want to hear back store \"filter\" event while we're resetting store filters\n\n me.clearStoreFiltersOnHide && me.suspendStoreTracking(); // hide the fields, each silently - no updating of the store's filtered state until the end\n\n columns && columns.forEach(col => me.hideColumnFilterField(col, true)); // Now update the filtered state\n\n me.grid.store.filter();\n me.clearStoreFiltersOnHide && me.resumeStoreTracking();\n me.hidden = true;\n }", "function _fnVisbleColumns(oS) {\n\t\t\tvar iVis = 0;\n\t\t\tfor (var i = 0; i < oS.aoColumns.length; i++) {\n\t\t\t\tif (oS.aoColumns[i].bVisible === true) {\n\t\t\t\t\tiVis++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn iVis;\n\t\t}", "function checkLosing() {\n lowestTop = parseFloat(columns[0][0].style.top);\n for (i = 1; i < columns.length; i++) {\n if (columns[i].length > 0) {\n const colLowestTop = parseFloat(columns[i][0].style.top);\n if (colLowestTop > lowestTop) {\n lowestTop = colLowestTop;\n }\n }\n }\n\n var lowestBottom = lowestTop + 8; /*8% target height*/\n if (lowestBottom > parseFloat(canon.style.top)) {\n //End Game\n //console.log(\"Loser\");\n endGame(gameOver.lose);\n }\n }", "generateColumns() {\r\n this.columns = _(this.getColumns())\r\n .map(this.getColumnOptions)\r\n .filter(\r\n o => {\r\n return _.isFunction(o.hidden) ? !o.hidden(o) : !o.hidden;\r\n }\r\n )\r\n .sortBy([\r\n o => {\r\n return _.isFunction(o.order) ? o.order(o) : o.order;\r\n }\r\n ])\r\n .value();\r\n\r\n this.fireSlimGridEvent(\"onColumnsGenerated\", {});\r\n }", "isSafe(grid, row, col, num) {\n // Check if 'num' is not already placed in current row,\n // current column and current 3x3 box\n return (\n !this.usedInRow(grid, row, num) &&\n !this.usedInCol(grid, col, num) &&\n !this.usedInBox(grid, row - (row % 3), col - (col % 3), num)\n );\n }", "function setGridState(visible, enabled) {\n var gridContents = document.getElementsByClassName('grid-content');\n var grid = document.getElementById('grid');\n\n if (enabled) {\n grid.setAttribute('enabled', '');\n } else {\n grid.removeAttribute('enabled');\n }\n\n for (var i = 0; i < gridContents.length; i++) {\n if (!visible) {\n gridContents[i].classList.add('invisible');\n } else {\n gridContents[i].classList.remove('invisible');\n }\n }\n}", "function unUsedInBox(solutionGrid, rowStart, colStart, num) \n { \n for (let i = 0; i<3; i++) \n for (let j = 0; j<3; j++) \n if (solutionGrid[rowStart+i][colStart+j]==num) \n return false; \n\n return true; \n }", "function isSafe(rooms, currRow, currColumn) {\n return currColumn >= 0 && currColumn < rooms[0].length && currRow >= 0 && currRow < rooms.length\n}", "function remove_cell_from_validation_grid(x, y) {\r\n\t\tgridPlaced[x][y] = '0';\r\n\t}", "isLastCellHidden(element, container)\n\t\t{\n\t\t\tif (! element[0]) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tlet rect = element[0].getBoundingClientRect();\n\t\t\tlet threshold = container[0].getBoundingClientRect().left + container[0].getBoundingClientRect().width;\n \t\n \tif (rect.left == 0 && threshold == 0) {\n \t\t// this means the stat table is currently hidden (user looking at different tab)\n \t\t// best we can do is just guess until it is actually scrolled on\n \t\treturn this.guesstimate();\n \t}\n \t\n \treturn rect.left >= threshold;\n }", "function hide_column(aColumnId) {\n mc.e(aColumnId).setAttribute(\"hidden\", \"true\");\n}", "function hideSolution()\n\t\t{\n\t\t\tallCells = puzzleCells.getElementsByTagName(\"td\");\n\t\t\tfor(i=0; i < allCells.length; i++) {\n\t\t\t\tallCells[i].style.backgroundColor = \"white\";\n\t\t\t\t}\n\t\t}", "function hideInputBox(column){\n \n addBtns[column].style.visibility='visible';\n saveItemBtns[column].style.display='none';\n addItemContainers[column].style.display='none';\n addToColumn(column);\n\n}", "function hideInputBox(column) {\n addBtns[column].style.visibility = 'visible'\n saveItemBtns[column].style.display = 'none'\n addItemContainers[column].style.display = 'none'\n addToColumn(column)\n}", "function showChooseColumnDialog(){\n\t // find the grid\n\t var grid = dijit.byId(\"grid\");\n\t \n\t for (var z in grid.layout.cells) {\n\t \t//console.debug(grid.structure[z].field);\n\t \tif (grid.layout.cells[z].field === \"datetime\") {\n\t \t\tdijit.byId('timestamp').set('checked', !grid.layout.cells[z].hidden);\n\t \t} else if (grid.layout.cells[z].field === \"threadid\") {\n\t \t\tdijit.byId('threadid').set('checked', !grid.layout.cells[z].hidden);\n\t \t} else if (grid.layout.cells[z].field === \"logger\") {\n\t \t\tdijit.byId('logger').set('checked', !grid.layout.cells[z].hidden);\n\t \t} else if (grid.layout.cells[z].field === \"event\") {\t \t\t\n\t \t\tdijit.byId('event').set('checked', !grid.layout.cells[z].hidden);\n\t \t} else if (grid.layout.cells[z].field === \"message\") {\t \t\t\n\t \t\tdijit.byId('message').set('checked', !grid.layout.cells[z].hidden);\n\t \t} \n\t }\n\n\t\tdijit.byId('selectColumnDialog').show();\n\t}", "toggleHidden (prop) {\n\t\t\tvar isVisible = true;\n\t\t\tif (!isNone(prop['isVisible'])) {\n\t\t\t\tisVisible = prop['isVisible'];\n\t\t\t}\n\t\t\tset(prop,'isVisible', isVisible?false:true);\n\t\t\t//comprobamos si queda alguna columna como visible, si no ocultamos acciones\n\t\t\tvar visible = false;\n\t\t\tvisible = this.properties.some(function(entry){\n\t\t\t\tif ( entry['isVisible'] ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t\tvisible?this.handleVisibility(false):this.handleVisibility(true);\n\t\t}", "function hideInputBox(column) {\r\n addBtns[column].style.visibility = \"visible\";\r\n saveItemBtns[column].style.display = \"none\";\r\n addItemContainers[column].style.display = \"none\";\r\n addToColumn(column);\r\n}", "checkCell( grid ){\n let flag = true;\n\n if( grid.x < 0 || grid.y < 0 || grid.x > this.const.m - 1 || grid.y > this.const.n - 1 )\n flag = false;\n\n return flag;\n }", "getColumnDragToolbarItems(column, items) {\n const visibleInRegion = this.grid.columns.visibleColumns.filter((col) => col.region === column.region);\n\n if (column.hideable !== false && visibleInRegion.length > 1) {\n items.push({\n text: this.L('hideColumnShort'),\n group: this.L('Column'),\n icon: 'b-fw-icon b-icon-hide-column',\n weight: 101,\n name: 'hideColumn',\n onDrop: ({ column }) => column.hide()\n });\n }\n return items;\n }", "function IsDraw(cells) {\n return cells.filter(c => c === null).length === 0;\n}", "function hideInputBox(column) {\r\n addBtns[column].style.visibility = 'visible';\r\n saveItemBtns[column].style.display = 'none';\r\n addItemContainers[column].style.display = 'none';\r\n addToColumn(column);\r\n}", "function emptyCells() {\n return origBoard.filter(cell => typeof cell === \"number\");\n}", "static hideBoards() {\n document.getElementById('boardContainer').style.display = 'none';\n }", "function isSafe(grid, row, col, num) {\r\n return isRowSafe(grid, row, num) && isColSafe(grid, col, num) && isBoxSafe(grid, row, col, num);\r\n}", "function outOfRange(col, row){\r\n\treturn (col<0 || row<0 || col>=field_width || row >= field_height); \r\n}", "getColumnDragToolbarItems(column, items) {\n const visibleInRegion = this.grid.columns.visibleColumns.filter(col => col.region === column.region);\n\n if (column.hideable !== false && visibleInRegion.length > 1) {\n items.push({\n text: 'L{hideColumnShort}',\n group: 'L{column}',\n localeClass: this,\n icon: 'b-fw-icon b-icon-hide-column',\n weight: 101,\n name: 'hideColumn',\n onDrop: ({\n column\n }) => column.hide()\n });\n }\n\n return items;\n }", "function setGridToNonClickable(grid){\n grid.style.pointerEvents=\"none\";\n}", "function grid() {\r\n\t\tvar grid = document.getElementById(\"grid\"); \r\n\t\tif (grid.checked === true) {\r\n\t\t myDiagram.grid.visible = true;\r\n\t\t return;\r\n\t\t} else {\r\n\t\t myDiagram.grid.visible = false; \r\n\t\t}\r\n\t }", "function hideAllCells(classname) {\r\n $(\".\" + classname).css(\"display\", 'none');\r\n $(\".\" + classname).css(\"visibility\", 'collapse');\r\n}" ]
[ "0.7009665", "0.671849", "0.6489299", "0.64390415", "0.64261806", "0.6304309", "0.6280371", "0.61885625", "0.61707515", "0.61495924", "0.61414665", "0.6080789", "0.6059737", "0.602183", "0.6007481", "0.5974017", "0.5955304", "0.59128755", "0.58927566", "0.5882405", "0.5880194", "0.58621323", "0.5843678", "0.5843143", "0.58248866", "0.5791663", "0.57902557", "0.5789497", "0.57732415", "0.5767132", "0.5748689", "0.5748689", "0.5739696", "0.5733203", "0.57312036", "0.57032907", "0.57029754", "0.5693192", "0.56921214", "0.568797", "0.56848454", "0.56830996", "0.5672299", "0.56403303", "0.5634152", "0.56282514", "0.5615219", "0.5610103", "0.5607532", "0.56005627", "0.5590586", "0.55858916", "0.5573261", "0.5563561", "0.5562708", "0.55439395", "0.55404776", "0.55328155", "0.5519804", "0.5512012", "0.550517", "0.54994476", "0.54977876", "0.5483852", "0.5478526", "0.54777217", "0.5476804", "0.5474338", "0.54724073", "0.5470637", "0.54697686", "0.54680526", "0.5467962", "0.5464973", "0.54481417", "0.544551", "0.5443839", "0.5442278", "0.543911", "0.5433965", "0.5432762", "0.5425924", "0.5424766", "0.541578", "0.5408758", "0.54055005", "0.54051715", "0.5403236", "0.54022056", "0.54004216", "0.5398952", "0.5392858", "0.5388927", "0.53825116", "0.53819984", "0.53695744", "0.53638387", "0.5355233", "0.5354155", "0.5349016", "0.5347318" ]
0.0
-1
Writes key/value pair to Output.xlsx
function SetOutputValue(/**string*/ key, /**string*/ value) { Global.SetProperty(key, value, "%WORKDIR%\\Output.xlsx"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetOutputValue(/**string*/ key, /**string*/ defValue)\r\n{\r\n\treturn Global.GetProperty(key, defValue, \"%WORKDIR%\\\\Output.xlsx\");\r\n}", "function GetOutputValue(/**string*/ key, /**string*/ defValue)\r\n{\r\n\treturn Global.GetProperty(key, defValue, \"%WORKDIR%\\\\Output.xlsx\");\r\n}", "function excelWriter(filePath, sheetName, json)\r\n{\r\n let newWb = xlsx.utils.book_new();\r\n let newWs = xlsx.utils.json_to_sheet(json);\r\n xlsx.utils.book_append_sheet(newWb, newWs, sheetName);\r\n xlsx.writeFile(newWb, filePath);\r\n}", "async function _export(exportName, creator,sheets,dataArray) {\n try {\n const workbook = new excelJS.Workbook();\n workbook.creator = creator ; \n \n sheets.forEach(s => {\n\n const worksheet = workbook.addWorksheet(`${s}`)\n const data = dataArray[s]\n const fixColumnsDef = columnDefs[s + 'Columns'].slice()\n var columnDef = fixColumnsDef\n \n worksheet.columns = columnDef.map(col => {\n return { key: col.id, header: col.columnTitle, width: col.columnWidth };\n });\n\n for (const d of data) {\n let rowData = {};\n for (const column of columnDef) {\n if (column.format) {\n rowData[column.id] = column.format(d[column.propertyName]);\n }\n else {\n rowData[column.id] = d[column.propertyName];\n }\n }\n var row = worksheet.addRow(rowData);\n }\n worksheet.properties.defaultRowHeight = 25;\n worksheet.properties.defaultColWidth = 30; \n\n })\n\n //now dump custom attributes.\n\n const buffer = await workbook.xlsx.writeBuffer();\n fs.writeFileSync(`./Excel_Exports/${exportName}.xlsx`, buffer, \"binary\")\n console.log(`./Excel_Exports/${exportName}.xlsx is saved`);\n return true\n } catch (e) {\n console.log(`./Excel_Exports/${exportName}.xlsx failed`);\n return false \n } \n}", "function exportXLSX() {\n var data = [];\n var data2 = [];\n var record = {};\n var keys = [];\n var workbook = utils.book_new();\n var awards = [];\n var awardsKeys = [];\n\n //Add the team table to the worksheet\n data = teamListExtended.map((item) => {\n record = _.cloneDeep(item);\n awards = record.awards || {};\n record.awards = [];\n delete record.hallOfFame;\n awardsKeys = Object.keys(awards)\n awardsKeys.forEach((key) => {\n awards[key].Awards.forEach((award) => {\n record.awards.push(`${award.year} ${award.eventName}: ${award.name}${award.person ? `: ${award.person}` : \"\"}`)\n })\n })\n record.awardList = _.join(record.awards, \"; \");\n delete record.awards;\n delete record.source;\n return (record);\n })\n\n // @ts-ignore\n var ws = utils.json_to_sheet(data, { cellHTML: \"true\" });\n utils.book_append_sheet(workbook, ws, \"Team Table\");\n\n //Add the Schedule to the worksheet\n var schedule = qualSchedule?.schedule || [];\n if (playoffSchedule?.schedule?.length > 0) {\n schedule = _.concat(qualSchedule?.schedule, playoffSchedule?.schedule);\n }\n\n schedule.forEach((match) => {\n record = {};\n keys = Object.keys(match);\n keys.forEach((key) => {\n if (key === \"teams\") {\n match.teams.forEach((team) => {\n record[team.station] = team.teamNumber\n })\n } else if (key === \"winner\") {\n record.winner = match?.winner?.winner;\n record.tieWinner = match?.winner?.tieWinner;\n record.tieBreakerLevel = match?.winner?.level;\n } else {\n record[key] = match[key];\n }\n })\n data2.push(record);\n })\n\n // @ts-ignore\n ws = utils.json_to_sheet(data2, { cellHTML: \"true\" });\n utils.book_append_sheet(workbook, ws, \"Schedule\");\n\n write(workbook, { bookType: \"xlsx\", bookSST: true, type: 'base64' });\n writeFile(workbook, \"gatoolExport_\" + selectedYear.value + selectedEvent.label + moment().format('MMDDYYYY_HHmmss') + \".xlsx\");\n\n }", "function writeBook() {\n\tfile.workbook.xlsx.writeFile(path)\n\t\t.then(() => {\n\t\t\tconsole.log(`[${dateNow()}] Added posts to excel file succesfully!!`);\n\t\t})\n\t\t.catch(console.error);\n}", "function writeKeywordToSpreadsheet(keyword){\n\n}", "function exportToExcel() {\n\n //--\n var selectedAuditConfiguration = getSelectedAuditConfiguration();\n\n if (selectedAuditConfiguration.length == 0) { return; }\n\n //--\n var headerRightPanel = $('.headerRightPanel');\n\n //--\n headerRightPanel.find('#auditObjectType').val(_auditObjectType);\n headerRightPanel.find('#selectedAuditConfiguration').val(selectedAuditConfiguration.join('|'));\n headerRightPanel.find('#selectedItemId').val(_selectedItemId.join('|'));\n headerRightPanel.find('#displayTitle').val(_displayTitle);\n\n //--\n $(\"#frmExportToExcel\").submit();\n\n}", "function writeOutput(output){\n var now = new Date();\n var file_name = 'files/'+'Employee-table-' + now.getFullYear()+(now.getMonth()+1)+now.getDate()+now.getHours()+now.getMinutes()+now.getSeconds() +'.json';\n fs.writeFile(file_name,output,function(err){\n if(err){\n return console.log(err);\n } \n })\n}", "function createWorkBook(){\n workbook1.xlsx.writeFile(constFile.destFilePath).then(function() {\n console.log(constFile.strFileWritten);\n }).catch((error)=>{\n throw new Error(error);\n })\n}", "function create_excel_produits(){\n\n\n // Create a connection to the database\n const con = mysql.createConnection({\n host: 'localhost',\n user: 'root',\n password: '',\n database: 'ordre'\n });\n \n // Open the MySQL connection\n con.connect((err) => {\n if (err) throw err;\n\n\n // -> Query data from MySQL\n con.query(\"SELECT * FROM produits\", function (err, panier, fields) {\n\n const jsonpanier = JSON.parse(JSON.stringify(panier));\n\n console.log(jsonpanier);\n /**\n [ { id: 1, address: 'Jack Smith', age: 23, name: 'Massachusetts' },\n { id: 2, address: 'Adam Johnson', age: 27, name: 'New York' },\n { id: 3, address: 'Katherin Carter', age: 26, name: 'Washington DC' },\n { id: 4, address: 'Jack London', age: 33, name: 'Nevada' },\n { id: 5, address: 'Jason Bourne', age: 36, name: 'California' } ]\n */\n \n \n\n // creer 1ére sheet -> panier\n\n let workbook = new excel.Workbook(); //creating workbook\n\n let worksheet = workbook.addWorksheet('panier'); //creating worksheet\n \n // WorkSheet Header\n worksheet.columns = [\n { header: 'Id', key: 'id', width: 10 },\n { header: 'Nom', key: 'nom', width: 30 },\n { header: 'Prix', key: 'prix', width: 30},\n { header: 'Photo', key: 'photo', width: 40, outlineLevel: 1},\n { header: 'Date', key: 'date', width: 30, outlineLevel: 1},\n { header: 'Categorie', key: 'categorie', width: 30, outlineLevel: 1}\n ];\n \n // Add Array Rows\n worksheet.addRows(jsonpanier);\n\n // Write to File\n workbook.xlsx.writeFile(\"produits.xlsx\")\n .then(function() {\n console.log(\"file produits saved!\");\n });\n\n });\n });\n \n }", "function writeWorkBookFromXml(filePath, fileName) {\r\n fs.readFile(filePath, 'utf8', function (err, data) {\r\n if (err) throw err; // we'll not consider error handling for now\r\n var jsonObj = JSON.parse(data);\r\n var wb = new Workbook();\r\n for (var name in jsonObj) {\r\n /*Cell address objects are stored as { c: C, r: R } where C and R are 0- indexed column and row numbers,\r\n respectively.For example, the cell address B5 is represented by the object {c: 1, r:4 }.\r\n Cell range objects are stored as { s: S, e: E } where S is the first cell and E is the last cell in the range.\r\n The ranges are inclusive. For example, the range A3: B7 is represented by the object {s: { c: 0, r:2 }, e:{ c: 1, r: 6 }}.\r\n Utility functions perform a row- major order walk traversal of a sheet range:*/\r\n var ws = {};\r\n var keys = Object.keys(jsonObj[name][0]); // fetch the key names on first child object\r\n var range = { s: { c: 0, r: 0 }, e: { c: keys.length - 1, r: jsonObj[name].length - 1 } };\r\n var range_w_headers = { s: { c: 0, r: 0 }, e: { c: keys.length - 1, r: jsonObj[name].length } };\r\n for (var i = 0; i < keys.length; i++) {\r\n var cell = { v: keys[i], t: 's' };\r\n var cell_ref = xlsx.utils.encode_cell({ c: i, r: 0 });\r\n if (cell.v == null) continue;\r\n ws[cell_ref] = cell; // Writes the property name to Excel header cells e.g. A1, B1, etc.\r\n if (keys[i] == \"Attributes\") { // block attributes condition (Attributes breaks down into Tag and TextString)\r\n for (var R = range.s.r; R <= range.e.r; ++R) {\r\n var attArr = jsonObj[name][R][keys[i]];\r\n var attCollection = '';\r\n if (attArr.length > 0) {\r\n for (var k = 0; k < attArr.length; k++) {\r\n attCollection += attArr[k]['Tag'] + \":\" + attArr[k]['Text'] + \";\";\r\n } \r\n }\r\n cell = { v: attCollection, t: 's' };\r\n cell_ref = xlsx.utils.encode_cell({ c: i, r: R + 1 });\r\n if (cell.v == null) continue;\r\n ws[cell_ref] = cell; // Writes the JSON data to the remaining cells\r\n }\r\n } else { \r\n for (var R = range.s.r; R <= range.e.r; ++R) {\r\n cell = { v: jsonObj[name][R][keys[i]], t: 's' };\r\n cell_ref = xlsx.utils.encode_cell({ c: i, r: R + 1 });\r\n if (cell.v == null) continue;\r\n ws[cell_ref] = cell; // Writes the JSON data to the remaining cells\r\n }\r\n }\r\n }\r\n if (range.s.c < 10000000) ws['!ref'] = xlsx.utils.encode_range(range_w_headers);\r\n wb.SheetNames.push(name);\r\n wb.Sheets[name] = ws;\r\n }\r\n var wbout = xlsx.writeFile(wb, './www/data/' + fileName + '-results.xlsx');\r\n });\r\n}", "function ExportToExcel(x)\n{\n\tcall_loader();\n\ttoggle('noprint', 'none');\n\n\tlet tablez=x;\n\tlet htmltable= document.getElementById(x);\n\tlet html = htmltable.outerHTML;\n\twindow.open('data:application/vnd.ms-excel,' + encodeURIComponent(html));\n\ttoggle('noprint', 'block');\n\tclose_loader();\n}", "function bcExport() {\n var keyValueMap = {};\n try {\n brewcalc.brewSheetTemplate = DriveApp.getFileById(brewcalc.settings.brewSheetTemplateId);\n if (typeof brewcalc.brewSheetTemplate === 'undefined') {\n throw 'Could not get handle to settings sheet';\n }\n\n var folders = brewcalc.brewSheetTemplate.getParents();\n if (folders.hasNext()) {\n brewcalc.brewSheetFolder = folders.next();\n }\n\n if (typeof brewcalc.brewSheetFolder === 'undefined') {\n throw 'Could not get handle to brew sheet folder';\n }\n\n // get the active sheet so I don't have to rely on the recipe sheet\n var recipeSheetName = brewcalc.volumeSheet.getRange('B2').getValue();\n var currentRecipeSheet = brewcalc.workbook.getSheetByName(recipeSheetName);\n if (typeof currentRecipeSheet !== 'undefined') {\n if (nonRecipeSheets.indexOf(currentRecipeSheet.getName()) >= 0) {\n throw 'Please select a recipe sheet before exporting';\n }\n\n brewcalc.recipeSheet = currentRecipeSheet;\n } else {\n throw 'I couldn\\'t find a sheet named \"' + recipeSheetName + '\"';\n }\n\n keyValueMap.recipeName = brewcalc.recipeSheet.getRange('K1').getValue();\n keyValueMap.version = brewcalc.recipeSheet.getRange('K3').getValue();\n var brewDateObj = brewcalc.recipeSheet.getRange('M3').getValue(),\n brewMoment = moment(brewDateObj).local(),\n stamp = brewMoment.format('YYYY-MM-DD');\n\n var targetDoc = bcDuplicateTemplate(stamp + ' ' + keyValueMap.recipeName + ' v' + keyValueMap.version),\n body = targetDoc.getBody(),\n paragraphs = body.getParagraphs(),\n tables = body.getTables(),\n idx;\n\n // read all the relevant cells in the sheet into JS arrays\n keyValueMap.brewDate = brewMoment.format('MM/DD/YYYY');\n var volumeRange = brewcalc.volumeSheet.getRange('B4:C38').getValues(),\n recipeRange = brewcalc.recipeSheet.getRange('B2:K44').getValues();\n\n var boilTime = brewcalc.recipeSheet.getRange('B1').getValue();\n keyValueMap.boilTime = boilTime;\n keyValueMap.batchVolume = volumeRange[ 5 ][ 0 ].toFixed(brewcalc.settings.decimalPlaces) + volumeRange[ 5 ][ 1 ];// volume to fermenter\n keyValueMap.firstRunnings = volumeRange[ 29 ][ 0 ].toFixed(brewcalc.settings.decimalPlaces) + volumeRange[ 29 ][ 1 ];\n keyValueMap.preBoilVolume = volumeRange[ 9 ][ 0 ].toFixed(brewcalc.settings.decimalPlaces) + volumeRange[ 9 ][ 1 ];\n keyValueMap.mashThickness = volumeRange[ 16 ][ 0 ] + volumeRange[ 16 ][ 1 ];\n keyValueMap.strikeWater = volumeRange[ 18 ][ 0 ].toFixed(brewcalc.settings.decimalPlaces) + volumeRange[ 18 ][ 1 ];\n keyValueMap.strikeTemp = volumeRange[ 19 ][ 0 ].toFixed(0) + volumeRange[ 19 ][ 1 ];\n keyValueMap.firstRunningsGallons = volumeRange[ 29 ][ 0 ].toFixed(brewcalc.settings.decimalPlaces) + volumeRange[ 29 ][ 1 ];\n keyValueMap.batchSpargeQuarts = volumeRange[ 31 ][ 0 ].toFixed(brewcalc.settings.decimalPlaces) + volumeRange[ 31 ][ 1 ];\n keyValueMap.totalWaterGallons = volumeRange[ 34 ][ 0 ].toFixed(brewcalc.settings.decimalPlaces) + volumeRange[ 34 ][ 1 ];\n\n // export to template\n for (idx = paragraphs.length; idx--;) {\n paragraphs[ idx ] = bcReplaceKeywords(paragraphs[ idx ], keyValueMap);\n }\n\n // collect data from efficiencies sheet\n keyValueMap = {};\n keyValueMap.style = recipeRange[ 0 ][ 9 ];\n keyValueMap.targetOG = recipeRange[ 2 ][ 0 ];\n keyValueMap.yeast = recipeRange[ 2 ][ 9 ];\n keyValueMap.starter = recipeRange[ 3 ][ 9 ];\n keyValueMap.estFWG = recipeRange[ 25 ][ 0 ];\n keyValueMap.estFWP = Utils.toPercent(recipeRange[ 21 ][ 0 ]);\n keyValueMap.estPBG = recipeRange[ 31 ][ 0 ];\n keyValueMap.estPBP = Utils.toPercent(recipeRange[ 33 ][ 0 ]);\n keyValueMap.estOP = Utils.toPercent(recipeRange[ 40 ][ 0 ]);\n keyValueMap.estFG = recipeRange[ 4 ][ 9 ];\n keyValueMap.estABV = recipeRange[ 5 ][ 9 ];\n keyValueMap.IBU = recipeRange[ 39 ][ 8 ];\n keyValueMap.BUGU = recipeRange[ 40 ][ 8 ];\n keyValueMap.color = bcCalculateSRM(keyValueMap.grainBill);\n\n // export to template\n for (idx = paragraphs.length; idx--;) {\n paragraphs[ idx ] = bcReplaceKeywords(paragraphs[ idx ], keyValueMap);\n }\n\n // get ingredients\n keyValueMap = {};\n keyValueMap.grainBill = bcGetGrainBill();\n keyValueMap.mashSteps = bcGetMashProfile();\n keyValueMap.hopSchedule = bcGetHopSchedule();\n keyValueMap.fermSteps = bcGetFermentationProfile();\n keyValueMap.brewSteps = bcGenerateBrewSteps(boilTime, keyValueMap.mashSteps, keyValueMap.hopSchedule);\n\n // set data in the tables\n idx = tables.length;\n var stepIdx,\n stepLen,\n step;\n for (; idx--;) {\n var table = tables[ idx ],\n cell = table.getCell(0, 0),\n numRows = table.getNumRows(),\n cellText = cell.getText();\n if (cellText.indexOf(\"Fermentables & Other Ingredients\") === 0) {\n stepLen = keyValueMap.grainBill.length;\n if (stepLen > numRows - 2) {\n throw 'Your grain bill is larger than the brew sheet can handle';\n }\n for (stepIdx = 0; stepIdx < stepLen; stepIdx++) {\n step = keyValueMap.grainBill[ stepIdx ];\n table.getCell(stepIdx + 2, 0)\n .setText(step.pounds.toFixed(brewcalc.settings.decimalPlaces) + ' lb');\n table.getCell(stepIdx + 2, 1).setText(Utils.toPercent(step.percent));\n table.getCell(stepIdx + 2, 2).setText(step.name);\n }\n table.getCell(stepIdx + 2, 0)\n .setText(brewcalc.recipeSheet.getRange('E20')\n .getValue()\n .toFixed(brewcalc.settings.decimalPlaces) + ' lb');\n table.getCell(stepIdx + 2, 1)\n .setText('x' + Utils.toPercent(brewcalc.recipeSheet.getRange('D20').getValue()));\n table.getCell(stepIdx + 2, 2).setText(brewcalc.recipeSheet.getRange('C20').getValue());\n } else if (cellText.indexOf(\"Mash Schedule\") === 0) {\n stepLen = keyValueMap.mashSteps.length;\n if (stepLen > numRows - 2) {\n throw 'Your mash schedule is larger than the brew sheet can handle';\n }\n for (stepIdx = 0; stepIdx < stepLen; stepIdx++) {\n step = keyValueMap.mashSteps[ stepIdx ];\n table.getCell(stepIdx + 2, 0).setText(step.temp.toFixed(0) + '°F');\n table.getCell(stepIdx + 2, 1).setText(step.time.toFixed(0));\n }\n } else if (cellText.indexOf(\"Hops\") === 0) {\n stepLen = keyValueMap.hopSchedule.length;\n if (stepLen > numRows - 2) {\n throw 'Your hop schedule is larger than the brew sheet can handle';\n }\n for (stepIdx = 0; stepIdx < stepLen; stepIdx++) {\n step = keyValueMap.hopSchedule[ stepIdx ];\n table.getCell(stepIdx + 2, 0).setText(step.amount.toFixed(brewcalc.settings.decimalPlaces));\n table.getCell(stepIdx + 2, 1).setText(step.name);\n table.getCell(stepIdx + 2, 2)\n .setText(Utils.toPercent(step.alpha, brewcalc.settings.decimalPlaces));\n if (step.time.length == 0) {\n table.getCell(stepIdx + 2, 3).setText('Dry hop');\n } else {\n table.getCell(stepIdx + 2, 3).setText(step.time.toFixed(0));\n }\n }\n } else if (cellText.indexOf(\"Fermentation\") === 0) {\n stepLen = keyValueMap.fermSteps.length;\n if (stepLen > numRows - 2) {\n throw 'Your fermentation schedule is larger than the brew sheet can handle';\n }\n for (stepIdx = 0; stepIdx < stepLen; stepIdx++) {\n step = keyValueMap.fermSteps[ stepIdx ];\n table.getCell(stepIdx + 3, 0).setText(step.temp + '°F');\n table.getCell(stepIdx + 3, 1).setText(step.time + ' days');\n }\n } else if (cellText.indexOf(\"Brew Day Timing\") === 0) {\n stepLen = keyValueMap.brewSteps.length;\n if (stepLen > numRows - 2) {\n throw 'Your brew day timing is larger than the brew sheet can handle';\n }\n for (stepIdx = 0; stepIdx < stepLen; stepIdx++) {\n step = keyValueMap.brewSteps[ stepIdx ];\n table.getCell(stepIdx + 2, 0).setText(step.time);\n table.getCell(stepIdx + 2, 1).setText(step.action);\n }\n }\n }\n SpreadsheetApp.getUi().alert('Export complete!');\n } catch (ex) {\n SpreadsheetApp.getUi().alert(ex);\n }\n}", "function writeData(dataInput) {\n dataInput.forEach(function(ufosights) {\n //console.log(ufosights); //for quality checks\n var row = ufotable.append(\"tr\"); //add a new row for each record\n \n Object.entries(ufosights).forEach(function([key, value]) {\n console.log(key, value);\n var cell = row.append(\"td\"); //add a new data for each record\n cell.text(value); //add the data into the tabledata previously added\n });\n });\n}", "_writeExportDataToWorkbook(thisObj, exportData, workbook) {\n thisObj._writeStudentDataToWorkbook(exportData.studentExportData, workbook);\n thisObj._writeMentorDataToWorkbook(exportData.mentorExportData, workbook);\n }", "if (product.productType && product.productType !== lastProductType) {\n lastProductType = product.productType\n lastExport = exportByProductType[lastProductType]\n\n // if we haven't started exporting this productType yet\n if (!lastExport) {\n // generate a temp file name\n const fileName: string = `${slugify(product.productType)}.xlsx`\n const filePath: string = path.join(tmpDir, fileName)\n\n // create headers and file stream\n lastExport = {\n productType: lastProductType,\n headers: mapHeaders(Object.keys(product)),\n excel: new ProductExcel(fs.createWriteStream(filePath)),\n }\n\n // write a header row to XLSX file\n const headerNames: Array<string> = lastExport.headers.map(\n (header) => header.label\n )\n lastExport.excel.writeHeader(headerNames)\n\n // register new export in cache\n exportByProductType[lastProductType] = lastExport\n }\n }", "writeKeyValue(key, value) {\n // This method is called by custom writeJSON() methods.\n if (this._needsComma) this._buf += this._doFormatting ? \",\\n\" : \", \";\n this._buf += this._tabs + '\"' + key + '\": ';\n this._write(value);\n this._needsComma = true;\n }", "function makeFile(exportBook){\n xlsx.writeFile(exportBook, __dirname + '/scouting.xlsx');\n}", "async function writeDataToExcel(pathname, fileInfos) {\n let wb = new xl.Workbook();\n\n let ws = wb.addWorksheet('Index');\n let deviceInfo = '';\n // Add first two headers\n ws.cell(1, 1).string('Workloads');\n ws.cell(1, 2).string('CaseId');\n let resultList = [];\n for (const fileInfo of fileInfos) {\n let results = {};\n for (let workload in fileInfo) {\n let resultFilePath = fileInfo[workload];\n \n if (!fs.existsSync(resultFilePath)) {\n return Promise.reject(`${resultFilePath} does not exist, failed to write to Excel!`);\n }\n let rawData = await fsPromises.readFile(resultFilePath, 'utf-8');\n results[workload] = JSON.parse(rawData);\n }\n resultList.push(results);\n }\n\n let workloadCol = [];\n let caseIdCol = [];\n let scoreCols = [];\n let once = true;\n // Loop through all results of chrome flags\n for (let i=0; i < resultList.length; i++) {\n let secondOnce = true;\n let scoreCol = [];\n // Loop through results of workloads in one round\n for (let workload in resultList[i]) {\n let workloadResult = resultList[i][workload];\n // Since we combined one round of test result with multiple workloads into one column,\n // so only need to add header name once here.\n if (secondOnce) {\n let flagName = workloadResult['chrome_flags'];\n // Add header name for each chrome flag\n console.log(flagName)\n ws.cell(1, 3 + i).string(flagName.join(\",\"));\n }\n for (let key in workloadResult['test_result']) {\n // for (let subCase in workloadResult['test_result']) {\n if (once) {\n workloadCol.push(workload);\n caseIdCol.push(key);\n }\n scoreCol.push(workloadResult['test_result'][key]);\n }\n secondOnce = false;\n }\n scoreCols.push(scoreCol);\n once = false;\n }\n\n // Insert workload name column and case id column\n for (let i=0; i<workloadCol.length; i++) {\n ws.cell(2+i, 1).string(workloadCol[i]);\n ws.cell(2+i, 2).string(caseIdCol[i]);\n }\n\n // Insert score columns\n for (let i=0; i<scoreCols.length; i++) {\n for(let j=0; j<scoreCols[i].length; j++) {\n ws.cell(2+j, 3+i).string(scoreCols[i][j]);\n }\n }\n await wb.write(pathname);\n console.log(`************Excel generation at: ${pathname}*****************`);\n\n return Promise.resolve();\n}", "function writeToCell(sheet, CellRange, WriteValue) {\n sheet.getRange(CellRange).setValue(WriteValue);\n}", "function writeFile() {\n let overwrite = JSON.stringify(notes);\n fs.writeFile(outputPath, overwrite, function(err) {\n if (err) {\n console.log(err);\n } else {\n console.log(\"File written\");\n }\n });\n}", "function exportExcel(_file,_data){ \n // step 1. workbook 생성\n const wb = XLSX.utils.book_new();\n\n // step 2. 시트 만들기 \n let newWorksheet = excelHandler.getWorksheet(_data);\n \n // step 3. workbook에 새로만든 워크시트에 이름을 주고 붙인다. \n XLSX.utils.book_append_sheet(wb, newWorksheet, _file.replace(\"*\",\"\"));\n\n // step 4. 엑셀 파일 만들기 \n XLSX.writeFile(wb, _file.replace('*','')+'.xlsx');\n}", "function downloadExcel(){\n\t\n\tvar fileName = sheet.getName()+\".xlsx\";\n\t\n\tvar json = spread.toJSON({\n\t\tincludeBindingSource : true ,\n\t\trowHeadersAsFrozenColumns : true ,\n\t\tcolumnHeadersAsFrozenRows : true ,\n\t\tignoreFormula : true ,\n\t\tignoreStyle : false\n\t});\n\t\t\n // here is excel IO API\n excelIO.save(json, function(blob){\n saveAs(blob, fileName);\n }, function (e) {\n // process error\n console.log(e);\n }, {password: \"\"});\n \n}", "function doExport() {\n CiteKeys.initialize();\n var keys = {};\n CiteKeys.db.forEach(function(rec) { keys[rec.item.itemID] = rec.key; });\n Zotero.write(JSON.stringify(keys));\n}", "function writeToSheet(results) {\n let ss = SpreadsheetApp.getActiveSpreadsheet();\n let sheet = ss.getSheets()[0];\n sheet.appendRow([\" \"]);\n\n sheet.appendRow([\" \"]);\n sheet.appendRow([results.results[0].school.name]);\n sheet.appendRow([\" \"]);\n sheet.appendRow([\"Address\", results.results[0].school.city + \", \" + results.results[0].school.state, \"\", \"Key Stats\", \"\", \"\", \"Cost\", \"\", \"\", \"Financial Aid Deadline\", \"\", \"Endowment\", \"\"]);\n sheet.appendRow([\"Web\", results.results[0].school.school_url, \"\", \"U.S. News College Ranking\", \"\", \"\", \"Tuition (In State)\", results.results[0].latest.cost.tuition.in_state, \"\", \"% of undergrads applying for aid\", \"\", \"Avg financial aid package\", \"\"]);\n sheet.appendRow([\"Private/Public\", privatePublic(results.results[0].school.ownership), \"\", \"ACT Range\", results.results[0].latest.admissions.act_scores[\"25th_percentile\"].cumulative + \"-\" + results.results[0].latest.admissions.act_scores[\"75th_percentile\"].cumulative, \"\", \"Tuition (Out of State)\", results.results[0].latest.cost.tuition.out_of_state, \"\", \"% of undergrads who recieved aid\", \"\", \"Avg non-need gift aid (out of state)\", \"\"]);\n sheet.appendRow([\"Enrollment\", results.results[0].latest.student.enrollment.undergrad_12_month, \"\", \"Acceptance Rate\", results.results[0].latest.admissions.admission_rate.overall, \"\", \"R/B\", \"\", \"\", \"% of need met in full\", \"\", \"% of non-need gift aid (out of state)\", \"\"]);\n sheet.appendRow([\"Early Action Deadline\", \"\", \"\", \"Avg High School GPA\", \"\", \"\", \"Books (avg)\", \"1000\", \"\", \"\", \"\", \"Avg need based loan\", \"\"]);\n sheet.appendRow([\"Regular decision Deadline\", \"\", \"\", \"App Fee\", \"\", \"\", \"Average Debt\", results.results[0].latest.aid.median_debt.completers.overall]);\n sheet.appendRow([\"Accepts Common App\", \"\", \"\", \"Freshman Retention\", results.results[0].latest.student.retention_rate.four_year.full_time, \"\", \"Proportion who borrowed\", results.results[0].latest.aid.federal_loan_rate]); \n \n Logger.log(\"Wrote to Sheet successfully.\")\n}", "function writeToAllGames(game, gb_api) {\n var active_sheet = allGamesSheet(),\n all_games_array = getDataFromAllGames();\n\n //Logger.log(game);\n var sheet = SpreadsheetApp.getActiveSheet(),\n row = sheet.getLastRow() + 1;\n if (gb_api){\n\n var values_to_save = [game.steam_id, game.gb_id, game.name, game.release_date,\n arrayToDashDelimited(game.concepts).join('|'),\n arrayToDashDelimited(game.developers).join('|'),\n arrayToDashDelimited(game.genres).join('|'),\n arrayToDashDelimited(game.similar_games).join('|'),\n arrayToDashDelimited(game.themes).join('|'), gb_api],\n range = sheet.getRange(row,1,1,values_to_save.length);\n\n\n } else {\n if (game.steam_id == '') { return true; }\n var values_to_save = [game.steam_id, game.gb_id, game.name, '',\n '',\n '',\n '',\n '',\n '', gb_api],\n range = sheet.getRange(row,1,1,values_to_save.length);\n }\n Logger.log('writing ' + game.name + ' to AllGames');\n\n range.setValues([values_to_save]);\n return true; // returns true if it put an entry into AllGames\n\n}", "savePool(file) {\n this.book.xlsx.writeFile(file);\n }", "function blxExportKeyVal (KeyVal) {\n try {\n if (KeyVal.v === undefined || KeyVal.v.total_len === undefined || !KeyVal.v.total_len) {\n blxErrMsg = 'ERROR(Export): No Length or Empty!'\n return\n }\n\n const ppos = KeyVal.k.lastIndexOf('.')\n let atype = 'application/octet-binary'\n if (ppos > 1) {\n switch (KeyVal.k.substr(ppos).toLowerCase()) {\n // src: https://www.sitepoint.com/mime-types-complete-list/\n case '.jpg':\n atype = 'image/jpeg'\n break\n case '.csv':\n atype = 'application/csv;charset=utf-8'\n break\n case '.pdf':\n atype = 'application/pdf'\n break\n case '.txt':\n case '.log':\n atype = 'text/plain;charset=utf-8'\n break\n // etc...\n }\n }\n\n const blob = new Blob([KeyVal.v.bytebuf], {\n type: atype\n }) // BlobType: MDN-File API\n const export_fname = KeyVal.k\n saveAs(blob, export_fname)\n terminalPrint(\"Export '\" + export_fname + \"'\")\n /* optional */\n // terminalPrint('Calculated CRC32: ' + crc32Calc(KeyVal.v.bytebuf).toString(16))\n } catch (e) {\n blxErrMsg = 'ERROR(Export): Export failed'\n }\n }", "function exportToXLS(){\n\testrategia = new Object();\n\testrategia.tareas = [];\n\t\n\t\n\tif(inTasks.length == 0){\n\t\t\n\t\ttasks.forEach(task => {\n\t\t\tif (task.modified) {\n\t\t\t\testrategia.tareas.push(task);\n\t\t\t}\n\t\t});\n\t\t\n\t}else{\n\n\t\tinTasks.forEach(task => {\n\t\t\t\testrategia.tareas.push(task);\n\t\t});\n\t}\n\t\n\tvar listObjectToExport = [];\n\t\n\testrategia.tareas.forEach(task => {\n\t\t\n\t\tvar ObjectToExport = new Object();\n\t\tObjectToExport.id = task.id;\n\t\tObjectToExport.Tipo = task.tipo;\n\t\tObjectToExport.PrioridadCBK = task.prioridad;\n\t\tObjectToExport.Resumen = task.resumen;\n\t\tObjectToExport.Peticionario = task.peticionario;\n\t\tObjectToExport.Propiedad_De = task.propiedad;\n\t\t\n\t\tif(task.estadoActual) {\n\t\t\tObjectToExport.Estado = task.estado;\n\t\t\tObjectToExport.Estado_Actual = task.estadoActual;\n\t\t}else{\n\t\t\tObjectToExport.Estado = task.estadoActual;\n\t\t}\n\t\t\n\t\tObjectToExport.Estado_Final = task.estadoFinal;\n\t\tObjectToExport.Complejidad = task.complejidad;\n\t\tObjectToExport.Tamaño = task.tamano;\n\n\t\ttask.relevante == \"Sí\" ? ObjectToExport.Relevante = \"Sí\" : ObjectToExport.Relevante = \"No\";\n\t\ttask.urgente == \"Sí\" ? ObjectToExport.Urgente = \"Sí\" : ObjectToExport.Urgente = \"No\";\n\n\t\tObjectToExport.Planificado_Para = task.planificado;\t\n\n\t\tlistObjectToExport.push(ObjectToExport);\n\n\t})\n\n\tvar xls = new XlsExport(listObjectToExport, sessionStorage.getItem('titulo'));\n\txls.exportToXLS(sessionStorage.getItem('titulo')+'.xls');\n\t\n}", "function exportDataToCSV() {\n // sorts the team by number\n teams.sort();\n // the columns of the sheet\n let export_sheet = \"1540 Data,Hatch Mean,Hatch Median,Hatch Maximum,Cargo Mean,Cargo Median,Cargo Maximum,Climb\\n\";\n // for each team...\n for (let team_index in teams) {\n let team = teams[team_index];\n // calculaet scores\n let scores = calculateScores(team);\n export_sheet += (team + \",\");\n // adds hatch and cargo mean, median, and maximums\n export_sheet += (jStat.mean(scores[1]) + \",\");\n export_sheet += (jStat.median(scores[1]) + \",\");\n export_sheet += (jStat.max(scores[1]) + \",\");\n export_sheet += (jStat.mean(scores[2]) + \",\");\n export_sheet += (jStat.median(scores[2]) + \",\");\n export_sheet += (jStat.max(scores[2]) + \",\");\n let team_matches = Object.keys(stand_data[team]);\n // add a list of their endgame performance\n for (let match_index in team_matches) {\n let match = stand_data[team][team_matches[match_index]];\n export_sheet += (match[\"Endgame\"][\"Platform\"])\n if (match[\"Endgame\"][\"Assistance\"] !== \"none\") {\n export_sheet += (\" (\" + match[\"Endgame\"][\"Assistance\"] + \")\");\n }\n export_sheet += \"; \";\n }\n export_sheet += \"\\n\"\n }\n // save the file\n fs.writeFileSync(\"./data/export/export.csv\", export_sheet);\n alert(\"export.csv saved!\");\n}", "function writeToFile(currentline,writeLine,count) {\nvar obj = {};\nobj[headers[Year]] = currentline[Year];\n\tif(currentline[indicatorIndex]===\"SP.URB.TOTL\"){\n\t\tobj[headers[Value]] = currentline[Value];\n\t}\n\tif(currentline[indicatorIndex]===\"SP.RUR.TOTL\"){\n\t\tobj[headers[Value]] = currentline[Value];\n\t}\n\tif(currentline[indicatorIndex]===\"SP.RUR.TOTL.ZS\"){\n\t\tobj[headers[Value]] = currentline[Value];\n\t}\n\tif(currentline[indicatorIndex]===\"SP.URB.TOTL.IN.ZS\"){\n\t\tobj[headers[Value]] = currentline[Value];\n\t}\nif(count==1) {\nwriteLine.write(JSON.stringify(obj)); // convert headers into JSON\n}\nelse {\n writeLine.write(\", \\n \\n\"+JSON.stringify(obj)); // convert data into JSON seperated by comma\n}\n\ncount++; //increment count and return it\nreturn count;\n}", "writeToFile () {\n let data = this.ghostToJson();\n\n fs.writeFileSync(this.ghostFileOutput, data, 'utf8');\n console.log( logSuccess('Ghost JSON generated successfully!') );\n }", "function ToXlsx() {\n\n //REFER https://github.com/SheetJS/js-xlsx/issues/122\n\n var a = document.createElement('a');\n a.href = 'data:attachment/xlsx,' + encodeURI(data);\n a.target = '_blank';\n a.download = 'out.xlsx';\n console.log(a);\n document.body.appendChild(a);\n a.click();\n}", "function exportMyTramites() {\n for (var tramite in vm.listaTramitesProceso) {\n vm.myTramitesForExport.push({\n 'Docente': vm.listaTramitesProceso[tramite].usuario,\n 'RFC': vm.listaTramitesProceso[tramite].rfc,\n 'Tramite': vm.listaTramitesProceso[tramite].tramite,\n 'Fecha': vm.listaTramitesProceso[tramite].fecha,\n 'Estatus': vm.listaTramitesProceso[tramite].estatus\n });\n }\n alasql('SELECT * INTO XLSX(\"ReporteTramites.xlsx\",{headers:true}) FROM ?', [vm.myTramitesForExport]);\n }", "function exportToFile(filename) {\n\n var csvData = \"\";\n var rowDelim = '\\r\\n';\n var colDelim = '\",\"';\n \n csvData = getCurrentParameterSettingsFromUI();\n csvData += rowDelim;\n csvData += rowDelim;\n csvData += \"Cells Data: ;\";\n csvData += rowDelim;\n csvData += localStorage.getItem('exportableEcmData');\n csvData += rowDelim;\n csvData += localStorage.getItem('exportableCellData1'); \n csvData += rowDelim;\n csvData += localStorage.getItem('exportableCellData2');\n\n downloadFile(filename,'data:text/csv;charset=UTF-8,' + encodeURIComponent(csvData));\n }", "function exportNewSheet(sourceRange,exportedRange) \n{\n var sourceData;\n\n // Clear Message, then Validate\n writeMessage(\"\");\n\n // Validate the input \n var $sourcerange = $(sourceRange).val();\n var $exportedrange = $(sourceRange).val();\n if ($.trim($sourcerange) == \"\" || $.trim($exportedrange) == \"\") {\n writeMessage(\"Error : Source Range and Exported Range can not be empty!\");\n return;\n }\n \n // Add a Binding in one excel sheet\n Office.context.document.bindings.addFromNamedItemAsync($(sourceRange).val(), Office.BindingType.Matrix, { id: \"sourceBinding\" }, function (asyncResult) {\n if (asyncResult.status == Office.AsyncResultStatus.Failed) {\n writeMessage(\"Error: \" + asyncResult.error.message);\n }\n else {\n // Read data from source binding\n Office.select(\"bindings#sourceBinding\").getDataAsync({ coercionType: Office.CoercionType.Matrix }, function (asyncResult) {\n if (asyncResult.status == Office.AsyncResultStatus.Failed) {\n writeMessage(\"Error: \" + asyncResult.error.message);\n }\n else {\n sourceData = asyncResult.value;\n\n // Write data into a new sheet\n writeBoundData(exportedRange, sourceData);\n }\n });\n }\n }); \n}", "function gps_exportarExcel() {\n\n var form_excel = document.getElementById(\"form-excel\");\n var infogps = parametros_infogps();\n\n document.getElementById(\"placa_excel\").value = infogps.placa;\n document.getElementById(\"fechaInicio_excel\").value = infogps.fechaInicio;\n document.getElementById(\"fechaFinal_excel\").value = infogps.fechaFinal;\n document.getElementById(\"verPuntoControl_excel\").value = infogps.verPuntoControl;\n document.getElementById(\"verPasajero_excel\").value = infogps.verPasajero;\n document.getElementById(\"verAlarma_excel\").value = infogps.verAlarma;\n document.getElementById(\"verConsolidado_excel\").value = infogps.verConsolidado;\n\n form_excel.submit();\n}", "function writeMinerContactDataToFile (aliasName, name, value) {\n const homeDir = process.env.HOME\n const filePath = path.join(homeDir, filedir, aliasName, MINERID_OPTIONAL_DATA_FILENAME)\n let data = {}\n try {\n if (fs.existsSync(filePath)) {\n data = JSON.parse(fs.readFileSync(filePath))\n if (!data.hasOwnProperty('minerContact')) {\n data.minerContact = {}\n }\n } else {\n data.minerContact = {}\n }\n data.minerContact[name] = value\n fs.writeFileSync(filePath, JSON.stringify(data, null, 2))\n } catch (err) {\n console.error(err)\n throw new Error(`Writing config key to file ${filePath}`)\n }\n}", "function exportExcel(alreadyHere=undefined, summarySheet=undefined){\n\n var newsPaper_data = [];\n let ws_data = [];\n let totalNb = 0;\n let totalMoney = 0;\n let totalCmd = 0;\n let percentageId = -1; // To decrease complexity\n\n if(summarySheet != undefined){\n newsPaper_data = summarySheet;\n }\n else{\n newsPaper_data.push([\"Jour\", \"Nombre\", \"Prix\"]);\n }\n \n if(alreadyHere != undefined){\n ws_data = alreadyHere;\n\n // HARD CODED for the '6' and the rest\n totalCmd = Number(ws_data[1][6]);\n ws_data[1] = ws_data[1].slice(0, 4);\n\n for(let i=0; i<ws_data.length; i++){\n if(ws_data[i][0] == \"TOTAL\"){\n totalNb = Number(ws_data[i][1]);\n totalMoney = Number(ws_data[i][3]);\n ws_data.length = i-1;\n break;\n }\n }\n\n ws_data.shift(); // Removes title row\n }\n \n // loop through commands\n for(let item in getData()){\n if(item[0] == 'C'){\n let obj = JSON.parse(getData(item));\n\n // Check that the time of the command is superior to the last save time\n if(obj[\"time\"] === undefined || getData(\"lastSave\") > Date.parse(obj[\"time\"])){\n continue;\n }\n\n if(obj[\"modified\"] !== undefined){\n console.log(\"MODIFIED\");\n if(isEmpty(obj[\"modified\"])){\n continue;\n }\n else{\n let newObj = JSON.parse(JSON.stringify(obj));\n delete newObj[\"modified\"];\n obj = obj[\"modified\"];\n saveData(item, JSON.stringify(newObj));\n console.log(obj);\n }\n }\n\n totalCmd++;\n let remise = 0;\n let normalSum = 0;\n let percentagedSum = 0;\n\n for(let key in obj){\n try{\n let thisName = \"\";\n let thisCost = 0;\n let isPercentaged = false;\n\n if(isNaN(key)){\n // Check whether it is a payment mode or not\n if(key[0] != key[0].toUpperCase()){\n continue;\n }\n\n console.log(\"real shit\", key);\n let meal;\n\n if(key.includes('M')){\n meal = key.match(/(M)\\d+/)[0].substring(1);\n\n isPercentaged = true;\n thisName = \"Menu \" + products[meal][3][2];\n thisCost = products[meal][3][1] * obj[key];\n if(key.includes('B')){\n thisName += \" + Boisson\";\n thisCost += (products[ key.match(/(B)\\d+/)[0].substring(1) ][1] - 0.5) * obj[key];\n }\n }\n else if(key.includes('F')){\n meal = key.match(/(F)\\d+/)[0].substring(1);\n \n isPercentaged = true;\n thisName = \"Formule \" + products[meal][3][2];\n thisCost = products[meal][3][0] * obj[key];\n }\n else{\n console.log(\"HU HO !!!\");\n }\n }\n else{\n // If it is a remise in %\n if(products[key][1] < 0 && products[key][3] === 'P'){\n remise = obj[key];\n }\n else{\n // If it is a: meal || dessert || starter || drink\n if((products[key].length === 4 && products[key][1] > 0 && products[key][3] != 'M') || products[key][2] === 1){\n isPercentaged = true;\n }\n\n thisCost = products[key][1] * obj[key];\n thisName = products[key][0];\n\n // If it is a newsPaper\n if(products[key].length === 4 && products[key][3] == 'M'){\n newsPaper_data[1][1] += obj[key];\n newsPaper_data[2][1] += thisCost;\n }\n }\n }\n\n if(!(products[key] !== undefined && products[key].length>3 && products[key][3] == 'P')){ // To check if it's a percentaged\n let id = isItHere(thisName);\n\n if(id != -1){\n ws_data[id][1] = Number(ws_data[id][1])+Number(obj[key]);\n ws_data[id][3] = Number(ws_data[id][3])+Number(thisCost);\n }\n else{\n ws_data.push([thisName, obj[key], thisCost/obj[key], thisCost]);\n }\n\n if(isPercentaged){\n percentagedSum += thisCost;\n }\n else{\n normalSum += thisCost;\n }\n\n if(thisCost > 0){\n totalNb++;\n }\n }\n }\n catch(err){\n console.log(err);\n }\n }\n\n if(remise > 0){\n let reduc = percentagedSum/100*Math.abs(remise);\n\n if(percentageId != -1){\n ws_data[percentageId][1] += 1;\n ws_data[percentageId][3] -= reduc;\n }\n else{\n percentageId = ws_data.push([products[0][0], 1, -1, -reduc])-1;\n }\n\n totalMoney += normalSum + percentagedSum - reduc;\n }\n else{\n totalMoney += normalSum + percentagedSum;\n }\n }\n }\n\n ws_data.sort(sortCommand);\n ws_data.unshift(['Plats par popularités' , 'Nombre de produits', 'Coût seul', 'Coût total', '', 'Ticket moyen', 'Nombre de repas']);\n ws_data.push([], ['TOTAL', totalNb, \"\", totalMoney]);\n if(ws_data[1] != undefined){\n ws_data[1].push(\"\", coolRound(totalMoney/totalCmd), totalCmd);\n }\n \n function isItHere(thisName){\n let id = -1;\n for(let i=0; i<ws_data.length; i++){\n if(ws_data[i][0] == thisName){\n id = i;\n break;\n }\n }\n return id;\n }\n function sortCommand(a, b) {\n if(a[2] < 0){\n return 1;\n }\n else if(b[2] < 0){\n return -1;\n }\n if (a[1] === b[1]) {\n if(a[2] === b[2]){\n return 0;\n }\n else{\n return (a[2] < b[2]) ? 1 : -1;\n }\n }\n else {\n return (a[1] < b[1]) ? 1 : -1;\n }\n }\n\n saveData(\"lastSave\", Date.now());\n console.log(\"Finish\", ws_data);\n return [ws_data, newsPaper_data];\n}", "save(fileobject) {\n\n // if in the browser (as opposed to electron)\n // fileobject is null and must be set to a default value first\n fileobject=bisgenericio.getFixedSaveFileName(fileobject,\"bmi.json\");\n \n\tlet values=this.getValues();\n\tlet out=JSON.stringify(values);\n \tbisgenericio.write(fileobject,out);\n }", "function writeCalculation(){\n archiveData();\n // get date from date of weeks range\n var tempp = dateRange.getValues();\n var arrayofDates = [];\n // filter out empty entry\n tempp.forEach(function(eachDate){\n if (eachDate[0]){\n if (eachDate[0] != 'Week of'){\n arrayofDates.push(eachDate);\n }\n };\n });\n arrayofDates = arrayofDates[arrayofDates.length-1];\n \n // get actions from actionRange range\n var arrayofActions = actionRange.getValues()[0];\n var result = [];\n var resultArray = [];\n\n //Loop the result (i and j) and perform a calculate function for the combination of date and action\n var date = arrayofDates[0];\n Logger.log(date);\n for (var j = 0; j < arrayofActions.length; j++){\n result.push(calculate(arrayofActions[j].toLowerCase(), date));\n }\n resultArray.push(result);\n \n Logger.log(resultArray);\n // store the result on summarySheet\n //var row = actionRange.getRow()+1;\n var row = summarySheet.getLastRow();\n var col = actionRange.getColumn();\n var maxcol = resultArray[0].length;\n var maxrow = resultArray.length;\n summarySheet.getRange(row, col, summarySheet.getLastRow(), summarySheet.getLastColumn()).clearContent();\n summarySheet.getRange(row, col, maxrow, maxcol).setValues(resultArray);\n}", "jsonToXLS(data) {\n let xlsTemp =\n '<html xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\" xmlns=\"http://www.w3.org/TR/REC-html40\"><head><meta name=ProgId content=Excel.Sheet> <meta name=Generator content=\"Microsoft Excel 11\"><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>${worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--><style>br {mso-data-placement: same-cell;}</style></head><body><table>${table}</table></body></html>';\n let xlsData = \"<thead>\";\n const colspan = Object.keys(data[0]).length;\n let _self = this;\n\n //Header\n if (this.title != null) {\n xlsData += this.parseExtraData(\n this.title,\n '<tr><th colspan=\"' + colspan + '\">${data}</th></tr>'\n );\n }\n\n //Fields\n xlsData += \"<tr>\";\n for (let key in data[0]) {\n xlsData += \"<th>\" + key + \"</th>\";\n }\n xlsData += \"</tr>\";\n xlsData += \"</thead>\";\n\n //Data\n xlsData += \"<tbody>\";\n data.map(function(item, index) {\n xlsData += \"<tr>\";\n for (let key in item) {\n xlsData += \"<td>\" + _self.valueReformattedForMultilines(item[key]) + \"</td>\";\n }\n xlsData += \"</tr>\";\n });\n xlsData += \"</tbody>\";\n\n //Footer\n if (this.footer != null) {\n xlsData += \"<tfoot>\";\n xlsData += this.parseExtraData(\n this.footer,\n '<tr><td colspan=\"' + colspan + '\">${data}</td></tr>'\n );\n xlsData += \"</tfoot>\";\n }\n\n return xlsTemp.replace(\"${table}\", xlsData).replace(\"${worksheet}\", this.worksheet);\n }", "function writeToLog (value, filename) {\n var str = JSON.stringify(value) + '\\n'\n fs.appendFile(filename, str)\n }", "function writeDataToSpreadsheet(tab, toWrite) {\n\t//this is where i am going to store my data\n\tvar spreadsheet;\n\tif(SPREADSHEET_NAME) {\n\t\tvar fileIter = DriveApp.getFilesByName(SPREADSHEET_NAME);\n\t\tif(fileIter.hasNext()) {\n\t\t\tvar file = fileIter.next();\n\t\t\tspreadsheet = SpreadsheetApp.openById(file.getId());\n\t\t} else {\n\t\t\tspreadsheet = SpreadsheetApp.create(SPREADSHEET_NAME)\n\t\t}\n\t} else if(SPREADSHEET_URL) {\n\t\tspreadsheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL);\n\t} else {\n\t\tthrow 'You need to set at least one of the SPREADSHEET_URL or SPREADSHEET_NAME variables'\n\t}\n\tvar sheet = spreadsheet.getSheetByName(tab);\n\tif(!sheet) {\n\t\tsheet = spreadsheet.insertSheet(tab);\n\t\tsheet.appendRow(getCols(tab));\n\t}\n\n\tvar lastRow = sheet.getLastRow();\n\tvar numRows = sheet.getMaxRows();\n\tif((numRows - lastRow) < toWrite.length) {\n\t\tsheet.insertRowsAfter((lastRow == 0) ? 1 : lastRow,toWrite.length-numRows+lastRow);\n\t}\n\tvar range = sheet.getRange(lastRow+1,1,toWrite.length,toWrite[0].length);\n\trange.setValues(toWrite);\n}", "function exportData () {\n const JSONexport = {\n ExportTs: Date.now(),\n Stacks: JSON.parse(localStorage.getItem('stackList')) || [],\n Tasks: JSON.parse(localStorage.getItem('taskList')) || [],\n Settings: JSON.parse(localStorage.getItem('mobySettings')) || [],\n Repos: JSON.parse(localStorage.getItem('repoList')) || [],\n SnGroups: JSON.parse(localStorage.getItem('snGroupList')) || [],\n RallyProjects: JSON.parse(localStorage.getItem('rallyProjectList')) || []\n }\n fs.writeFile(`${desktopPath}/moby_export_${Date.now()}.txt`, JSON.stringify(JSONexport, null, 4), err => {\n if (err) {\n alert('An error occured during the export ' + err.message)\n return\n }\n alert('The export has completed succesfully and is located on your desktop')\n })\n}", "function createSheet(arr){\n for (let i = 0; i < arr.length; i++){\n var currentCell = alphabet[i] + rowCounter;\n // inside value should be nextStep\n workbook.sheet('Hailstone').cell(currentCell).value();\n }\n\n}", "function writeToJson(address,json, outputName){\n\n\tfileIndex = fileIndex +1;\n\n\tvar pathName = 'category_output/';\n\tvar outputFile = outputName + '.json'\n\n\n\tvar newAddress = pathName + outputFile;\n fs.writeFile(newAddress, JSON.stringify(three, null, 4), function(err){\n \t//console.log(json);\n })\t\n}", "writeKeyValue(key, value) {\n this._isChanged = true;\n this._json = null;\n // write the key value to data in derived class\n }", "saveSheet(name=\"sheet.json\") {\n textFileUserDownload(JSON.stringify(this.fbpSheet.exportJSON(),\n (key, value) =>\n (key === \"id\" && value instanceof Number) ? \"#\"+value.toString(16)\n : value\n ,\n 2),\n name\n );\n }", "setOutputValues() {\n }", "function ExportToExcel(element, options, bindings, _window) {\n var _this = _super.call(this, element, ExportToExcel.ID, bindings) || this;\n _this.element = element;\n _this.options = options;\n _this.bindings = bindings;\n _this._window = _window;\n _this._window = _this._window || window;\n _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, ExportToExcel, options);\n _this.bind.onRootElement(SettingsEvents_1.SettingsEvents.settingsPopulateMenu, function (args) {\n args.menuData.push({\n text: Strings_1.l('ExportToExcel'),\n className: 'coveo-export-to-excel',\n tooltip: Strings_1.l('ExportToExcelDescription'),\n onOpen: function () { return _this.download(); },\n svgIcon: SVGIcons_1.SVGIcons.icons.dropdownExport,\n svgIconClassName: 'coveo-export-to-excel-svg'\n });\n });\n return _this;\n }", "function updateFile(){\n var logger = fs.createWriteStream('./tendie/tendiebox.txt', {\n //flags: 'a' // 'a' means appending (old data will be preserved)\n })\n\n //going through the tendie map and setting the file to it\n for(var key of tendieMap.keys()){\n logger.write(key + \"|\" + tendieMap.get(key).getTendies() + \"|\");\n }\n}", "function workbookToJson() {\n var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets();\n var output = {};\n _.each(sheets, function(sheet, sheetIdx) {\n var outSheet = {};\n var sheetArrays = sheet.getDataRange().getValues();\n var columnHeaders = sheetArrays[0];\n _.each(columnHeaders, function(columnHeader) {\n if (columnHeader === '_rowNum') {\n throw new Error(\"_rowNum is not a valid column header.\");\n }\n });\n var outSheet = _.map(sheetArrays.slice(1), function(row, rowIdx) {\n //_rowNum is added to support better error messages.\n var outRow = {}; //Object.create({ __rowNum__ : (rowIdx + 1) });\n outRow.prototype = {\n __rowNum__: (rowIdx + 1)\n };\n _.each(row, function(val, valIdx) {\n outRow[columnHeaders[valIdx]] = val;\n });\n return outRow;\n });\n output[sheet.getName()] = outSheet;\n });\n return output;\n}", "function generateExcelBook(teamNumbers){\n var exportBook = new Workbook();\n\n for(var x = 0; x < teamNumbers.length; x++){\n var current = teamNumbers[x];\n exportBook.SheetNames.push(\"\" + current);\n exportBook.Sheets[\"\" + current] = getTemplate();\n }\n makeFile(exportBook);\n}", "function doExport() {\n\tvar data = [];\n CiteKeys.initialize().forEach(function(item) {\n trLog('.');\n data.push(scrub(item));\n });\n\tZotero.write(JSON.stringify(data, null, \"\\t\"));\n}", "setOutput(name, value) {\n core.setOutput(name, value);\n }", "function writeResultFile() {\n fs.writeFile(arquivoSaida, JSON.stringify(results), function (err) {\n if (err) return console.log(err);\n console.log('======================================================');\n console.log(results.length + ' documentos foram inseridos em ' + arquivoSaida + '!');\n });\n }", "generateFinalReport() {\n const obj = {\n environment: \"Dev\",\n numberOfTestSuites: this._numberOfTestSuites,\n totalTests: this._numberOfTests,\n browsers: this.browsers,\n testsState: [{\n state: this.standardTestState('Passed'),\n total: this._numberOfPassedTests\n }, {\n state: this.standardTestState('Failed'),\n total: this._numberOfFailedTests\n }, {\n state: this.standardTestState('Skipped'),\n total: this._numberOfSkippedTests\n\n }],\n testsPerBrowserPerState: this._testsCountPerBrowserPerState,\n testsPerSuitePerState: this._testsCountPerSuitePerState,\n testsWeatherState: this.weatherState,\n totalDuration: this._totalDuration,\n testsPerBrowser: this._testsPerBrowser\n };\n\n jsonfile.writeFile(this._finalReport, obj, {\n spaces: 2\n }, function(err) {\n if (err !== null) {\n console.error('Error saving JSON to file:', err)\n }\n console.info('Report generated successfully.');\n });\n }", "writeValue(value) {\n return this._writeData(this._getValue(value));\n }", "writeValue(value) {\n return this._writeData(this._getValue(value));\n }", "writeValue(value) {\n return this._writeData(this._getValue(value));\n }", "function exportTable(id, file) {\n var blob = new Blob([document.getElementById(id).innerHTML], {\n type: 'application/application/vnd.ms-excel;charset=utf-8'\n });\n saveAs(blob, file + '.xls');\n }", "function exportAllTramites() {\n for (var tramite in vm.tramitesProceso) {\n vm.allTramitesForExport.push({\n 'Docente': vm.tramitesProceso[tramite].usuario,\n 'RFC': vm.tramitesProceso[tramite].rfc,\n 'Tramite': vm.tramitesProceso[tramite].tramite,\n 'Fecha': vm.tramitesProceso[tramite].fecha,\n 'Estatus': vm.tramitesProceso[tramite].estatus\n });\n }\n alasql('SELECT * INTO XLSX(\"ReporteTramites.xlsx\",{headers:true}) FROM ?', [vm.allTramitesForExport]);\n }", "setOutputType(args) {\n\t\tlet cell = this.getCellForUID(args.uid);\n\t\tif (!cell) args.fail();\n\t\tcell.outputtype = args.outputtype;\n\t\targs.done(JSON.stringify(cell));\n\t}", "function writeHunters(spreadsheet, input) {\n var sheet = spreadsheet.getSheetByName('Hunters');\n for each (var hunter in input.huntersList) {\n var originalLastRow = sheet.getLastRow();\n var newRow = originalLastRow + 1;\n var numRows = 1; var column = 1; var numColumns = 4;\n var writeRange = sheet.getRange(newRow, column, numRows, numColumns); \n \n // setValues takes multi-dimensional array\n // (first dimension is rows, second is columns)\n var values = [[input.date, input.location, input.timeOfDay, hunter]];\n writeRange.setValues(values);\n \n // fill down the calc'd cells from previous last row\n var sourceRange = sheet.getRange(originalLastRow, 5, 1, 5);\n var targetRange = sheet.getRange(newRow, 5, 1, 5);\n sourceRange.copyTo(targetRange);\n \n // Set the 'Written by Script' column for posterity\n var scriptIndicatorRange = sheet.getRange(newRow, 10, 1, 1);\n scriptIndicatorRange.setValue(\"TRUE\");\n }\n}", "function download() {\n\n\tlet resultTable = document.querySelector('#resultTable');\n\t//replace all space with %20\n\tlet tableHTML = resultTable.outerHTML.replace(/ /g, '%20');\n\n\tlet element = document.createElement('a');\n\telement.href = 'data:application/vnd.ms-excel,' + tableHTML;\n\n\t// filename of the downloaded file\n\telement.download = 'results.xls';\n\n\telement.style.display = 'none';\n\tdocument.body.appendChild(element);\n\n\telement.click();\n\n\tdocument.body.removeChild(element);\n}", "function getAndWriteAppleDataToCSV() {\n var ws = XLSX.utils.aoa_to_sheet([ [\n \"AppleId\", \"Price\", \"updated\", \"version\", \"developer\", \"developerUrl\"\n ] ]);\n var appleIds = main(0)\n for (var appleObject in appleIds) {\n var aId = appleIds[appleObject].cellValue\n aStore.app({id: aId}).then((data) => {\n var dataObject = [\n [\n data.id, \n data.price,\n data.updated, \n data.version, \n data.developer, \n data.developerUrl\n ],\n ]\n })\n .then ( () => {\n var wb = XLSX.utils.book_new();\n XLSX.utils.book_append_sheet(wb, ws, \"Sheet1\");\n XLSX.writeFile(wb, \"AppleData.xlsx\");\n })\n }\n}", "function saveTableContentToXml() {\n\n Excel.run(function (context) {\n\n var theTable = context.workbook.tables.getItem(tableName);\n var headerRange = theTable.getHeaderRowRange();\n headerRange.load();\n\n var parts = context.workbook.customXmlParts;\n parts.load();\n\n var xmlPart = parts.getByNamespace(\"SapPrototypeTest\").getOnlyItem();\n xmlPart.delete();\n\n return context.sync().then(function () {\n\n binding.getDataAsync(\n {\n startRow: 0,\n startColumn: 0\n },\n function (asyncResult) {\n var valuesInTable = asyncResult.value;\n saveRowsInXml(headerRange, valuesInTable, xmlPartDoc);\n\n var xmlString = (new XMLSerializer()).serializeToString(xmlPartDoc);\n\n xmlPart = parts.add(xmlString);\n xmlPart.load();\n\n return context.sync().then(function () {\n var xmlData = xmlPart.getXml();\n return context.sync().then(function () {\n xmlPartDoc = $.parseXML(xmlData.value);\n });\n });\n }\n );\n\n });\n }).catch(function (error) {\n console.error(\">>>>>>>>>>>>>> Error when saving XML >>>>>>>>>>>>>>>>\");\n console.error(error);\n });\n\n }", "function write_params() {\n var fs = require('fs');\n var path = require('path');\n // Data which will write in a file.\n var data = { X_max: X_max, X_min: X_min, max_: max_, min_: min_ };\n\n return fs.writeFileSync(path.resolve(__dirname, 'minmaxscaler.json'), JSON.stringify(data));\n}", "function excelExport(reportId, repKey, reportTitle)\r\n{\r\n\t\tvar data = loadedReps[repKey],\r\n\t\t\tfilter_scale = $(\"#\"+reportId+\"_scale\").val();\r\n\t\t\tcolspan = 1,\r\n\t\t\theadspan = 0;\r\n\t\t\theadHtml = \"\";\r\n\t\tvar divHtml = \"<table>\";\r\n\t\t\r\n\t\tfor(key in data.head)\r\n\t\t\tif(data.format[key] != \"link\")\r\n\t\t\t{\r\n\t\t\t\theadspan++;\r\n\t\t\t\tif(data.format[key] == \"br\")\r\n\t\t\t\t{\r\n\t\t\t\t\theadHtml += \"\\n\\t<th style='background-color:#3861ab; color:#fff;'>کد شعبه</th>\";\r\n\t\t\t\t\theadHtml += \"\\n\\t<th style='background-color:#3861ab; color:#fff;'>نام شعبه</th>\";\r\n\t\t\t\t\tcolspan = 2;\r\n\t\t\t\t\theadspan++;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\theadHtml += \"\\n\\t<th style='background-color:#3861ab; color:#fff;'>\" + data.head[key] + \"</th>\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\tdivHtml += \"\\\r\n\t<tr>\\\r\n\t\t<th colspan='\"+headspan+\"' height='80' align='center'>\\n\\\r\n\t\t\t<img src='http://bmi.ir/App_Themes/FaResponsive/img/BMILogo.png' /> \\n\\\r\n\t\t\t\"+reportTitle+\"<br/>\"+data.subtitle+\" ( \"+ formatNumber(parseInt(repKey.substr(-4)), 2, \"/\") +\" ) \\n\\\r\n\t\t</th>\\\r\n\t</tr>\\\r\n\t<tr>\\\r\n\t\"+headHtml+\"\\\r\n\t</tr>\";\t\t\r\n\t\t\r\n\t\t\r\n\t\tfor(var rowid in data.body) {\r\n\t\t\tvar row = data.body[rowid];\r\n\t\t\tvar tdBgColor;\r\n\t\t\t\r\n\t\t\tif(row.type && row.type == \"title\")\r\n\t\t\t\ttdBgColor = \"background-color:#a3ffb4;\";\r\n\t\t\telse if(row.type && row.type == \"midSum\")\r\n\t\t\t\ttdBgColor = \"background-color:#a3ffb4;\";\r\n\t\t\telse if(rowid%2)\r\n\t\t\t\ttdBgColor = \"background-color:#f1f1f1;\";\r\n\t\t\telse\r\n\t\t\t\ttdBgColor = \"\";\r\n\r\n\t\t\tdivHtml += \"<tr>\";\r\n\r\n\t\t\tfor(key in row) {\r\n\t\t\t\tif(key == \"type\")\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tvar value = \"\";\r\n\t\t\t\tswitch(data.format[key])\r\n\t\t\t\t{\r\n\t\t\t\t\tcase \"int\":\r\n\t\t\t\t\t\tvalue = \"<td style='\"+tdBgColor+\"'>\" + row[key] + \"</td>\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"char\":\r\n\t\t\t\t\t\tvalue = \"<td align='right' style='\"+tdBgColor+\"'>\"+row[key]+\"</td>\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"ebcdic\":\r\n\t\t\t\t\t\tif(row.type && row.type == \"midSum\")\r\n\t\t\t\t\t\t\tvalue = \"جمــع \"+zoneList[row[key]];\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tvalue = main2win(row[key]);\r\n\t\t\t\t\t\tvalue = \"<td align='right' style='\"+tdBgColor+\"'>\" + value.trim() + \"</td>\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"amount\":\r\n\t\t\t\t\t\tvalue = (row[key] >= 0)? \r\n\t\t\t\t\t\t\t\"<td align='right' style='color:#008000; \"+tdBgColor+\"'>\" + formatNumber(Math.abs(row[key]/filter_scale), 3, \",\") + \"</td>\" : \r\n\t\t\t\t\t\t\t\"<td align='right' style='color:#b12020; \"+tdBgColor+\"'>\" + formatNumber(Math.abs(row[key]/filter_scale), 3, \",\") + \"</td>\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"amountsum\":\r\n\t\t\t\t\t\tvalue = (row[key] >= 0)? \r\n\t\t\t\t\t\t\t\"<td align='right' style='color:#008000; font-weight:bold; \"+tdBgColor+\"'>\" + formatNumber(Math.abs(row[key]/filter_scale), 3, \",\") + \"</td>\" : \r\n\t\t\t\t\t\t\t\"<td align='right' style='color:#b12020; font-weight:bold; \"+tdBgColor+\"'>\" + formatNumber(Math.abs(row[key]/filter_scale), 3, \",\") + \"</td>\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"date\":\r\n\t\t\t\t\t\tvalue = \"<td style='\"+tdBgColor+\"'>\" + formatNumber(row[key]%1000000, 2, \"/\") + \"</td>\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"zone\":\r\n\t\t\t\t\t\tvalue = \"<td style='\"+tdBgColor+\"'>\" + zoneList[row[key]] + \"</td>\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"sar\":\r\n\t\t\t\t\t\tif(row.type && row.type == \"midSum\")\r\n\t\t\t\t\t\t\tvalue = \"<td align='right' style='\"+tdBgColor+\"'>جمــع \"+zoneList[row[key]]+\"</td>\";\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tvalue = \"<td align='right' style='\"+tdBgColor+\"'>\"+sarList[row[key]]+\"</td>\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"br\":\r\n\t\t\t\t\t\tvalue = \"<td style='\"+tdBgColor+\"'>\"+row[key]+\"</td>\";\r\n\t\t\t\t\t\tvalue += \"<td align='right' dir='rtl' style='\"+tdBgColor+\"'>\"+brList[row[key]]+\"</td>\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"link\":\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tvalue = \"<td style='\"+tdBgColor+\"'>\" + row[key] + \"</td>\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tdivHtml += \"\\n\\t\"+value;\r\n\t\t\t}\r\n\t\t\tdivHtml += \"</tr>\";\r\n\t\t}\r\n\t\t\r\n\t\tif(data.rowsum != false)\r\n\t\t{\r\n\t\t\tvar rowSum = data.rowsum;\r\n\t\t\t\r\n\t\t\tdivHtml += \"<tr>\\\r\n\t\t\t\t\t\t\t\\n\\t<td colspan=\"+colspan+\" style='background-color:#4bd2ff;' >جمــع</td>\";\r\n\t\t\tfor(key in rowSum)\r\n\t\t\t{\r\n\t\t\t\tvar value = (rowSum[key] === \"\") ? \"<td style='background-color:#4bd2ff;'> </td>\" :\r\n\t\t\t\t\t\t\t\t\t\t\t((rowSum[key] >= 0) ? \r\n\t\t\t\t\t\t\t\t\t\t\t\t(\"<td align='right' style='background-color:#4bd2ff; color:#008000; font-weight:bold;'>\"+ formatNumber(Math.abs(rowSum[key]/filter_scale), 3, \",\") +\"</td>\") :\r\n\t\t\t\t\t\t\t\t\t\t\t\t(\"<td align='right' style='background-color:#4bd2ff; color:#b12020; font-weight:bold;'>\"+ formatNumber(Math.abs(rowSum[key]/filter_scale), 3, \",\") +\"</td>\")\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\tdivHtml += \"\\n\\t\"+value;\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\tdivHtml += \"</tr>\";\r\n\t\t}\r\n\t\tdivHtml += \"</table>\";\r\n\t\t\r\n\t\t$(\"div#export-excel\").html(divHtml);\r\n\t\tdelete divHtml;\r\n\t\t\r\n\t\t//window.open(\"data:application/vnd.ms-excel,\" + $(\"div#export-excel\").html(), \"SATA-REP01\");\r\n\t\t$(\"div#export-excel > table\").table2excel({\r\n\t\t\texclude: \".noExl\",\r\n\t\t\tname: reportId,\r\n\t\t\tsheetName: \"گزارش\",\r\n\t\t\tfilename: reportTitle+\"-\"+data.subtitle+\"_\"+repKey.substr(-4),\r\n\t\t\tfileext: \".xls\",\r\n\t\t\texclude_img: true,\r\n\t\t\texclude_links: true,\r\n\t\t\texclude_inputs: true\r\n\t\t});\r\n\t\t$(\"div#export-excel\").html(\"\");\r\n\r\n\r\n}", "function writeToJson(frame){\n\n fs.writeFile('x_out.json', JSON.stringify(frame, null, 4), function(err){\n \n })\t\n}", "function report(title,description,addtionalInfo) {\r\n\trefreshReports();\r\n\tvar jsonObj = {\r\n key: [getDateTime()],\r\n response: [\"Title of bug:\"+title+\" \\n Description:\"+description+\" \\n Addtional information:\"+addtionalInfo]\r\n };\r\n JsonArrayReports.push(jsonObj);\r\n var newFile = fsReports.writeFileSync(\"./Dictionary/Report_Log.json\",JSON.stringify(JsonArrayReports, null, \"\\t\"));\r\n}", "function ConvertToCSV(key) {\n let nameformidmap = {\n evals: allthings.evals,\n locations: allthings.locations\n };\n // TODO: csv format handle spaces\n if (key === \"evals\") {\n var headers = [\n \"Team Name\",\n \"Task Name\",\n \"Config Name\",\n \"Attempt\",\n \"Total Time\",\n \"Goal Time\",\n \"Start Date Epoch\",\n \"End Date Epoch\",\n \"notes\",\n \"Percent Complete\",\n \"end Time UTC\"\n ];\n var icky = [\n \"team\",\n \"task\",\n \"config\",\n \"attempt\",\n \"time\",\n \"goaltime\",\n \"eStart\",\n \"eEnd\",\n \"notes\",\n \"percent\",\n \"eUTC\"\n ];\n }\n\n let str = \"\";\n for (let x = 0; x < headers.length; x++) {\n str += '\"' + headers[x] + '\",';\n }\n str += \"\\n\";\n\n console.log(\"key: \" + key);\n let objArray = nameformidmap[key];\n console.log(\"objArray: \" + objArray);\n\n // TODO: csv format line end include comma\n for (var i = 0; i < objArray.length; i++) {\n var line = \"\";\n for (var fieldIndex in icky) {\n var fieldName = icky[fieldIndex];\n if (line != \"\") line += \",\";\n line += objArray[i][fieldName];\n }\n\n str += line + \"\\r\\n\";\n }\n\n return str;\n}", "function writeKVPToFITSHeader(kvp) {\n //instantionate kvp since push will only push reference to array\n var kvpInstance = new FITSKeyword(kvp);\n var i;\n\n for (i=0;i<header.length;i++) {\n// if (header[i].isString == true) {\n if (header[i].name.localeCompare(kvp.name) == 0) {\n //overwrite value\n header[i].value = kvp.value;\n return;\n }\n// }\n }\n //else write new KVP and append to header\n header.push(kvpInstance);\n}", "function createExcelFileFromTable() {\r\n\tconst sheetName = \"Inventaire\";\r\n\t/*create the workbook and add metadata*/\r\n\tvar wb = XLSX.utils.book_new();\r\n\twb.Props = {\r\n\t\tSubject: \"Inventaire de Bronkhorst France\",\r\n\t\tAuthor: \"Aldric Vitali Silvestre\",\r\n\t\tCreatedDate: new Date()\r\n\t}\r\n\r\n\t/*create a new sheet*/\r\n\twb.SheetNames.push(sheetName);\r\n\tvar table = document.getElementById(TABLE_ID);\r\n\tvar rowsData = getTableData();\r\n\t/*add header rowData before others*/\r\n\trowsData.unshift(new DatabaseRow(\"Référence\", \"Description\", \"Prix (€)\", \"Quantité\"));\r\n\tvar arr = [];\r\n\tfor (var i = 0; i < rowsData.length; i++) {\r\n\t\tvar row = rowsData[i];\r\n\t\tarr.push([row.reference, row.description, row.price, row.quantity]);\r\n\t}\r\n\t/*var ws = XLSX.utils.table_to_sheet(table);*/\r\n\tws = XLSX.utils.aoa_to_sheet(arr);\r\n\twb.Sheets[sheetName] = ws;\r\n\treturn wb;\r\n}", "writeBusiness() {\n\t\tthis.writer.write(this.application.business);\n\t}", "function exportFileHandler () {\n var lat, lon, url, notes;\n var SEP = \"|\";\n var i;\n\n var csvContent = 'sep=' + SEP + '\\n';\n csvContent += 'lat' + SEP + 'long' + SEP + 'google maps link' + SEP + 'notes\\n';\n for (i = 0; i < points.length; i++) {\n lat = points[i].lonlat.lat;\n lon = points[i].lonlat.lon;\n url = makeMapUrl(lat, lon);\n notes = getNotes(i);\n csvContent += lat + SEP + lon + SEP + url + SEP + notes + '\\n';\n }\n\n var date = new Date();\n var year = date.getFullYear().toString();\n var month = (date.getMonth() + 1).toString();\n if (month.length === 1) {\n month = \"0\" + month;\n }\n var day = date.getDate().toString();\n if (day.length === 1) {\n day = \"0\" + day;\n }\n\n var filename = 'poi_' + year + month + day + '.csv';\n\n var csv = new Blob([csvContent], {\n type: \"text/csv;\"\n });\n\n if (typeof ga !== 'undefined') { \n ga('send', {\n 'hitType': 'event', // Required.\n 'eventCategory': 'User Generated Points', // Required.\n 'eventAction': 'Click', // Required.\n 'eventLabel': 'Download Points'\n });\n }\n\n saveAs(csv, filename);\n }", "function exportFileHandler () {\n var lat, lon, url, notes;\n var SEP = \"|\";\n var i;\n\n var csvContent = 'sep=' + SEP + '\\n';\n csvContent += 'lat' + SEP + 'long' + SEP + 'google maps link' + SEP + 'notes\\n';\n for (i = 0; i < points.length; i++) {\n lat = points[i].lonlat.lat;\n lon = points[i].lonlat.lon;\n url = makeMapUrl(lat, lon);\n notes = getNotes(i);\n csvContent += lat + SEP + lon + SEP + url + SEP + notes + '\\n';\n }\n\n var date = new Date();\n var year = date.getFullYear().toString();\n var month = (date.getMonth() + 1).toString();\n if (month.length === 1) {\n month = \"0\" + month;\n }\n var day = date.getDate().toString();\n if (day.length === 1) {\n day = \"0\" + day;\n }\n\n var filename = 'poi_' + year + month + day + '.csv';\n\n var csv = new Blob([csvContent], {\n type: \"text/csv;\"\n });\n\n if (typeof ga !== 'undefined') { \n ga('send', {\n 'hitType': 'event', // Required.\n 'eventCategory': 'User Generated Points', // Required.\n 'eventAction': 'Click', // Required.\n 'eventLabel': 'Download Points'\n });\n }\n\n saveAs(csv, filename);\n }", "function save_and_export() {\r\n\r\n}", "function writeJson(){\n mapjson = JSON.stringify(map, null, 4);\n fs.writeFile('asd/map.json', mapjson, 'utf8', function(){\n });\n}", "function write(data){\n const csvWriter = createCsvWriter({\n path: 'output.csv',\n header: [\n {id: 'product_code', title: 'product_code'},\n {id: 'quantity', title: 'quantity'},\n {id: 'pick_location', title: 'pick_location'},\n ]\n });\n \n csvWriter.writeRecords(data)\n .then(() => {\n //print out the pick up order\n console.log('PICKING ORDER');\n var i;\n for(i = 0;i<data.length;i++){\n console.log(data[i]);\n }\n });\n}", "function setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}", "function setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}", "function setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}", "function setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}", "function setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}", "function setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}", "function setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}", "function exportTransactions(tranactions, outputFileName) {\r\n\r\n loggerMessages.logDebug('Starting to write out transactions');\r\n const outputJSON = JSON.stringify(tranactions.slice(1)); // Slicing needed because first entry is null (header line)\r\n \r\n try {\r\n fs.writeFileSync(outputFileName, outputJSON, 'utf-8');\r\n loggerMessages.logDebug('Transactions have been successfully written out');\r\n } catch(err) {\r\n loggerMessages.logError(`Cannot write transactions to ${outputFileName}; error message: `);\r\n loggerMessages.logError(err);\r\n console.log('Transactions could not have been written out');\r\n }\r\n\r\n}", "outputDataToCSV(self) {\n let portfolio = new Portfolio(self.stocksToRetrieve);\n\n let displayArray = [];\n\n portfolio.displayItems.forEach((item) => {\n displayArray.push(item.displayObjects);\n });\n\n let csv = CsvUtils.jsonArrayToCsv(displayArray);\n \n CsvUtils.writeToFile(stockOutputCsvPath, csv);\n }", "function getExcelFilename(deviceInfo) {\n\n let date = new Date();\n let isoDate = new Date(date.getTime() - (date.getTimezoneOffset() * 60000));\n let dateText = isoDate.toISOString().split('.')[0].replace(/T|-|:/g, '');\n\n let cpu = deviceInfo[\"CPU\"][\"info\"];\n cpu = cpu.replace(/\\s/g, \"-\");\n let brand = deviceInfo[\"CPU\"][\"mfr\"];\n let platform = deviceInfo[\"OS\"];\n platform = platform.replace(/\\s/g, \"\");\n let browser = deviceInfo[\"Browser\"];\n\n let excelFileName = [dateText, brand, cpu, platform, browser, \"flags\"].join('_') + '.xlsx';\n return excelFileName;\n}", "function testExportThreadAppraisal(){\n var items = [\n { \"parentID\": \"1\", \"Author\": \"Dummy1\", \"Timestamp\": \"1426872319922\", \"Content\":\"Bla Bla\", \"Status\":\"On\", \"memeberID\":\"1\", \"appraisalID\":\"1\", \"appraisalValue\":\"1\" },\n { \"parentID\": \"2\", \"Author\": \"Dummy2\", \"Timestamp\": \"1426872319924\", \"Content\":\"Bla Bla ble\", \"Status\":\"Off\", \"memeberID\":\"2\", \"appraisalID\":\"2\", \"appraisalValue\":\"2\" }];\n\n /** Convert object to JSON*/\n var jsonObject = JSON.stringify(items);\n Reporting.exportThreadAppraisal(jsonObject,\"C:/Users/Diaman/Desktop/Appraisal\",\"appraisal.csv\");\n}", "function commitToFile ( ) {\r\n var arrayLength = books.length;\r\n var bookData;\r\n// var fileHandle = 'insert appropriate API function here'\r\n var writeData;\r\n writeData = 'var = books [';\r\n for ( var i=0 ; i < arrayLength ; i++ ) {\r\n bookData = newlineText + ' { ';\r\n for ( var propertyName in books[i] ) {\r\n\t if ( propertyName !== bookNumberProperty ) {\r\n\t bookData += propertyName + ': ' + books[i][propertyName] + ', ';\r\n\t }\r\n }\r\n writeData += bookData.replace ( /, $/, ' },' );\r\n }\r\n writeData += newlineText + '];';\r\n // in lieu of some API function such as: writeToFile ( writeData );\r\n outputDiv.innerHTML = '<br />Source: ' + bookDataFile + '<br />' + nonBreakingSpaceText + '<br />was intended to be the recipient of this data:<br />' + nonBreakingSpaceText + '<pre>' + writeData + '</pre>';\r\n console.log ( writeData );\r\n}", "function GenerateExcelSpreadsheet()\n{\n // Assume failure\n var RC = false;\n var Txt = \"\";\n\n // Start Excel and get automation object\n var XL = new ActiveXObject( \"Excel.Application\" );\n if (XL == null)\n {\n Txt = \"Error launching Excel\";\n WScript.StdOut.WriteLine( Txt );\n\n return RC;\n }\n\n // Get a new workbook\n var WB = XL.Workbooks.Add();\n if (WB == null)\n {\n Txt = \"Error interfacing to Excel\";\n WScript.StdOut.WriteLine( Txt );\n\n return RC;\n }\n\n try\n {\n WB.Sheets( 3 ).Delete();\n WB.Sheets( 2 ).Delete();\n }\n catch (Err) { };\n\n WB.title = \"WCDMA Ec/No\";\n\n // Populate Excel workspace sheet\n var Sheet = WB.ActiveSheet;\n if (Sheet == null)\n {\n Txt = \"Error interfacing to Excel\";\n WScript.StdOut.WriteLine( Txt );\n\n WB.Close();\n return RC;\n }\n\n Sheet.Name = \"Data\";\n\n Txt = \"Generating Excel spreadsheet...\";\n WScript.StdOut.Write( Txt );\n\n // Populate Excel spreadsheet\n RC = PopulateExcelSpreadsheet( Sheet );\n if (RC == false)\n {\n Txt = \"Error\";\n WScript.StdOut.WriteLine( Txt );\n\n WB.Close();\n return RC;\n }\n\n Txt = \"Done\";\n WScript.StdOut.WriteLine( Txt );\n\n // Save the work book file\n WB.SaveAs( XLSAbsolutePath );\n WB.Close();\n\n Txt = \"Excel file saved at:\\n\";\n Txt += XLSAbsolutePath;\n WScript.StdOut.WriteLine( Txt );\n}", "function writeFile(fileObj, fileContent, encoding) {\n //var csvContent = 'data:text/csv;charset=utf-8,%EF%BB%BF'\n encoding = encoding || \"UTF-8\";\n var titleRow = [csvQuotes(\"FilePath\"),csvQuotes(\"Title\"),csvQuotes(\"Biography\"),\n csvQuotes(\"Employee Name\"),csvQuotes(\"Title\"),csvQuotes(\"Biography\"),\n csvQuotes(\"Education\"),csvQuotes(\"Registration\"),csvQuotes(\"Memberships\"),\n csvQuotes(\"Awards\"),csvQuotes(\"Publications\"),csvQuotes(\"Project Name\"),\n csvQuotes(\"Project Location\"),csvQuotes(\"Project Summary\")]\n \n if (!fileObj.exists) fileContent2 = titleRow.toString() + \"\\n\" + fileContent;\n else fileContent2 = fileContent;\n \n fileObj = (fileObj instanceof File) ? fileObj : new File(fileObj); \n \n var parentFolder = fileObj.parent;\n if (!parentFolder.exists && !parentFolder.create()) \n throw new Error(\"Cannot create file in path \" + fileObj.fsName); \n \n fileObj.encoding = encoding; \n fileObj.open(\"a\"); \n fileObj.write(fileContent2); \n fileObj.close();\n \n return fileObj; \n}", "function export(){\n Logger.log(startRow + \" \" + startCol);\n var k = 1; \n for (i = startCol; i < lastColumn+startCol-1; i++) {\n k+1;\n // Logger.log(i);\n var lastRow = sheet.getLastRow();\n var range = sheet.getRange(startRow, i, lastRow);\n var newLastRow = newSheet.getLastRow();\n \n Logger.log(\"Last Row: \" + lastRow)\n \n // Logger.log(k);\n \n for(j = startRow; j < lastRow+startRow-1; j++){\n var keyword = sheet.getRange(j, i).getValue();\n \n if(matchTypes[m] == \"Broad\"){\n if(keyword != \"\"){var keyword = \" +\" + keyword.split(' ').join(' +');}\n }\n var adgroup = sheet.getRange(3, i).getValue() + \" (\" + matchTypes[m] + \")\" ;\n var campaign = sheet.getRange(2, i).getValue() + \" (\" + matchTypes[m] + \")\" ;\n var matchType = matchTypes[m];\n \n var row = [[campaign, adgroup, keyword, matchType]];\n \n if(keyword != \"\"){\n k++;\n var writeRow = newSheet.getLastRow();\n writeRow++;\n Logger.log(writeRow);\n var writeRange = newSheet.getRange(writeRow, 1, 1, 4);\n writeRange.setValues(row);\n }\n }\n }\n }", "function writeFile () {\n\tvar stringified = JSON.stringify(masterObject);\n\t\n\tfs.writeFile(newFilePath, stringified, function (err) {\n\t\tif (err) {console.log(err)};\n\t\tconsole.log(\"finished\");\n\t})\n}", "async function genMultiFlagsResultsToExcel(fileInfos, deviceInfo) {\n let excelFileName = getExcelFilename(deviceInfo);\n console.log(`Excel file name: ${excelFileName}`);\n\n let excelDir = path.join(process.cwd(), 'flagsExcel');\n if (!fs.existsSync(excelDir)) {\n fs.mkdirSync(excelDir, {recursive: true});\n }\n let excelPathName = path.join(excelDir, excelFileName);\n\n await writeDataToExcel(excelPathName, fileInfos);\n\n return Promise.resolve();\n}" ]
[ "0.5967647", "0.5967647", "0.5960251", "0.5863578", "0.5754181", "0.56086296", "0.5566769", "0.5564454", "0.5519575", "0.55006504", "0.5472677", "0.5408666", "0.5376704", "0.53723156", "0.53606576", "0.5356875", "0.5311346", "0.52215147", "0.5201173", "0.519983", "0.5193754", "0.5175259", "0.51520157", "0.51473254", "0.51460284", "0.5112625", "0.5112044", "0.5081621", "0.50610745", "0.5052758", "0.50421596", "0.50339985", "0.49986497", "0.49590135", "0.49580306", "0.4948858", "0.49134186", "0.49087706", "0.49064532", "0.49063578", "0.48919302", "0.4887475", "0.4885694", "0.48775747", "0.4863075", "0.48616186", "0.4858308", "0.48498204", "0.4847901", "0.48449132", "0.48436317", "0.48324752", "0.4827409", "0.48198807", "0.48179215", "0.4812825", "0.47955146", "0.47664273", "0.47581932", "0.4755399", "0.4755399", "0.4755399", "0.47537598", "0.47516495", "0.47393125", "0.47262576", "0.47245845", "0.47199577", "0.4717574", "0.4712714", "0.4707691", "0.47065678", "0.46975544", "0.46789858", "0.46768796", "0.46618974", "0.46597594", "0.4657566", "0.4657566", "0.46513635", "0.46466073", "0.4646007", "0.4644169", "0.4644169", "0.4644169", "0.4644169", "0.4644169", "0.4644169", "0.4644169", "0.4637902", "0.46322545", "0.4632022", "0.46275073", "0.46241808", "0.46209615", "0.4610125", "0.46024907", "0.45970872", "0.4590549" ]
0.72306156
1
Reads value from Output.xlsx
function GetOutputValue(/**string*/ key, /**string*/ defValue) { return Global.GetProperty(key, defValue, "%WORKDIR%\\Output.xlsx"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readTextFile(address_of_cell)\r\n{\r\nif(typeof require !== 'undefined') XLSX = require('xlsx');\r\nvar workbook = XLSX.readFile('users.xlsx');\r\nvar first_sheet_name = workbook.SheetNames[0];\r\nvar worksheet = workbook.Sheets[first_sheet_name];\r\nvar desired_cell = worksheet[address_of_cell];\r\nvar desired_value = desired_cell.v;\r\nreturn desired_value;\r\n}", "function SetOutputValue(/**string*/ key, /**string*/ value)\r\n{\r\n\tGlobal.SetProperty(key, value, \"%WORKDIR%\\\\Output.xlsx\");\r\n}", "function SetOutputValue(/**string*/ key, /**string*/ value)\r\n{\r\n\tGlobal.SetProperty(key, value, \"%WORKDIR%\\\\Output.xlsx\");\r\n}", "function getFileTextData(fileName){\n\t\n const result = excelToJson({\n\tsourceFile: fileName,\n/*\tsheets: [\n\t{\n\t\tname: 'BirthDay',\n\t range: 'A4:C5'\n\t}],\n\tcolumnToKey: {\n\t\tA: 'EmployeeCode',\n\t\tB: 'EmployeeName',\n\t\tC: 'DateOfBirth'\n\t}\n\t*/\n\t//sourceFile: data\t\n});\n\nconsole.log(\"File Parsed Successfully\");\nconsole.log(result);\n\t\t\nreturn result;\n\n}", "async function extractSpreadsheetFile(input, output, bookType = \"xlsx\") {\n input.workbook = XLSX.read(input.array, {\n type: \"array\"\n });\n\n // excel files can have embedded properties; extract those\n const props = input.workbook.Props;\n if (props) {\n if (props.Title) {\n output.datasetTitle = props.Title;\n }\n if (props.LastAuthor) {\n output.author = props.LastAuthor;\n }\n if (props.Author) {\n output.author = props.Author;\n }\n if (props.ModifiedDate) {\n output.modified = props.ModifiedDate.toISOString().substr(0, 10);\n }\n }\n\n input.text = Object.values(input.workbook.Sheets)\n .map(worksheet => {\n return XLSX.utils\n .sheet_to_json(worksheet)\n .map(row => Object.values(row).join(\",\"))\n .join(\"\\n\");\n })\n .join(\"\\n\\n\");\n}", "function getValue(sheet,row,column){\n return sheet.getRange(row,column).getValue();\n}", "function handleExFile(e) {\n document.getElementById('excel').blur();\n\n\tNAME_LIST = [];\n\tvar files = e.target.files, f = files[0];\n console.log(excel.files[0].name.split('.').pop());\n\n\tif(!excelTypeCheck(excel.files[0])) {\n \treturn;\n \t}\n\n\tvar reader = new FileReader();\n\treader.onload = function(e) {\n\t\tvar data = e.target.result;\n\t\tif(!rABS) data = new Uint8Array(data);\n\t\tvar workbook = XLSX.read(data, {type: rABS ? 'binary' : 'array'});\n\t\tNAME_LIST = readNames(workbook);\n\t\tconsole.log(NAME_LIST);\n\t\t\n\t\t/* DO SOMETHING WITH workbook HERE */\n\t};\n\tif(rABS) reader.readAsBinaryString(f); else reader.readAsArrayBuffer(f);\n}", "function excelReader(filePath, sheetName) {\n // player workbook\n let wb = xlsx.readFile(filePath);\n // get data from a particular sheet in that wb\n let excelData = wb.Sheets[sheetName];\n // sheet to json \n let ans = xlsx.utils.sheet_to_json(excelData);\n return ans;\n}", "function ReadData() {\n Office.context.document.getSelectedDataAsync(\"matrix\", function (result) {\n//if the cells are successfully read, print results in task pane\n if (result.status === \"succeeded\"){\n sumData(result.value);\n }\n//if there was an error, print error in task pane\n else{\n\t\t\tdocument.getElementById(\"results\").innerText = result.error.name;\n }\n });\n}", "function getSheetTargetData(sheet_name) {\n var wb = xlsx.readFile(path_target);\n var listSheetNames = wb.SheetNames;\n console.log('all sheetName is ...', listSheetNames);\n // list_sheet_name.forEach(function(sheet_name) {\n // get sheet \n var wsheet = wb.Sheets[sheet_name];\n // console.log('wsheet ...', wsheet);cls\n // get data 1.name 2.row and col\n var range_str = wsheet['!ref'];\n var cell_range = analysisCell(range_str);\n\n var col = 3; // row = 3\n for (var row = 0; row < cell_range.c; row++) {\n var xy = xlsx.utils.encode_cell({ r: row, c: col });\n // console.log('xy ...',xy);\n var cell = wsheet[xy];\n // console.log('cell row ...',cell)\n if (cell && cell.v) { // if have value than add to list\n var item_tar = { \"val\": cell.v, \"row\": row, \"col\": col };\n data_target.push(item_tar);\n }\n }\n}", "function getTemplate(){\n var wb = xlsx.readFile(__dirname + '/sample_files/template.xlsx');\n var ws = wb.Sheets.Sheet1;\n ws['!cols'] = getCols(ws);\n return ws;\n}", "getCellByRef(refStr){\n const pos = Sheet.refStrToPos(refStr);\n console.log(pos);\n const c = this.getCellByPos(pos[0], pos[1]);\n console.log(c);\n return c;\n }", "function getFromSpreadSheet () {\nlet request = prepareReturnRequest();\n sheets.spreadsheets.values.get(request, function(err, response) {\n if (err) {\n console.error(err);\n return;\n }\n // TODO: Change code below to process the `response` object:\n // console.log(JSON.stringify(response, null, 2));\n console.log(\"Response from getFromSpreadSheet:\",response);\n });\n}", "function loadExcel(contents){\n /* Call XLSX */\n var workbook = XLSX.read(contents, {\n type: \"binary\"\n });\n\n /* DO SOMETHING WITH workbook HERE */\n var first_sheet_name = workbook.SheetNames[0];\n /* Get worksheet */\n var worksheet = workbook.Sheets[first_sheet_name];\n var result = XLSX.utils.sheet_to_json(worksheet, {\n raw: true\n });\n document.getElementById('drag-and-drop').innerHTML = \"<div class='excelData'><table id='excelDataTable' class='excelDataTable'></table></div>\";\n buildHtmlTable('#excelDataTable', result);\n var totalDirectCostExpenditures = calculateTotalDirectCostExpenditures(result);\n var totalDirectCostRefunds = calculateTotalDirectCostRefunds(result);\n var netDirectCostExpenditures = calculateNetDirectCostExpenditures(totalDirectCostExpenditures, totalDirectCostRefunds);\n\n document.getElementById(\"input-bp\").value = result[0][\"Budget Purpose\"];\n\n result = JSON.stringify(result);\n result = result.split(String.fromCharCode(92)).join(String.fromCharCode(92,92));\n\n result = result.replace(/'/g, \"\");\n sessionStorage.setItem(\"result\", result);\n //console.log(sessionStorage.getItem(\"result\"));\n //console.log(JSON.parse(sessionStorage.getItem(\"result\")));\n}", "_getCellValue(cellRef) {\n const tab = this.vals.get(cellRef.get('tabId'))\n if ( !tab ) {\n return null;\n }\n\n return tab.getIn([cellRef.get('rowIdx'), cellRef.get('colIdx')]);\n }", "read() {\n const {\n input,\n sheetname,\n schema,\n hasHeader = true,\n lowerCaseHeaders,\n onRecord,\n onCell,\n onError,\n useMemoryForItems, // useful when no onRecord handler and no output provided\n backwards\n } = this.options;\n\n console.log(\"Reading Excel file...\", input);\n\n const eventNames = [...DEFAULT_EVENTS];\n if (typeof onCell === \"function\") eventNames.push(\"cell\");\n\n this._rowsProcessed = 0;\n this._hasRecord = false;\n this._createOutStream();\n this._writeHeader();\n this._sheetReaderInstance = { _startRow: 0 };\n\n FastXlsxReader.iterate(\n input,\n sheetname,\n (eventName, data, rowIndex, colIndex) => {\n if (eventName === 'start') {\n this._createOutStream();\n this._writeHeader();\n // the 'start' event's third param (after the 'this' arg) is the sheet reader instance\n this._sheetReaderInstance = data || this._sheetReaderInstance;\n } else {\n this._handleCallbackEvent(eventName, data, rowIndex, colIndex, schema, hasHeader,\n lowerCaseHeaders, onRecord, onError, useMemoryForItems);\n }\n },\n eventNames,\n this, // thisArg for the callback\n backwards\n );\n }", "function ImportFile() { \n var excelUrl = \"table_of_dates.xlsx\"; \n\n var oReq = new XMLHttpRequest(); \n oReq.open('get', excelUrl, true); \n oReq.responseType = 'blob'; \n oReq.onload = function () { \n var blob = oReq.response; \n excelIO.open(blob, LoadSpread, function (message) { \n console.log(message); \n }); \n }; \n oReq.send(null); \n}", "peek(){\n return this.sheet.getRange(\n 2, // first row after the header\n this.colNum\n ).getValue();\n }", "read(file) {\n var workbook = XLSX.readFile(file);\n var sheet_name_list = workbook.SheetNames;\n var data = {};\n var letters = [];\n var moduleShortNameArray = [];\n sheet_name_list.forEach(function(y) {\n var worksheet = workbook.Sheets[y];\n var headers = [];\n\n var column = 0;\n var enc_addr = XLSX.utils.encode_cell;\n var dec_range = XLSX.utils.decode_range;\n var range = dec_range(worksheet['!ref']);\n\n while (worksheet[enc_addr({c: column, r: 0})]) {\n headers.push((worksheet[enc_addr({c: column, r: 0})].v).replace(/ +/g, \"\"));\n column++\n }\n\n for (var R = range.s.r +1; R <= range.e.r; ++R) {\n\n var record = [];\n\n data['row'+R] = {};\n for (var C = range.s.c; C <= headers.length-1; ++C) {\n let cell_address = enc_addr({c: C, r: R});\n let cell = worksheet[cell_address];\n\n if (cell && typeof cell.v !== 'undefined') {\n var header = headers[R-1];\n var value = cell.v;\n record.push(value);\n headers.map((header, index) => {\n data[\"row\"+R][header] = record[index];\n })\n }\n }\n moduleShortNameArray.push(record[0].split('_').pop());\n letters.push(record[0].charAt(0));\n\n }\n });\n\n this.uniqueRows = this.reducerFilter([], letters);\n this.uniqueModuleShortName = this.reducerFilter([], moduleShortNameArray);\n this.filterData(data);\n }", "function getSheetValues() {\n var values = toWorksheet.getDataRange().getValues();\n return values;\n}", "function parseExcel(filename) {\n // Reading the file\n var workbook = XLSX.readFile(\"./input_files/\" + filename);\n\n // Excel file\n var firstSheet = workbook.SheetNames[0];\n // Worksheet from file\n var worksheet = workbook.Sheets[firstSheet];\n\n // Output file as JSON\n var outputJson = Utils.removeDiacritics(JSON.stringify(XLSX.utils.sheet_to_row_object_array(worksheet), null, 2));\n\n // Check if user wants to write into a JSON file\n if (args[1]) {\n Utils.writeToJson(baseName, outputJson);\n } else {\n console.log(outputJson);\n }\n}", "function getValueFromSelector (keyHeader, keyCol, keyVal, offsetCol) {\n var value = \"\";\n var sh = \"\";\n if (keyHeader === \"feeCode\") {\n sh = workbook.Sheets[\"FEE_HEADER\"];\n } else if (keyHeader === \"productCode\") {\n sh = workbook.Sheets[\"PRODUCT_HEADER\"];\n } else if (keyHeader === \"cfsCode\") {\n sh = workbook.Sheets[\"CFS_HEADER\"];\n } else if (keyHeader === \"rfsCode\") {\n sh = workbook.Sheets[\"RFS_HEADER\"];\n } else if (keyHeader === \"formulaCode\") {\n sh = workbook.Sheets[\"FORMULA_HEADER\"];\n }\n\n if(sh !== \"\"){\n var range = XLSX.utils.decode_range(sh['!ref']); // get the range\n for (var R = range.s.r; R <= range.e.r; ++R) {\n for (var C = range.s.c; C <= range.e.c; ++C) {\n var cellref = XLSX.utils.encode_cell({c: C, r: R}); // construct A1 reference for cell\n if (sh[cellref]) { // if cell doesn't exist, move on\n var cell = sh[cellref];\n if (C === keyCol) {\n if (cell.v === keyVal) {\n value = sh[XLSX.utils.encode_cell({c: C + offsetCol, r: R})].v;\n }\n }\n }\n }\n }\n }\n return value;\n}", "function downloadExcel(){\n\t\n\tvar fileName = sheet.getName()+\".xlsx\";\n\t\n\tvar json = spread.toJSON({\n\t\tincludeBindingSource : true ,\n\t\trowHeadersAsFrozenColumns : true ,\n\t\tcolumnHeadersAsFrozenRows : true ,\n\t\tignoreFormula : true ,\n\t\tignoreStyle : false\n\t});\n\t\t\n // here is excel IO API\n excelIO.save(json, function(blob){\n saveAs(blob, fileName);\n }, function (e) {\n // process error\n console.log(e);\n }, {password: \"\"});\n \n}", "function process_spreadsheet() {\n var file = document.getElementById('docpicker')\n var viewer = document.getElementById('spreadsheet_output')\n file.addEventListener('change', importFile);\n\n function importFile(evt) {\n var f = evt.target.files[0];\n\n if (f) {\n var r = new FileReader();\n r.onload = e => {\n var contents = processExcel(e.target.result);\n }\n r.readAsBinaryString(f);\n } else {\n console.log(\"Failed to load file\");\n }\n }\n\n function processExcel(data) {\n var workbook = XLSX.read(data, {\n type: 'binary'\n });\n\n var firstSheet = workbook.SheetNames[0];\n var data = to_json(workbook);\n return data\n };\n\n function to_json(workbook) {\n newDataset.resetData();\n var result = {};\n workbook.SheetNames.forEach(function(sheetName) {\n var roa = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName], {\n header: 1\n });\n if (roa.length) result[sheetName] = roa;\n });\n newSpreadsheet.setSpreadsheet(result);\n var tx_counter = 0;\n for (i = 0; i < newSpreadsheet.getSpreadsheet()[\"Sheet1\"].length; i++) {\n if (newSpreadsheet.getSpreadsheet()[\"Sheet1\"][i][1] != undefined && newSpreadsheet.getSpreadsheet()[\"Sheet1\"][i][1] != \"undefined\") {\n accountAddress = newSpreadsheet.getSpreadsheet()[\"Sheet1\"][i][1].toString();\n if (web3.utils.isAddress(accountAddress)) {\n var tempAmountinWei = parseInt(newSpreadsheet.getSpreadsheet()[\"Sheet1\"][i][2], 10);\n var amountAsBN = new web3.utils.BN(tempAmountinWei.toString());\n if (web3.utils.toBN(amountAsBN).gt(web3.utils.toBN('0')) && web3.utils.toBN(amountAsBN).lt(web3.utils.toBN('1000000000000000000000'))) {\n var row = [accountAddress, amountAsBN.toString()];\n newDataset.addRowToDataset(row);\n tx_counter = tx_counter + 1;\n row = [];\n } else {\n document.getElementById(\"spreadsheet_output\").innerHTML = \"ERROR!: Account Address of \" + accountAddress + \"is going to receive more than 1000 network tokens (this prototype application does not support amounts that high)\";\n }\n }\n }\n }\n document.getElementById(\"spreadsheet_output\").innerHTML = JSON.stringify(newDataset.getDataset(), 2, 2);\n };\n}", "function handleInputFile(e) {\n var files = e.target.files, f = files[0];\n inputName = f.name;\n var reader = new FileReader();\n reader.onload = function(e) {\n var data = e.target.result;\n if(!rABS) data = new Uint8Array(data);\n var workbook = XLSX.read(data, {type: rABS ? 'binary' : 'array'});\n \tvar sheet = workbook.Sheets[Object.keys(workbook.Sheets)[0]];\n \t//console.log(sheet);\n \ttable = sheet2arr(sheet);\n \tmaxRow = table.length;\n\tmaxCol = table[0].length;\n\ttableRow = 0;\n\ttableCol = -1;\n\tnewTable = new Array(maxRow).fill(0).map(() => new Array(maxCol).fill(\"\"));\n\tnewTable[0] = table[0];\n\toutwb = XLSX.utils.book_new();\n\toutwb.SheetNames.push(\"Sheet1\");\n\n /* DO SOMETHING WITH workbook HERE */\n };\n if(rABS) reader.readAsBinaryString(f); else reader.readAsArrayBuffer(f);\n}", "readReportFromFile() {\n const content = this.utility.readFromFile(this.reportFileName);\n return content;\n }", "function SheetOutputFinder_getOutputForSheetTest(){\n\tvar sheet_output = (new SheetOutputFinder()).getOutputForSheet( SpreadsheetApp.getActiveSpreadsheet().getActiveSheet() );\n\tsheet_output.activate();\n}", "getOutput(){\n\t\tif(this.output3 == ''){\n\t\t\treturn 'NO DATA';\n\t\t}else{\n\t\t\treturn this.output3;\n\t\t}\n\t}", "function cell(sheet, range){\n return sheet.getRange(range)\n .getCell(1,1)\n .getValue();\n}", "getCellValue() {\n let cellData = {};\n cellData.cellName = this.props.cellName;\n cellData.cellValue = this.state.value;\n return cellData;\n }", "function getOutput()\n{\n\treturn document.getElementById(\"output-value\").innerText;\n}", "function createSheet(arr){\n for (let i = 0; i < arr.length; i++){\n var currentCell = alphabet[i] + rowCounter;\n // inside value should be nextStep\n workbook.sheet('Hailstone').cell(currentCell).value();\n }\n\n}", "function getDataRange() {\n var ss = SpreadsheetApp.getActiveSpreadsheet(),\n sheetName = 'english_premier_league',\n sh = ss.getSheetByName(sheetName),\n dataRange = sh.getDataRange();\n Logger.log(dataRange.getA1Notation());\n}", "static readSheet(jwtClient, spreadsheetId, range){\n return new Promise(function(resolve, reject){\n sheets.spreadsheets.values.get({\n auth:jwtClient,\n spreadsheetId: spreadsheetId,\n range: range\n },function(err,response){\n if(response){resolve(response)}\n else if (err) {reject(err)}\n })\n });\n }", "function filePicked(oEvent) {\r\n\t// Get The File From The Input\r\n\tvar oFile = oEvent.target.files[0];\r\n\tvar sFilename = oFile.name;\r\n\tif (!oFile) {\r\n\t\talert(\"Failed to load file\");\r\n \t} else if (/.xml\\$/.test(sFilename)) { // vérifie que le nom du fichier se termine par .xml\r\n\t\tloadXml(oFile);\r\n \t} else if (/.xls\\$/.test(sFilename)) {\r\n\t\t// Create A File Reader HTML5\r\n\t\tvar reader = new FileReader();\r\n\r\n\t\t// Ready The Event For When A File Gets Selected\r\n\t\treader.onload = function(e) {\r\n\t\t\tvar data = e.target.result;\r\n\t\t\tvar cfb = XLSX.read(data, {type: 'binary'}); // conversion \r\n\t\t\tcfb.SheetNames.forEach(function conv(sheetName) {\r\n\t\t\t\t// Obtain The Current Row As CSV\r\n\t\t\t\tvar csvData = XLS.utils.make_csv(cfb.Sheets[sheetName]); \r\n\t\t\t\tvar data=XLS.utils.make_csv(cfb.Sheets[sheetName]); //// conversion xls /xlsx / ods -> csv \r\n\t\t\t\tvar employee_data = data.split(/\\r?\\n|\\r/);\r\n\t\t\t\tlet table_data = '<table class=\"table table-bordered table-striped\">'; // affichage\r\n\t\t\t\tfor(var count = 0; count<employee_data.length; count++)\r\n\t\t\t\t{\r\n\t\t\t\t\tvar cell_data = employee_data[count].split(\",\");\r\n\t\t\t\t\ttable_data += '<tr>';\r\n\t\t\t\t\tfor(var cell_count=0; cell_count<cell_data.length; cell_count++) // affichage\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(count === 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ttable_data += '<th>'+cell_data[cell_count]+'</th>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ttable_data += '<td>'+cell_data[cell_count]+'</td>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttable_data += '</tr>';\r\n\t\t\t\t}\r\n\t\t\t\ttable_data += '</table>'; // table_data : la conversion csv-> tableau html \r\n\t\t\t\t//console.log(table_data); //// test html \r\n\t\t\t\tdocument.getElementById('DataBlock').innerHTML +=table_data; // affichage \r\n\r\n\t\t\t\tcsvData = csvData.split('\\n').map(row => row.trim()); //// conversion csv-> xml \r\n\t\t\t\tlet headings = csvData[1].split(',').map(row => row.trim());\r\n\t\t\t\tfor (z=0 ;z<headings.length;z++){ // pour eliminer les espace et les caractere specieux des balise \r\n\t\t\t\t\t\tfor (h=0;h<headings[z].length;h++){\r\n\t\t\t\t\t\theadings[z]=headings[z].replace(' ','');// pour les balise ou il y a faute de frappe avec deux espace \r\n\t\t\t\t\t\theadings[z]=headings[z].replace('/','');\r\n\t\t\t\t\t\theadings[z]=headings[z].replace(\"'\",\"\");\r\n\t\t\t\t\t\theadings[z]=headings[z].replace('°','');\r\n\t\t\t\t\t\theadings[z]=headings[z].replace('.','');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar xml = ``;\r\n\t\t\t\txml=\"<?xml version=\"+\"1.0\"+\" encoding=\"+\"ISO-8859-1\"+\" ?>\\n\"; \r\n\t\t\t\tfor(let i = 2; i < csvData.length; i++) {\r\n\t\t\t\tlet details = csvData[i].split(',').map(row => row.trim());\r\n\t\t\t\txml += \"<productData>\\n\";\r\n\r\n\t\t\t\tfor(let j = 0; j < headings.length; j++) {\r\n\t\t\t\t\tif (headings[j] !== \"\"){ // condition pour regler le probleme de dimension du tableau \r\n\t\t\t\txml += `<${headings[j]}>${details[j]}</${headings[j]}>`;\r\n\t\t\t\t\t}\r\n\t\t\t\t};\t\t\t\t\t\t\t\t\r\n\t\t\t\txml += \"\\n</productData>\\n\"; // xml : le fichier xml \r\n\r\n\t\t\t\t};\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t//Function to download data to a file\r\n\t\t\t\tfunction download(data, filename, type) {\r\n\t\t\t\t\tvar file = new Blob([data], {type: type});\r\n\t\t\t\t\tif (window.navigator.msSaveOrOpenBlob) // IE10+\r\n\t\t\t\t\t\twindow.navigator.msSaveOrOpenBlob(file, filename);\r\n\t\t\t\t\telse { // Others\r\n\t\t\t\t\t\tvar a = document.createElement(\"a\"),\r\n\t\t\t\t\t\t\t\turl = URL.createObjectURL(file);\r\n\t\t\t\t\t\ta.href = url;\r\n\t\t\t\t\t\ta.download = filename;\r\n\t\t\t\t\t\tdocument.body.appendChild(a);\r\n\t\t\t\t\t\ta.click();\r\n\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\tdocument.body.removeChild(a);\r\n\t\t\t\t\t\t\twindow.URL.revokeObjectURL(url); \r\n\t\t\t\t\t\t}, 0); \r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\r\n\t\t\t}\r\n\t\t\t);\r\n\r\n\r\n\r\n\t\t/*//creation de la liste de fragments :\r\n\t\tlignes = readXml(xml);\r\n\r\n\t\tattributs = getXmlAttributes(lignes[0]);\r\n\t\tcreateObjects(attributs,lignes,Objects); //liste de la liste des valeurs de chaque fragment\r\n\r\n\t\tconsole.log(Objects[0][1]);\t*/\r\n\t\t}\r\n\t// Tell JS To Start Reading The File.. You could delay this if desired\r\n\treader.readAsBinaryString(oFile);\r\n\t}\r\n}", "function getExcelFilename(deviceInfo) {\n\n let date = new Date();\n let isoDate = new Date(date.getTime() - (date.getTimezoneOffset() * 60000));\n let dateText = isoDate.toISOString().split('.')[0].replace(/T|-|:/g, '');\n\n let cpu = deviceInfo[\"CPU\"][\"info\"];\n cpu = cpu.replace(/\\s/g, \"-\");\n let brand = deviceInfo[\"CPU\"][\"mfr\"];\n let platform = deviceInfo[\"OS\"];\n platform = platform.replace(/\\s/g, \"\");\n let browser = deviceInfo[\"Browser\"];\n\n let excelFileName = [dateText, brand, cpu, platform, browser, \"flags\"].join('_') + '.xlsx';\n return excelFileName;\n}", "function createWorkBook(){\n workbook1.xlsx.writeFile(constFile.destFilePath).then(function() {\n console.log(constFile.strFileWritten);\n }).catch((error)=>{\n throw new Error(error);\n })\n}", "function getDataRange () {\n var ss = \n SpreadsheetApp.getActiveSpreadsheet(),\n sheetName = 'english_premier_league',\n sh = ss.getSheetByName(sheetName),\n dataRange = sh.getDataRange();\n Logger.log(dataRange.getA1Notation());\n}", "function getOutput() {\n return document.getElementById(\"output-value\").innerText;\n}", "function getOutput() {\n return document.getElementById(\"output-value\").innerText;\n}", "async function pullSheet() {\r\n try {\r\n await axios.get(`https://sheet.best/api/sheets/72539cae-16c2-42ad-a77f-e3f074d64c0e`).then((result) => {\r\n sheetData = result.data;\r\n console.log(JSON.stringify(sheetData))\r\n })\r\n } catch (e) {\r\n console.log(e)\r\n }\r\n}", "function GETCHECKNUMBER() {\n var out = new Array()\n var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets();\n for (var i=1 ; i<sheets.length-1 ; i++) out.push( [ sheets[i].getRange('B23').getValue() ] )\n return out;\n}", "function read_excel_file(filePath, callback){\n excelParser.parse({\n inFile: filePath,\n worksheet: 1,\n skipEmpty: false,\n },function(err, records){\n if (err) console.error(err);\n typeof callback === 'function' && callback(records);\n })\n}", "function readSingleFile(e) {\n // IF WE SELECTED THE FILE FROM BUTTON THEN HANDLE THIS WAY\n if(e.type == \"change\"){\n var file = e.target.files[0];\n if (!file) {\n return;\n }\n }\n else // ELSE, IT MUST BE FROM DRAG AND DROP, HANDLE THIS WAY\n {\n var file = e.dataTransfer.files[0];\n if(!file) {\n return;\n }\n }\n // CHECK IF THE FILE IS OF TYPE XLSX\n if(validateFileType(file)){\n var dragarea = document.getElementById('drag-and-drop');\n dragarea.classList.add('dropped');\n var reader = new FileReader();\n\n reader.readAsBinaryString(file);\n\n reader.onload = function(e) {\n var contents = e.target.result;\n loadExcel(contents);\n document.getElementById('small-hint').innerHTML = \"(\" + file.name + \")\";\n };\n }\n}", "function ProcessExcel(data) {\n //Read the Excel File data.\n var workbook = XLSX.read(data, {\n type: 'binary'\n });\n\n //Fetch the name of First Sheet.\n var firstSheet = workbook.SheetNames[0];\n\n //Read all rows from First Sheet into an JSON array.\n var excelRows = XLSX.utils.sheet_to_row_object_array(workbook.Sheets[firstSheet]);\n\n //Create a HTML Table element.\n var table = $(\"<table />\");\n table[0].border = \"1\";\n\n //Add the header row.\n var row = $(table[0].insertRow(-1));\n\n //Add the header cells.\n var headerCell = $(\"<th />\");\n headerCell.html(\"Name\");\n row.append(headerCell);\n\n var headerCell = $(\"<th />\");\n headerCell.html(\"Marks\");\n row.append(headerCell);\n\n var headerCell = $(\"<th />\");\n headerCell.html(\"Result\");\n row.append(headerCell);\n\n //Add the data rows from Excel file.\n for (var i = 0; i < excelRows.length; i++) {\n //Add the data row.\n var row = $(table[0].insertRow(-1));\n\n //Add the data cells.\n var cell = $(\"<td />\");\n\n cell = $(\"<td />\");\n cell.html(excelRows[i].Name);\n row.append(cell);\n\n cell = $(\"<td />\");\n cell.html(excelRows[i].Marks);\n row.append(cell);\n\n cell = $(\"<td />\");\n cell.html(excelRows[i].Result);\n row.append(cell);\n }\n\n var dvExcel = $(\"#dvExcel\");\n dvExcel.html(\"\");\n dvExcel.append(table);\n\n }", "function doGet(e) {\n var doc = SpreadsheetApp.openById(SCRIPT_PROP.getProperty(\"key\"));\n var sheet = doc.getSheetByName('record');\n var nextRow = sheet.getLastRow();\n var recentRange;\n var dataReturn;\n if (sheet.getLastRow() == 1) {\n dataReturn = [];\n } else {\n recentRange = sheet.getRange(2, 1, sheet.getLastRow()-1, 5);\n dataReturn = recentRange.getDisplayValues();\n }\n return ContentService\n .createTextOutput(\n JSON.stringify({\n \"result\": \"success\",\n \"data\": JSON.stringify(dataReturn)\n }))\n .setMimeType(ContentService.MimeType.JSON);\n}", "function getOutput(){\r\n\treturn document.getElementById(\"output_value\").innerText;\r\n}", "function getDatatForHtmpFormSelect_()\n{\n // data to fill the table. Change to any data\n var file = SpreadsheetApp.getActive();\n var sheet = file.getSheetByName('Sheet1');\n var range = sheet.getDataRange();\n var dataFromSheet = range.getValues(); \n return dataFromSheet; \n}", "function getSheetData(cb){\n barstool.getAllWorksheets(function(err,data){\n if (err) throw err;\n sheetData = data;\n cb(err);\n });\n}", "function ActiveCompanyNumber() {\n var sheet = SpreadsheetApp.getActive().getActiveSheet();\n var activerow = sheet.getRange(sheet.getSelection().getCurrentCell().getRow(),1,1,1);\n var companynumber = activerow.getValue();\n //Logger.log('Company name is ' + companyname);\n return companynumber; \n}", "function workbookToJson() {\n var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets();\n var output = {};\n _.each(sheets, function(sheet, sheetIdx) {\n var outSheet = {};\n var sheetArrays = sheet.getDataRange().getValues();\n var columnHeaders = sheetArrays[0];\n _.each(columnHeaders, function(columnHeader) {\n if (columnHeader === '_rowNum') {\n throw new Error(\"_rowNum is not a valid column header.\");\n }\n });\n var outSheet = _.map(sheetArrays.slice(1), function(row, rowIdx) {\n //_rowNum is added to support better error messages.\n var outRow = {}; //Object.create({ __rowNum__ : (rowIdx + 1) });\n outRow.prototype = {\n __rowNum__: (rowIdx + 1)\n };\n _.each(row, function(val, valIdx) {\n outRow[columnHeaders[valIdx]] = val;\n });\n return outRow;\n });\n output[sheet.getName()] = outSheet;\n });\n return output;\n}", "function getOutput() {\n return document.getElementById(\"output-value\").innerText;\n\n}", "getSheetId() {\n return this.sheetID.toString();\n }", "function getCalOutput() {\r\n return document.getElementById(\"displayCalPin\").value;\r\n}", "function getOutput(){\n return document.getElementById(\"output-value\").innerText;\n}", "function retrieveDocId(){ \n var masterrownum = rowOfDocId();\n var mastersheet = SpreadsheetApp.openById('1WQBEVDTyK8XvTG5BkMJMbqWMyKTf3aYuFjCQPuc23GI');\n var mastertab = mastersheet.getSheetByName('Client Master List');\n var masterrange = mastertab.getRange(masterrownum, 6,1,1);\n var billingDocId = masterrange.getValue();\n var routingId = billingDocId;\n return routingId;\n}", "function readFileToJson(workbook_path){\n let wb = xlsx.readFile(workbook_path),\n first_tab = wb.SheetNames[0],\n ws = wb.Sheets[first_tab],\n data = xlsx.utils.sheet_to_json(ws);\n data = property_remover(data, 'مسلسل');\n return data;\n}", "function getSampleFileContent(){\n var output = ''\n\n fs.readFile('Sample.txt', 'utf8', function(err, data){\n if(err){ //if there are any error\n \n output = err;\n //console.log('error block');\n console.log(err);\n }\n else{\n \n output = data;\n console.log('data block');\n console.log(data)\n }\n console.log('File read completed...')\n return output;\n })\n }", "getCellsValue() {\n let rowData = [];\n for(let ref in this.refs) {\n if(ref != \"checkbox\") {\n let cellValue = this.refs[ref].getCellValue();\n rowData.push(cellValue);\n }\n }\n return rowData;\n }", "function doGet(e) {\n // states:1 call for updates (get categories and payment methods)\n // states:2 get last column\n \n var a = sheet.getRange(str_pay).getValues()[0]\n var b = sheet.getRange(str_cate).getValues()[0]\n var j = {\"pay\": a, \"cate\": b}\n var end = JSON.stringify(j)\n \n var output = ContentService.createTextOutput(end)\n return output\n}", "function getInvoiceProperties(selectedInvoiceId, selectedBill, selectedDate) {\n\n // get the output2 sheet\n var sheet = getOutputSheet(2);\n \n // get the first cell of the Output2 sheet\n var cell = getOutputFirstCell(2) \n \n var properties = [];\n \n var date = new Date(Date.parse(selectedDate));\n var month = date.getMonth(); \n var year = date.getFullYear();\n\n // set the formula to get the asked information\n cell.setFormula(\"=QUERY('Base de Datos'!A:M;\\\"select K, L, C where D=\" + selectedInvoiceId + \" and C='\" + selectedBill + \"' and month(E)=\" + month + \" and year(E)=\" + year + \"\\\")\");\n \n\t// create a 2 dim area of the data in the carrier names column and codes \n\tvar store = sheet.getRange(\"A2\").getValue();\n var chargeback = sheet.getRange(\"B2\").getValue();\n var bill = sheet.getRange(\"C2\").getValue();\n \n // add the properties to the array\n properties.push(store);\n properties.push(chargeback);\n properties.push(bill);\n \n // return them as string\n return JSON.stringify(properties);\n}", "function getTestJSONData() {\n return JSON.parse(ActiveSpreadsheetApp.getRangeByName(\"LastReportJSON\").getDisplayValue());\n}", "function get_values() {\n // Manual upload data\n gapi.client.sheets.spreadsheets.values.get({\n spreadsheetId: '1o_o4vil2VPIjO_XEECPz9yz3IAImEd8R1l9GQZkEeUY',\n range: 'Manual Upload'\n }).then(function (response) {\n var manual_data = JSON.parse(response.body).values;\n\n // Web-scraped data\n gapi.client.sheets.spreadsheets.values.get({\n spreadsheetId: '1o_o4vil2VPIjO_XEECPz9yz3IAImEd8R1l9GQZkEeUY',\n range: 'Webscrapers'\n }).then(function (response) {\n var scraped_data = JSON.parse(response.body).values;\n\n var cell_data = manual_data.concat(scraped_data);\n console.log(scraped_data)\n return cell_data\n }, function (response) {\n appendPre('Webscraper Data Error: ' + response.result.error.message);\n });\n\n }, function (response) {\n appendPre('Manual Data Error: ' + response.result.error.message);\n });\n\n}", "handleSheet(workbook, extentions){\n var sheetJS = ( extentions === 'xls' ? XLS : XLSX );\n\n /* Get worksheet */\n for(var id in workbook.SheetNames) {\n var workSheetName = workbook.SheetNames[id];\n var worksheet = workbook.Sheets[workSheetName];\n\n var headers = [];\n var range = null;\n\n if(worksheet['!ref']){\n range = sheetJS.utils.decode_range(worksheet['!ref']);\n } else {\n continue;\n }\n \n if(range) {\n var C, R = range.s.r; /* start in the first row */\n \n /* walk every column in the range */\n for(C = range.s.c; C <= range.e.c; ++C) {\n var cell = worksheet[sheetJS.utils.encode_cell({c:C, r:R})] /* find the cell in the first row */\n\n if(cell && cell.t) {\n var hdr = sheetJS.utils.format_cell(cell);\n headers.push(hdr);\n }\n }\n } else {\n continue;\n }\n\n //console.log(headers);\n\n /*-----\n Check required field header\n -----*/\n var validFields = false;\n for (var i in officerInfo){\n if(headers.includes(officerInfo[i])){\n validFields = true;\n } else {\n this.setState({\n loadding: false,\n error: true,\n message: \"Thiếu hoặc sai tên trường: \" + officerInfo[i]\n });\n\n validFields = false;\n break;\n }\n }\n\n if(validFields) {\n this.setState({\n error: false,\n message: ''\n })\n\n this.handleSheetData(worksheet, sheetJS);\n } else {\n return;\n }\n }\n }", "function getValueRange(auth, key, tabName) {\n const sheets = google.sheets({version: 'v4', auth});\n\n let readDataParams = {\n spreadsheetId: key,\n range: tabName\n };\n\n let p = sheets.spreadsheets.values.get(readDataParams);\n return p;\n}", "function getConfig()\n{\n// Process Configuration\n\n var sheet = spreadsheet.getSheetByName('Config');\n var range = sheet.getDataRange();\n var numRows = range.getNumRows();\n var numColumns = range.getNumColumns();\n var ObjectsDataRange = sheet.getRange(3, range.getColumn(), numRows - 1, numColumns);\n var numObjectsDataRows = ObjectsDataRange.getNumRows() - 1;\n\n\n // Create objects from rows\n var ConfigObjects = getRowsData(sheet, ObjectsDataRange, 2);\n return ConfigObjects;\n\n}", "function getInfo(value) {\n var s = SpreadsheetApp.getActiveSpreadsheet();\n var sheet = s.getSheetByName('Configuration');\n if(value == 'api_key') {\n return sheet.getRange('B1').getValue();\n }\n if(value == 'region') {\n return sheet.getRange('B2').getValue();\n }\n if(value == 'summoner_name') {\n return sheet.getRange('B3').getValue();\n }\n if(value == 'season') {\n return sheet.getRange('B6').getValue();\n }\n if(value == 'check_duoer') {\n return sheet.getRange('B7').getValue();\n }\n if(value == 'correct_row') {\n var row = sheet.getRange('B8').getValue();\n if(row) {\n return row;\n }\n else {\n Browser.msgBox(\"Error, please enter a row number to be corrected when using this option\")\n return;\n }\n }\n \n // summoner_id has a special case because it's populated the first time we run the script\n if(value == 'summoner_id') {\n val = sheet.getRange('B4').getValue();\n if(!val) {\n val = getSummonerId();\n if(val == 'exit') {\n return 'exit';\n }\n }\n sheet.getRange('B4').setValue(val);\n return val;\n }\n \n if(value == 'account_id') {\n val = sheet.getRange('B5').getValue();\n if(!val) {\n val = getAccountId();\n if(val == 'exit') {\n return 'exit';\n }\n }\n sheet.getRange('B5').setValue(val);\n return val;\n }\n\n}", "function GetData(path, parameter)\n {\n var ss = SpreadsheetApp.getActiveSpreadsheet();\n var spreadsheetName = ss.getName();\n var spreadsheetID = ss.getId();\n var data = {\n path: path,\n parameter: parameter,\n name: spreadsheetName,\n spreadsheetID: spreadsheetID\n };\n\n if (parameter.metaData) {\n //UpdateMetaData();\n }\n\n if (parameter.sheets) {\n\n data.sheets = {};\n data.sheetNames = [];\n\n var sheets = ss.getSheets();\n\n sheets.forEach(function (sheet, index) {\n var sheetID = sheet.getSheetId();\n var sheetName = sheet.getName();\n var sheetRows = sheet.getLastRow();\n var sheetColumns = sheet.getLastColumn();\n\n data.sheetNames.push(sheetName);\n\n var sheetData = data.sheets[sheetName] = {\n index: index,\n sheetName: sheetName,\n sheetID: sheetID,\n spreadsheetID: spreadsheetID,\n rows: sheetRows,\n columns: sheetColumns\n };\n\n if (parameter.sheetValues) {\n sheetData.values = sheet.getSheetValues(1, 1, sheetRows, sheetColumns);\n }\n\n });\n\n }\n\n if (parameter.ranges) {\n\n data.ranges = {};\n data.rangeNames = [];\n\n var namedRanges = ss.getNamedRanges();\n\n namedRanges.forEach(function (namedRange, index) {\n var rangeName = namedRange.getName();\n var range = namedRange.getRange();\n var row = range.getRow();\n var column = range.getColumn();\n var rows = range.getHeight();\n var columns = range.getWidth();\n var sheet = range.getSheet();\n var sheetName = sheet.getName();\n var sheetID = sheet.getSheetId();\n\n data.rangeNames.push(rangeName);\n\n var rangeData = data.ranges[rangeName] = {\n index: index,\n rangeName: rangeName,\n spreadsheetID: spreadsheetID,\n sheetID: sheetID,\n sheetName: sheetName,\n row: row,\n column: column,\n rows: rows,\n columns: columns\n };\n\n if (parameter.rangeValues) {\n rangeData.values = \n sheet.getSheetValues(row, column, rows, columns);\n }\n\n });\n\n }\n\n return data;\n }", "function Xlsx() {\n }", "getContents() {\n return _fs.default.readFileSync(this.filePath, \"utf8\");\n }", "function GETWEEKLYAMOUNT() {\n var out = new Array()\n var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets();\n for (var i=1 ; i<sheets.length-1 ; i++) out.push( [ sheets[i].getRange('B22').getValue() ] )\n return out;\n}", "getCellValues() {\n var table = this.tableCsvTarget\n var lines = [];\n for (var r = 1, n = table.rows.length; r < n; r++) {\n var line = [];\n for (var c = 0, m = table.rows[r].cells.length - 3; c < m; c++) {\n line.push(this.tableHeaders[c].replace(/(\\r\\n|\\n|\\r)/gm, \"\") + \": \" + table.rows[r].cells[c+1].innerText);\n // line.push(table.rows[r].cells[c].innerText);\n }\n lines.push(line);\n }\n this.saveCsv({ upload: lines })\n }", "async function process_wb_manually(wb, sheetName) {\n $('#data-table').empty();\n var sh = workbook.Sheets[sheetName];\n var cellsToAppend = \"\";\n var range = XLSX.utils.decode_range(sh['!ref']); // get the range\n for (var R = range.s.r; R <= range.e.r; ++R) {\n cellsToAppend += \"<tr>\";\n cellsToAppend += (R===0)?\"<th style='min-width: 0px'>#</th>\":\"<td><b>\" + R + \"</b></td>\";\n for (var C = range.s.c; C <= range.e.c; ++C) {\n var cellref = XLSX.utils.encode_cell({c: C, r: R}); // construct A1 reference for cell\n if (sh[cellref]){\n var cell = sh[cellref];\n if(R === 0){\n cellsToAppend += \"<th class=\\\"filter\\\">\" + cell.v + \"</th>\";\n } else {\n if (R> 0 && (sh[XLSX.utils.encode_cell({c: C, r: 0})].v === \"startDate\" || sh[XLSX.utils.encode_cell({c: C, r: 0})].v === \"endDate\" ||sh[XLSX.utils.encode_cell({c: C, r: 0})].v === \"feeDateFrom\" ||sh[XLSX.utils.encode_cell({c: C, r: 0})].v === \"feeDateTo\" )) {\n if(cell.v instanceof Date) {\n datePlusOne = new Date(cell.v.getTime() + 1000*60*60);\n } else {\n datePlusOne = cell.v;\n }\n\t\t\t cellsToAppend += \"<td id='r\" + R + \"c\" + C + \"'><span class='table_span' contenteditable='false' oninput='changeCell(\" + C + \", \" + R + \"); return false'>\" + datePlusOne.toLocaleString('es-ES', {\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n }) + \"</span></td>\";\n } else {\n cellsToAppend += \"<td id='r\" + R + \"c\" + C + \"'><span class='table_span' contenteditable='false' oninput='changeCell(\" + C + \", \" + R + \"); return false'>\" + cell.v + \"</span></td>\";\n }\n }\n } else {\n if(sh[XLSX.utils.encode_cell({c: C, r: 0})]) {\n cellsToAppend += \"<td id='r\" + R + \"c\" + C + \"'><span class='table_span' contenteditable='false' oninput='changeCell(\" + C + \", \" + R + \"); return false'></span></td>\";\n }\n }\n }\n cellsToAppend += \"</tr>\";\n }\n $('#data-table').append(cellsToAppend);\n}", "load(req, res){\r\n\t\t\tlet \tfile \t\t= \treq.files.file\r\n\t\t\t, \t\txlsxData \t= \txlsx.parse(file.path)\r\n\t\t\t,\t\tresult\t\t=\t[]\r\n\r\n\t\t\t//Contruimos el formato del json deseado desde las librerias y cabeceras\r\n\t\t\tfor(let i in xlsxData){\r\n\t\t\t\tlet \tlib\t\t\t= \txlsxData[i]\r\n\t\t\t\t,\t\trow \t\t= \tlib.data[0]\r\n\t\t\t\t,\t\trowFormat \t= \t{}\r\n\t\t\t\t, \t\trowHeads\t= \t[]\r\n\t\t\t\t\r\n\t\t\t\trowFormat.id \t= i\r\n\t\t\t\trowFormat.lib \t= lib.name\r\n\r\n\t\t\t\tfor(let i in row){\r\n\t\t\t\t\tlet value \t\t= row[i]\r\n\t\t\t\t\t,\trowFormat \t= {}\r\n\r\n\t\t\t\t\trowFormat.row \t= value\r\n\t\t\t\t\trowFormat.id\t= i\r\n\r\n\t\t\t\t\trowHeads.push(rowFormat)\r\n\t\t\t\t}\r\n\t\t\t\trowFormat.data \t= rowHeads\r\n\t\t\t\tresult.push(rowFormat)\r\n\t\t\t}\r\n\r\n\t\t\t//Agregamos los valores de los campos al nuevo formato\r\n\t\t\tfor(let i in result){\r\n\t\t\t\tlet lib = result[i]\r\n\t\t\t\tfor(let i in lib.data){\r\n\t\t\t\t\t\r\n\t\t\t\t\tlet data\t\t= lib.data[i]\r\n\t\t\t\t\t, \txlsxDataRow = xlsxData[lib.id].data\r\n\r\n\t\t\t\t\tif(!result[lib.id].data[data.id]) continue;\r\n\t\t\t\t\tresult[lib.id].data[data.id].column = []\r\n\t\t\t\t\tfor(let i in xlsxDataRow){\r\n\t\t\t\t\t\tif(i == 0) continue;\r\n\t\t\t\t\t\tlet xlsxRow = xlsxDataRow[i]\r\n\t\t\t\t\t\tresult[lib.id].data[data.id].column.push( (xlsxRow[data.id])?xlsxRow[data.id]:null )\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tres.status(200).send({status:'success', file:result})\r\n\t\t}", "getData() {\n const sheetData = super.getData();\n\n // Temporary HP\n let hp = sheetData.data.attributes.hp;\n if (hp.temp === 0) delete hp.temp;\n if (hp.tempmax === 0) delete hp.tempmax;\n\n // Resources\n let res = sheetData.data.resources;\n if (res.primary && res.primary.value === 0) delete res.primary.value;\n if (res.primary && res.primary.max === 0) delete res.primary.max;\n if (res.secondary && res.secondary.value === 0) delete res.secondary.value;\n if (res.secondary && res.secondary.max === 0) delete res.secondary.max;\n\n // Return data for rendering\n return sheetData;\n }", "function parseExcelFile(excel_path) {\n // Checking for excel path\n if (excel_path === null || excel_path === '') {\n throw new Error('Excel file path is null or epty');\n }\n var workbook = XLSX.readFile(excel_path);\n var sheet_name_list = workbook.SheetNames;\n var data = XLSX.utils.sheet_to_json(workbook.Sheets[sheet_name_list[0]]);\n return data;\n}", "function grabData(xx,yy,ii,jj){\r\n\treturn parseInt(getCell(xx,yy,ii,jj).innerHTML.slice(0,getCell(xx,yy,ii,jj).innerHTML.indexOf(\" \")).replace(/,/g, \"\"));\r\n}", "function getArrayFromXlsx(req, res, next) {\n\n var file = req.files.file;\n\n // Tên file\n var originalFilename = file.name;\n console.log(\"Ten file vua up: \" + originalFilename)\n // File type\n var fileType = file.type.split('/')[1];\n\n // File size\n var fileSize = file.size;\n // Đường dẫn lưu ảnh\n var pathUpload = __dirname + '/xlsx/' + originalFilename;\n\n // START READ XLSX DATA\n //doc du lieu tu xlsx dua ve object\n var workbook = XLSX.readFile(file.path);\n var sheet_name_list = workbook.SheetNames;\n var data = [];\n sheet_name_list.forEach(function (y) {\n var worksheet = workbook.Sheets[y];\n var headers = {};\n\n for (z in worksheet) {\n if (z[0] === '!') continue;\n //parse out the column, row, and value\n var tt = 0;\n for (var i = 0; i < z.length; i++) {\n if (!isNaN(z[i])) {\n tt = i;\n break;\n }\n }\n ;\n var col = z.substring(0, tt);\n var row = parseInt(z.substring(tt));\n var value = worksheet[z].v;\n\n //store header names\n if (row == 1 && value) {\n headers[col] = value;\n continue;\n }\n\n if (!data[row]) data[row] = {};\n data[row][headers[col]] = value;\n }\n\n //drop those first two rows which are empty\n data.shift();\n data.shift();\n });\n\n return next(data);\n}", "function getNotes() {\n var sheet = SpreadsheetApp.getActiveSheet();\n var data = sheet.getDataRange().getValues();\n return data[notesRow][notesCol];\n}", "function doGet(e) {\n if(typeof e !== 'undefined'){\n Logger.log(e.parameter[\"file\"]);\n file = UrlFetchApp.fetch(e.parameter[\"file\"]).getBlob();\n var excelfile = UrlFetchApp.fetch(e.parameter[\"file\"]).getBlob();\n var filename = Utilities.formatDate(new Date(), \"GMT\", \"yyMMdd\");\n var fileInfo = {\n title: filename,\n mimeType: \"MICROSOFT_EXCEL\", // it'll be converted to Google Sheets\n \"parents\": [{'id': DataFolderId}], //Folder id for Reports folder\n };\n file = Drive.Files.insert(fileInfo, excelfile, {convert: true});\n addQueryToSheet(file.id);\n cleanFormula(file.id);\n appendToDataSheet(file.id);\n sendSummaryMailTo(\"[email protected]\", \"Report Summary of \" + filename);\n return ContentService.createTextOutput(JSON.stringify(e.parameter));\n }\n}", "getWorksheet(args) {\n\t\tconst lua = this.lua;\nconsole.log(\"getWorksheet\", args);\n\t\t//TODO read file from the lua.vm-util.js.lua preloader\n\t\t//and then convert it from a lua object to a json object\n\t\t//and then return it\n\t\t//alright, I might finally need dkjson.lua ...\n\t\tlet result = '';\n\t\tthis.capture({\n\t\t\tcallback : () => {\n\t\t\t\tlua.execute(\n`\nlocal data\ndata = 'symmath/`+args.filename+`'\ndata = require 'ext.io'.readfile(data)\ndata = require 'ext.fromlua'(data)\ndata = require 'dkjson'.encode(data)\norig_print(data)\n`\n);\n\t\t\t},\n\t\t\toutput : s => {\n\t\t\t\tresult += s + '\\n';\nconsole.log(\"output\", s);\n\t\t\t},\n\t\t\terror : s => {\nconsole.log(\"error\", s);\n\t\t\t}\n\t\t});\nconsole.log(\"getWorksheet results\", result);\n\t\targs.done(result);\n\t}", "async function writeDataToExcel(pathname, fileInfos) {\n let wb = new xl.Workbook();\n\n let ws = wb.addWorksheet('Index');\n let deviceInfo = '';\n // Add first two headers\n ws.cell(1, 1).string('Workloads');\n ws.cell(1, 2).string('CaseId');\n let resultList = [];\n for (const fileInfo of fileInfos) {\n let results = {};\n for (let workload in fileInfo) {\n let resultFilePath = fileInfo[workload];\n \n if (!fs.existsSync(resultFilePath)) {\n return Promise.reject(`${resultFilePath} does not exist, failed to write to Excel!`);\n }\n let rawData = await fsPromises.readFile(resultFilePath, 'utf-8');\n results[workload] = JSON.parse(rawData);\n }\n resultList.push(results);\n }\n\n let workloadCol = [];\n let caseIdCol = [];\n let scoreCols = [];\n let once = true;\n // Loop through all results of chrome flags\n for (let i=0; i < resultList.length; i++) {\n let secondOnce = true;\n let scoreCol = [];\n // Loop through results of workloads in one round\n for (let workload in resultList[i]) {\n let workloadResult = resultList[i][workload];\n // Since we combined one round of test result with multiple workloads into one column,\n // so only need to add header name once here.\n if (secondOnce) {\n let flagName = workloadResult['chrome_flags'];\n // Add header name for each chrome flag\n console.log(flagName)\n ws.cell(1, 3 + i).string(flagName.join(\",\"));\n }\n for (let key in workloadResult['test_result']) {\n // for (let subCase in workloadResult['test_result']) {\n if (once) {\n workloadCol.push(workload);\n caseIdCol.push(key);\n }\n scoreCol.push(workloadResult['test_result'][key]);\n }\n secondOnce = false;\n }\n scoreCols.push(scoreCol);\n once = false;\n }\n\n // Insert workload name column and case id column\n for (let i=0; i<workloadCol.length; i++) {\n ws.cell(2+i, 1).string(workloadCol[i]);\n ws.cell(2+i, 2).string(caseIdCol[i]);\n }\n\n // Insert score columns\n for (let i=0; i<scoreCols.length; i++) {\n for(let j=0; j<scoreCols[i].length; j++) {\n ws.cell(2+j, 3+i).string(scoreCols[i][j]);\n }\n }\n await wb.write(pathname);\n console.log(`************Excel generation at: ${pathname}*****************`);\n\n return Promise.resolve();\n}", "function test() {\n\n // var path = './source_or/模版.xls';\n var wopts = { bookType: 'xlsx', bookSST: false, type: 'binary' }; // solve style\n var path = './result.xls';\n var opt = { cellStyles: true, raw: true, cellNF: true, cellDates: true, sheetStubs: true, bookDeps: true, bookFiles: true, bookProps: true, bookSheets: true, bookVBA: true, WTF: true };\n var wb = xlsx.readFile(path);\n var listSheetNames = wb.SheetNames;\n var wsheet = wb.Sheets[listSheetNames[0]];\n console.log('listSheetNames ...', listSheetNames);\n wsheet['D1'] = { v: 15, t: 'n', w: '15' };\n\n\n // var ws = xlsx.utils.aoa_to_sheet([ \"SheetJS\".split(\"\") ]);\n // xlsx.utils.sheet_add_aoa(ws, [[5,6,7], [6,7,8], [7,8,9]], {origin:{r:1, c:4}});\n // xlsx.utils.sheet_add_aoa(ws, [[4,5,6,7,8,9,0]], {origin: -1});\n\n // var new_ws_name = \"SheetJS\";\n // var ws_data = [\n // [ \"S\", \"h\", \"e\", \"e\", \"t\", \"J\", \"S\" ],\n // [ 1 , 2 , 3 , 4 , 5 ]\n // ];\n // var ws = xlsx.utils.aoa_to_sheet(ws_data);\n // xlsx.utils.book_append_sheet(wb, ws, ws_name,new_ws_name);\n\n // var addr = 'D1';\n // if (!wsheet[addr]) {\n // wsheet[addr] = { t: 'n', f: 'uuu' };\n // console.log('1111')\n // } else {\n // wsheet[addr].f = 'uu';\n // console.log('222');\n // console.log(wsheet[addr]);\n\n // }\n\n\n // wb.Sheets[listSheetNames[0]] = wsheet;\n\n\n xlsx.writeFile(wb, path, wopts);\n\n\n\n // function s2ab(s) {\n // var buf = new ArrayBuffer(s.length);\n // var view = new Uint8Array(buf);\n // for (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;\n // return buf;\n // }\n\n // var wopts = { bookType:'xlsx', bookSST:false, type:'binary' };\n // wopts.cellStyles = true;\n // wopts.bookVBA = true;\n // var wbout = xlsx.write(wb,wopts);\n // saveAs(new Blob([s2ab(wbout)],{type:\"\"}), \"test.xlsx\")\n\n}", "function purchaseExcelReport(data_record_po) {\n\n}", "function writeWorkBookFromXml(filePath, fileName) {\r\n fs.readFile(filePath, 'utf8', function (err, data) {\r\n if (err) throw err; // we'll not consider error handling for now\r\n var jsonObj = JSON.parse(data);\r\n var wb = new Workbook();\r\n for (var name in jsonObj) {\r\n /*Cell address objects are stored as { c: C, r: R } where C and R are 0- indexed column and row numbers,\r\n respectively.For example, the cell address B5 is represented by the object {c: 1, r:4 }.\r\n Cell range objects are stored as { s: S, e: E } where S is the first cell and E is the last cell in the range.\r\n The ranges are inclusive. For example, the range A3: B7 is represented by the object {s: { c: 0, r:2 }, e:{ c: 1, r: 6 }}.\r\n Utility functions perform a row- major order walk traversal of a sheet range:*/\r\n var ws = {};\r\n var keys = Object.keys(jsonObj[name][0]); // fetch the key names on first child object\r\n var range = { s: { c: 0, r: 0 }, e: { c: keys.length - 1, r: jsonObj[name].length - 1 } };\r\n var range_w_headers = { s: { c: 0, r: 0 }, e: { c: keys.length - 1, r: jsonObj[name].length } };\r\n for (var i = 0; i < keys.length; i++) {\r\n var cell = { v: keys[i], t: 's' };\r\n var cell_ref = xlsx.utils.encode_cell({ c: i, r: 0 });\r\n if (cell.v == null) continue;\r\n ws[cell_ref] = cell; // Writes the property name to Excel header cells e.g. A1, B1, etc.\r\n if (keys[i] == \"Attributes\") { // block attributes condition (Attributes breaks down into Tag and TextString)\r\n for (var R = range.s.r; R <= range.e.r; ++R) {\r\n var attArr = jsonObj[name][R][keys[i]];\r\n var attCollection = '';\r\n if (attArr.length > 0) {\r\n for (var k = 0; k < attArr.length; k++) {\r\n attCollection += attArr[k]['Tag'] + \":\" + attArr[k]['Text'] + \";\";\r\n } \r\n }\r\n cell = { v: attCollection, t: 's' };\r\n cell_ref = xlsx.utils.encode_cell({ c: i, r: R + 1 });\r\n if (cell.v == null) continue;\r\n ws[cell_ref] = cell; // Writes the JSON data to the remaining cells\r\n }\r\n } else { \r\n for (var R = range.s.r; R <= range.e.r; ++R) {\r\n cell = { v: jsonObj[name][R][keys[i]], t: 's' };\r\n cell_ref = xlsx.utils.encode_cell({ c: i, r: R + 1 });\r\n if (cell.v == null) continue;\r\n ws[cell_ref] = cell; // Writes the JSON data to the remaining cells\r\n }\r\n }\r\n }\r\n if (range.s.c < 10000000) ws['!ref'] = xlsx.utils.encode_range(range_w_headers);\r\n wb.SheetNames.push(name);\r\n wb.Sheets[name] = ws;\r\n }\r\n var wbout = xlsx.writeFile(wb, './www/data/' + fileName + '-results.xlsx');\r\n });\r\n}", "function Sheet(props) {\n return (\n <div className=\"sheet\">\n {props.value}\n </div>\n );\n}", "function getX(cell) {\n return cell[0];\n }", "excelDownload(){\nreturn this.get(Config.API_URL + Constant.REFFERAL_EXCELDOWNLOAD);\n}", "getRange(rangeRef) {\n return this.sheet.mapRange(\n rangeRef,\n this._getCellValue.bind(this)\n );\n }", "async function _export(exportName, creator,sheets,dataArray) {\n try {\n const workbook = new excelJS.Workbook();\n workbook.creator = creator ; \n \n sheets.forEach(s => {\n\n const worksheet = workbook.addWorksheet(`${s}`)\n const data = dataArray[s]\n const fixColumnsDef = columnDefs[s + 'Columns'].slice()\n var columnDef = fixColumnsDef\n \n worksheet.columns = columnDef.map(col => {\n return { key: col.id, header: col.columnTitle, width: col.columnWidth };\n });\n\n for (const d of data) {\n let rowData = {};\n for (const column of columnDef) {\n if (column.format) {\n rowData[column.id] = column.format(d[column.propertyName]);\n }\n else {\n rowData[column.id] = d[column.propertyName];\n }\n }\n var row = worksheet.addRow(rowData);\n }\n worksheet.properties.defaultRowHeight = 25;\n worksheet.properties.defaultColWidth = 30; \n\n })\n\n //now dump custom attributes.\n\n const buffer = await workbook.xlsx.writeBuffer();\n fs.writeFileSync(`./Excel_Exports/${exportName}.xlsx`, buffer, \"binary\")\n console.log(`./Excel_Exports/${exportName}.xlsx is saved`);\n return true\n } catch (e) {\n console.log(`./Excel_Exports/${exportName}.xlsx failed`);\n return false \n } \n}", "function _getDataFromFile(){\n\tvar fileData = _openFIle();\n\treturn fileData;\n}", "getText() {\r\n return this.clone(File, \"$value\", false).get(new TextParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\r\n }", "function getTemp() {\n b.readTextFile(w1, printStatus);\n}", "function readNames(workbook) {\n\tvar worksheet = workbook.Sheets[workbook.SheetNames[0]];\n\tvar json_list = XLSX.utils.sheet_to_json(worksheet, {header:\"A\"});\n\treturn json_list.map(x => x.A);\n}", "serializeChartExcelData() {\n this.mArchiveExcel = new ZipArchive();\n this.mArchiveExcel.compressionLevel = 'Normal';\n let type = this.chart.chartType;\n let isScatterType = (type === 'Scatter_Markers' || type === 'Bubble');\n this.serializeWorkBook();\n this.serializeSharedString(isScatterType);\n this.serializeExcelContentTypes();\n this.serializeExcelData(isScatterType);\n this.serializeExcelStyles();\n this.serializeExcelRelation();\n this.serializeExcelGeneralRelations();\n this.chartStringCount = 0;\n }", "Get(filename)\n {\n return \"\";\n }", "function getValue(location){\n if (location === null){\n return null;\n }\n if (location[0] === 'F'){\n var idx = parseInt(location.substring(1));\n return (fpRegFile[idx] || 0);\n }\n if (location[0] === '$'){\n var idx = parseInt(location.substring(1));\n \n var v = (intRegFile[idx] || 0);\n return v;\n }\n if (location[0] === '#'){\n return parseInt(location.substring(1));\n }\n var parsedInput = location.match(/(\\d*)\\(\\$(\\d+)\\)/);\n if (parsedInput){\n index = parseInt(intRegFile[parsedInput[2]]);\n offset = parseInt(parsedInput[1]);\n return (parseInt(dataMem[index+offset]) || 0);\n }\n \n throw new Error(\"Could not obtain a value from \\\"\" + location +\n \"\\\". Check that is is formatted correctly (see README)\");\n}", "getCell(id) {\n return this.model.getCell(id);\n }", "getCellValues() {\n var table = this.tableCsvTarget\n var lines = [];\n for (var r = 1, n = table.rows.length; r < n; r++) {\n // console.log(\"line\")\n var line = [];\n for (var c = 0, m = table.rows[r].cells.length - 3; c < m; c++) {\n line.push(this.tableHeaders[c].replace(/(\\r\\n|\\n|\\r)/gm, \"\") + \": \" + table.rows[r].cells[c+1].innerText);\n // line.push(table.rows[r].cells[c].innerText);\n }\n lines.push(line);\n }\n this.saveCsv({ upload: lines })\n }" ]
[ "0.6875597", "0.58114046", "0.58114046", "0.5795402", "0.5729074", "0.56231225", "0.55404246", "0.55056584", "0.54448014", "0.54431045", "0.54337615", "0.54273885", "0.534754", "0.53386384", "0.53066933", "0.51853144", "0.5173703", "0.5157729", "0.5127182", "0.5089614", "0.5070542", "0.50703466", "0.503811", "0.5014925", "0.49961013", "0.49777138", "0.4942478", "0.49424765", "0.49224868", "0.49213552", "0.49010143", "0.48923326", "0.4882253", "0.4876451", "0.4870626", "0.48541462", "0.48435423", "0.4827072", "0.48103836", "0.48103836", "0.48065352", "0.47970212", "0.4785256", "0.4782153", "0.4767988", "0.47610134", "0.47571847", "0.4749738", "0.47380167", "0.47363266", "0.4722904", "0.47171456", "0.4711627", "0.47044143", "0.47041366", "0.47003207", "0.46973753", "0.46844405", "0.4675835", "0.46738347", "0.46738127", "0.46704662", "0.4667698", "0.46633375", "0.46489406", "0.4646753", "0.4643259", "0.46430764", "0.46332562", "0.4622176", "0.4616652", "0.46135223", "0.46104383", "0.46041533", "0.45967484", "0.45959386", "0.45905146", "0.45888385", "0.45823798", "0.4576344", "0.45755398", "0.45706585", "0.4567945", "0.45622805", "0.45582563", "0.45522535", "0.45474398", "0.4545263", "0.45433137", "0.45362455", "0.45356655", "0.45317888", "0.45186478", "0.4504786", "0.44847894", "0.4475711", "0.44721022", "0.4471101", "0.44602254" ]
0.73445314
1
Scales the vector x by a constant c, without making a new vector.
function vecScale(x, c) { for (var i = 0; i < x.length; i++) { x[i] *= c; }; return x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scaleToLength(x, c) {\n var norm = l2norm(x);\n for (var i = 0; i < x.length; i++) {\n c * x[i] / norm;\n };\n return x;\n}", "static scale(c,v) {\n try {\n if (!(typeof(c) === \"number\") || !(v instanceof Vector))\n throw \"Vector.scale: malformed parameter\";\n else\n return(new Vector(c*v.x,c*v.y,c*v.z));\n } // end try\n \n catch(e) {\n console.log(e);\n return(new Vector(NaN,NaN,NaN));\n }\n }", "static scale(c,v) {\r\n try {\r\n if (!(typeof(c) === \"number\") || !(v instanceof Vector)){\r\n //throw \"Vector.scale: malformed parameter\";\r\n }\r\n\r\n else\r\n return(new Vector(c*v.x,c*v.y,c*v.z));\r\n } // end try\r\n\r\n catch(e) {\r\n console.log(e);\r\n return(new Vector(NaN,NaN,NaN));\r\n }\r\n }", "function rescale(x, a,b, c,d) {\n if (abs(a-b) < 1e-7) return x <= (a+b)/2 ? c : d // avoid division by 0\n return c + (x-a)/(b-a)*(d-c)\n}", "static scale(p, c) {\n return {x: (c * p.x), y: (c * p.y)};\n }", "function scale(x,y) {\n matrix[0] *= x;\n matrix[1] *= x;\n matrix[2] *= y;\n matrix[3] *= y;\n }", "static setScaleV3(xyz, s) {\nxyz[0] *= s;\nxyz[1] *= s;\nxyz[2] *= s;\nreturn xyz;\n}", "ScaleBy(scaleFactor)\n {\n let scaled=new Vector(this.x*scaleFactor,this.y*scaleFactor);\n return scaled;\n }", "scl(c) {\n for (var i = 0; i < this.rows; i++) for (var j = 0; j < this.cols; j++)\n this.m[i][j] *= c;\n return this;\n }", "function unscaleX(xvar){\r\n xvar = xvar - xShift;\r\n xvar = xvar / mapScale;\r\n\r\n var xMin = getMin(x);\r\n if(xMin < 0){\r\n xvar += xMin;\r\n }\r\n\r\n return xvar;\r\n\r\n}", "function scaleBy(point, value) {\n point.x *= value;\n point.y *= value;\n }", "scale(s) {\r\n this.forEach((x, i, a) => a[i] *= s);\r\n }", "function resizeVertex(vertex, x) {\n var newVertex = new Array();\n for (var i = 0; i < vertex.length; i++) {\n temp = vertex[i];\n temp[0] *= x;\n temp[1] *= x;\n newVertex[i] = temp;\n }\n return newVertex;\n}", "function scaleV(x) {\r\n var xmax = maxaV(x); y=[];\r\n var lt=x.length;\r\n for (igo = 0; igo < lt; igo++) {\r\n y[igo] = x[igo]/xmax;\r\n }\r\n return y;\r\n}", "function scaling(x, y, z) {\n return [x, 0, 0, 0, 0, y, 0, 0, 0, 0, z, 0, 0, 0, 0, 1];\n}", "Scale(scalar) {\n\t\tconst outX = this.X * scalar\n\t\tconst outY = this.Y * scalar\n\t\treturn Point(outX, outY)\n\t}", "function scale(vector, factor) {\n\treturn [vector[0]*factor, vector[1] * factor];\n}", "ScaleMe(multiplier)\n {\n this.x*=multiplier;\n this.y*=multiplier;\n }", "x(x) {\n\t\treturn this.scaleX * (x - this.offsetX) + nodeSize;\n\t}", "function scale(vec, scalar) {\n var result = [];\n var i;\n for (i = 0; i < vec.length;i++) {\n result[i] = vec[i] * scalar;\n }\n return result;\n}", "scale (vec, m) {\n return [vec[0] * m, vec[1] * m];\n }", "scale (vec, m) {\n return [vec[0] * m, vec[1] * m];\n }", "scale (vec, m) {\n return [vec[0] * m, vec[1] * m];\n }", "scale (vec, m) {\n return [vec[0] * m, vec[1] * m];\n }", "function Scale () {}", "static multiplyScalar(v, s) {\n\t\treturn new vector(v.x*s, v.y*s);\n\t}", "static scale(vector)\n\t{\n\t\treturn new Float32Array([\n\t\t\tvector.x, 0, 0, 0,\n\t\t\t0, vector.y, 0, 0,\n\t\t\t0, 0, vector.z, 0,\n\t\t\t0, 0, 0, 1\n\t\t]);\n\t}", "function cuberoot(x) {\n return x < 0 ? -Math.pow(-x, 1 / 3) : Math.pow(x, 1 / 3);\n}", "function scale (input) {\n return Math.round (input * CppUtilities.scaleRatio);\n}", "scale(vec, m) {\n return [vec[0] * m, vec[1] * m];\n }", "scale(vec, m) {\n return [vec[0] * m, vec[1] * m];\n }", "scale(vec, m) {\n return [vec[0] * m, vec[1] * m];\n }", "scale(vec, m) {\n return [vec[0] * m, vec[1] * m];\n }", "scale(vec, m) {\n return [vec[0] * m, vec[1] * m];\n }", "limitx() { return (this.scale - 1) * this.sizex / 2; }", "function scale(point){\n\t\tpoint.x =point.x *xscale;\n\t\tpoint.y= point.y *yscale ;\n\t}", "function scale( s, v1 ) { return [ s * v1[0], s * v1[1], s * v1[2] ]; }", "scale(val) {\n this._scale = val;\n return this;\n }", "scale(val) {\n this._scale = val;\n return this;\n }", "static setInverseScaleV3(xyz, s) {\nxyz[0] /= s;\nxyz[1] /= s;\nxyz[2] /= s;\nreturn xyz;\n}", "scale (vec, m) {\n\t return [vec[0] * m, vec[1] * m];\n\t }", "scale(x, y, z = 1) {\n const m = this.getCurrentMatrix();\n this.setCurrentMatrix(m4.scale(m, [x, y, z]));\n }", "function scaleVec2(vec, scale) {\n vec.set_x( scale * vec.get_x() );\n vec.set_y( scale * vec.get_y() );\n}", "scaleTo() {}", "function scale_vector(S, V){\n var final = [];\n for(var i = 0; i<V.length; i++){\n final.push(V[i] * S);\n\n }\n return final;\n}", "function transform(x) {\n return w * (x - min) / (max - min);\n}", "function scaleValue(value){\n //Assuming army size is between \n}", "function scale(value) {\n return (canvasWidth / SCALE_WIDTH) * value;\n}", "function pxScale(input) {\n return input * width / blocks;\n }", "static scale(v)\n\t{\n\t\t// TODO construct a 4x4 scale matrix for a scale by the\n\t\t// 3D vector v\n\t\treturn new Float32Array([v.x, 0, 0, 0, 0, v.y, 0, 0, 0, 0, v.z, 0, 0, 0, 0, 1]);\n\t}", "function scale(vec, setTo) {\n\t\tthis.transform(this.transformation.scale, vec, setTo);\n\t}", "function damageScale(x) {\n return Math.cbrt(x / 781250) * scaleWidth;\n }", "function scale(el, val) {\n el.style.mozTransform = el.style.msTransform = el.style.webkitTransform = el.style.transform = 'scale3d(' + val + ', ' + val + ', 1)';\n}", "static setScaleQV(qv, s) {\nqv[0] *= s;\nqv[1] *= s;\nqv[2] *= s;\nqv[3] *= s;\nreturn qv;\n}", "scale(vec, m) {\n return [vec[0] * m, vec[1] * m];\n }", "scale(vec, m) {\n return [vec[0] * m, vec[1] * m];\n }", "function clamp(x){\n return Math.min(Math.max(x, 0.0), 1.0)\n}", "scaleEq(scalar)\n\t{\n\t\tthis._w *= scale;\n\t\tthis._x *= scale;\n\t\tthis._y *= scale;\n\t\tthis._z *= scale;\n\t}", "scale(sx, sy, sz){\n let e = this.elements;\n e[0] *= sx; e[4] *= sy; e[8] *= sz;\n e[1] *= sx; e[5] *= sy; e[9] *= sz;\n e[2] *= sx; e[6] *= sy; e[10] *= sz;\n e[3] *= sx; e[7] *= sy; e[11] *= sz;\n return this;\n }", "function scale(n) { return (1 + n)/2; }", "function scaleValue(v, s1, e1, s2, e2) {\n\treturn (v - s1) / (e1 - s1) * (e2 - s2) + s2;\n}", "function scale (vec, m) {\n return [vec[0] * m, vec[1] * m];\n }", "function paper_scale(amount, x, y) {\n var scale = V(paper.viewport).scale().sx;\n var newScale = scale*amount;\n paper.scale(newScale, newScale);\n\n var ox = paper.options.origin.x;\n var oy = paper.options.origin.y;\n var dx = (newScale - scale)/scale * (x - ox);\n var dy = (newScale - scale)/scale * (y - oy);\n paper.setOrigin(ox - dx, oy - dy);\n}", "scaleVec(scale)\n {\n var output = Vector2D.zero;\n output.x = scale * this.x;\n output.y = scale * this.y;\n\n return output;\n }", "function __scale(s) {\n if (typeof s === 'number') {\n mat4.scale(__scaleMatrix, __scaleMatrix, vec3.fromValues(s, s, s));\n }\n\n __shouldUpdateMatrices = true;\n\n return this;\n }", "function xLinearScale(val,iL,iH,oL,oH)\r\n{\r\n var m=(oH-oL)/(iH-iL);\r\n var b=oL-(iL*m);\r\n return m*val+b;\r\n}", "cx(x) {\n return x == null ? this.x() + this.width() / 2 : this.x(x - this.width() / 2);\n }", "convertX(x)\n\t{\n\t\treturn Dimensioning.cmToPixel(x - Dimensioning.pixelToCm(this.originX));\n//\t\treturn (x - (this.originX * this.cmPerPixel)) * this.pixelsPerCm;\n\t}", "function scale (vec, m) {\n return [vec[0] * m, vec[1] * m];\n}", "scaleImageToCanvasX(x) {\n var img = this.getImage();\n var canvas = this.getCanvas();\n return (x / (canvas.width / img.width)) * this.state.scale;\n }", "function center_x_to_canvas(x) {\n return canvas.width*x + 0.5*canvas.width;\n }", "static scaleQV(q, s) {\nvar qv;\nqv = this.copyOfQV(q);\nreturn this.setScaleQV(qv, s);\n}", "static multiply(scalarC, vectorX, n) {\n\t\tvar result = new Array(n);\n\t\tfor (var i = 0; i < n; i++) {\n\t\t\tresult[i] = scalarC * vectorX[i];\n\t\t}\n\t\treturn result;\n\t}", "setScale(x,y,z=this.scale.z){\n this.scale.x = x;\n this.scale.y = y;\n }", "function montSqrTo(x, r) {\r\n\t x.squareTo(r);\r\n\t this.reduce(r);\r\n\t}", "function montSqrTo(x, r) {\r\n\t x.squareTo(r);\r\n\t this.reduce(r);\r\n\t}", "function clamp( x ) {\n\n return Math.min( Math.max( x, -1 ), 1 );\n\n }", "function clamp( x ) {\n\n return Math.min( Math.max( x, -1 ), 1 );\n\n }", "function montSqrTo(x,r) { x._squareTo(r); this.reduce(r); }", "function xScaleUpdate(censusData, currentX) {\n // create scales\n var xScale = d3.scaleLinear()\n .domain([d3.min(censusData, d => d[currentX] - 1),\n d3.max(censusData, d => d[currentX])\n ])\n .range([0, chartWidth]);\n return xScale;\n }", "scaleMat4c(x, y, z, m) {\n\n m[0] *= x;\n m[4] *= y;\n m[8] *= z;\n\n m[1] *= x;\n m[5] *= y;\n m[9] *= z;\n\n m[2] *= x;\n m[6] *= y;\n m[10] *= z;\n\n m[3] *= x;\n m[7] *= y;\n m[11] *= z;\n return m;\n }", "function setSize(x, y)\n{\n\tthis.scale.set(x, y, 1);\n}", "function clamp( x ) {\r\n\r\n\t\t\treturn Math.min( Math.max( x, -1 ), 1 );\r\n\r\n\t\t}", "function clamp( x ) {\r\n\r\n\t\t\treturn Math.min( Math.max( x, -1 ), 1 );\r\n\r\n\t\t}", "function gScale(sx,sy,sz) {\n modelMatrix = mult(scale(sx,sy,sz), modelMatrix) ;\n}", "multiplyScalar(s) {\n\t\tthis.x *= s;\n\t\tthis.y *= s;\n\t\treturn this;\n\t}", "function montSqrTo(x, r) {\n x.squareTo(r);this.reduce(r);\n }", "function montSqrTo(x, r) {\n x.squareTo(r);this.reduce(r);\n }", "function montSqrTo(x, r) {\n x.squareTo(r);this.reduce(r);\n }", "function tricube(x) {\n return (x = 1 - x * x * x) * x * x;\n}", "multiply(multiplier) {\n return new Vector(this.x * multiplier, this.y * multiplier);\n }", "function Scale(x, y, z) {\n\t\tz = (typeof z !== 'undefined' ? z : 1);\n\t\tthis.x = parseFloat(x);\n\t\tthis.y = parseFloat(y);\n\t\tthis.z = parseFloat(z);\n\t}", "function scale_v2(v, l) {\n var len = length_v2(v);\n if (len == 0) return v;\n l /= len;\n return [v[0] * l, v[1] * l];\n }", "function xScale(cData, chosenXAxis) {\n // create scales\n var xLinearScale = d3.scaleLinear()\n .domain([d3.min(cData, d => d[chosenXAxis]) * 0.8,\n d3.max(cData, d => d[chosenXAxis]) * 1.2\n ])\n .range([0, width]);\n \n return xLinearScale;\n \n}", "function montSqrTo(x, r) {\n x.squareTo(r);\n this.reduce(r);\n }", "function montSqrTo(x, r) {\n x.squareTo(r);\n this.reduce(r);\n }", "clampScale(){\n\t\tif(this.status > .674)\n\t\t\tthis.status = .674;\n\t\telse if(this.status < 0)\n\t\t\tthis.status = 0;\n\t}", "function scaleVectors(scale, vectorsX, vectorsY) {\n const length = vectorsX.length;\n for (let i = 0; i < length; i++) {\n vectorsX[i] *= scale;\n vectorsY[i] *= scale;\n }\n}", "function montSqrTo(x, r) {\n x.squareTo(r);\n this.reduce(r);\n }", "function scaleX(passedX) {\n \"use strict\";\n var tempX = Number(passedX) + 400;\n return tempX;\n}" ]
[ "0.7172556", "0.6901361", "0.68987393", "0.6890781", "0.62872046", "0.626055", "0.6194341", "0.6152622", "0.6124915", "0.592144", "0.5903154", "0.58779746", "0.5867658", "0.5861009", "0.5786418", "0.57699054", "0.5728986", "0.56805044", "0.56771976", "0.56415755", "0.56208646", "0.56208646", "0.56208646", "0.56208646", "0.55901104", "0.558586", "0.55849314", "0.55610347", "0.55601764", "0.5538343", "0.5538343", "0.5538343", "0.5538343", "0.5538343", "0.5535445", "0.553056", "0.5528571", "0.5512679", "0.5512679", "0.5501814", "0.54789215", "0.5478309", "0.54780984", "0.5476893", "0.54729414", "0.5468313", "0.54363686", "0.5434633", "0.5418816", "0.54175586", "0.540275", "0.53845817", "0.5368868", "0.5348375", "0.5335925", "0.5335925", "0.53310424", "0.53286874", "0.53286076", "0.53214514", "0.5314135", "0.5297922", "0.5275599", "0.52600944", "0.5254915", "0.5254793", "0.5247269", "0.5238362", "0.5232822", "0.5216303", "0.5212292", "0.52076393", "0.5186074", "0.517379", "0.5173027", "0.5173027", "0.5168537", "0.5168537", "0.5156315", "0.51515794", "0.5147536", "0.51363546", "0.513572", "0.513572", "0.5130028", "0.5129442", "0.5125512", "0.5125512", "0.5125512", "0.51241016", "0.51215625", "0.51209277", "0.5115942", "0.51073045", "0.51054126", "0.51054126", "0.5102954", "0.5097307", "0.50961405", "0.5092199" ]
0.8047045
0
In place scales x to be length c
function scaleToLength(x, c) { var norm = l2norm(x); for (var i = 0; i < x.length; i++) { c * x[i] / norm; }; return x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function vecScale(x, c) {\n for (var i = 0; i < x.length; i++) {\n x[i] *= c;\n };\n return x;\n}", "function rescale(x, a,b, c,d) {\n if (abs(a-b) < 1e-7) return x <= (a+b)/2 ? c : d // avoid division by 0\n return c + (x-a)/(b-a)*(d-c)\n}", "static scale(p, c) {\n return {x: (c * p.x), y: (c * p.y)};\n }", "static setScaleV3(xyz, s) {\nxyz[0] *= s;\nxyz[1] *= s;\nxyz[2] *= s;\nreturn xyz;\n}", "function xScale(censusData, chosenXAxis) {\n // create scales\n\n var xScaleLinear = d3.scaleLinear()\n // trying to scale it so the data points aren't all on right side\n // took the min for the domain and subtracted one to keep scatter\n // plot on the canvas and not overlapping on y axis\n .domain([(d3.min(censusData, cdata => cdata[chosenXAxis])) - 1, \n d3.max(censusData, cdata => cdata[chosenXAxis])])\n .range([0, width])\n .nice();\n console.log(width);\n\n return xScaleLinear;\n\n}", "function scaleV(x) {\r\n var xmax = maxaV(x); y=[];\r\n var lt=x.length;\r\n for (igo = 0; igo < lt; igo++) {\r\n y[igo] = x[igo]/xmax;\r\n }\r\n return y;\r\n}", "function scaleLength(d) {\n var max = 20.\n var min = 0.\n var delta = (max - min)\n var x = ((d - min)/delta)*100\n\n return x ;\n}", "function xScale(data) {\n\n bound = calculate_minmax(data);\n let x = d3.scaleLinear()\n .domain([bound.min, bound.max])\n .range([25, w - 25])\n .nice();\n return x;\n\n}", "scaleTo() {}", "function updateXScale(xData,curXAxis){\n var xLineraScale = d3.scaleLinear()\n .domain([d3.min(xData, d=> d[curXAxis]),d3.max(xData, d=> d[curXAxis])])\n .range([0,chartWidth]);\n return xLineraScale; \n\n}", "function xLinearScale(val,iL,iH,oL,oH)\r\n{\r\n var m=(oH-oL)/(iH-iL);\r\n var b=oL-(iL*m);\r\n return m*val+b;\r\n}", "function x_scale(rows,min_x,max_x){\n return d3.scaleLinear().domain([0,rows+1]).range([min_x,max_x]);\n}", "function scale(x,y) {\n matrix[0] *= x;\n matrix[1] *= x;\n matrix[2] *= y;\n matrix[3] *= y;\n }", "function scale_to_Rx(x) {\n\tvar $container = $('#canvas');\n\t\n\t// First change from the coordinates of the page to those of the plotdiv\n\tnew_x = x - $container.position().left;\n\t\n\t// Then change to the coordinates of the drawing zone\n\tnew_x = new_x - scale[\"margin_left\"];\n\t\n\t// Finally scale to the R graph\n\tvar draw_zone_width = $container.width() - scale[\"margin_left\"] - scale[\"margin_right\"];\n\tvar real_width = scale[\"current_end1\"] - scale[\"current_start1\"];\n\tvar xscale = real_width / draw_zone_width;\n\tvar rx = Math.floor(scale[\"current_start1\"] + new_x * xscale);\n\t\n\treturn rx;\n}", "function unscaleX(xvar){\r\n xvar = xvar - xShift;\r\n xvar = xvar / mapScale;\r\n\r\n var xMin = getMin(x);\r\n if(xMin < 0){\r\n xvar += xMin;\r\n }\r\n\r\n return xvar;\r\n\r\n}", "function Scale () {}", "function uc1_rescaleX(data, g, binSize, range, mutationTypes, stacked, showTotal, normalize) {\n\n // uc1(data, binSize, range, mutationTypes);\n //return;\n\n console.log(\"rescaling x\");\n g.xAxisScale = d3.scaleLinear().domain([range.min,range.max]).range([0, g.width]);\n\n // g.xAxisScale.domain([range.min,range.max]) \n g.xAxis\n .transition()\n .duration(1000)\n .call(d3.axisBottom(g.xAxisScale).tickFormat(function(d) { return d3.format(\".2s\")(d); }));\n\n uc1_update(data, g, binSize, range.minY, mutationTypes,stacked, showTotal, normalize);\n}", "function xScale(cData, chosenXAxis) {\n // create scales\n var xLinearScale = d3.scaleLinear()\n .domain([d3.min(cData, d => d[chosenXAxis]) * 0.8,\n d3.max(cData, d => d[chosenXAxis]) * 1.2\n ])\n .range([0, width]);\n \n return xLinearScale;\n \n}", "limitx() { return (this.scale - 1) * this.sizex / 2; }", "function transform(x) {\n return w * (x - min) / (max - min);\n}", "function xScale (data, xvalue) {\n var xLinearScale = d3.scaleLinear()\n .domain(d3.extent(data, data => data[xvalue]))\n .range([0, chartWidth])\n return xLinearScale;\n }", "function scale() {\n\tvar domain = [];\n\tvar range = [];\n\n\tvar _scale = function(x) {\n\t\tif (domain.length < 2) {return _scale;}\n\t\tif (range.length < 2) {return _scale;}\n\n\t\tx = Math.max(x, domain.min);\n\t\tx = Math.min(x, domain.max);\n\t\tvar x2 = distance(domain[0], x);\n\t\tvar rangeVal = x2/domain.distance * range.distance;\n\t\treturn range[0] + rangeVal;\n\t};\n\tfunction distance(x1, x2) {\n\t\tif (x1 instanceof Array) {\n\t\t\tx2 = x1[1];\n\t\t\tx1 = x1[0];\n\t\t}\n\t\t// return Math.max(x1, x2) - Math.min(x1, x2);\n\t\treturn x2 - x1;\n\t}\n\n\tfunction initDistance(obj) {\n\t\tobj.distance = distance(obj);\n\t\tobj.min = Math.min.apply(Math, obj);\n\t\tobj.max = Math.max.apply(Math, obj);\n\t\treturn obj;\n\t}\n\t_scale.domain = function(/* start, end */) {\n\t\tdomain = Array.prototype.slice.call(arguments, 0, 2);\n\t\tinitDistance(domain);\n\t\treturn _scale;\n\t};\n\t_scale.range = function(/* start, end */) {\n\t\trange = Array.prototype.slice.call(arguments, 0, 2);\n\t\tinitDistance(range);\n\t\treturn _scale;\n\t};\n\treturn _scale;\n}", "function scale(point){\n\t\tpoint.x =point.x *xscale;\n\t\tpoint.y= point.y *yscale ;\n\t}", "function pxScale(input) {\n return input * width / blocks;\n }", "function scaleBy(point, value) {\n point.x *= value;\n point.y *= value;\n }", "x(x) {\n\t\treturn this.scaleX * (x - this.offsetX) + nodeSize;\n\t}", "function updateXscale(data, chosen_x_axis) {\n var x_scale = d3.scaleLinear()\n .domain([-1.05, 1.05])\n .range([0, width]);\n return x_scale;\n}", "function paper_scale(amount, x, y) {\n var scale = V(paper.viewport).scale().sx;\n var newScale = scale*amount;\n paper.scale(newScale, newScale);\n\n var ox = paper.options.origin.x;\n var oy = paper.options.origin.y;\n var dx = (newScale - scale)/scale * (x - ox);\n var dy = (newScale - scale)/scale * (y - oy);\n paper.setOrigin(ox - dx, oy - dy);\n}", "function scale(el, val) {\n el.style.mozTransform = el.style.msTransform = el.style.webkitTransform = el.style.transform = 'scale3d(' + val + ', ' + val + ', 1)';\n}", "function xScale(bikeData, chosenXAxis, width) {\n // create scales\n var xLinearScale = d3.scaleLinear()\n .domain([d3.min(bikeData, d => d[chosenXAxis]),// * 0.8,\n d3.max(bikeData, d => d[chosenXAxis]),// * 1.2\n ])\n .range([0, width]);\n return xLinearScale;\n}", "function xUpdate(healthData, paramX) {\n //scaling\n var xLinScale = d3.scaleLinear()\n .domain([d3.min(healthData, d => d[paramX]),\n d3.max(healthData, d => d[paramX])\n ])\n .range([0,width]);\n return xLinScale; \n }", "function plot(x) { \n var canvas = document.getElementById(\"canvas\"); \n var c = canvas.getContext(\"2d\"); \n var canvasStyle = window.getComputedStyle(canvas, null); \n var width = parseInt(canvasStyle.width);\n var height= parseInt(canvasStyle.height); \n var offset = (1 / (x.length - 1)) * width;\n var maxX = x.reduce(function(a, b) { return Math.max(a, b);});\n var minX = x.reduce(function(a, b) { return Math.min(a, b);});\n // scale the input values to be plotted\n function drawToScale(input) {\n return height - ( (input-minX)*height) / (maxX-minX); \n } \n // remove the previuous lines\n c.clearRect(0, 0, width, height) \n // plot the new ones\n c.beginPath();\n c.moveTo(0, drawToScale(x[0]));\n for (var i = 1; i < x.length; i++) {\n c.lineTo(i * offset, drawToScale(x[i]) );\n }\n c.stroke();\n }", "function xScaleUpdate(censusData, currentX) {\n // create scales\n var xScale = d3.scaleLinear()\n .domain([d3.min(censusData, d => d[currentX] - 1),\n d3.max(censusData, d => d[currentX])\n ])\n .range([0, chartWidth]);\n return xScale;\n }", "function scaling(x, y, z) {\n return [x, 0, 0, 0, 0, y, 0, 0, 0, 0, z, 0, 0, 0, 0, 1];\n}", "getXScale(width) {\n let domainValues = _.map(this.props.data, (d) => d[this.props.x]);\n let sortedVals = _.sortBy(domainValues, [(d) => {\n let rank = this.props.xRank[d];\n return (rank) ? rank : 8;\n \n }]);\n\n return scaleBand()\n .padding(this.props.padding)\n .domain(sortedVals)\n .range([this.props.margins.left, width - this.props.margins.left]);\n }", "function scaleValue(value){\n //Assuming army size is between \n}", "function scale_from_Rx(rx) {\n\tvar $container = $('#plotdiv');\n\t\n\t// First scale to the plot drawing zone\n\tvar draw_zone_width = $container.width() - scale[\"margin_left\"] - scale[\"margin_right\"];\n\tvar real_width = scale[\"current_end1\"] - scale[\"current_start1\"];\n\tvar xscale = real_width / draw_zone_width;\n\tvar new_x = (rx - scale[\"current_start1\"]) / xscale;\n\t\n\t// Then Change to the plotdiv coordinates\n\tnew_x = new_x + scale[\"margin_left\"];\n\t\n\t// Finally change to the coordinates of the page\n\tnew_x = new_x + $container.position().left;\n\t\t\n\treturn Math.floor(new_x);\n}", "scale(sx, sy, sz){\n let e = this.elements;\n e[0] *= sx; e[4] *= sy; e[8] *= sz;\n e[1] *= sx; e[5] *= sy; e[9] *= sz;\n e[2] *= sx; e[6] *= sy; e[10] *= sz;\n e[3] *= sx; e[7] *= sy; e[11] *= sz;\n return this;\n }", "function make_xScale(data, chosenX, chartWidth){\n var xScale = d3.scaleLinear()\n .domain([d3.min(data, d => d[chosenX]) * 0.9, d3.max(data, d => d[chosenX]) * 1.05])\n .range([0, +chartWidth]);\n return xScale;\n}", "function scale(s){\ndWidth = 90;\ndHeight = 45;\nwallHeight = 135;\n\ndWidth = dWidth * s;\ndHeight = dHeight * s;\nwallHeight = wallHeight * s;\n\n}", "static scale(dst, src, x, y) {\n dst[0] = x * src[0];\n dst[1] = x * src[1];\n dst[2] = x * src[2];\n\n dst[3] = y * src[3];\n dst[4] = y * src[4];\n dst[5] = y * src[5];\n\n dst[6] = src[6];\n dst[7] = src[7];\n dst[8] = src[8];\n return dst;\n }", "function scale(value) {\n return (canvasWidth / SCALE_WIDTH) * value;\n}", "function figureScale($scope, x1, y1){\r\n var x2 = $scope.east - $scope.west;\r\n var y2 = $scope.north - $scope.south;\r\n $scope.xFactor = x1/x2;\r\n $scope.yFactor = y1/y2;\r\n}", "function damageScale(x) {\n return Math.cbrt(x / 781250) * scaleWidth;\n }", "function createX(){\n line(0, 0, -vScale/2, -vScale/2);\n line(0, 0, vScale/2, -vScale/2);\n line(0, 0, vScale/2, vScale/2);\n line(0, 0, -vScale/2, vScale/2);\n}", "function drawHorizontalScale(ifDirty = false) {\n if (ifDirty && !worldSizeDirty)\n return;\n function drawTicks(/** @type {CanvasRenderingContext2D} */ ctx, pixelsPer, heightPer) {\n let total = heightPer.clone();\n total.value = math.unit(-config.x, \"meters\").toNumber(config.unit);\n\n // further adjust it to put the current position in the center\n\n total.value -= heightPer.toNumber(\"meters\") / pixelsPer * (canvasWidth + 50) / 2;\n let x = ctx.canvas.clientWidth - 50;\n\n\n let offset = total.toNumber(\"meters\") % heightPer.toNumber(\"meters\");\n\n x += offset / heightPer.toNumber(\"meters\") * pixelsPer;\n total = math.subtract(total, math.unit(offset, \"meters\"));\n\n for (; x >= 50 - pixelsPer; x -= pixelsPer) {\n // negate it so that the left side is negative\n drawTick(ctx, x, 50, math.multiply(-1, total));\n total = math.add(total, heightPer);\n }\n }\n\n function drawTick(/** @type {CanvasRenderingContext2D} */ ctx, x, y, value) {\n const oldStroke = ctx.strokeStyle;\n const oldFill = ctx.fillStyle;\n\n ctx.beginPath();\n ctx.moveTo(x, y);\n ctx.lineTo(x, y + 20);\n ctx.strokeStyle = \"#000000\";\n ctx.stroke();\n\n ctx.beginPath();\n ctx.moveTo(x, y + 20);\n ctx.lineTo(x, ctx.canvas.clientHeight - 70);\n ctx.strokeStyle = \"#aaaaaa\";\n ctx.stroke();\n\n ctx.beginPath();\n ctx.moveTo(x, ctx.canvas.clientHeight - 70);\n ctx.lineTo(x, ctx.canvas.clientHeight - 50);\n ctx.strokeStyle = \"#000000\";\n ctx.stroke();\n\n const oldFont = ctx.font;\n ctx.font = 'normal 24pt coda';\n ctx.fillStyle = \"#dddddd\";\n\n ctx.beginPath();\n ctx.fillText(value.format({ precision: 3 }), x + 35, y + 20);\n\n ctx.font = oldFont;\n ctx.strokeStyle = oldStroke;\n ctx.fillStyle = oldFill;\n }\n const canvas = document.querySelector(\"#display\");\n\n /** @type {CanvasRenderingContext2D} */\n\n const ctx = canvas.getContext(\"2d\");\n\n let pixelsPer = (ctx.canvas.clientHeight - 100) / config.height.toNumber();\n\n heightPer = 1;\n\n if (pixelsPer < config.minLineSize * 2) {\n const factor = math.ceil(config.minLineSize * 2/ pixelsPer);\n heightPer *= factor;\n pixelsPer *= factor;\n }\n\n if (pixelsPer > config.maxLineSize * 2) {\n const factor = math.ceil(pixelsPer / 2/ config.maxLineSize);\n heightPer /= factor;\n pixelsPer /= factor;\n }\n\n if (heightPer == 0) {\n console.error(\"The world size is invalid! Refusing to draw the scale...\");\n return;\n }\n heightPer = math.unit(heightPer, document.querySelector(\"#options-height-unit\").value);\n \n\n ctx.beginPath();\n ctx.moveTo(0, 50);\n ctx.lineTo(ctx.canvas.clientWidth, 50);\n ctx.stroke();\n ctx.beginPath();\n ctx.moveTo(0, ctx.canvas.clientHeight - 50);\n ctx.lineTo(ctx.canvas.clientWidth , ctx.canvas.clientHeight - 50);\n ctx.stroke();\n\n drawTicks(ctx, pixelsPer, heightPer);\n}", "function drawToScale(input) {\n return height - ( (input-minX)*height) / (maxX-minX); \n }", "function setupXScale()\n{\n\n x = d3.scaleTime()\n .range([0, width])\n .domain(d3.extent(Spain, function(d) { return d.x}));\n}", "setScale(sx, sy, sz){\n let e = this.elements;\n e[0] = sx; e[4] = 0; e[8] = 0; e[12] = 0;\n e[1] = 0; e[5] = sy; e[9] = 0; e[13] = 0;\n e[2] = 0; e[6] = 0; e[10] = sz; e[14] = 0;\n e[3] = 0; e[7] = 0; e[11] = 0; e[15] = 1;\n return this;\n }", "function xScale(brf,chosenXaxis){\n var xLinearScale=d3.scaleLinear()\n .domain([d3.min(brf,d=>d[chosenXaxis])*.8,\n d3.max(brf,d=>d[chosenXaxis])*1.2])\n .range([0,width]);\n // console.log(xLinearScale);\n return xLinearScale;\n}", "setScale(x,y,z=this.scale.z){\n this.scale.x = x;\n this.scale.y = y;\n }", "function xToGraph(x){\r\n\treturn (sciMonk.Width/sciMonk.CanvasWidth*(x - (sciMonk.CanvasWidth/2)))*0.5;\r\n}", "rescale(min, max) {\n if(min === 0){\n min = min + \"\";\n }\n if(max === 0){\n max = max + \"\";\n }\n this.x.domain([min || 30, max || 80]);\n\n this.xAxisElement\n .transition().duration(1500).ease(easeSinInOut) // https://github.com/mbostock/d3/wiki/Transitions#wiki-d3_ease\n .call(this.xAxis);\n\n for (let k in this.data) {\n // Add the valueline path.\n this.lineSvg.select(\".MECU\"+k)\n .transition().duration(1500).ease(easeSinInOut)\n .attr(\"d\", this.valueline(this.data[k].r));\n }\n }", "function center_x_to_canvas(x) {\n return canvas.width*x + 0.5*canvas.width;\n }", "convertX(x)\n\t{\n\t\treturn Dimensioning.cmToPixel(x - Dimensioning.pixelToCm(this.originX));\n//\t\treturn (x - (this.originX * this.cmPerPixel)) * this.pixelsPerCm;\n\t}", "function scale( s, v1 ) { return [ s * v1[0], s * v1[1], s * v1[2] ]; }", "function scaleX(passedX) {\n \"use strict\";\n var tempX = Number(passedX) + 400;\n return tempX;\n}", "function xScale(data, chosenXAxis) {\n var x_scale = d3.scaleLinear()\n .domain([d3.min(data, d => d[chosenXAxis]) * 0.8,\n d3.max(data, d => d[chosenXAxis] * 1.2)\n ])\n .range([0, width]); \n \n return x_scale;\n}", "function domainX(x) {\n x.domain([35,90])\n}", "setScale(xscale, yscale) {\n this.a = xscale\n this.e = yscale\n }", "static scale(c,v) {\n try {\n if (!(typeof(c) === \"number\") || !(v instanceof Vector))\n throw \"Vector.scale: malformed parameter\";\n else\n return(new Vector(c*v.x,c*v.y,c*v.z));\n } // end try\n \n catch(e) {\n console.log(e);\n return(new Vector(NaN,NaN,NaN));\n }\n }", "static setInverseScaleV3(xyz, s) {\nxyz[0] /= s;\nxyz[1] /= s;\nxyz[2] /= s;\nreturn xyz;\n}", "static scale(c,v) {\r\n try {\r\n if (!(typeof(c) === \"number\") || !(v instanceof Vector)){\r\n //throw \"Vector.scale: malformed parameter\";\r\n }\r\n\r\n else\r\n return(new Vector(c*v.x,c*v.y,c*v.z));\r\n } // end try\r\n\r\n catch(e) {\r\n console.log(e);\r\n return(new Vector(NaN,NaN,NaN));\r\n }\r\n }", "scaleToWidth(width) {\n let scaleFactor = width / this._sprite.width;\n this.scale.x = scaleFactor;\n this.scale.y = scaleFactor;\n }", "function xScale(depression, chosenXAxis) {\n // create scales\n var xLinearScale = d3.scaleLinear()\n .domain([d3.min(depression, d => d[chosenXAxis]) * 0.8,\n d3.max(depression, d => d[chosenXAxis]) * 1.2\n ])\n .range([0, width]);\n \n return xLinearScale;\n \n }", "updateDomainByBBox(b) {\n let x = this.xAxis.scale();\n x.domain([b[0], b[1]]);\n }", "function xScale(data,chosenXAxis){\n // create scales\n var xLinearScale=d3.scaleLinear()\n .domain([d3.min(data,d=>d[chosenXAxis])*0.8,\n d3.max(data,d=>d[chosenXAxis])*1.2])\n .range([0,width]);\n return xLinearScale;\n}", "function updateScales(width,height){\n\t\tscales[state].x.range([0, width]);\n\n\t\tscales[state].y.range([height,0]);\n\t}", "function xScale(census, chosenXAxis) {\n var xLinearScale = d3.scaleLinear()\n .domain([d3.min(census, d => d[chosenXAxis]) * 0.9,\n d3.max(census, d => d[chosenXAxis]) * 1.1])\n .range([0, width]);\n return xLinearScale;\n}", "function xScale(census, chosen_xAxis) {\n var xLinearScale = d3.scaleLinear()\n .domain([d3.min(census, (d) => d[chosen_xAxis] * 0.8),\n d3.max(census, (d) => d[chosen_xAxis] * 1.2)])\n .range([0, chartWidth]);\n \n return xLinearScale;\n}", "function xScale(censusData, chosenXAxis) {\n var xLinearScale = d3.scaleLinear()\n .domain([d3.min(censusData, d => d[chosenXAxis]) * 0.8,\n d3.max(censusData, d => d[chosenXAxis]) * 1.2])\n .range([0, width]);\n return xLinearScale;\n}", "function linearScale(domain, range, value) {\n\n return (value - domain[0]) / (domain[1] - domain[0]) * (range[1] - range[0]) + range[0];\n}", "function xNewScale(newXScale, xAxis) {\n var bottomAxis = d3.axisBottom(newXScale);\n\n xAxis.transition()\n .duration(1500)\n .call(bottomAxis);\n\n return xAxis;\n}", "function xScale(censusdata, chosenXAxis) {\n // create scales\n var xLinearScale = d3.scaleLinear()\n .domain([d3.min(censusdata, d => d[chosenXAxis]) * 0.8,\n d3.max(censusdata, d => d[chosenXAxis]) * 1.2\n ])\n .range([0, width]);\n\n return xLinearScale;\n\n}", "function xScale(srcData, axis) {\n // create scales\n var xLinearScale = d3\n .scaleLinear()\n .domain([\n d3.min(srcData, (d) => d[axis] * 0.8),\n d3.max(srcData, (d) => d[axis] * 1.2),\n ])\n .range([0, width]);\n return xLinearScale;\n}", "function xScale(binTicks){\n tickLocs = [];\n for (var i=0; i<binNum+1; i++){\n tickLocs.push((width/binNum)*(i));\n }\n var xOrdinalScale = d3.scaleOrdinal()\n .domain(binTicks)\n .range(tickLocs); // reference this when placing bars\n return xOrdinalScale;\n}", "function xScale(censusData, chosenXAxis) {\n var xLinearScale = d3.scaleLinear()\n .domain([\n d3.min(censusData, d => d[chosenXAxis]) * 0.95,\n d3.max(censusData, d => d[chosenXAxis]) * 1.05\n ])\n .range([0, chartWidth])\n .nice();\n return xLinearScale;\n}", "function zoomXform(x, lap) {\n\n // The x-axis domain.\n var domain = SCALES.x.domain();\n var step = domain[1] - domain[0];\n\n // What is the increment between each lap after zooming.\n var inc = lap <= domain[0] || lap >= domain[1] ?\n step / (ZOOM_PEAK + ZOOM_SHOULDER - 2.0 + step) :\n step / (ZOOM_PEAK + 2.0 * ZOOM_SHOULDER - 3.0 + step);\n\n // The zoom centre is mid-lap.\n lap += 3.0;\n\n // The transformed version of x.\n var z = 0.0;\n\n // Beyond upper shoulder.\n if (x > lap + 1.0) z = (x + ZOOM_PEAK + 2.0 * ZOOM_SHOULDER - 3.0) * inc;\n\n // Upper shoulder.\n else if (x > lap) z = ((x - lap + 1.0) * ZOOM_SHOULDER + lap + ZOOM_PEAK - 2.0) * inc;\n\n // Peak.\n else if (x > lap - 1.0) z = ((x - lap + 1.0) * ZOOM_PEAK + lap + ZOOM_SHOULDER - 2.0) * inc;\n\n // Lower shoulder.\n else if (x > lap - 2.0) z = ((x - lap + 2.0) * ZOOM_SHOULDER + lap - 2.0) * inc;\n\n // Below lower shoulder.\n else z = (x - domain[0]) * inc;\n\n return z;\n}", "function scaleUnits(val, axis){\n if (axis === 'y') {\n return cells(graphScale.yUnit) * val;\n }\n if (axis === 'x') {\n return cells(graphScale.xUnit) * val;\n }\n return 0; //maybe throw error instead\n}", "function xScale(healthData,chosenXAxis){\n let xLinearScale = d3.scaleLinear()\n .domain([d3.min(healthData, d=>d[chosenXAxis])*0.9, d3.max(healthData,d=>d[chosenXAxis])*1.1])\n .range([0,width])\n return xLinearScale;\n}", "set x(val) {\n this.width = val;\n }", "function make_x_axis() {\n return d3.svg.axis()\n .scale(x)\n .orient(\"bottom\");\n }", "function createScale ( domain, range ) {\n\tvar multiplier = ( range[1] - range[0] ) / ( domain[1] - domain[0] );\n\n\treturn function ( num ) {\n\t\treturn range[0] + multiplier * ( num - domain[0] );\n\t};\n}", "function xScale(censusData, chosenXAxis) {\n //scales\n var xLinearScale = d3.scaleLinear()\n .domain([d3.min(censusData, d => d[chosenXAxis]) * 0.8,\n d3.max(censusData, d => d[chosenXAxis]) * 1.2])\n .range([0, width]);\n\n return xLinearScale;\n}", "scaleImageToCanvasX(x) {\n var img = this.getImage();\n var canvas = this.getCanvas();\n return (x / (canvas.width / img.width)) * this.state.scale;\n }", "scale(val) {\n this._scale = val;\n return this;\n }", "scale(val) {\n this._scale = val;\n return this;\n }", "function xScale(universities2, chosenXAxis) {\n // create scales\n var xLinearScale = d3.scaleLinear()\n .domain([-50,\n 1600\n ])\n .range([0, width]);\n return xLinearScale;\n}", "function Scale() {\n var domain = new Normalizer(0, 1);\n var range = new Interpolater(0, 1);\n var s = function(val) {\n return range(domain(val));\n };\n s.domain = function(min, max) {\n if (!arguments.length) return domain;\n domain = new Normalizer(min, max)\n return s\n };\n s.range = function(min, max, clamp) {\n if (!arguments.length) return range;\n range = new Interpolater(min, max, clamp)\n return s\n };\n return s;\n}", "setScale(xScale, yScale) {\n this.m = [[xScale, 0], [0, yScale]];\n return this;\n }", "function X(d) {\n return xScale(d[0]);\n }", "function X(d) {\n return xScale(d[0]);\n }", "function X(d) {\n return xScale(d[0]);\n }", "function updateZoom(x)\n{\n var oldVal = parseInt(zoomValueLabel.innerHTML);\n if (x != false)\n {\n xOffset = (xOffset / oldVal * zoomValue) >> 0;\n yOffset = (yOffset / oldVal * zoomValue) >> 0;\n }\n zoomValueLabel.innerHTML = zoomValue;\n fillCanvas();\n}", "function dragpointScale() {\n var\n cssrule = '#'+self.cfg.stylesId+'{ #'+svgContainer.id+'_dragpoint }',\n scale = 0.0025 * Math.min( boxW, boxH );\n $.stylesheet(cssrule).css( 'transform', 'scale('+scale+')' );\n }", "function setScale(selector, value) {\n\t\t\tlet start = -2.2;\n\t\t\tlet end = 97.4;\n\t\t\tlet range = end - start;\n\n\t\t\t$(`${selector}.scale-space .tick`).css('left', `${range * value + start}%`)\n\t\t}", "function adjustToX() {\n\t\t\t\tnewWidth = startWidth + factorX * moveDiffX;\n\t\t\t\tnewHeight = Math.round(newWidth / ratio);\n\t\t\t}", "function xScale(healthData,chosenXAxis){\n var xLinearScale = d3.scaleLinear()\n .domain([d3.min(healthData,d => d[chosenXAxis])*0.8,\n d3.max(healthData,d => d[chosenXAxis])*1.2])\n .range([0,width]);\n return xLinearScale;\n}", "function xScale(healthData, chosenXAxis){\n var xLinearScale = d3.scaleLinear()\n .domain([d3.min(healthData, d => d[chosenXAxis]) * 0.95 ,d3.max(healthData, d => d[chosenXAxis]) * 1.05])\n .range([0,width]);\n \n return xLinearScale\n}", "function scaleCoord() {\r\n\r\n coord[0] = coordOG[0];\r\n coord[1] = coordOG[1];\r\n\r\n var minX = getMin(x);\r\n var minY = getMin(y);\r\n\r\n var scale = mapScale;\r\n\r\n //turn everything positive\r\n if(minX < 0){\r\n coord[0]+=Math.abs(minX);\r\n }\r\n if(minY < 0){\r\n coord[1]+=Math.abs(minY);\r\n }\r\n\r\n coord[0] *= scale;\r\n coord[1] *= scale;\r\n coord[1] = 800 - coord[1];\r\n\r\n\r\n coord[0] += xShift;\r\n coord[1] -= yShift;\r\n\r\n}" ]
[ "0.6643712", "0.6642108", "0.6470534", "0.62736326", "0.6267319", "0.6211961", "0.6177407", "0.6163881", "0.61566776", "0.61549944", "0.61160874", "0.61149037", "0.6095336", "0.60949224", "0.60704595", "0.6057193", "0.6051336", "0.60351753", "0.5988444", "0.59764487", "0.5957897", "0.5954832", "0.59540534", "0.58951074", "0.5891061", "0.58862007", "0.5883271", "0.58633435", "0.5831139", "0.5820812", "0.5804345", "0.57969624", "0.57949656", "0.57878834", "0.57768095", "0.57682675", "0.5766416", "0.57663393", "0.57475704", "0.5747039", "0.57369155", "0.57155263", "0.5715199", "0.57098085", "0.57093686", "0.57007086", "0.5697432", "0.56804943", "0.56766504", "0.56573457", "0.5649741", "0.5642795", "0.56359214", "0.5626097", "0.5623305", "0.56204796", "0.5618663", "0.56157446", "0.55979925", "0.5574142", "0.55638844", "0.55627656", "0.55606437", "0.5540584", "0.55337465", "0.5531251", "0.552656", "0.55241543", "0.5518431", "0.55177945", "0.5515782", "0.55144495", "0.5514324", "0.5512711", "0.5497768", "0.5494608", "0.5493347", "0.5491914", "0.54874736", "0.5487172", "0.548586", "0.54810756", "0.54625636", "0.54587024", "0.54566836", "0.545358", "0.545358", "0.5453499", "0.54426926", "0.5423978", "0.5422495", "0.5422495", "0.5422495", "0.54204875", "0.5418383", "0.54141045", "0.54128253", "0.5409351", "0.54072404", "0.54063743" ]
0.74863464
0
a < a + b
function vecAddInPlace(a, b) { for (var i = 0; i < a.length; i++) { a[i] += b[i]; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function value(a,b) {\r\na = a[1]+a[0];\r\nb = b[1]+b[0];\r\nreturn a == b ? 0 : (a < b ? -1 : 1)\r\n}", "function trueOrFalse(a , b) {\r\n return a < b;\r\n}", "function leq(a, b) {\n\t return a < b || eq(a, b);\n\t}", "function caml_lessthan (x, y) { return +(caml_compare(x,y,false) < 0); }", "function isLess(a, b) {\nreturn (a < b);\n}", "function oa(a,b){return a.end>b.start&&a.start<b.end}", "function isLess(a, b){\n return a < b;\n}", "lte(other) { return this.cmp(other) <= 0; }", "function isLess(a, b) {\n\treturn a < b;\n}", "function isLess(a, b) {\n return a < b;\n}", "function comparison(a, b) {\n return distance(operator, a) - distance(operator, b);\n }", "function min(a, b) {\n return (a < b && a) || b;\n}", "function sc_lessEqual(x, y) {\n for (var i = 1; i < arguments.length; i++) {\n\tif (x > arguments[i])\n\t return false;\n\tx = arguments[i];\n }\n return true;\n}", "function b(a,b){return-1!==b.indexOf(a)}", "function check(a, b) {\n if (a == 50 || b == 50 || (a + b) == 50) {\n console.log(true)\n } else {\n console.log(false)\n }\n}", "function leastToGreater (a,b){\n return a-b;\n}", "function lessThan100(a, b) {\n if (a + b < 100) {\n return true;\n }\n return false;\n}", "function a(x) {\n if (x[0] < x[1]) {\n return true;\n } else {\n return false;\n }\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function compare (a, b) {\n return a > b ? 1 : a < b ? -1 : 0\n}", "function check(a, b) {\n\t//je check si la somme est inférieure à 100 pour retourner true, sinon je retourne false\n\tif(a+b < 100){\n\t return true;\n\t} else {return false;}\n}", "function less_equal(x, y) {\r\n return less(x, y) || equal_to(x, y);\r\n}", "function greaterThanLessThan (a,b,c) {\nreturn (a < b < c)\n}", "function ascending(a, b) {\n return a - b;\n}", "function lessOrEqual (lhs, rhs) {\n return number(lhs) && lhs <= rhs;\n }", "function lt(a, b) {\n\t\treturn a < b;\n\t}", "function compare(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n}", "function bitor(a, b) {\n return a + b; \n }", "function compare(a, b) {\n\t return a < b ? -1 : a > b ? 1 : 0;\n\t}", "function compare(a, b) {\n\t return a < b ? -1 : a > b ? 1 : 0;\n\t}", "function compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}", "function compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}", "function compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}", "function compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}", "function compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}", "function caml_greaterequal (x, y) { return +(caml_compare(x,y,false) >= 0); }", "function isLess(a, b) {\n\tif(a < b) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function isEqualTo( a,b){\n if(a == 100 || b == 100 || (a + b) == 100){\n return true;\n }\n else{\n return false\n }\n}", "function isLess(a,b) {\n // if( a < b ){\n // return true;\n // } else {\n // return false;\n // }\n return a < b\n}", "function contains(a0, a1, b0, b1) {\n\ta0 = rnd(a0);\n\ta1 = rnd(a1);\n\tb0 = rnd(b0);\n\tb1 = rnd(b1);\n\n\treturn (b0 >= a0) && (b0 + b1 <= a0 + a1);\n}", "function e_test( a, b, n )\n\t\t{\n\t\t\tif (n >= a && b > n)\n\t\t\t\treturn 1;\n\t\t}", "function min(a, b){\n return a >= b ? b : a;\n}", "function areEqual(a, b) { \r\n var r = a - b;\r\n return (r >= 0 && r < .00001) || (r < 0 && r > -.00001); \r\n }", "function compare_asc(a, b) {\n return a - b;\n}", "function sc_greaterEqual(x, y) {\n for (var i = 1; i < arguments.length; i++) {\n\tif (x < arguments[i])\n\t return false;\n\tx = arguments[i];\n }\n return true;\n}", "function gte(x, y) {\n return lte (y, x);\n }", "function min(a, b) {\n if( a > b){return b}\n if( b > a){return a}\n else return \"both values are equal\";\n}", "function caml_lessequal (x, y) { return +(caml_compare(x,y,false) <= 0); }", "function less (lhs, rhs) {\n return number(lhs) && lhs < rhs;\n }", "function compare(a, b) {\n if (\"a is less than b by some ordering criterion\") {\n return -1;\n }\n if (\"a is greater than b by the ordering criterion\") {\n return 1;\n }\n // a must be equal to b\n return 0;\n }", "function compare(a, b) {\n if (a>b) return 1;\n if (a<b) return -1;\n }", "function positiveNegative(a, b) {\n return (a >= 0 && b < 0) || (a < 0 && b >= 0);\n}", "function notATriangle(a, b, c) {\n if ((a + b) <= c || (a + c) <= b || (b + c) <= a) return true;\n}", "function compare(a, b) {\n if (a < b) {\n return -1;\n }\n if (a > b) {\n return 1;\n }\n // a must be equal to b\n return 0;\n }", "function relation(a,b) {\n console.log(`${a} == ${b} : ${a == b}`);\n console.log(`${a} > ${b} : ${a > b}`);\n console.log(`${a} < ${b} : ${a < b}`);\n }", "function compare( a, b ) {\n\tif ( a === b )\n\t\treturn 0;\n\tif ( a < b )\n\t\treturn -1;\n\treturn 1;\n}", "function compare(a, b){\n if(a.value < b.value)\n return -1;\n if(a.value > b.value)\n return 1;\n return 0;\n}", "gt(other) { return this.cmp(other) > 0; }", "function dc(a, b) {\n if (a === b) {\n return 0;\n }\n if (a > b) {\n return 1;\n }\n return -1;\n}", "function isLessThan(num1, num2) {\n return num2 < num1 ? true : false;\n}", "function compare (a, b){\n return a > b;\n}", "function compare(a, b) {\n if (a < b) {\n return -1\n } else if (b < a) {\n return 1\n } else {\n return 0\n }\n}", "function lessThan100(num1,num2) {\n return num1+num2<100?true:false\n}", "function compare(a, b, less) {\n if (less) {\n return a < b\n } else {\n return a > b\n }\n}", "function gte(x, y) {\n return lte(y, x);\n }", "function GetSum(a, b) {\n\tlet total = 0;\n\tif (a === b) {\n\t\treturn a;\n\t}\n\tif (a < b) {\n\t\tfor (let i = a; i <= b; i++) {\n\t\t\ttotal += i;\n\t\t}\n\t\treturn total;\n\t}\n\tif (b < a) {\n\t\tfor (let i = b; i <= a; i++) {\n\t\t\ttotal += i;\n\t\t}\n\t\treturn total;\n\t}\n}", "lt(other) { return this.cmp(other) < 0; }", "function compare (a, b) {\n if (a > b) {\n return 1\n }\n else if (a < b) {\n return -1\n }\n return 0\n \n }", "function findGreaterOrEqual(a, b) {\n return (a === b) ? \"a and b are equal\" \n : (a > b) ? \"a is greater\" \n : \"b is greater\";\n}", "campare(a, b) {\n const EPS = 0.1;\n if (Math.abs(Math.abs(a) - Math.abs(b)) < EPS) {\n return true;\n }\n return false;\n }", "function evklid(a,b) {\n\twhile(a != b) {\n\t\tif (a > b) {\n\t\t\ta = a -b;\n\t\t} else {\n\t\t\tb = b- a;\n\t\t}\n\n\t}\n\treturn a;\n}", "function compare(a, b) {\n if (a < b) return -1;\n if (a > b) return 1;\n return 0;\n}", "lessThanOrEqual(other) {\n return this.comp(other) <= 0;\n }", "function compare(a,b) {\n if (a.x < b.x)\n return -1;\n if (a.x > b.x)\n return 1;\n return 0;\n }", "function lt(x, y) {\n return sameType (x, y) && !(lte (y, x));\n }", "function greater_equal(x, y) {\r\n return !less(x, y);\r\n}", "function plus(a, b) {\n return a === 0 ? b : plus(dec(a), inc(b));\n}", "function sum20 (a, b) {\n if (a == 20 || b == 20 || a + b == 20)\n return true\n else\n return false\n}", "function compareNumbers(x, y) {\n if (x < y) {\n return -1;\n }\n if (x > y) {\n return 1;\n }\n return 0;\n}", "function lessThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b];\n return dataArr[idx1] < dataArr[idx2];\n }", "function compareNumbers(a, b) {\n\treturn a - b;\n}", "function compareNumeric(a,b) {\n if (a > b) return 1;\n if (a == b) return 0;\n if (a < b) return -1;\n}", "compare(a, b) {\n if (a === b) return 0;\n return a < b ? -1 : 1;\n }", "compare(a, b) {\n if (a === b) {\n return 0;\n }\n \n return a < b ? -1 : 1;\n }", "function isLess(a, b) {\n // Fix this code\n return a < b;\n}", "function min(a,b)\n{\n\treturn (a>=b) ? b : a;\n}", "function boxIntersectCheck(a, b) {\n return !( a[0] > b[2] || b[0] > a[2] || a[1] > b[3] || b[1] > a[3] );\n}", "function lt(x, y) {\n return sameType(x, y) && !lte(y, x);\n }", "function comparisonNum(a, b) {\n\tif (a === b) { return true;}\n\t else if(a != b){ return false;}\n}" ]
[ "0.7480131", "0.72488934", "0.70138186", "0.7001488", "0.69295", "0.6922856", "0.6857376", "0.6840853", "0.6807872", "0.67854613", "0.67831695", "0.6754036", "0.6751464", "0.6732615", "0.67323667", "0.66767365", "0.6668829", "0.6648537", "0.66417205", "0.66417205", "0.66417205", "0.66417205", "0.66417205", "0.66417205", "0.66417205", "0.66417205", "0.66417205", "0.66417205", "0.66417205", "0.66417205", "0.66417205", "0.66417205", "0.66297036", "0.6629533", "0.662709", "0.6596223", "0.6594662", "0.6587127", "0.65858406", "0.6573293", "0.65660274", "0.65660274", "0.65542996", "0.65542996", "0.65542996", "0.65542996", "0.65542996", "0.6550975", "0.65453804", "0.6544068", "0.6537202", "0.65207106", "0.6499753", "0.64844096", "0.64792657", "0.6475903", "0.64591867", "0.6458029", "0.6446456", "0.6444548", "0.64175916", "0.6413841", "0.64114237", "0.64092267", "0.6407874", "0.63993", "0.639805", "0.63909924", "0.63904506", "0.6385396", "0.6379154", "0.6366297", "0.6363088", "0.6356455", "0.6355292", "0.6354236", "0.63447744", "0.63435286", "0.63364154", "0.6333863", "0.6333825", "0.6327704", "0.6322163", "0.6321274", "0.6318082", "0.63080704", "0.62957937", "0.6294944", "0.62943214", "0.6286031", "0.62854743", "0.6285094", "0.62758666", "0.62717843", "0.6271624", "0.6264448", "0.626315", "0.6261651", "0.626137", "0.6256147", "0.62525487" ]
0.0
-1
Takes a nutrient vector and returns its color as a hex string ffffff
function nutrientColor(nut) { return colorToString(colorLerp(nut, CHEMICAL_COLORS)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getHexColorValue() {\n let hexRepresentation = _.map(_.slice(this.props.value, 0, 3), (val)=>{\n let hexVal = val.toString(16);\n return hexVal.length === 1 ? '0' + hexVal : hexVal;\n }).join('');\n return '#' + hexRepresentation;\n }", "function fullColorString(clr, a) {\n return \"#\" + ((Math.ceil(a*255) + 256).toString(16).substr(1, 2) +\n clr.toString().substr(1, 6)).toUpperCase();\n}", "vaxiColor(n) {\n return n >= 100 ? 'hsl(139, 100%, 17%)':\n n > 75 ? 'hsl(139, 100%, 27%)':\n n > 60 ? 'hsl(139, 100%, 32%)':\n n > 50 ? 'hsl(139, 100%, 37%)':\n n > 45 ? 'hsl(139, 100%, 42%)':\n n > 40 ? 'hsl(139, 100%, 47%)':\n n > 35 ? 'hsl(139, 100%, 52%)':\n n > 30 ? 'hsl(139, 100%, 57%)':\n n > 25 ? 'hsl(139, 100%, 62%)':\n n > 20 ? 'hsl(139, 100%, 67%)':\n n > 15 ? 'hsl(139, 100%, 72%)':\n n > 10 ? 'hsl(139, 100%, 77%)':\n n > 5 ? 'hsl(139, 100%, 87%)':\n n > 3 ? 'hsl(139, 100%, 92%)':\n n > 2 ? 'hsl(139, 100%, 95%)':\n n > 1 ? 'hsl(139, 100%, 97%)':\n 'hsl(139, 100%, 99%)';\n }", "function convertVelocityToBackgroundColor(x) {\n\tx++;\n\tvar blue = 196-x;\n\tvar red = 2*x;\n\tvar output = '#' + (red*65536 + blue).toString(16);\n\treturn output;\n}", "function get_color(i, v, n) {\n var color_list = [\n d3.rgb(0, 0, 0), //black\n d3.rgb(230, 159, 0), // orange\n d3.rgb(86, 180, 233), // sky blue\n d3.rgb(0, 158, 115), // bluish green\n d3.rgb(240, 228, 66), // yellow\n d3.rgb(0, 114, 178), // blue\n d3.rgb(213, 94, 0), // vermilion\n d3.rgb(204, 121, 167) // reddish purple\n ];\n if (v === (false || null)) {\n return '#eeeeee';\n }\n var c = color_list[(i + 8) % 8],\n m = 3,\n r = (255 - (255 - c.r) / m - c.r) * (n - v) / n + c.r,\n g = (255 - (255 - c.g) / m - c.g) * (n - v) / n + c.g,\n b = (255 - (255 - c.b) / m - c.b) * (n - v) / n + c.b\n ;\n return d3.rgb(r, g, b);\n }", "function getColor(value) {\n // More votes for republican, show red\n var red = 0;\n var blue = 0;\n var green = 0;\n if (value > 1) {\n var trimmed_value = Math.min(value, 3);\n red = 255;\n blue = Math.round((1 - trimmed_value / 3) * 255);\n green = Math.round((1 - trimmed_value / 3) * 255);\n trimmed_value = null;\n } else if (value == 1) {\n return \"#FFFFFF\";\n } else if (value < 1) {\n var trimmed_value = 1 / value;\n trimmed_value = Math.min(trimmed_value, 3);\n blue = 255;\n red = Math.round((1 - trimmed_value / 3) * 255);\n green = Math.round((1 - trimmed_value / 3) * 255);\n trimmed_value = null;\n }\n var second = red % 16;\n var first = (red - second) / 16;\n var fourth = green % 16;\n var third = (green - fourth) / 16;\n var sixth = blue % 16;\n var fifth = (blue - sixth) / 16;\n return (\"#\" + first.toString(16) + second.toString(16) + third.toString(16) + fourth.toString(16) + fifth.toString(16) + sixth.toString(16));\n }", "function getTintedColor(color, v) {\n if (color.length > 6) {color = color.substring(1, color.length)}\n var rgb = parseInt(color, 16); \n var r = Math.abs(((rgb >> 16) & 0xFF)+v); if (r>255) r = 255;\n var g = Math.abs(((rgb >> 8) & 0xFF)+v); if (g>255) g = 255;\n var b = Math.abs((rgb & 0xFF)+v); if (b>255) b = 255;\n r = Number(r < 0 || isNaN(r)) ? 0 : ((r > 255) ? 255 : r).toString(16); \n if (r.length == 1) r = '0' + r;\n g = Number(g < 0 || isNaN(g)) ? 0 : ((g > 255) ? 255 : g).toString(16); \n if (g.length == 1) g = '0' + g;\n b = Number(b < 0 || isNaN(b)) ? 0 : ((b > 255) ? 255 : b).toString(16); \n if (b.length == 1) b = '0' + b;\n return \"#\" + r + g + b;\n }", "function getFullColorString(color) {\r\n return \"#\" + hsv2hex(color.h, MAX_COLOR_SATURATION, MAX_COLOR_VALUE);\r\n}", "toHexString() {\n const intR = (this.r * 255) || 0;\n const intG = (this.g * 255) || 0;\n const intB = (this.b * 255) || 0;\n const intA = (this.a * 255) || 0;\n return \"#\" + _1.Scalar.ToHex(intR) + _1.Scalar.ToHex(intG) + _1.Scalar.ToHex(intB) + _1.Scalar.ToHex(intA);\n }", "function colorToString(value) {\n function toHex(v) {\n // eslint-disable-next-line\n return (Math.round(v * 255) | 1 << 8).toString(16).slice(1);\n }\n\n var red = toHex(value.red());\n var green = toHex(value.green());\n var blue = toHex(value.blue());\n var alpha = toHex(value.alpha());\n return \"#\".concat(red).concat(green).concat(blue).concat(alpha);\n}", "function make_color(v)\n\t{\n\t\tconst c_table = [0, 85, 171, 255]; // Color table for rgb\n\t\t\n\t\t// Data is in 0b00RRGGBB format\n\t\tvar r = c_table[(v >> 4) & 0x03];\n\t\tvar g = c_table[(v >> 2) & 0x03];\n\t\tvar b = c_table[v & 0x03];\n\t\t\n\t\treturn (0xff << 24) + (b << 16) + (g << 8) + r;\n\t}", "function colour() {\n //let c = Math.random();\n //console.log(c);\n //c = c.toString(16)\n //console.log(c)\n return '#' + Math.random().toString(16).substring(2,8); //substring (2,8) \n}", "function color (i){\n\tif (i===0){\n\t\treturn \"rgb(1, 95, 102)\";\n\t} else if (i===1) {\n\t\treturn \"rgb(45, 241, 255)\";\n\t} else if (i===2) {\n\t\treturn \"rgb(34, 86, 150)\";\n\t} else if (i===3) {\n\t\treturn \"rgb(0, 132, 88)\";\n\t} else if (i===4) {\n\t\treturn \"rgb(56, 255, 188)\";\n\t} else if (i===5) {\n\t\treturn \"rgb(77, 168, 137)\";\n\t} else {\n\t\treturn \"rgb(1, 95, 102)\";\n\t}\n}", "toHexColor() {\n const R = this.R.toHex().valueOf();\n const G = this.G.toHex().valueOf();\n const B = this.B.toHex().valueOf();\n return new HexColor(`#${R}${G}${B}`);\n }", "function uvColor (index) {\n if (index > 0 && index < 3 ) {\n green (index)\n }\n else if (index > 3 && index < 5 ) {\n yellow (index)\n }\n else if (index > 3 && index < 5 ) {\n yellow (index)\n }\n else if (index > 5 && index < 8 ) {\n orange (index)\n }\n else if (index > 8 && index < 11 ) {\n red (index)\n }\n else if (index > 11) {\n violet (index)\n }\n $(`#uvIndex2`).html(`\n <span> ${ index }</span>\n `) \n }", "function getColor(value) {\n var hue = ((1 - value) * 200).toString(10);\n return [\"hsl(\", hue, \",100%,50%)\"].join(\"\");\n }", "function dopolnitCol(hex) {\r\nvar a = hex.split(\"(\")[1].split(\")\")[0];\r\na = a.split(\",\");\r\nreturn \"rgb(\"+(255-Number(a[0])).toString()+\", \"+(255-Number(a[1])).toString()+\", \"+(255-Number(a[2])).toString()+\")\"\r\n}", "function colorValue() {\n return randomHex() + randomHex();\n}", "function color(n) {\r\n // rgb\r\n return `hsl(${n * quickcol * 360},100%,50%)`;\r\n // default\r\n return `hsl(${n * quickcol * 360},${20+n*quickcol*50}%,${n * quickcol * 100}%)`;\r\n // gray-scaled\r\n return `hsl(0, 0%, ${100 - n * quickcol * 100}%)`;\r\n}", "toHexColor() {\n const R = this.R.toHex().valueOf();\n const G = this.G.toHex().valueOf();\n const B = this.B.toHex().valueOf();\n return new HexColor(`#${R}${G}${B}`);\n }", "function getColour(value) {\n var hue = ((1 - value) * 120).toString(10);\n return [`hsl(${hue}, 100%, 50%)`].join(\"\");\n}", "function uuid2color(uuid) {\r\n var col = 1;\r\n for (var i = 0; i < uuid.length; i++) {\r\n var cc = uuid.charCodeAt(i);\r\n col = (col * cc) % 0xffffff;\r\n }\r\n return [(col >> 16) & 0xff, (col >> 8) & 0xff, col & 0xff];\r\n}", "getColor(value) {\n // Test Max\n if (value === 255) {\n console.log(\"MAX!\");\n }\n let percent = (value) / 255 * 50;\n // return 'rgb(V, V, V)'.replace(/V/g, 255 - value);\n return 'hsl(H, 100%, P%)'.replace(/H/g, 255 - value).replace(/P/g, percent);\n }", "getColor(){\n\t\tvar r, g, b, a;\n\t\tvar hex = this.valueOf('color'); // always gets a hex string (ex., #rrggbb)\n\t\ta = this.valueOf('opacity');\n\t\tr = parseInt(hex.substring(1,3), 16);\n\t\tg = parseInt(hex.substring(3,5), 16);\n\t\tb = parseInt(hex.substring(5,7), 16);\n\t\treturn 'rgba('+r+','+g+','+b+','+a+')';\n\t}", "getColor() {\n var i = (this.speed * 255) / 255;\n var r = Math.round(Math.sin(0.024 * i + 0) * 127 + 128);\n var g = Math.round(Math.sin(0.024 * i + 2) * 127 + 128);\n var b = Math.round(Math.sin(0.024 * i + 4) * 127 + 128);\n var rgb = \"rgb(\" + r + \",\" + g + \",\" + b + \")\";\n\n return rgb;\n }", "function getColor(value) {\n value = value / 100\n var hue = ((1 - value) * 120).toString(10);\n return [\"hsl(\", hue, \",100%,50%)\"].join(\"\");\n }", "function uviColor(uvIndx){\n n = parseFloat(uvIndx);\n\n if (n <=2) {\n return \"#76A942\";\n } else if (n<=5) {\n return \"#F7ED00\";\n } else if (n<=7) {\n return \"#E1AF33\";\n } else if (n<=10) {\n return \"#C42B00\";\n } else {\n return \"#603BBF\";\n }\n}", "getColor(value) {\n let normalizeValue = 0;\n if (value >= 50) {\n normalizeValue = 100 - (value / 100);\n } else {\n normalizeValue = ((value / 100) - 100) * -1;\n }\n\n const hue = ((1 - normalizeValue) * 120).toString(10);\n\n return [\"hsl(\", hue, \", 100%, 50%)\"].join(\"\");\n }", "toString() {\n /* if (this.alpha < 1.0) {*/\n return 'rgba(' + this.rgb.map(function (c) {\n return Math.round(c);\n }).concat(this.alpha).join(', ') + ')';\n /*} else {\n return '#' + this.rgb.map(function(i) {\n i = Math.round(i);\n i = (i > 255 ? 255 : (i < 0 ? 0 : i)).toString(16);\n return i.length === 1 ? '0' + i : i;\n }).join('');\n }*/\n }", "function hexcode(v) { return v < 10 ? 0x30 + v : 0x61 + v - 10 }", "function gnomeColor(color) {\n\t\t\t\treturn color.toString().replace(/#(.{2})(.{2})(.{2})/, '#$1$1$2$2$3$3');\n\t\t\t}", "function gnomeColor(color) {\n\t\t\t\treturn color.toString().replace(/#(.{2})(.{2})(.{2})/, '#$1$1$2$2$3$3');\n\t\t\t}", "function uviColors(uv) {\n if (uv < 3) {\n return \"green\";\n }\n else if (uv >= 3 && uv < 6) {\n return \"yellow\";\n }\n else if (uv >= 6 && uv < 8) {\n return \"orange\";\n }\n else if (uv >= 8 && uv <= 10) {\n return \"red\"\n }\n else return \"purple\";\n }", "function toHex(c) {\n var m = c.match(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)/);\n // short skirt to long jacket\n return (m ? rgb(m[1], m[2], m[3]) : c).replace(/#(\\w)(\\w)(\\w)$/, '#$1$1$2$2$3$3');\n }", "function toColorHex(value) {\n let colorHex = value.toString(16);\n\n if(colorHex.length < 2) {\n colorHex = `0${colorHex}`;\n }\n\n return colorHex;\n}", "function rgb(...values) {\n let hex = [];\n for (let val of values) {\n if (val > 255) {\n hex.push('FF');\n } else if (val < 0) {\n hex.push('00');\n } else {\n hex.push(val.toString(16).toUpperCase());\n }\n }\n \n return hex.map(a => {\n return a.length < 2 ? a = 0 + a : a;\n }).join('')\n}", "function colorRGB(){\n var coolor = \"(\"+generarNumero(255)+\",\" + generarNumero(255) + \",\" + generarNumero(255) +\")\";\n return \"rgb\" + coolor;\n }", "function color(magnitude){\n\n if (magnitude > 5){\n return 'red'\n } else if (magnitude > 4){\n return 'orange'\n } else if (magnitude > 3){\n return 'yellow'\n } else if (magnitude > 2){\n return 'green'\n } else if (magnitude > 1){\n return 'lightblue'\n } else {\n return 'purple'\n }\n }", "function getFullColorString(color) {\n return \"#\" + hsv2hex_1.hsv2hex(color.h, consts_1.MAX_COLOR_SATURATION, consts_1.MAX_COLOR_VALUE);\n }", "function perc2color(perc) {\n\tvar r, g, b = 0;\n\tif(perc < 50) {\n\t\tr = 255;\n\t\tg = Math.round(5.1 * perc);\n\t}\n\telse {\n\t\tg = 255;\n\t\tr = Math.round(510 - 5.10 * perc);\n\t}\n\tvar h = r * 0x10000 + g * 0x100 + b * 0x1;\n\treturn '#' + ('000000' + h.toString(16)).slice(-6);\n}", "function getColor(magnitude) {\n if (magnitude > 5) {\n return \"#ea2c2c\";\n }\n if (magnitude > 4) {\n return \"#ea822c\";\n }\n if (magnitude > 3) {\n return \"#ee9c00\";\n }\n if (magnitude > 2) {\n return \"#eecc00\";\n }\n if (magnitude > 1) {\n return \"#d4ee00\";\n }\n return \"#98ee00\";\n}", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 6:\n return \"purple\";\n case magnitude > 5:\n return \"maroon\";\n case magnitude > 4:\n return \"red\";\n case magnitude > 3:\n return \"darkorange\";\n case magnitude > 2:\n return \"yellow\";\n case magnitude > 1:\n return \"lime\";\n default:\n return \"green\";\n }\n }", "function getColor(magnitude) {\n if (magnitude > 5) {\n return \"#ea2c2c\";\n }\n if (magnitude > 4) {\n return \"#ea822c\";\n }\n if (magnitude > 3) {\n return \"#ee9c00\";\n }\n if (magnitude > 2) {\n return \"#eecc00\";\n }\n if (magnitude > 1) {\n return \"#d4ee00\";\n }\n return \"#98ee00\";\n}", "function toHex(d) {\n let r = djb2('red' + d)\n let g = djb2('green' + d)\n let b = djb2('blue' + d)\n\n let red = Math.abs((r + 85) % 240) + 30\n let green = Math.abs((g + 170) % 240) + 30\n let blue = Math.abs(b % 240) + 30\n\n red = red < 255 ? red : 255\n green = green < 255 ? green : 255\n blue = blue < 255 ? blue : 255\n\n return (\n ('0' + Number(red).toString(16)).slice(-2) +\n ('0' + Number(green).toString(16)).slice(-2) +\n ('0' + Number(blue).toString(16)).slice(-2)\n )\n}", "function colorString(color) {\n return `${color[0]} ${color[1]} ${color[2]}`;\n }", "function newHexColor() {\n\tvar letters = \"0123456789ABCDEF\";\n\tvar color = \"#\";\n\tfor (var i = 0; i < 6; i++) {\n\t\tcolor += letters[Math.floor(Math.random() * 16)];\n\t}\n\treturn color;\n}", "function getColor(magnitude) {\r\n if (magnitude > 5) {\r\n return \"#ea2c2c\";\r\n }\r\n if (magnitude > 4) {\r\n return \"#ea822c\";\r\n }\r\n if (magnitude > 3) {\r\n return \"#ee9c00\";\r\n }\r\n if (magnitude > 2) {\r\n return \"#eecc00\";\r\n }\r\n if (magnitude > 1) {\r\n return \"#d4ee00\";\r\n }\r\n return \"#98ee00\";\r\n}", "function paintColor(d, i){\n if (i < n){\n tog(color, i / ( n + 2) );\n } else {\n var k = Math.floor(i/n);\n var num = ( 2 * k + 1);\n var dem = Math.pow(2, Math.ceil( Math.log(k + 1) / Math.LN2 ));\n var added = ( num / dem ) % 1;\n tog(color, (i % n + added) / ( n + 2) );\n }\n vec3.scale( color, color, 100);\n \n return [\n \"color:rgb( \", \n Math.round(color[0]), \"%,\", \n Math.round(color[1]), \"%,\",\n Math.round(color[2]), \"% )\"\n ].join(\"\");\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n }\n }", "function displayHex() {\n document.getElementById('hex').textContent = fullColorHex(r, g, b);\n}", "function Qcolor(magnitude) {\n if (magnitude >= 5) {\n return \"#990000\";} \n else if (magnitude >= 4 && magnitude <5) {\n return \"#D60000\";} \n else if (magnitude >= 3 && magnitude <4) {\n return \"#FF4848\";} \n else if (magnitude >= 2 && magnitude <3){\n return \"#FFB0B0\";} \n else if (magnitude >= 1 && magnitude <2){\n return \"#FFCACA\"; } \n else if (magnitude < 1){\n return \"#FFE4E4\";} \n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n }\n }", "function convertColorComponent(input) {\n var result = input.toString(16);\n if (result.length < 2) {\n result = '0' + result;\n }\n return result;\n}", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n }\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n }\n }", "function hex( c ) {\n var m = /rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)/.exec(c);\n return m ? '#' + (1 << 24 | m[1] << 16 | m[2] << 8 | m[3]).toString(16).substr(1) : c;\n}", "function gam_sRGB(v) {\n if (v <= 0.0031308) {\n v *= 12.92;\n } else {\n v = 1.055 * Math.pow(v, 1.0/2.4) - 0.055;\n }\n return Math.round(v*255);\n}", "pack(v) {\n let bias = [1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0];\n\n let r = v;\n let g = this.fract(r * 255.0);\n let b = this.fract(g * 255.0);\n let a = this.fract(b * 255.0);\n let colour = [r, g, b, a];\n\n let dd = [colour[1]*bias[0],colour[2]*bias[1],colour[3]*bias[2],colour[3]*bias[3]];\n\n return [colour[0]-dd[0],colour[1]-dd[1],colour[2]-dd[2],colour[3]-dd[3] ];\n }", "function uviColor(uvi) {\n if (uvi < 3) {\n return \"#289500\"; // green\n } else if (uvi < 6) {\n return \"#F7E400\"; // yellow\n } else if (uvi < 8) {\n return \"#F85900\"; // orange\n } else if (uvi < 11) {\n return \"#D80010\"; // red\n } else {\n return \"#6B49C8\"; // purple\n }\n}", "function heatMapColorforValue(value){\n const h = (1.0 - value) * 240;\n return \"hsl(\" + h + \", 100%, 50%)\";\n }", "function getUVcolor(uvi) {\n var backgroundColor = \"\"; \n if (!(Number.isNaN(uvi))) {\n if (uvi < 4) {\n backgroundColor = \"bg-success\";\n }\n else if (uvi < 8) {\n backgroundColor = \"bg-warning\";\n }\n else {\n backgroundColor = \"bg-danger\";\n }\n }\n return backgroundColor;\n }", "randomHexValue() {\n var color = '#';\n var c = '0123456789ABCDEF'.split('');\n\n for (var i = 0; i < 6; i++) {\n color += c[Math.floor(Math.random() * c.length)];\n }\n\n return color;\n }", "rgbToHex(r, g, b) {\n return (\"#\" +\n this.componentToHex(r) +\n this.componentToHex(g) +\n this.componentToHex(b));\n }", "static color() {\n return '#' + Math.floor(Math.random() * 16777215).toString(16)\n }", "function generateColorFromValue(value) {\n\tnormalizedValue = value / 100; // Normalize\n\tvar hue=((1-normalizedValue)*120).toString(10);\n\t\n\t// Get alpha gradient from 0 to 50\n\tvar alpha = normalizedValue * 3;\n\talpha = alpha > 1 ? 1 : alpha;\n\n return [\"hsla(\" + hue + \",100%,50%,\" + alpha + \")\"].join(\"\");\n}", "function color() {\n var map = {\n \"black\" : [ 0/255,0/255,0/255 ],\n \"silver\": [ 192/255,192/255,192/255 ],\n \"gray\" : [ 128/255,128/255,128/255 ],\n \"white\" : [ 255/255,255/255,255/255 ],\n \"maroon\": [ 128/255,0/255,0/255 ],\n \"red\" : [ 255/255,0/255,0/255 ],\n \"purple\": [ 128/255,0/255,128/255 ],\n \"fuchsia\": [ 255/255,0/255,255/255 ],\n \"green\" : [ 0/255,128/255,0/255 ],\n \"lime\" : [ 0/255,255/255,0/255 ],\n \"olive\" : [ 128/255,128/255,0/255 ],\n \"yellow\": [ 255/255,255/255,0/255 ],\n \"navy\" : [ 0/255,0/255,128/255 ],\n \"blue\" : [ 0/255,0/255,255/255 ],\n \"teal\" : [ 0/255,128/255,128/255 ],\n \"aqua\" : [ 0/255,255/255,255/255 ],\n \"aliceblue\" : [ 240/255,248/255,255/255 ],\n \"antiquewhite\" : [ 250/255,235/255,215/255 ],\n \"aqua\" : [ 0/255,255/255,255/255 ],\n \"aquamarine\" : [ 127/255,255/255,212/255 ],\n \"azure\" : [ 240/255,255/255,255/255 ],\n \"beige\" : [ 245/255,245/255,220/255 ],\n \"bisque\" : [ 255/255,228/255,196/255 ],\n \"black\" : [ 0/255,0/255,0/255 ],\n \"blanchedalmond\" : [ 255/255,235/255,205/255 ],\n \"blue\" : [ 0/255,0/255,255/255 ],\n \"blueviolet\" : [ 138/255,43/255,226/255 ],\n \"brown\" : [ 165/255,42/255,42/255 ],\n \"burlywood\" : [ 222/255,184/255,135/255 ],\n \"cadetblue\" : [ 95/255,158/255,160/255 ],\n \"chartreuse\" : [ 127/255,255/255,0/255 ],\n \"chocolate\" : [ 210/255,105/255,30/255 ],\n \"coral\" : [ 255/255,127/255,80/255 ],\n \"cornflowerblue\" : [ 100/255,149/255,237/255 ],\n \"cornsilk\" : [ 255/255,248/255,220/255 ],\n \"crimson\" : [ 220/255,20/255,60/255 ],\n \"cyan\" : [ 0/255,255/255,255/255 ],\n \"darkblue\" : [ 0/255,0/255,139/255 ],\n \"darkcyan\" : [ 0/255,139/255,139/255 ],\n \"darkgoldenrod\" : [ 184/255,134/255,11/255 ],\n \"darkgray\" : [ 169/255,169/255,169/255 ],\n \"darkgreen\" : [ 0/255,100/255,0/255 ],\n \"darkgrey\" : [ 169/255,169/255,169/255 ],\n \"darkkhaki\" : [ 189/255,183/255,107/255 ],\n \"darkmagenta\" : [ 139/255,0/255,139/255 ],\n \"darkolivegreen\" : [ 85/255,107/255,47/255 ],\n \"darkorange\" : [ 255/255,140/255,0/255 ],\n \"darkorchid\" : [ 153/255,50/255,204/255 ],\n \"darkred\" : [ 139/255,0/255,0/255 ],\n \"darksalmon\" : [ 233/255,150/255,122/255 ],\n \"darkseagreen\" : [ 143/255,188/255,143/255 ],\n \"darkslateblue\" : [ 72/255,61/255,139/255 ],\n \"darkslategray\" : [ 47/255,79/255,79/255 ],\n \"darkslategrey\" : [ 47/255,79/255,79/255 ],\n \"darkturquoise\" : [ 0/255,206/255,209/255 ],\n \"darkviolet\" : [ 148/255,0/255,211/255 ],\n \"deeppink\" : [ 255/255,20/255,147/255 ],\n \"deepskyblue\" : [ 0/255,191/255,255/255 ],\n \"dimgray\" : [ 105/255,105/255,105/255 ],\n \"dimgrey\" : [ 105/255,105/255,105/255 ],\n \"dodgerblue\" : [ 30/255,144/255,255/255 ],\n \"firebrick\" : [ 178/255,34/255,34/255 ],\n \"floralwhite\" : [ 255/255,250/255,240/255 ],\n \"forestgreen\" : [ 34/255,139/255,34/255 ],\n \"fuchsia\" : [ 255/255,0/255,255/255 ],\n \"gainsboro\" : [ 220/255,220/255,220/255 ],\n \"ghostwhite\" : [ 248/255,248/255,255/255 ],\n \"gold\" : [ 255/255,215/255,0/255 ],\n \"goldenrod\" : [ 218/255,165/255,32/255 ],\n \"gray\" : [ 128/255,128/255,128/255 ],\n \"green\" : [ 0/255,128/255,0/255 ],\n \"greenyellow\" : [ 173/255,255/255,47/255 ],\n \"grey\" : [ 128/255,128/255,128/255 ],\n \"honeydew\" : [ 240/255,255/255,240/255 ],\n \"hotpink\" : [ 255/255,105/255,180/255 ],\n \"indianred\" : [ 205/255,92/255,92/255 ],\n \"indigo\" : [ 75/255,0/255,130/255 ],\n \"ivory\" : [ 255/255,255/255,240/255 ],\n \"khaki\" : [ 240/255,230/255,140/255 ],\n \"lavender\" : [ 230/255,230/255,250/255 ],\n \"lavenderblush\" : [ 255/255,240/255,245/255 ],\n \"lawngreen\" : [ 124/255,252/255,0/255 ],\n \"lemonchiffon\" : [ 255/255,250/255,205/255 ],\n \"lightblue\" : [ 173/255,216/255,230/255 ],\n \"lightcoral\" : [ 240/255,128/255,128/255 ],\n \"lightcyan\" : [ 224/255,255/255,255/255 ],\n \"lightgoldenrodyellow\" : [ 250/255,250/255,210/255 ],\n \"lightgray\" : [ 211/255,211/255,211/255 ],\n \"lightgreen\" : [ 144/255,238/255,144/255 ],\n \"lightgrey\" : [ 211/255,211/255,211/255 ],\n \"lightpink\" : [ 255/255,182/255,193/255 ],\n \"lightsalmon\" : [ 255/255,160/255,122/255 ],\n \"lightseagreen\" : [ 32/255,178/255,170/255 ],\n \"lightskyblue\" : [ 135/255,206/255,250/255 ],\n \"lightslategray\" : [ 119/255,136/255,153/255 ],\n \"lightslategrey\" : [ 119/255,136/255,153/255 ],\n \"lightsteelblue\" : [ 176/255,196/255,222/255 ],\n \"lightyellow\" : [ 255/255,255/255,224/255 ],\n \"lime\" : [ 0/255,255/255,0/255 ],\n \"limegreen\" : [ 50/255,205/255,50/255 ],\n \"linen\" : [ 250/255,240/255,230/255 ],\n \"magenta\" : [ 255/255,0/255,255/255 ],\n \"maroon\" : [ 128/255,0/255,0/255 ],\n \"mediumaquamarine\" : [ 102/255,205/255,170/255 ],\n \"mediumblue\" : [ 0/255,0/255,205/255 ],\n \"mediumorchid\" : [ 186/255,85/255,211/255 ],\n \"mediumpurple\" : [ 147/255,112/255,219/255 ],\n \"mediumseagreen\" : [ 60/255,179/255,113/255 ],\n \"mediumslateblue\" : [ 123/255,104/255,238/255 ],\n \"mediumspringgreen\" : [ 0/255,250/255,154/255 ],\n \"mediumturquoise\" : [ 72/255,209/255,204/255 ],\n \"mediumvioletred\" : [ 199/255,21/255,133/255 ],\n \"midnightblue\" : [ 25/255,25/255,112/255 ],\n \"mintcream\" : [ 245/255,255/255,250/255 ],\n \"mistyrose\" : [ 255/255,228/255,225/255 ],\n \"moccasin\" : [ 255/255,228/255,181/255 ],\n \"navajowhite\" : [ 255/255,222/255,173/255 ],\n \"navy\" : [ 0/255,0/255,128/255 ],\n \"oldlace\" : [ 253/255,245/255,230/255 ],\n \"olive\" : [ 128/255,128/255,0/255 ],\n \"olivedrab\" : [ 107/255,142/255,35/255 ],\n \"orange\" : [ 255/255,165/255,0/255 ],\n \"orangered\" : [ 255/255,69/255,0/255 ],\n \"orchid\" : [ 218/255,112/255,214/255 ],\n \"palegoldenrod\" : [ 238/255,232/255,170/255 ],\n \"palegreen\" : [ 152/255,251/255,152/255 ],\n \"paleturquoise\" : [ 175/255,238/255,238/255 ],\n \"palevioletred\" : [ 219/255,112/255,147/255 ],\n \"papayawhip\" : [ 255/255,239/255,213/255 ],\n \"peachpuff\" : [ 255/255,218/255,185/255 ],\n \"peru\" : [ 205/255,133/255,63/255 ],\n \"pink\" : [ 255/255,192/255,203/255 ],\n \"plum\" : [ 221/255,160/255,221/255 ],\n \"powderblue\" : [ 176/255,224/255,230/255 ],\n \"purple\" : [ 128/255,0/255,128/255 ],\n \"red\" : [ 255/255,0/255,0/255 ],\n \"rosybrown\" : [ 188/255,143/255,143/255 ],\n \"royalblue\" : [ 65/255,105/255,225/255 ],\n \"saddlebrown\" : [ 139/255,69/255,19/255 ],\n \"salmon\" : [ 250/255,128/255,114/255 ],\n \"sandybrown\" : [ 244/255,164/255,96/255 ],\n \"seagreen\" : [ 46/255,139/255,87/255 ],\n \"seashell\" : [ 255/255,245/255,238/255 ],\n \"sienna\" : [ 160/255,82/255,45/255 ],\n \"silver\" : [ 192/255,192/255,192/255 ],\n \"skyblue\" : [ 135/255,206/255,235/255 ],\n \"slateblue\" : [ 106/255,90/255,205/255 ],\n \"slategray\" : [ 112/255,128/255,144/255 ],\n \"slategrey\" : [ 112/255,128/255,144/255 ],\n \"snow\" : [ 255/255,250/255,250/255 ],\n \"springgreen\" : [ 0/255,255/255,127/255 ],\n \"steelblue\" : [ 70/255,130/255,180/255 ],\n \"tan\" : [ 210/255,180/255,140/255 ],\n \"teal\" : [ 0/255,128/255,128/255 ],\n \"thistle\" : [ 216/255,191/255,216/255 ],\n \"tomato\" : [ 255/255,99/255,71/255 ],\n \"turquoise\" : [ 64/255,224/255,208/255 ],\n \"violet\" : [ 238/255,130/255,238/255 ],\n \"wheat\" : [ 245/255,222/255,179/255 ],\n \"white\" : [ 255/255,255/255,255/255 ],\n \"whitesmoke\" : [ 245/255,245/255,245/255 ],\n \"yellow\" : [ 255/255,255/255,0/255 ],\n \"yellowgreen\" : [ 154/255,205/255,50/255 ] };\n\n var o, i = 1, a = arguments, c = a[0], alpha;\n\n if(a[0].length<4 && (a[i]*1-0)==a[i]) { alpha = a[i++]; } // first argument rgb (no a), and next one is numeric?\n if(a[i].length) { a = a[i], i = 0; } // next arg an array, make it our main array to walk through\n if(typeof c == 'string')\n c = map[c.toLowerCase()];\n if(alpha!==undefined)\n c = c.concat(alpha);\n for(o=a[i++]; i<a.length; i++) {\n o = o.union(a[i]);\n }\n return o.setColor(c);\n}", "function getColor(magnitude) {\n if (magnitude > 7) {\n return 'red'\n } else if (magnitude > 6) {\n return 'orange'\n } else if (magnitude > 5) {\n return 'yellow'\n } else if (magnitude > 4) {\n return 'lightgreen'\n } else if (magnitude > 2) {\n return 'green'\n } else {\n return 'blue'\n }\n}", "function GetHexColour($Rgb)\n{\n\tvar $Length = 6\n\treturn ('000000000' + $Rgb.toString(16) ).substr(-$Length);\n}", "function pColor(piece){ return piece.charCodeAt(0) }", "function fipsColor(fips) {\n const number = parseInt(fips, 10)\n const scalar = number / 56.0\n return `hsl(${360 - ((scalar * 180.0) + 180.0)}, 85%, 70%)`\n}", "function getColor(magnitude) {\r\n switch (true) {\r\n case magnitude > 5:\r\n return \"#ea2c2c\";\r\n case magnitude > 4:\r\n return \"#ea822c\";\r\n case magnitude > 3:\r\n return \"#ee9c00\";\r\n case magnitude > 2:\r\n return \"#eecc00\";\r\n case magnitude > 1:\r\n return \"#d4ee00\";\r\n default:\r\n return \"#98ee00\";\r\n }\r\n }", "function formatHex(color) {\n return \"#\" + _toTwoDigitHex(color.rgba.r) + _toTwoDigitHex(color.rgba.g) + _toTwoDigitHex(color.rgba.b);\n }", "function color(i) {\n\tlet ret = \"white\";\n\tswitch (i) {\n\t\tcase 0:\n\t\t\tret = \"bisque\";\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tret = \"lightgreen\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tret = \"lightsalmon\";\n\t\t\tbreak;\n\t\tdefault:\n\t}\n\treturn ret;\n}", "function rgbToHex(colour) {\n var hex = \"#\";\n for (var i in colour) {\n var hexValue = colour[i].toString(16);\n (hexValue.length < 2) ?\n hex += \"0\" + hexValue : hex += hexValue;\n }\n return hex;\n }", "function variaceColor(){\n\n\treturn d3.scale.linear()\n\t\t\t\t\t.domain([0, 1])\n\t\t\t\t\t.range(['#fee0d2', '#de2d26']);\n}", "function randomColor() {\n const hexa = '0123456789ABCDEF';\n let cor = '#';\n\n for (let index = 0; index < 6; index += 1) {\n cor += hexa[Math.floor(Math.random() * 16)];\n }\n return cor;\n}", "function getColor (magnitude){\r\n switch (true){\r\n case magnitude >6:\r\n return \"#581845\"\r\n case magnitude >5:\r\n return \"#900C3F\"\r\n case magnitude >4:\r\n return \"#C70039\"\r\n case magnitude >3:\r\n return \"#FF5733\"\r\n case magnitude >2:\r\n return \"#FFC300\"\r\n case magnitude >1:\r\n return \"#DAF7A6\"\r\n \r\n }\r\n }", "function getColor(magnitude) {\r\n switch (true) {\r\n case magnitude > 5:\r\n return \"#ea2c2c\";\r\n case magnitude > 4:\r\n return \"#ea822c\";\r\n case magnitude > 3:\r\n return \"#ee9c00\";\r\n case magnitude > 2:\r\n return \"#eecc00\";\r\n case magnitude > 1:\r\n return \"#d4ee00\";\r\n default:\r\n return \"#98ee00\";\r\n }\r\n }", "function value2Hex(val) {\n val = Math.round(val).toString(16);\n // Must zero-pad for under-long things\n return color.base == 256 && val.length < 2 ? \"0\" + val : val;\n }", "function magnitudeColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"brown\";\n case magnitude > 4:\n return \"red\";\n case magnitude > 3:\n return \"orange\";\n case magnitude > 2:\n return \"yellow\";\n case magnitude > 1:\n return \"green\";\n default:\n return \"lightgreen\";\n }\n }", "function getColor (magnitude) {\n switch (true) {\n case magnitude > 5:\n return '#f54242'\n case magnitude > 4:\n return '#b942f5'\n case magnitude > 3:\n return '#42cef5'\n case magnitude > 2:\n return '#84f542'\n case magnitude > 1:\n return '#f5e342'\n default:\n return '#f54242'\n }\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#581845\";\n case magnitude > 4:\n return \"#900C3F\";\n case magnitude > 3:\n return \"#C70039\";\n case magnitude > 2:\n return \"#FF5733\";\n case magnitude > 1:\n return \"#FFC300\";\n default:\n return \"#DAF7A6\";\n }\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude < 1:\n return \"#fed976\";\n case magnitude < 2:\n return \"#feb24c\";\n case magnitude < 3:\n return \"#fd8d3c\";\n case magnitude < 4:\n return \"#fc4e2a\";\n case magnitude < 5:\n return \"#e31a1c\";\n default:\n return \"#b10026\";\n }\n}", "function displayHexNumber(){\n let hexColor = '';\n hexColor = convertNumber(red.value) + convertNumber(green.value) + convertNumber(blue.value);\n hex.value = hexColor;\n convertColor.style.backgroundColor = `#${hexColor}`\n}", "function getFullColorString(color) {\n return \"#\" + (0,_hsv2hex__WEBPACK_IMPORTED_MODULE_0__.hsv2hex)(color.h, _consts__WEBPACK_IMPORTED_MODULE_1__.MAX_COLOR_SATURATION, _consts__WEBPACK_IMPORTED_MODULE_1__.MAX_COLOR_VALUE);\n}", "function pointToColor(point) {\n const iterations = julia(point);\n const percentage = iterations / _maxIterations;\n return `hsl(${_hue},100%,${percentage * 100}%)`;\n }", "function color() {\n return colorValue() + colorValue() + colorValue();\n}", "function rgb(...rgb){\n return rgb.map(val => val <= 0 ? \"00\" : (val > 255 ? 255 : val).toString(16).toUpperCase()).join(\"\");\n }", "function getFieldShade(index) {\n \n var len = 0;\n for( var i in data.fields ){\n //check if field is time or text\n if( data.fields[i].type_id != 7 && data.fields[i].type_id != 37 ){\n len++;\n }\n }\n \n var visi = 1;\n for( var i in data.fields ){\n //check if field is time or text\n if( data.fields[i].type_id != 7 && data.fields[i].type_id != 37 ){\n \n if (index == i) {\n var color = Math.floor(((visi / (len + 3))) * 255).toString(16);\n \n if (color.length === 1){\n color = '0' + color;\n }\n //xx -> xxxxxx\n return color + color + color;\n }\n \n if (data.fields[i].visibility == 1) {\n visi++;\n }\n }\n }\n \n return 'ffffff';\n}", "function randomColor(){ \n return rgbToHex(random255(),random255(),random255())\n}", "function colorOf(idx) {\n return colors[idx] || \"#000\";\n }", "function getNewColor() { \r\n\r\n symbols = \"012345679ABCDEF\";\r\n color = \"#\";\r\n\r\n //Generate random color using hex id\r\n for (let i = 0; i < 6; i++){\r\n color = color + symbols[Math.floor(Math.random() * 16)];\r\n }\r\n return color\r\n}", "function HSVToHex(h, s, v) {\n var rgb = HSVToRGB(h, s, v);\n return RGBToHex(rgb.r, rgb.g, rgb.b);\n}", "function HSVToHex(h, s, v) {\n var rgb = HSVToRGB(h, s, v);\n return RGBToHex(rgb.r, rgb.g, rgb.b);\n}", "function printColors() {\n\treturn \"<div class=\\\"column\\\">\" + mutateColor(hex, 255, 0, 0, 0, 1, true) + mutateColor(hex, 0, 255, 0, 0, 1, true) + mutateColor(hex, 0, 0, 255, 0, 1, true) + mutateColor(hex, 255, 255, 0, 0, 1, true) + mutateColor(hex, 0, 255, 255, 0, 1, true) + mutateColor(hex, 255, 0, 255, 0, 1, true) + mutateColor(hex, 255, 255, 255, 0, 1, true) + \"</div>\" +\n\t\t\t\"<div class=\\\"column\\\">\" + mutateColor(hex, 128, -32, 0, 0, 1, false) + mutateColor(hex, 0, 128, -32, 0, 1, false) + mutateColor(hex, -32, 0, 128, 0, 1, false) + mutateColor(hex, 128, 128, 0, 0, 1, false) + mutateColor(hex, 0, 128, 128, 0, 1, false) + mutateColor(hex, 128, 0, 128, 0, 1, false) + mutateColor(hex, 128, 128, 128, 0, 1, false) + \"</div>\" +\n\t\t\t\"<div class=\\\"column\\\">\" + mutateColor(hex, 32, 0, 0, 0, 7, false) + \"</div>\" +\n\t\t\t\"<div class=\\\"column\\\">\" + mutateColor(hex, 0, 32, 0, 0, 7, false) + \"</div>\" +\n\t\t\t\"<div class=\\\"column\\\">\" + mutateColor(hex, 0, 0, 32, 0, 7, false) + \"</div>\";\n}", "function rainbowColorText(str){\r\n\tvar phase = 0, center = 128, width = 127, frequency = Math.PI*2/str.length, totalString = '';\r\n\tvar div = document.createElement('div');\r\n\tvar escape = document.createElement('textarea');\r\n\tdiv.innerHTML = str;\r\n\tif(div.firstChild !== null && div.firstChild !== undefined){\r\n\t\tvar decoded = div.firstChild.nodeValue;\r\n\t}else{\r\n\t\tvar decoded = '';\r\n\t}\r\n\tfor(var i=0; i<decoded.length; ++i){\r\n\t\tred = parseInt(Math.sin(frequency*i+2+phase) * width + center);\r\n\t\tgreen = parseInt(Math.sin(frequency*i+0+phase) * width + center);\r\n\t\tblue = parseInt(Math.sin(frequency*i+4+phase) * width + center);\r\n\t\tescape.innerHTML = decoded.substr(i,1);\r\n\t\ttotalString += '<span style=\"color:' + RGB2Color(red,green,blue) + '\">' + escape.innerHTML + '</span>';\r\n\t}\r\n\treturn totalString;\r\n}", "function getInverse(color){\n\tlet r = (255 - color.slice(4, 7)).toString(16);\n\tlet g = (255 - color.slice(9, 12)).toString(16);\n\tlet b = (255 - color.slice(14, 17)).toString(16);\n\t\n\tif (r.length == 1)\n\t\tr = '0' + r;\n\tif (g.length == 1)\n\t\tg = '0' + g;\n\tif (b.length == 1)\n\t\tb = '0' + b;\n\t\n\treturn '#' + r + g + b;\n}", "transformarNumeroAColor(numero) {\n switch (numero) {\n case 0:\n return \"celeste\";\n case 1:\n return \"violeta\";\n case 2:\n return \"naranja\";\n case 3:\n return \"verde\";\n }\n }", "function recomposeColor(_ref) {\n var values = _ref.values;\n return \"#\".concat(values.map(floatToHex).join(''));\n}", "function getColor(magnitude) {\r\n return magnitude >= 5 ? '#e80909' :\r\n magnitude >= 4 ? '#e87909' :\r\n magnitude >= 3 ? '#ffe208' :\r\n magnitude >= 2 ? '#f0ff19' :\r\n magnitude >= 1 ? '#5ce330' :\r\n '#03ff3d';\r\n}" ]
[ "0.7085386", "0.68464106", "0.67952985", "0.6710052", "0.66278106", "0.65814584", "0.6578032", "0.64902115", "0.6478208", "0.6455905", "0.6450244", "0.6421787", "0.6400383", "0.63754636", "0.63610995", "0.6335178", "0.6311356", "0.6306497", "0.62757516", "0.6259985", "0.624787", "0.62339646", "0.62290996", "0.6215971", "0.6206795", "0.6196483", "0.61798555", "0.6176294", "0.61727726", "0.6171564", "0.61669993", "0.61669993", "0.6165558", "0.615516", "0.6129016", "0.61050844", "0.60872006", "0.60814947", "0.6078562", "0.60785013", "0.6057466", "0.60496044", "0.60457915", "0.6006191", "0.6001226", "0.5998755", "0.5998686", "0.59951025", "0.59950817", "0.5981519", "0.59808403", "0.5960619", "0.59509975", "0.59505635", "0.5949612", "0.5940555", "0.5936754", "0.5929704", "0.5925999", "0.59212464", "0.59180504", "0.5908949", "0.5907479", "0.5897513", "0.58931696", "0.5890339", "0.5889491", "0.5886489", "0.58835495", "0.58827376", "0.58821803", "0.58808964", "0.5874128", "0.5874024", "0.58735114", "0.58726966", "0.58683383", "0.5861485", "0.5861066", "0.58608955", "0.58607656", "0.5856112", "0.58514595", "0.58502495", "0.5844925", "0.58411795", "0.5840538", "0.5838438", "0.5837348", "0.58362955", "0.5832382", "0.5831609", "0.58290243", "0.58290243", "0.5823331", "0.5823204", "0.5820594", "0.58120865", "0.580986", "0.5809662" ]
0.644181
11
Given a numerical color 0x012345, returns its magnitude from 0 to 1
function colorMagnitude(color) { var r = (color & 0xFF0000) >>> 16; var g = (color & 0x00FF00) >>> 8; var b = (color & 0x0000FF); return (r+g+b) / (3*0xFF); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function magnitudeColors(color) {\n if (color < 1){return \"red\"}\n else if (color < 2){return \"orange\"}\n else if (color < 3){return \"yellow\"}\n else if (color < 4){return \"green\"} \n else if (color < 5 ){return \"blue\"}\n else {return \"indigo\"}\n}", "function getColor(magnitude) {\n if (magnitude > 5) {\n return \"#ea2c2c\";\n }\n if (magnitude > 4) {\n return \"#ea822c\";\n }\n if (magnitude > 3) {\n return \"#ee9c00\";\n }\n if (magnitude > 2) {\n return \"#eecc00\";\n }\n if (magnitude > 1) {\n return \"#d4ee00\";\n }\n return \"#98ee00\";\n}", "function getColor(magnitude) {\n if (magnitude > 5) {\n return \"#ea2c2c\";\n }\n if (magnitude > 4) {\n return \"#ea822c\";\n }\n if (magnitude > 3) {\n return \"#ee9c00\";\n }\n if (magnitude > 2) {\n return \"#eecc00\";\n }\n if (magnitude > 1) {\n return \"#d4ee00\";\n }\n return \"#98ee00\";\n}", "function getColor(magnitude) {\r\n if (magnitude > 5) {\r\n return \"#ea2c2c\";\r\n }\r\n if (magnitude > 4) {\r\n return \"#ea822c\";\r\n }\r\n if (magnitude > 3) {\r\n return \"#ee9c00\";\r\n }\r\n if (magnitude > 2) {\r\n return \"#eecc00\";\r\n }\r\n if (magnitude > 1) {\r\n return \"#d4ee00\";\r\n }\r\n return \"#98ee00\";\r\n}", "function getColor (magnitude){\r\n switch (true){\r\n case magnitude >6:\r\n return \"#581845\"\r\n case magnitude >5:\r\n return \"#900C3F\"\r\n case magnitude >4:\r\n return \"#C70039\"\r\n case magnitude >3:\r\n return \"#FF5733\"\r\n case magnitude >2:\r\n return \"#FFC300\"\r\n case magnitude >1:\r\n return \"#DAF7A6\"\r\n \r\n }\r\n }", "function getColor(magnitude) {\r\n return magnitude >= 5 ? '#e80909' :\r\n magnitude >= 4 ? '#e87909' :\r\n magnitude >= 3 ? '#ffe208' :\r\n magnitude >= 2 ? '#f0ff19' :\r\n magnitude >= 1 ? '#5ce330' :\r\n '#03ff3d';\r\n}", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n }\n }", "function getColor(d) {\n var magnitude = +d;\n switch (true) {\n case (magnitude <= 1):\n return '#00FF00';\n case (magnitude > 1 && magnitude <= 2):\n return '#ADFF2F';\n case (magnitude > 2 && magnitude <= 3):\n return '#FFFF00';\n case (magnitude > 3 && magnitude <= 4):\n return '#F4A460';\n case (magnitude > 4 && magnitude <= 5):\n return '#FF8C00';\n default:\n return '#FF4500';\n }\n}", "function getColor(magnitude) {\r\n switch (true) {\r\n case magnitude > 5:\r\n return \"#ea2c2c\";\r\n case magnitude > 4:\r\n return \"#ea822c\";\r\n case magnitude > 3:\r\n return \"#ee9c00\";\r\n case magnitude > 2:\r\n return \"#eecc00\";\r\n case magnitude > 1:\r\n return \"#d4ee00\";\r\n default:\r\n return \"#98ee00\";\r\n }\r\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#581845\";\n case magnitude > 4:\n return \"#900C3F\";\n case magnitude > 3:\n return \"#C70039\";\n case magnitude > 2:\n return \"#FF5733\";\n case magnitude > 1:\n return \"#FFC300\";\n default:\n return \"#DAF7A6\";\n }\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n } \n }", "function getColor(magnitude) {\n if (magnitude > 7) {\n return 'red'\n } else if (magnitude > 6) {\n return 'orange'\n } else if (magnitude > 5) {\n return 'yellow'\n } else if (magnitude > 4) {\n return 'lightgreen'\n } else if (magnitude > 2) {\n return 'green'\n } else {\n return 'blue'\n }\n}", "function magnitudeColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"brown\";\n case magnitude > 4:\n return \"red\";\n case magnitude > 3:\n return \"orange\";\n case magnitude > 2:\n return \"yellow\";\n case magnitude > 1:\n return \"green\";\n default:\n return \"lightgreen\";\n }\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n }\n }", "function getColor (magnitude) {\n switch (true) {\n case magnitude > 5:\n return '#f54242'\n case magnitude > 4:\n return '#b942f5'\n case magnitude > 3:\n return '#42cef5'\n case magnitude > 2:\n return '#84f542'\n case magnitude > 1:\n return '#f5e342'\n default:\n return '#f54242'\n }\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n }\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n }\n }", "function getColor(magnitude) {\r\n switch (true) {\r\n case magnitude > 5:\r\n return \"#ea2c2c\";\r\n case magnitude > 4:\r\n return \"#ea822c\";\r\n case magnitude > 3:\r\n return \"#ee9c00\";\r\n case magnitude > 2:\r\n return \"#eecc00\";\r\n case magnitude > 1:\r\n return \"#d4ee00\";\r\n default:\r\n return \"#98ee00\";\r\n }\r\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n }\n}", "colorLuminance (hex, lum = 0) {\n let c = null;\n let i = 0;\n let rgb = '#';\n hex = String(hex).replace(/[^0-9a-f]/gi, '');\n if (hex.length < 6)\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n\n while (i < 3) {\n c = parseInt(hex.substr(i * 2, 2), 16);\n c = Math.round(Math.min(Math.max(0, c + c * lum), 255)).toString(16);\n rgb += ('00' + c).substr(c.length);\n i++;\n }\n return rgb;\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return '#d62727';\n case magnitude > 4:\n return '#e37c27';\n case magnitude > 3:\n return '#f2a30c';\n case magnitude > 2:\n return '#ebca09';\n case magnitude > 1:\n return '#d0e809';\n default:\n return '#96e805';\n }\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude < 1:\n return \"#fed976\";\n case magnitude < 2:\n return \"#feb24c\";\n case magnitude < 3:\n return \"#fd8d3c\";\n case magnitude < 4:\n return \"#fc4e2a\";\n case magnitude < 5:\n return \"#e31a1c\";\n default:\n return \"#b10026\";\n }\n}", "function color(magnitude){\n\n if (magnitude > 5){\n return 'red'\n } else if (magnitude > 4){\n return 'orange'\n } else if (magnitude > 3){\n return 'yellow'\n } else if (magnitude > 2){\n return 'green'\n } else if (magnitude > 1){\n return 'lightblue'\n } else {\n return 'purple'\n }\n }", "decodeColor(){\n return this.colors[ this.extractBinaryNumber(this.hasAlpha ? 3 : 2) ];\n }", "function getLuminance(color) {\n if (color === 'transparent') return 0;\n function f(x) {\n var channel = x / 255;\n return channel <= 0.03928 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);\n }\n var _parseToRgba = parseToRgba(color),\n _parseToRgba2 = _slicedToArray(_parseToRgba, 3),\n r = _parseToRgba2[0],\n g = _parseToRgba2[1],\n b = _parseToRgba2[2];\n return 0.2126 * f(r) + 0.7152 * f(g) + 0.0722 * f(b);\n}", "function magnitudeColor(depth) {\n switch (true) {\n case (depth >= 90):\n return \"#ff0000\";\n case (depth > 70):\n return \"#ff8000\";\n case (depth > 50):\n return \"#ffbf00\";\n case (depth > 30):\n return \"#ffff00\";\n case (depth > 10):\n return \"#bfff00\";\n case (depth > -10):\n return \"#66ff8c\";\n \n }\n\n}", "function normalizeColor(color) {\n var match;\n\n if (typeof color === 'number') {\n if (color >>> 0 === color && color >= 0 && color <= 0xffffffff) {\n return color;\n }\n return null;\n }\n\n // Ordered based on occurrences on Facebook codebase\n if ((match = matchers.hex6.exec(color))) {\n return parseInt(match[1] + 'ff', 16) >>> 0;\n }\n\n if (names.hasOwnProperty(color)) {\n return names[color];\n }\n\n if ((match = matchers.rgb.exec(color))) {\n return (\n parse255(match[1]) << 24 | // r\n parse255(match[2]) << 16 | // g\n parse255(match[3]) << 8 | // b\n 0x000000ff // a\n ) >>> 0;\n }\n\n if ((match = matchers.rgba.exec(color))) {\n return (\n parse255(match[1]) << 24 | // r\n parse255(match[2]) << 16 | // g\n parse255(match[3]) << 8 | // b\n parse1(match[4]) // a\n ) >>> 0;\n }\n\n if ((match = matchers.hex3.exec(color))) {\n return parseInt(\n match[1] + match[1] + // r\n match[2] + match[2] + // g\n match[3] + match[3] + // b\n 'ff', // a\n 16\n ) >>> 0;\n }\n\n // https://drafts.csswg.org/css-color-4/#hex-notation\n if ((match = matchers.hex8.exec(color))) {\n return parseInt(match[1], 16) >>> 0;\n }\n\n if ((match = matchers.hex4.exec(color))) {\n return parseInt(\n match[1] + match[1] + // r\n match[2] + match[2] + // g\n match[3] + match[3] + // b\n match[4] + match[4], // a\n 16\n ) >>> 0;\n }\n\n if ((match = matchers.hsl.exec(color))) {\n return (\n hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) |\n 0x000000ff // a\n ) >>> 0;\n }\n\n if ((match = matchers.hsla.exec(color))) {\n return (\n hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) |\n parse1(match[4]) // a\n ) >>> 0;\n }\n\n return null;\n}", "function normalizeColor(color) {\n var match;\n\n if (typeof color === 'number') {\n if (color >>> 0 === color && color >= 0 && color <= 0xffffffff) {\n return color;\n }\n return null;\n }\n\n // Ordered based on occurrences on Facebook codebase\n if ((match = matchers.hex6.exec(color))) {\n return parseInt(match[1] + 'ff', 16) >>> 0;\n }\n\n if (names.hasOwnProperty(color)) {\n return names[color];\n }\n\n if ((match = matchers.rgb.exec(color))) {\n return (\n parse255(match[1]) << 24 | // r\n parse255(match[2]) << 16 | // g\n parse255(match[3]) << 8 | // b\n 0x000000ff // a\n ) >>> 0;\n }\n\n if ((match = matchers.rgba.exec(color))) {\n return (\n parse255(match[1]) << 24 | // r\n parse255(match[2]) << 16 | // g\n parse255(match[3]) << 8 | // b\n parse1(match[4]) // a\n ) >>> 0;\n }\n\n if ((match = matchers.hex3.exec(color))) {\n return parseInt(\n match[1] + match[1] + // r\n match[2] + match[2] + // g\n match[3] + match[3] + // b\n 'ff', // a\n 16\n ) >>> 0;\n }\n\n // https://drafts.csswg.org/css-color-4/#hex-notation\n if ((match = matchers.hex8.exec(color))) {\n return parseInt(match[1], 16) >>> 0;\n }\n\n if ((match = matchers.hex4.exec(color))) {\n return parseInt(\n match[1] + match[1] + // r\n match[2] + match[2] + // g\n match[3] + match[3] + // b\n match[4] + match[4], // a\n 16\n ) >>> 0;\n }\n\n if ((match = matchers.hsl.exec(color))) {\n return (\n hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) |\n 0x000000ff // a\n ) >>> 0;\n }\n\n if ((match = matchers.hsla.exec(color))) {\n return (\n hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) |\n parse1(match[4]) // a\n ) >>> 0;\n }\n\n return null;\n}", "function normalizeColor(color) {\n var match;\n\n if (typeof color === 'number') {\n if (color >>> 0 === color && color >= 0 && color <= 0xffffffff) {\n return color;\n }\n return null;\n }\n\n // Ordered based on occurrences on Facebook codebase\n if ((match = matchers.hex6.exec(color))) {\n return parseInt(match[1] + 'ff', 16) >>> 0;\n }\n\n if (names.hasOwnProperty(color)) {\n return names[color];\n }\n\n if ((match = matchers.rgb.exec(color))) {\n return (\n parse255(match[1]) << 24 | // r\n parse255(match[2]) << 16 | // g\n parse255(match[3]) << 8 | // b\n 0x000000ff // a\n ) >>> 0;\n }\n\n if ((match = matchers.rgba.exec(color))) {\n return (\n parse255(match[1]) << 24 | // r\n parse255(match[2]) << 16 | // g\n parse255(match[3]) << 8 | // b\n parse1(match[4]) // a\n ) >>> 0;\n }\n\n if ((match = matchers.hex3.exec(color))) {\n return parseInt(\n match[1] + match[1] + // r\n match[2] + match[2] + // g\n match[3] + match[3] + // b\n 'ff', // a\n 16\n ) >>> 0;\n }\n\n // https://drafts.csswg.org/css-color-4/#hex-notation\n if ((match = matchers.hex8.exec(color))) {\n return parseInt(match[1], 16) >>> 0;\n }\n\n if ((match = matchers.hex4.exec(color))) {\n return parseInt(\n match[1] + match[1] + // r\n match[2] + match[2] + // g\n match[3] + match[3] + // b\n match[4] + match[4], // a\n 16\n ) >>> 0;\n }\n\n if ((match = matchers.hsl.exec(color))) {\n return (\n hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) |\n 0x000000ff // a\n ) >>> 0;\n }\n\n if ((match = matchers.hsla.exec(color))) {\n return (\n hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) |\n parse1(match[4]) // a\n ) >>> 0;\n }\n\n return null;\n}", "function colorIntensity() {\n return Math.floor(Math.random() * 265);\n }", "function luminanace (r, g, b) {\n var a = [r, g, b].map(function (v) {\n v /= 255;\n return v <= 0.03928\n ? v / 12.92\n : Math.pow((v + 0.055) / 1.055, 2.4)\n })\n return a[0] * 0.2126 + a[1] * 0.7152 + a[2] * 0.0722;\n}", "function magColor(mag) {\n var color = \"\";\n if (mag <= 2) { color = \"#006633\"; }\n else if (mag <= 3) {color = \"#99CC00\"; }\n else if (mag <= 4) { color = \"#FFFF00\"; }\n else if (mag <= 5) {color = \"#FF6600\"; }\n else { color = \"#006633\"; }\n \n return color;\n \n }", "function chooseColor(magnitude) {\n if (magnitude > 7.9) {\n return '#3f0000';\n }else if (magnitude > 6.9) {\n return '#580000';\n }else if (magnitude > 5.9) {\n return '#720000';\n }else if (magnitude > 4.9) { \n return '#8b0000';\n }else if (magnitude > 3.9) {\n return '#a50000';\n }else if (magnitude > 2.9) {\n return '#be0000';\n }else if (magnitude > 1.9) {\n return '#d80000';\n }else{\n return '#e34c4c';\n }\n}", "function getColour(mag) {\n if (mag > 5) {\n return \"#FF4500\"\n } else if (mag > 4) {\n return \"#FF6347\"\n } else if (mag > 3) {\n return \"#FF8C00\"\n } else if (mag > 2) {\n return \"#FF7F50\"\n } else if (mag > 1) {\n return \"#FF6347\"\n } else {\n return \"#FFA500\"\n }\n }", "function luminanace(r, g, b) {\n var a = [r, g, b].map(function (v) {\n v /= 255;\n return v <= 0.03928\n ? v / 12.92\n : Math.pow( (v + 0.055) / 1.055, 2.4 );\n });\n return a[0] * 0.2126 + a[1] * 0.7152 + a[2] * 0.0722;\n}", "function colorLuminance(hex, lum) { \n // validate hex string \n hex = String(hex).replace(/[^0-9a-f]/gi, ''); \n if (hex.length < 6) { \n hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]; \n }\n lum = lum || 0; \n // convert to decimal and change luminosity \n var rgb = \"\", c, i; \n for (i = 0; i < 3; i++) { \n c = parseInt(hex.substr(i*2,2), 16); \n c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16); \n rgb += (\"00\"+c).substr(c.length); \n }\n return rgb; \n}", "function _intFromColor(color) {\r\n var cache, red, green, blue;\r\n cache = /^#([\\da-fA-F]{2})([\\da-fA-F]{2})([\\da-fA-F]{2})/.exec(color);\r\n\r\n if (!cache) {\r\n return -1;\r\n }\r\n\r\n red = parseInt(cache[1], 16);\r\n green = parseInt(cache[2], 16);\r\n blue = parseInt(cache[3], 16);\r\n\r\n red = (red << 16) & 0x00FF0000; //Shift red 16-bits and mask out other stuff\r\n green = (green << 8) & 0x0000FF00; //Shift Green 8-bits and mask out other stuff\r\n blue = blue & 0x000000FF; //Mask out anything not blue.\r\n\r\n return 0xFF000000 | red | green | blue; //0xFF000000 for 100% Alpha. Bitwise OR everything together.\r\n}", "function lum(hex) {\n\tvar rgb = hexToRgb(hex)\n\tvar lrgb = [];\n\trgb.forEach(function(c) {\n\t\tc = c / 255.0;\n\t\tif (c <= 0.03928) {\n\t\t\tc = c / 12.92;\n\t\t} else {\n\t\t\tc = Math.pow((c + 0.055) / 1.055, 2.4);\n\t\t}\n\t\tlrgb.push(c);\n\t});\n\tvar lum = 0.2126 * lrgb[0] + 0.7152 * lrgb[1] + 0.0722 * lrgb[2];\n\treturn lum > 0.179 ? \"#000000\" : \"#ffffff\";\n}", "function chooseColor(magnitude) {\n mag = parseFloat(magnitude);\n if (mag >= 5.0 ) {\n return '#922B21';\n } else if (mag >= 4.0 ) {\n return '#D35400';\n } else if (mag >= 3.0 ) {\n return '#EB984E';\n } else if (mag >= 2.0 ) {\n return '#F8C471';\n } else {\n return '#F9E79F';\n }\n}", "function getRGBRange(color: Color) {\n var rgb = sortBy(color.rgb().array()).reverse();\n var [max, med, min] = rgb;\n return (max - min) / 10;\n}", "function getColor(magnitude) {\r\n //Condtionals for magnitude \r\n if (magnitude >= 5) {\r\n return \"red\";\r\n }\r\n else if (magnitude >= 4){\r\n return \"peru\";\r\n }\r\n else if (magnitude >= 3) {\r\n return \"darkorange\";\r\n }\r\n else if (magnitude >= 2) {\r\n return \"yellow\";\r\n }\r\n else if (magnitude >= 1) {\r\n return \"yellowgreen\";\r\n }\r\n else {\r\n return \"green\";\r\n }\r\n}", "function getColor(mag) {\r\n switch (true) {\r\n case mag > 5:\r\n return \"#FF0000\";\r\n case mag > 4:\r\n return \"#ff9933\";\r\n case mag > 3:\r\n return \"#ffcc00\";\r\n case mag > 2:\r\n return \"#ccff33\";\r\n case mag > 1:\r\n return \"#d4ee00\";\r\n default:\r\n return \"#98ee00\";\r\n }\r\n }", "function getColor(mag) {\n // Conditionals for magnitude\n if (mag >= 5) {\n return \"#ea2c2c\";\n }\n else if (mag >= 4) {\n return \"#eaa12c\";\n }\n else if (mag >= 3) {\n return \"#eaea2c\";\n }\n else if (mag >= 2) {\n return \"#6fea2c\";\n }\n else if (mag >= 1) {\n return \"#2cdaea\";\n }\n else {\n return \"#a12cea\";\n }\n}", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 6:\n return \"purple\";\n case magnitude > 5:\n return \"maroon\";\n case magnitude > 4:\n return \"red\";\n case magnitude > 3:\n return \"darkorange\";\n case magnitude > 2:\n return \"yellow\";\n case magnitude > 1:\n return \"lime\";\n default:\n return \"green\";\n }\n }", "function Qcolor(magnitude) {\n if (magnitude >= 5) {\n return \"#990000\";} \n else if (magnitude >= 4 && magnitude <5) {\n return \"#D60000\";} \n else if (magnitude >= 3 && magnitude <4) {\n return \"#FF4848\";} \n else if (magnitude >= 2 && magnitude <3){\n return \"#FFB0B0\";} \n else if (magnitude >= 1 && magnitude <2){\n return \"#FFCACA\"; } \n else if (magnitude < 1){\n return \"#FFE4E4\";} \n }", "function normalizeColor(color) {\n var match;\n\n if (typeof color === 'number') {\n return color >>> 0 === color && color >= 0 && color <= 0xffffffff ? color : null;\n } // Ordered based on occurrences on Facebook codebase\n\n\n if (match = hex6.exec(color)) return parseInt(match[1] + 'ff', 16) >>> 0;\n if (colors.hasOwnProperty(color)) return colors[color];\n\n if (match = rgb.exec(color)) {\n return (parse255(match[1]) << 24 | // r\n parse255(match[2]) << 16 | // g\n parse255(match[3]) << 8 | // b\n 0x000000ff) >>> // a\n 0;\n }\n\n if (match = rgba.exec(color)) {\n return (parse255(match[1]) << 24 | // r\n parse255(match[2]) << 16 | // g\n parse255(match[3]) << 8 | // b\n parse1(match[4])) >>> // a\n 0;\n }\n\n if (match = hex3.exec(color)) {\n return parseInt(match[1] + match[1] + // r\n match[2] + match[2] + // g\n match[3] + match[3] + // b\n 'ff', // a\n 16) >>> 0;\n } // https://drafts.csswg.org/css-color-4/#hex-notation\n\n\n if (match = hex8.exec(color)) return parseInt(match[1], 16) >>> 0;\n\n if (match = hex4.exec(color)) {\n return parseInt(match[1] + match[1] + // r\n match[2] + match[2] + // g\n match[3] + match[3] + // b\n match[4] + match[4], // a\n 16) >>> 0;\n }\n\n if (match = hsl.exec(color)) {\n return (hslToRgb(parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) | 0x000000ff) >>> // a\n 0;\n }\n\n if (match = hsla.exec(color)) {\n return (hslToRgb(parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) | parse1(match[4])) >>> // a\n 0;\n }\n\n return null;\n}", "function ColorLuminance(hex, lum) {\n\thex = String(hex).replace(/[^0-9a-f]/gi, '');\n\tlum = lum || 0;\n\tvar rgb = \"#\", c, i;\n\tfor (i = 0; i < 3; i++) {\n\t\tc = parseInt(hex.substr(i*2,2), 16);\n\t\tc = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);\n\t\trgb += (\"00\"+c).substr(c.length);\n\t}\n\treturn rgb;\n}", "get colorValue() {}", "getColor() {\n var i = (this.speed * 255) / 255;\n var r = Math.round(Math.sin(0.024 * i + 0) * 127 + 128);\n var g = Math.round(Math.sin(0.024 * i + 2) * 127 + 128);\n var b = Math.round(Math.sin(0.024 * i + 4) * 127 + 128);\n var rgb = \"rgb(\" + r + \",\" + g + \",\" + b + \")\";\n\n return rgb;\n }", "function normaliseForRGB(x) {\n return x * 100 % 255;\n}", "getColor(value) {\n // Test Max\n if (value === 255) {\n console.log(\"MAX!\");\n }\n let percent = (value) / 255 * 50;\n // return 'rgb(V, V, V)'.replace(/V/g, 255 - value);\n return 'hsl(H, 100%, P%)'.replace(/H/g, 255 - value).replace(/P/g, percent);\n }", "function colorRange(magnitude) {\n\n switch (true) {\n case magnitude >= 5:\n return '#ff0000';\n break;\n\n case magnitude >= 4:\n return '#ff5900';\n break;\n \n case magnitude >= 3:\n return '#ee9c00';\n break;\n\n case magnitude >= 2:\n return '#eecc00';\n break;\n\n case magnitude >= 1:\n return '#d4ee00';\n break;\n\n default:\n return '#98ee00';\n };\n}", "function ColorLuminance(hex, lum) {\n // validate hex string\n hex = String(hex).replace(/[^0-9a-f]/gi, '');\n if (hex.length < 6) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n lum = lum || 0;\n\n // convert to decimal and change luminosity\n var rgb = \"#\",\n c, i;\n for (i = 0; i < 3; i++) {\n c = parseInt(hex.substr(i * 2, 2), 16);\n c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);\n rgb += (\"00\" + c).substr(c.length);\n }\n\n return rgb;\n}", "function colorToInt( thing ) {\n\tvar str = String(thing);\n\tif( str.substr(0,1) == '#' ) {\n\t\treturn parseInt( '0x' + substr(1) );\t// Drop '#', assume the rest is hex\n\t}\n\treturn parseInt(thing);\n}", "function luminosity(pixel) {\n return Math.sqrt(.241 * pixel[0] + .691 * pixel[1] + .068 * pixel[2]);\n}", "function normalizeColor(color) {\n let match;\n\n if (typeof color === 'number') {\n return color >>> 0 === color && color >= 0 && color <= 0xffffffff ? color : null;\n } // Ordered based on occurrences on Facebook codebase\n\n\n if (match = hex6.exec(color)) return parseInt(match[1] + 'ff', 16) >>> 0;\n if (colors.hasOwnProperty(color)) return colors[color];\n\n if (match = rgb.exec(color)) {\n return (parse255(match[1]) << 24 | // r\n parse255(match[2]) << 16 | // g\n parse255(match[3]) << 8 | // b\n 0x000000ff) >>> // a\n 0;\n }\n\n if (match = rgba.exec(color)) {\n return (parse255(match[1]) << 24 | // r\n parse255(match[2]) << 16 | // g\n parse255(match[3]) << 8 | // b\n parse1(match[4])) >>> // a\n 0;\n }\n\n if (match = hex3.exec(color)) {\n return parseInt(match[1] + match[1] + // r\n match[2] + match[2] + // g\n match[3] + match[3] + // b\n 'ff', // a\n 16) >>> 0;\n } // https://drafts.csswg.org/css-color-4/#hex-notation\n\n\n if (match = hex8.exec(color)) return parseInt(match[1], 16) >>> 0;\n\n if (match = hex4.exec(color)) {\n return parseInt(match[1] + match[1] + // r\n match[2] + match[2] + // g\n match[3] + match[3] + // b\n match[4] + match[4], // a\n 16) >>> 0;\n }\n\n if (match = hsl.exec(color)) {\n return (hslToRgb(parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) | 0x000000ff) >>> // a\n 0;\n }\n\n if (match = hsla.exec(color)) {\n return (hslToRgb(parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) | parse1(match[4])) >>> // a\n 0;\n }\n\n return null;\n}", "function normalizeColor(color) {\n let match;\n\n if (typeof color === 'number') {\n return color >>> 0 === color && color >= 0 && color <= 0xffffffff ? color : null;\n } // Ordered based on occurrences on Facebook codebase\n\n\n if (match = hex6.exec(color)) return parseInt(match[1] + 'ff', 16) >>> 0;\n if (colors.hasOwnProperty(color)) return colors[color];\n\n if (match = rgb.exec(color)) {\n return (parse255(match[1]) << 24 | // r\n parse255(match[2]) << 16 | // g\n parse255(match[3]) << 8 | // b\n 0x000000ff) >>> // a\n 0;\n }\n\n if (match = rgba.exec(color)) {\n return (parse255(match[1]) << 24 | // r\n parse255(match[2]) << 16 | // g\n parse255(match[3]) << 8 | // b\n parse1(match[4])) >>> // a\n 0;\n }\n\n if (match = hex3.exec(color)) {\n return parseInt(match[1] + match[1] + // r\n match[2] + match[2] + // g\n match[3] + match[3] + // b\n 'ff', // a\n 16) >>> 0;\n } // https://drafts.csswg.org/css-color-4/#hex-notation\n\n\n if (match = hex8.exec(color)) return parseInt(match[1], 16) >>> 0;\n\n if (match = hex4.exec(color)) {\n return parseInt(match[1] + match[1] + // r\n match[2] + match[2] + // g\n match[3] + match[3] + // b\n match[4] + match[4], // a\n 16) >>> 0;\n }\n\n if (match = hsl.exec(color)) {\n return (hslToRgb(parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) | 0x000000ff) >>> // a\n 0;\n }\n\n if (match = hsla.exec(color)) {\n return (hslToRgb(parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) | parse1(match[4])) >>> // a\n 0;\n }\n\n return null;\n}", "function hexToRgb(e){var a=/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;e=e.replace(a,function(e,a,t,i){return a+a+t+t+i+i});var t=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}", "function hexToRgb(e){var a=/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;e=e.replace(a,function(e,a,t,i){return a+a+t+t+i+i});var t=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}", "function hexToRgb(e){var a=/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;e=e.replace(a,function(e,a,t,i){return a+a+t+t+i+i});var t=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}", "function hexToRgb(e){var a=/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;e=e.replace(a,function(e,a,t,i){return a+a+t+t+i+i});var t=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}", "function hexToRgb(e){var a=/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;e=e.replace(a,function(e,a,t,i){return a+a+t+t+i+i});var t=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}", "function hexToRgb(e){var a=/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;e=e.replace(a,function(e,a,t,i){return a+a+t+t+i+i});var t=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}", "function depthColor(magnitude) {\r\n if (magnitude <= 10) {\r\n return \"#a7fb09\"\r\n } else if (magnitude <= 30) {\r\n return \"#dcf900\"\r\n } else if (magnitude <= 50) {\r\n return \"#f6de1a\"\r\n } else if (magnitude <= 70) {\r\n return \"#fbb92e\"\r\n } else if (magnitude <= 90) {\r\n return \"#faa35f\"\r\n } else {\r\n return \"#ff5967\"\r\n }\r\n}", "function colorLuminance(hex, lum) {\n // Validate hex string\n hex = String(hex).replace(/[^0-9a-f]/gi, '');\n if (hex.length < 6) {\n hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];\n }\n lum = lum || 0;\n\n // Convert to decimal and change luminosity\n var rgb = \"#\", c, i;\n for (i = 0; i < 3; i++) {\n c = parseInt(hex.substr(i*2,2), 16);\n c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);\n rgb += (\"00\"+c).substr(c.length);\n }\n\n return rgb;\n }", "function ColorLuminance(hex, lum) {\n\n // validate hex string\n hex = String(hex).replace(/[^0-9a-f]/gi, '');\n if (hex.length < 6) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n lum = lum || 0;\n\n // convert to decimal and change luminosity\n var rgb = \"#\", c, i;\n for (i = 0; i < 3; i++) {\n c = parseInt(hex.substr(i * 2, 2), 16);\n c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);\n rgb += (\"00\" + c).substr(c.length);\n }\n\n return rgb;\n }", "function red(hexColor) {\r\n return rgbValues(hexColor)[0];\r\n}", "function brightness(hex){\n var r = parseInt(hex.slice(1, 3), 16);\n var g = parseInt(hex.slice(3, 5), 16);\n var b = parseInt(hex.slice(5, 7), 16);\n return Math.sqrt(0.299 * r**2 + 0.587 * g**2 + 0.114 * b**2);\n}", "get luminance() { return this.hsl[2]; }", "function calculateNormalColor(r, g, b) {\n var intValue = 0;\n intValue = intValue | (r & 255);\n intValue = intValue << 8;\n intValue = intValue | (g & 255);\n intValue = intValue << 8;\n intValue = intValue | (b & 255);\n return intValue;\n }", "function luminanace(r, g, b) {\n var a = [r, g, b].map(function (v) {\n v /= 255;\n return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);\n });\n return a[0] * 0.2126 + a[1] * 0.7152 + a[2] * 0.0722;\n} //calculate contrast between two rgb colors", "function cBrightness(hex) { \n\tif (hex == undefined) {\n\t\treturn 0;\n\t}\n\n\tvar r = parseInt(hex.slice(1, 3), 16) / 255;\n\tvar g = parseInt(hex.slice(3, 5), 16) / 255;\n\tvar b = parseInt(hex.slice(5, 7), 16) / 255;\n\t//weight different colors differently to adjust for eye perception\n\treturn Math.sqrt(0.299 * (r * r) + 0.587 * (g * g) + 0.114 * (b * b));\n}", "function getLuma(color) {\n const rgb = colorToInt(color);\n return _color_transformSRGB__WEBPACK_IMPORTED_MODULE_3__.toXYZ(rgb)[1];\n}", "function truncateColor(color) {\n if (color < 0) return 0\n if (color > 255) return 255\n return color\n}", "function ColorLuminance(hex, lum) {\r\n\t\t// validate hex string\r\n\t\thex = String(hex).replace(/[^0-9a-f]/gi, '');\r\n\t\tif (hex.length < 6) {\r\n\t\t\thex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];\r\n\t\t}\r\n\t\tlum = lum || 0;\r\n\t\t// convert to decimal and change luminosity\r\n\t\tvar rgb = \"#\", c, i;\r\n\t\tfor (i = 0; i < 3; i++) {\r\n\t\t\tc = parseInt(hex.substr(i*2,2), 16);\r\n\t\t\tc = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);\r\n\t\t\trgb += (\"00\"+c).substr(c.length);\r\n\t\t}\r\n\t\treturn rgb;\r\n\t}", "function gam_sRGB(v) {\n if (v <= 0.0031308) {\n v *= 12.92;\n } else {\n v = 1.055 * Math.pow(v, 1.0/2.4) - 0.055;\n }\n return Math.round(v*255);\n}", "function ColorLuminance(hex, lum) {\n\n\t// validate hex string\n\thex = String(hex).replace(/[^0-9a-f]/gi, '');\n\tif (hex.length < 6) {\n\t\thex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];\n\t}\n\tlum = lum || 0;\n\n\t// convert to decimal and change luminosity\n\tvar rgb = \"#\", c, i;\n\tfor (i = 0; i < 3; i++) {\n\t\tc = parseInt(hex.substr(i*2,2), 16);\n\t\tc = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);\n\t\trgb += (\"00\"+c).substr(c.length);\n\t}\n\n\treturn rgb;\n}", "function getLuminance(hex) {\n var rgb = hexToRgb(hex); // array\n\n var red = getStandard(rgb[0]);\n\tvar green = getStandard(rgb[1]);\n\tvar blue = getStandard(rgb[2]);\n\n\treturn (0.2126*red)+(0.7152*green)+(0.0722*blue);\n}", "function colorDistance(e1, e2) {\n //console.log(\"e1e2a: \", e1, e2);\n e1 = tinycolor(e1);\n e2 = tinycolor(e2);\n //console.log(\"e1e2b: \", e1, e2);\n var rmean = (e1._r + e2._r) / 2;\n var r = e1._r - e2._r;\n var g = e1._g - e2._g;\n var b = e1._b - e2._b;\n\n return Math.sqrt((((512 + rmean) * r * r) / 256) + 4 * g * g + (((767 - rmean) * b * b) / 256));\n }", "function rgb(color){\n return [color[0]/255, color[1]/255, color[2]/255];\n}", "function magColor(mag) {\n return mag > 8 ? \"#800026\":\n mag > 7 ? \"#bd0026\":\n mag > 6 ? \"#e31a1c\":\n mag > 5 ? \"#fc4e2a\":\n mag > 4 ? \"#fd8d3c\":\n mag > 3 ? \"#feb24c\":\n mag > 2 ? \"#fed976\":\n mag > 1 ? \"#ffeda0\":\n \"#ffffcc\";\n}", "function getScale(hexColor, numberOfColors) {\n return chroma.scale(getRange(hexColor)).mode(\"lab\").colors(numberOfColors);\n}", "function magnitude(mag) {\n return mag * 5;\n}", "function computeColorScale() {\n var blue = chroma('darkblue');\n var red = chroma('darkred');\n var white = chroma('white');\n return scale = [[0, blue.css()], [0.35, white.css()], [0.5, white.css()], [0.65, white.css()], [1, red.css()]];\n}", "function getColor(mag) {\n return mag >= 5 ? \"#EA2C2C\" : \n mag >= 4? \"#EA822C\" :\n mag >= 3? \"#EE9C00\" :\n mag > 2? \"#EECC00\" :\n mag > 1? \"#D4EE00\" :\n \"#98EE00\";\n}", "function getColor(value, scale, reverse = false) {\n var color;\n var offset;\n if (reverse) {\n scale = 1-scale;\n }\n color = { r: 255, g: 255, b: 255 };\n if (value > 0) {\n color = { r: Math.round(255-(255-153)*scale), g: Math.round(255-(255-153)*scale), b: Math.round(255-(255-153)*scale) }; //gray\n }\n return color;\n}", "function dopolnitCol(hex) {\r\nvar a = hex.split(\"(\")[1].split(\")\")[0];\r\na = a.split(\",\");\r\nreturn \"rgb(\"+(255-Number(a[0])).toString()+\", \"+(255-Number(a[1])).toString()+\", \"+(255-Number(a[2])).toString()+\")\"\r\n}", "get ASTC_RGB_10x10() {}", "function inv_gam_sRGB(ic) {\n var c = ic/255;\n //todo: could break if comparing big number\n if (c <= 0.04045) {\n return c/12.92;\n } else {\n return Math.pow(((c+0.044)/(1.055)), 2.4);\n }\n}", "hexToUint (hex) {\n if (hex[0] === '#') {\n // Remove the hash\n hex = hex.substr(1);\n\n // Convert shortcolors fc9 to ffcc99\n if (hex.length === 3) {\n hex = hex.replace(/([a-f0-9])/ig, '$1$1');\n }\n return parseInt(hex, 16);\n } else {\n measureColor.style.color = hex;\n const rgb = window.getComputedStyle(document.body.appendChild(measureColor)).color\n .match(/\\d+/g)\n .map(function (a) {\n return parseInt(a, 10);\n });\n document.body.removeChild(measureColor);\n return (rgb[0] << 16) + (rgb[1] << 8) + rgb[2];\n }\n }", "colorToNumber(color){\r\n switch (color) {\r\n case 'cyan':\r\n return 0\r\n case 'violet':\r\n return 1\r\n case 'orange':\r\n return 2\r\n case 'green':\r\n return 3\r\n }\r\n }", "function luminance(r, g, b) {\n let a = [r, g, b].map((v) => {\n v /= 255;\n return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);\n });\n return a[0] * 0.2126 + a[1] * 0.7152 + a[2] * 0.0722;\n}", "function setColor(magnitude) {\n \tif (magnitude > 5) {\n \treturn '#FF0000'\n \t} else if (magnitude > 4) {\n \treturn '#FF7C00'\n \t} else if (magnitude > 3) {\n \treturn '#FFBE00'\n \t} else if (magnitude > 2) {\n \treturn '#FFF500'\n \t} else if (magnitude > 1) {\n \treturn '#AEFF00'\n \t} else {\n \treturn '#39FF00'\n \t}\n}", "function rgb(color){\n return [color[0]/255, color[1]/255, color[2]/255];\n }", "function transformColor(c) {\r\n\tif(c === 16) {\r\n\t return colorID; // Main color\r\n }\r\n\telse if(c === 24) {\r\n\t return colorID < 0 ? colorID : -colorID-1; // Edge color\r\n }\r\n\treturn c;\r\n }", "function color256(c) {\n var r = ~ ~(c[0] * 6 / 256),\n g = ~ ~(c[1] * 6 / 256),\n b = ~ ~(c[2] * 6 / 256);\n\n return r * 36 + g * 6 + b + 16;\n}", "function hexc(colorval) {\n var parts = colorval.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);\n delete(parts[0]);\n for (var i = 1; i <= 3; ++i) {\n parts[i] = parseInt(parts[i]).toString(16);\n if (parts[i].length == 1) parts[i] = '0' + parts[i];\n }\n return '#' + parts.join('');\n}", "function chooseColor(magnitude) {\n switch(true) {\n case magnitude > 6:\n return \"#FF0000\";\n case magnitude > 5:\n return \"#FF4000\";\n case magnitude > 4:\n return \"#FF8000\";\n case magnitude > 3:\n return \"#FFBF00\";\n default:\n return \"#FFFF00\";\n };\n }", "function HTMLcolorTodecimalColor( HTMLcolor) {\r\n\tvar hexString = HTMLcolor.substring(1, HTMLcolor.length)\r\n var color = parseInt(hexString, 16);\r\n\treturn color;\r\n}", "function chooseColor(magnitude) {\r\n switch (true) {\r\n case magnitude > 5:\r\n return \"#581845\";\r\n case magnitude > 4:\r\n return \"#900C3F\";\r\n case magnitude > 3:\r\n return \"#C70039\";\r\n case magnitude > 2:\r\n return \"#FF5733\";\r\n case magnitude > 1:\r\n return \"#FFC300\";\r\n default:\r\n return \"#DAF7A6\";\r\n }\r\n }" ]
[ "0.7078998", "0.6669759", "0.66650087", "0.66583747", "0.65490395", "0.6540675", "0.6501001", "0.6496558", "0.6482208", "0.6479344", "0.64791155", "0.64752406", "0.6473931", "0.6472916", "0.6468841", "0.6461499", "0.64570177", "0.64557225", "0.64205796", "0.6407454", "0.640291", "0.64007705", "0.63872045", "0.63813347", "0.6380623", "0.6363792", "0.63409513", "0.63409513", "0.63409513", "0.6326625", "0.6308582", "0.6302586", "0.62905943", "0.62849385", "0.6283412", "0.6276658", "0.62608576", "0.6229397", "0.6228324", "0.62184817", "0.6218023", "0.62048435", "0.6176055", "0.6156722", "0.6153456", "0.6148332", "0.61452013", "0.61425024", "0.61376345", "0.61371046", "0.61269516", "0.6126274", "0.61192805", "0.61168295", "0.61126995", "0.6094244", "0.6094244", "0.6078279", "0.6078279", "0.6078279", "0.6078279", "0.6078279", "0.6078279", "0.6068338", "0.6058954", "0.60524535", "0.6052323", "0.6049276", "0.60466784", "0.6025911", "0.6020291", "0.6012105", "0.6006168", "0.59920275", "0.59762496", "0.5974526", "0.5972115", "0.5967096", "0.59659225", "0.5936137", "0.5928115", "0.5926745", "0.59196013", "0.59188944", "0.5909474", "0.5893231", "0.588999", "0.5865052", "0.5864983", "0.58603674", "0.58561784", "0.5853638", "0.5832225", "0.58280003", "0.5825038", "0.5817969", "0.5801138", "0.57973784", "0.57851213", "0.57821697" ]
0.830881
0
Modifiers have the ability to execute arbitrary code before the first update cycle runs. They will be executed in the same order as the update cycle. This is useful when a modifier adds some persistent data that other modifiers need to use, but the modifier is run after the dependent one.
function runModifierEffects() { state.orderedModifiers.forEach(function (_ref3) { var name = _ref3.name, _ref3$options = _ref3.options, options = _ref3$options === void 0 ? {} : _ref3$options, effect = _ref3.effect; if (typeof effect === 'function') { var cleanupFn = effect({ state: state, name: name, instance: instance, options: options }); var noopFn = function noopFn() {}; effectCleanupFns.push(cleanupFn || noopFn); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function runModifierEffects(){state.orderedModifiers.forEach(function(_ref3){var name=_ref3.name,_ref3$options=_ref3.options,options=_ref3$options===void 0?{}:_ref3$options,effect=_ref3.effect;if(typeof effect==='function'){var cleanupFn=effect({state:state,name:name,instance:instance,options:options});var noopFn=function noopFn(){};effectCleanupFns.push(cleanupFn||noopFn);}});}", "function runModifierEffects(){state.orderedModifiers.forEach(function(_ref3){var name=_ref3.name,_ref3$options=_ref3.options,options=_ref3$options===void 0?{}:_ref3$options,effect=_ref3.effect;if(typeof effect==='function'){var cleanupFn=effect({state:state,name:name,instance:instance,options:options});var noopFn=function noopFn(){};effectCleanupFns.push(cleanupFn||noopFn);}});}", "function runModifierEffects(){state.orderedModifiers.forEach(function(_ref3){var name=_ref3.name,_ref3$options=_ref3.options,options=_ref3$options===void 0?{}:_ref3$options,effect=_ref3.effect;if(typeof effect==='function'){var cleanupFn=effect({state:state,name:name,instance:instance,options:options});var noopFn=function noopFn(){};effectCleanupFns.push(cleanupFn||noopFn);}});}", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n var noopFn = function noopFn() {};\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state1.orderedModifiers.forEach(function(_ref3) {\n var name = _ref3.name, _ref3$options = _ref3.options, options = _ref3$options === void 0 ? {\n } : _ref3$options, effect = _ref3.effect;\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state1,\n name: name,\n instance: instance,\n options: options\n });\n var noopFn = function noopFn() {\n };\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }", "function ModifierChain() {\n this._chain = [];\n if (arguments.length) this.addModifier.apply(this, arguments);\n }", "static defineModifier() {\n let mod = new Modifier;\n return (tag) => {\n if (tag.modified.indexOf(mod) > -1)\n return tag;\n return Modifier.get(tag.base || tag, tag.modified.concat(mod).sort((a, b) => a.id - b.id));\n };\n }", "function addAddEffect(modifiers, name, type, key) {\n let changes = [];\n // const bonus = utils.filterModifiers(modifiers, \"bonus\", type).reduce((a, b) => a + b.value, 0);\n const bonus = getValueFromModifiers(modifiers, name, type, \"bonus\");\n if (bonus) {\n logger.debug(`Generating ${type} bonus for ${name}`, bonus);\n changes.push(generateAddChange(bonus, 18, key));\n }\n return changes;\n}", "update() {\n // override to add custom forces before World step\n }", "function addCustomEffect(modifiers, name, type, key, extra = \"\") {\n let changes = [];\n const bonus = utils.filterModifiers(modifiers, \"bonus\", type).reduce((a, b) => a + b.value, 0);\n if (bonus !== 0) {\n logger.debug(`Generating ${type} bonus for ${name}`);\n changes.push(generateCustomChange(`${bonus}${(extra) ? extra : \"\"}`, 18, key));\n }\n return changes;\n}", "recalculateModifiers() {\n // Basic\n this.modifiers = [];\n for (var i = 0; i < this.inherentModifiers.length; i++) {\n this.modifiers.push(this.inherentModifiers[i].copy());\n }\n\n // Tools\n for ( i = 0; i < this.attachedCards.length; i++) {\n for (var j = 0; j < this.attachedCards[i].inherentModifiers.length; j++) {\n this.attachedCards[i].inherentModifiers[j].name = this.attachedCards[i].name;\n this.modifiers.push(this.attachedCards[i].inherentModifiers[j].copy());\n }\n }\n\n // Abilities\n var abilities = this.getAbilities();\n for ( i = 0; i < abilities.length; i++) {\n abilities[i].modifySelfModifiers(this, this.modifiers);\n }\n\n\n // Empowerment\n for ( i = 0; i < this.controller.empowerment; i++) {\n this.modifiers.push(ModifierD6(\"Posílení z minulého kola\"));\n }\n\n // Enemy intervention\n var enemyCreature = this.controller.session.enemy.activeCreature == this ?\n this.controller.session.you.activeCreature : this.controller.session.enemy.activeCreature;\n if (enemyCreature != null) {\n // Type bonus\n var myType = this.color;\n var enemyType = enemyCreature.color;\n if (myType == \"Leaf\" && enemyType == \"Water\") {\n this.modifiers.push(ModifierD6(\"Výhoda lesních proti vodním\"));\n } else if (myType == \"Fire\" && enemyType == \"Leaf\") {\n this.modifiers.push(ModifierD6(\"Výhoda ohně proti lesu\"));\n } else if (myType == \"Water\" && enemyType == \"Fire\") {\n this.modifiers.push(ModifierD6(\"Výhoda vody proti ohni\"));\n }\n\n var friendlyAbilities = this.getAbilities();\n for ( i = 0; i < friendlyAbilities.length; i++) {\n friendlyAbilities[i].modifySelfAgainstEnemyModifiers(this, enemyCreature, this.modifiers);\n }\n // Abilities\n var enemyAbilities = enemyCreature.getAbilities();\n for ( i = 0; i < enemyAbilities.length; i++) {\n enemyAbilities[i].modifyEnemyModifiers(enemyCreature, this, this.modifiers);\n }\n }\n // Final modifications\n for (var i = 0; i < abilities.length; i++) {\n if (abilities[i].id == \"Rozkopu\") {\n this.modifiers.length = 0;\n this.modifiers.push(new Modifier(MODIFIER_FLAT, \"img/dPlus.png\", \"Rozkopán (+10)\", 10));\n }\n }\n }", "function enableModifier(modNumber, value, len) {\n\t\tif (len == null) len = 1;\n\t\tfor (var i = modNumber; i < modNumber + len; i++) {\n\t\t\tif ( i < this.modsActive.length) {\n\t\t\t\tthis.modsActive[i] = value;\n\t\t\t}\n\t\t}\n\t\tthis.applyModifiers();\n\t}", "function applyStaticModifiers(character, modifiers, applyModifier, match) {\n let activeModifiers = { ...modifiers };\n\n // i assume background, class, feat, race are applied if their componentId is found\n // componentId seems to source the feature/component granting the modifier\n // ??? checking the component tells us to apply the modifier or not\n // i.e. sometimes the component is just a character option, not a modifier in effect\n // https://dndbeyond.com/characters/3 is an example\n // that guy has wisdom-score as an optional modifier, but isn't actually in effect\n // check for componentId last, because they could be an expensive operation\n\n // ??? do conditions matter for ability score?\n activeModifiers = character.modifiers.background.reduce((currentModifiers, modifier) => {\n const appliedModifiers = applyModifier({\n character,\n match,\n modifiers: currentModifiers,\n modifier,\n });\n if (appliedModifiers && componentIdInBackground(character, modifier.componentId)) {\n return appliedModifiers;\n }\n return currentModifiers;\n }, activeModifiers);\n\n activeModifiers = character.modifiers.class.reduce((currentModifiers, modifier) => {\n const appliedModifiers = applyModifier({\n character,\n match,\n modifiers: currentModifiers,\n modifier,\n });\n if (appliedModifiers && componentIdInClasses(character, modifier.componentId)) {\n return appliedModifiers;\n }\n return currentModifiers;\n }, activeModifiers);\n\n activeModifiers = character.modifiers.feat.reduce((currentModifiers, modifier) => {\n const appliedModifiers = applyModifier({\n character,\n match,\n modifiers: currentModifiers,\n modifier,\n });\n if (appliedModifiers && componentIdInFeats(character, modifier.componentId)) {\n return appliedModifiers;\n }\n return currentModifiers;\n }, activeModifiers);\n\n activeModifiers = character.modifiers.race.reduce((currentModifiers, modifier) => {\n const appliedModifiers = applyModifier({\n character,\n match,\n modifiers: currentModifiers,\n modifier,\n });\n if (appliedModifiers && componentIdInRace(character, modifier.componentId)) {\n return appliedModifiers;\n }\n return currentModifiers;\n }, activeModifiers);\n\n return activeModifiers;\n}", "addModifier(modifier, position) {\n if (position !== undefined) {\n modifier.setPosition(position);\n }\n\n modifier.setStave(this);\n this.formatted = false;\n this.modifiers.push(modifier);\n return this;\n }", "function modifier() {\n //text of the modifier\n this.text = modifierText;\n //status & drive effects\n this.statusEffect = modifierStatusEffect;\n this.angerEffect = modifierAngerEffect;\n this.confidenceEffect = modifierConfidenceEffect;\n this.lustEffect = modifierLustEffect;\n this.prideEffect = modifierPrideEffect;\n this.envyEffect = modifierEnvyEffect;\n}", "function L() { if (ModifierContext.DEBUG) Vex.L(\"Vex.Flow.ModifierContext\", arguments); }", "function Modifier(callback) {\n this.element = null;\n this.callback = callback;\n this.states = [];\n\n /**\n * Execute the modification on the element and cascade\n *\n * @returns {*}\n */\n this.execute = function () {\n // the element is a dependent, so perform a callback on it to modify it\n this.callback(this.element.$element);\n\n // the element might also be a dependency, so do the same to its dependents (cascade)\n this.element.modifyDependents();\n };\n\n /**\n * Set the dependent Element\n * \n * @param element\n * @return {Modifier}\n */\n this.setElement = function (element) {\n this.element = element;\n return this;\n };\n\n /**\n * Subscribe to a State\n * \n * @param state\n */\n this.subscribe = function (state) {\n state.addModifier(this);\n this.states.push(state);\n }\n }", "function modifier(rentalModifications)\n{\n for (var i = 0; i < rentalModifications.length; i++)\n {\n\n }\n}", "function applyModifiers() {\n\t\ttry {\n\t\t\tvar rt = this.funcOldString;\n\t\t\tvar active = false;\n\n\t\t\tfor (var i=0; i< this.modifiers.length; i++){\n\t\t\t\tif ( !this.modsActive[i]) continue;\n\n\t\t\t\tx = rt.replace(this.modifiers[i][0], this.modifiers[i][1]);\n\t\t\t\tif (x == rt) { // if not found\n\t\t\t\t\t// print out an error message when the match fails.\n\t\t\t\t\t// These messages get lost on a refresh, so wait a few seconds to put it in the error log.\n\t\t\t\t\tsetTimeout( function (fname, repStr, ftstr) {\n\t\t\t\t\t\treturn function () {\n\t\t\t\t\t\t\tlogit(\"Unable to replace string in function \" + fname);\n\t\t\t\t\t\t\tlogit(\"Replacement string:\" + repStr );\n\t\t\t\t\t\t\tlogit(\"Function listing: \" + ftstr);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}(this.funcName, this.modifiers[i][0], ft), 5000);\n\t\t\t\t}\n\t\t\t\telse { }\n\n\t\t\t\trt = x;\n\t\t\t\tactive = true;\n\t\t\t}\n\n\t\t\tthis.funcNew = rt;\n\t\t\tif (active) {\n\t\t\t\t// apply the new function\n\t\t\t\tuW.uWFunc(this.funcName +' = '+ this.funcNew);\n\t\t\t} else {\n\t\t\t\t// set to the original function\n\t\t\t\tvar x1 = this.funcName.split('.');\n\t\t\t\tvar f1 = uW;\n\t\t\t\tfor (var i=0; i<x1.length-1; i++)\n\t\t\t\tf1 = f1[x1[i]];\n\t\t\t\tf1[x1[x1.length-1]] = this.funcOld;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tlogit(\"CalterFuncModifier \"+ this.funcName);\n\t\t\tlogerr(err);\n\t\t}\n\t}", "function preRun(){if(Module['preRun']){if(typeof Module['preRun']=='function')Module['preRun']=[Module['preRun']];while(Module['preRun'].length){addOnPreRun(Module['preRun'].shift());}}callRuntimeCallbacks(__ATPRERUN__);}", "setViewedItemMinimumRestrictedModifiers(state, modifiers) {\n state.viewedItemMinimumRestrictedModifiers = modifiers;\n }", "get modifier () {\n\t\treturn this._modifier;\n\t}", "get modifier () {\n\t\treturn this._modifier;\n\t}", "preUpdate(time, deltaTime){\n super.preUpdate(time, deltaTime);\n\n //moves based on directionTracker parent class property\n this.manageMovement(\"ogre-idle\", \"ogre-run\"); \n }", "function addModifier(fr) {\n\t\tthis.modifiers.push(fr);\n\t\tthis.modsActive.push(false);\n\t\t// return the index of the newly added modifier\n\t\treturn this.modifiers.length-1;\n\t}", "function canModify(modifier, modified) {\n\t\tif(modifier && modified){\n\t\t\tmodifier = getRolePriority(modifier);\n\t\t\tmodified = getRolePriority(modified);\n\t\t\treturn modifier > modified;\n\t\t}\n\t\treturn false;\n}", "preUpdate(time, deltaTime){\n super.preUpdate(time, deltaTime);\n\n //moves based on directionTracker parent class property\n this.manageMovement(\"demon-big-idle\", \"demon-big-run\"); \n }", "function addCustomBonusEffect(modifiers, name, type, key) {\n let changes = [];\n const bonuses = getValueFromModifiers(modifiers, name, type, \"bonus\");\n\n if (bonuses) {\n changes.push(generateCustomChange(`${bonuses}`, 18, key));\n logger.debug(`Changes for ${type} bonus for ${name}`, changes);\n }\n\n return changes;\n}", "function modLives(modification)\n{\n\tnumLives = numLives + modification;\n}", "SetPlayerModifier(modifier){\n this.HUD.SetModifier(modifier);\n }", "emitModifiers(modifiers, implicitModifiers = []) {\n if (modifiers.length === 0) {\n return;\n }\n Modifier_1.ModifierOrder.forEach(m => {\n if (modifiers.includes(m) && !implicitModifiers.includes(m)) {\n this.emit(m).emit(' ');\n }\n });\n }", "function sort(modifier){visited.add(modifier.name);var requires=[].concat(modifier.requires||[],modifier.requiresIfExists||[]);requires.forEach(function(dep){if(!visited.has(dep)){var depModifier=map.get(dep);if(depModifier){sort(depModifier);}}});result.push(modifier);}", "function sort(modifier){visited.add(modifier.name);var requires=[].concat(modifier.requires||[],modifier.requiresIfExists||[]);requires.forEach(function(dep){if(!visited.has(dep)){var depModifier=map.get(dep);if(depModifier){sort(depModifier);}}});result.push(modifier);}", "function sort(modifier){visited.add(modifier.name);var requires=[].concat(modifier.requires||[],modifier.requiresIfExists||[]);requires.forEach(function(dep){if(!visited.has(dep)){var depModifier=map.get(dep);if(depModifier){sort(depModifier);}}});result.push(modifier);}", "function updateModifiers() {\n const abilityScores = document.getElementsByClassName('ability-score');\n for (let i = 0; i < abilityScores.length; i++) {\n updateAbilityModifier(abilityScores[i]);\n }\n}", "function addDiceModifiers() {\r\n let current_attacker_leader_modifier = 0;\r\n let current_defender_leader_modifier = 0;\r\n if (current_phase === \"fire\") {\r\n current_attacker_leader_modifier = attacker.leader_fire_advantage;\r\n current_defender_leader_modifier = defender.leader_fire_advantage;\r\n } else {\r\n current_attacker_leader_modifier = attacker.leader_shock_advantage;\r\n current_defender_leader_modifier = defender.leader_shock_advantage;\r\n }\r\n attacker.dice_roll += current_attacker_leader_modifier - terrain - crossing;\r\n defender.dice_roll += current_defender_leader_modifier;\r\n\r\n}", "ModifierDefinition(_node) {\n current_contract.modifiers[_node.name]={\n _node:_node,\n arguments: {}, // declarations: quick access to argument list\n returns: {}, // declarations: quick access to return argument list\n declarations: {}, // all declarations: arguments+returns+body\n identifiers: [], // all identifiers (use of variables)\n };\n \n current_function = current_contract.modifiers[_node.name];\n current_contract.names[_node.name]=current_function;\n // parse function body to get all function scope params.\n // first get declarations\n parser.visit(_node.parameters, {\n VariableDeclaration: function(__node){\n current_function.arguments[__node.name]=__node;\n current_function.declarations[__node.name]=__node;\n }\n });\n parser.visit(_node.returnParameters, {\n VariableDeclaration: function(__node){\n current_function.arguments[__node.name]=__node;\n current_function.declarations[__node.name]=__node;\n }\n });\n /**** body declarations */\n parser.visit(_node.body, {\n VariableDeclaration(__node) {current_function.declarations[__node.name] = __node;}\n });\n /**** all identifier */\n /**** body declarations */\n parser.visit(_node, {\n //resolve scope\n // check if defined in \n //\n //\n Identifier(__node) {\n if (!current_function) {\n return;\n }\n __node.inFunction = current_function;\n current_function.identifiers.push(__node);\n }\n });\n }", "get modifier() {\n\t\treturn this.__modifier;\n\t}", "resume() {\n // override to add custom forces before World step\n }", "function maybeModifier (predicate) {\n\t return function () {\n\t if (!check.defined(arguments[0]) || check.nulled(arguments[0])) {\n\t return true\n\t }\n\t return predicate.apply(null, arguments)\n\t }\n\t }", "function enterModificationReal() {\n\t suspendEvents += 1;\n\t }", "function enterModificationReal() {\n\t suspendEvents += 1;\n\t }", "function Modifiers() {\n this.modTypes = [];\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function createModifierFunction (modifier) {\r\n return function (obj, field, value) {\r\n var fieldParts = typeof field === 'string' ? field.split('.') : field;\r\n\r\n if (fieldParts.length === 1) {\r\n lastStepModifierFunctions[modifier](obj, field, value);\r\n } else {\r\n obj[fieldParts[0]] = obj[fieldParts[0]] || {};\r\n modifierFunctions[modifier](obj[fieldParts[0]], fieldParts.slice(1), value);\r\n }\r\n };\r\n}", "function applyModifiers(character, modifiers, applyModifier, match) {\n let activeModifiers = applyStaticModifiers(character, modifiers, applyModifier, match);\n\n // items have grantedModifiers, but we need to check if they're equipped and attunement rules\n activeModifiers = character.inventory.reduce((currentModifiers, {\n equipped, isAttuned, definition: {\n grantedModifiers,\n },\n }) => {\n // ??? an item can only apply modifiers if they're equipped\n if (!equipped) {\n return currentModifiers;\n }\n return grantedModifiers.reduce((currentModifiersInner, modifier) => {\n const { requiresAttunement } = modifier;\n if (requiresAttunement && !isAttuned) {\n return currentModifiersInner;\n }\n const appliedModifiers = applyModifier({\n character,\n match,\n modifiers: currentModifiersInner,\n modifier,\n });\n return appliedModifiers ?? currentModifiersInner;\n }, currentModifiers);\n }, activeModifiers);\n\n return activeModifiers;\n}", "beforeUpdate(){\n console.log('beforeUpdate');\n }", "injectModifier(codeSource) {\n let oldNode = new RcmTreeNode(this, this)\n for (let field in this) {\n delete this[field]\n }\n\n this.type = 'InjectedModifier'\n this.code = codeSource\n this.oldNode = oldNode\n this.parent = oldNode.parent\n }", "function applyPassiveModifiers({\n match,\n modifiers,\n modifier: { subType, type, value },\n}) {\n const appliedAbilityModifiers = { ...modifiers };\n // ??? handle restricted bonuses\n if (subType === match && type === 'bonus') {\n appliedAbilityModifiers.passiveBonus += value;\n return appliedAbilityModifiers;\n }\n if (subType === match && type === 'set') {\n appliedAbilityModifiers.passiveSets.push(value);\n return appliedAbilityModifiers;\n }\n return null;\n}", "_depend(changers, _allow_unordered) {\n if (Tracker.active) {\n const dependency = new Tracker.Dependency;\n const notify = dependency.changed.bind(dependency);\n\n dependency.depend();\n\n const options = {_allow_unordered, _suppress_initial: true};\n\n ['added', 'addedBefore', 'changed', 'movedBefore', 'removed']\n .forEach(fn => {\n if (changers[fn]) {\n options[fn] = notify;\n }\n });\n\n // observeChanges will stop() when this computation is invalidated\n this.observeChanges(options);\n }\n }", "_modifiers(e) {\n const [_x, _y] = ELEM.getScrollPosition(0);\n const [x, y] = [Event.pointerX(e), Event.pointerY(e)];\n if (!isNaN(x) || isNaN(y)) {\n this.status.setCrsr(x, y);\n }\n this.status.setAltKey(e.altKey);\n this.status.setCtrlKey(e.ctrlKey);\n this.status.setShiftKey(e.shiftKey);\n this.status.setMetaKey(e.metaKey);\n }", "_modifiers(e) {\n const [_x, _y] = ELEM.getScrollPosition(0);\n const [x, y] = [Event.pointerX(e), Event.pointerY(e)];\n if (!isNaN(x) || isNaN(y)) {\n this.status.setCrsr(x, y);\n }\n this.status.setAltKey(e.altKey);\n this.status.setCtrlKey(e.ctrlKey);\n this.status.setShiftKey(e.shiftKey);\n this.status.setMetaKey(e.metaKey);\n }", "mutate() {}", "mutate() {}", "function update() {\n\t // if popper is destroyed, don't perform any further update\n\t if (this.state.isDestroyed) {\n\t return;\n\t }\n\n\t var data = {\n\t instance: this,\n\t styles: {},\n\t arrowStyles: {},\n\t attributes: {},\n\t flipped: false,\n\t offsets: {}\n\t };\n\n\t // compute reference element offsets\n\t data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n\t // compute auto placement, store placement inside the data object,\n\t // modifiers will be able to edit `placement` if needed\n\t // and refer to originalPlacement to know the original value\n\t data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n\t // store the computed placement inside `originalPlacement`\n\t data.originalPlacement = data.placement;\n\n\t // compute the popper offsets\n\t data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\t data.offsets.popper.position = 'absolute';\n\n\t // run the modifiers\n\t data = runModifiers(this.modifiers, data);\n\n\t // the first `update` will call `onCreate` callback\n\t // the other ones will call `onUpdate` callback\n\t if (!this.state.isCreated) {\n\t this.state.isCreated = true;\n\t this.options.onCreate(data);\n\t } else {\n\t this.options.onUpdate(data);\n\t }\n\t}", "function checkModifier(oldMod, newMod) {\n return newMod - oldMod;\n }", "function enterModificationReal() {\n suspendEvents += 1;\n }", "function enterModificationReal() {\n suspendEvents += 1;\n }", "function update() {\n\t // if popper is destroyed, don't perform any further update\n\t if (this.state.isDestroyed) {\n\t return;\n\t }\n\t\n\t var data = {\n\t instance: this,\n\t styles: {},\n\t arrowStyles: {},\n\t attributes: {},\n\t flipped: false,\n\t offsets: {}\n\t };\n\t\n\t // compute reference element offsets\n\t data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\t\n\t // compute auto placement, store placement inside the data object,\n\t // modifiers will be able to edit `placement` if needed\n\t // and refer to originalPlacement to know the original value\n\t data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\t\n\t // store the computed placement inside `originalPlacement`\n\t data.originalPlacement = data.placement;\n\t\n\t // compute the popper offsets\n\t data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\t data.offsets.popper.position = 'absolute';\n\t\n\t // run the modifiers\n\t data = runModifiers(this.modifiers, data);\n\t\n\t // the first `update` will call `onCreate` callback\n\t // the other ones will call `onUpdate` callback\n\t if (!this.state.isCreated) {\n\t this.state.isCreated = true;\n\t this.options.onCreate(data);\n\t } else {\n\t this.options.onUpdate(data);\n\t }\n\t}", "function ApplyAnimModifier(m:float):void {\n\tcharDummy.animation[\"slash1\"].speed *= m;\n\tcharDummy.animation[\"thrust-release\"].speed *= m;\n\tcharDummy.animation[\"thrust-windup\"].speed *= m;\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function addBonusSpeedEffect(modifiers, name, subType, speedType = null) {\n const bonuses = modifiers.filter((modifier) => modifier.type === \"bonus\" && modifier.subType === subType);\n\n let effects = [];\n // \"Equal to Walking Speed\"\n // max(10+(ceil(((@classes.monk.levels)-5)/4))*5,10)\n if (bonuses.length > 0) {\n logger.debug(`Generating ${subType} speed bonus for ${name}`);\n if (!speedType) {\n const innate = subType.split(\"-\").slice(-1)[0];\n speedType = DICTIONARY.character.speeds.find((s) => s.innate === innate).type;\n }\n const bonusValue = bonuses.reduce((speed, mod) => speed + mod.value, 0);\n if (speedType === \"all\") {\n effects.push(generateCustomChange(`+ ${bonusValue}`, 9, `data.attributes.movement.${speedType}`));\n } else {\n effects.push(generateAddChange(bonusValue, 9, `data.attributes.movement.${speedType}`));\n }\n }\n return effects;\n}", "getModifierState(keyArg) {\n return Boolean(this[`modifier${keyArg}`]);\n }", "function execute_code() \r\n{\r\n\t// add player code to the end of base code\r\n\tvar exe_code = base_code + update_code + player_code;\r\n\r\n\t// execute code\r\n\ttry {\r\n\t\tvar source = text_editor_script.pyEngine.CreateScriptSourceFromString(exe_code);\r\n\t\tsource.Execute(P01_scope);\r\n\t}\r\n\r\n\tcatch (error : System.Exception) { \r\n \tDebug.LogException(error);\r\n }\r\n\r\n\t// reassign editable variables\r\n\tactivated = true;\r\n\tdistance_to_move = P01_scope.GetVariable.<float>(\"distance_to_move\");\r\n\r\n\tif (activated)\r\n\t{\r\n\t\troller_ball.GetComponent.<roller_ball>().activated = true;\r\n\t\troller_ball.GetComponent.<roller_ball>().distance_to_move = distance_to_move;\r\n\t}\r\n\r\n}", "function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }", "function Update() {\n\tmyBehavior.Update();\n}", "function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }", "function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }", "function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }", "function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }" ]
[ "0.6899217", "0.6899217", "0.6899217", "0.65973413", "0.6554783", "0.65511376", "0.65511376", "0.6528902", "0.6522295", "0.5640873", "0.5548874", "0.54205", "0.5367152", "0.5282087", "0.5209293", "0.514531", "0.5135397", "0.51228476", "0.50885075", "0.50815284", "0.5081525", "0.5071073", "0.50540864", "0.50393045", "0.49761313", "0.49711016", "0.49711016", "0.49653935", "0.4954865", "0.4943325", "0.49429467", "0.49394155", "0.49132052", "0.49047995", "0.49008048", "0.4883631", "0.4883631", "0.4883631", "0.48616165", "0.4858596", "0.48369724", "0.4833017", "0.48217928", "0.48144495", "0.48084038", "0.48084038", "0.48064014", "0.4804132", "0.48017442", "0.4790364", "0.4773394", "0.47606677", "0.4753783", "0.47452277", "0.4740852", "0.4740852", "0.47193116", "0.47193116", "0.4711179", "0.47094736", "0.4701514", "0.4701514", "0.46976745", "0.4694947", "0.46865743", "0.46865743", "0.46865743", "0.46865743", "0.4685129", "0.46695614", "0.46649975", "0.46566957", "0.46556553", "0.46526772", "0.46526772", "0.46526772", "0.46526772" ]
0.6535009
28
clipping (or hiding) overflowing elements with a position different from `initial`
function getClippingParents(element) { var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__["default"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__["default"])(element)); var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__["default"])(element).position) >= 0; var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__["isHTMLElement"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__["default"])(element) : element; if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__["isElement"])(clipperElement)) { return []; } // $FlowFixMe: https://github.com/facebook/flow/issues/1414 return clippingParents.filter(function (clippingParent) { return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__["isElement"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__["default"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__["default"])(clippingParent) !== 'body'; }); } // Gets the maximum area that the element is visible in due to any number of
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetHiddenItemSize() {\n TweenLite.to(_element, 0, {scale: 1});\n }", "revertPosition() {\n const context = this.context,\n original = context.originalPosition; // revert to correct location\n\n if (original.next) {\n const isNoop = original.next && original.next.previousSibling === context.dragging || !original.next && context.dragging === original.parent.lastChild;\n\n if (!isNoop) {\n original.parent.insertBefore(context.dragging, original.next);\n }\n } else {\n original.parent.appendChild(context.dragging);\n } // no target container\n\n context.draggedTo = null;\n }", "revertPosition() {\n const context = this.context,\n original = context.originalPosition;\n\n // revert to correct location\n if (original.next) {\n const isNoop =\n (original.next && original.next.previousSibling === context.dragging) ||\n (!original.next && context.dragging === original.parent.lastChild);\n\n if (!isNoop) {\n original.parent.insertBefore(context.dragging, original.next);\n }\n } else {\n original.parent.appendChild(context.dragging);\n }\n\n // no target container\n context.draggedTo = null;\n }", "function _revert_element(ui) {\n // make element assume previous size\n if (ui.originalSize) {\n ui.helper.height(ui.originalSize.height);\n }\n}", "set originalClip(value) {}", "function clamp(pos){pos.top=Math.max(Math.min(pos.top,bounds.bottom-containerNode.offsetHeight),bounds.top);pos.left=Math.max(Math.min(pos.left,bounds.right-containerNode.offsetWidth),bounds.left);}", "removeFlipped ()\r\n {\r\n //card.classList.remove(\"revealed\");\r\n this.arr.forEach (card => {card.classList.remove(\"visible\");})\r\n }", "function clip (x, l, h)\n{\n if (x < l)\n x = l;\n if (x > h)\n x = h;\n \n return x;\n\t\n}", "hideOffscreenElements() {\n const startIndex = Math.floor(-(this.scrollContainer.y - this.y) / this.itemHeight);\n const endIndex = Math.floor(startIndex + (this.height / this.itemHeight));\n for (let i = 0; i < this.items.length; i++) {\n const item = this.items[i];\n item.visible = false;\n if (i >= startIndex && i <= endIndex + 1) {\n item.visible = true;\n }\n }\n }", "function clip(x,a,b){return b===undefined?x>a?a:x<-a?-a:x:x>b?b:x<a?a:x}", "setPositionLimits() {\n\t\tconst elementRect = this.element.getBoundingClientRect();\n\t\tif (elementRect.left < 0) {\n\t\t\tthis.element.style.left = '0px';\n\t\t}\n\t\tif (elementRect.top < 0) {\n\t\t\tthis.element.style.top = '0px';\n\t\t}\n\t}", "function getClippingParents(element){var clippingParents=listScrollParents(getParentNode(element));var canEscapeClipping=['absolute','fixed'].indexOf(getComputedStyle(element).position)>=0;var clipperElement=canEscapeClipping&&isHTMLElement(element)?getOffsetParent(element):element;if(!isElement(clipperElement)){return [];}// $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\nreturn clippingParents.filter(function(clippingParent){return isElement(clippingParent)&&contains(clippingParent,clipperElement)&&getNodeName(clippingParent)!=='body';});}// Gets the maximum area that the element is visible in due to any number of", "function lipMask(_ref) {\n var _ref$canvas = _ref.canvas,\n canvas = _ref$canvas === undefined ? null : _ref$canvas,\n outerlipArray = _ref.outerlipArray,\n innerlipArray = _ref.innerlipArray,\n lipsOpened = _ref.lipsOpened,\n w = _ref.w,\n h = _ref.h,\n _ref$size = _ref.size,\n size = _ref$size === undefined ? 1.0 : _ref$size,\n _ref$color = _ref.color,\n color = _ref$color === undefined ? 'rgba(255,100,0,0.3)' : _ref$color,\n _ref$scale = _ref.scale,\n scale = _ref$scale === undefined ? null : _ref$scale,\n _ref$blurLevel = _ref.blurLevel,\n blurLevel = _ref$blurLevel === undefined ? 0.02 : _ref$blurLevel,\n _ref$topSize = _ref.topSize,\n topSize = _ref$topSize === undefined ? 1 : _ref$topSize;\n\n var canvasTemp = createCanvas({ canvas: canvas, w: w, h: h });\n var contextTemp = canvasTemp.getContext('2d');\n\n if (scale) {\n contextTemp.scale(scale.x, scale.y);\n }\n\n if (outerlipArray.length === 0) {\n console.log('Error: outerlip length is 0');\n return;\n }\n\n if (innerlipArray.length === 0) {\n console.log('Error: innerlip length is 0');\n return;\n }\n\n var minx = -1,\n maxx = -1;\n var miny = -1,\n maxy = -1;\n for (var i = 0, l = outerlipArray.length; i < l; i++) {\n if (minx === -1) {\n minx = outerlipArray[i].x;\n } else {\n if (minx > outerlipArray[i].x) {\n minx = outerlipArray[i].x;\n }\n }\n\n if (maxx === -1) {\n maxx = outerlipArray[i].x;\n } else {\n if (maxx < outerlipArray[i].x) {\n maxx = outerlipArray[i].x;\n }\n }\n\n if (miny === -1) {\n miny = outerlipArray[i].y;\n } else {\n if (miny > outerlipArray[i].y) {\n miny = outerlipArray[i].y;\n }\n }\n\n if (maxy === -1) {\n maxy = outerlipArray[i].y;\n } else {\n if (maxy < outerlipArray[i].y) {\n maxy = outerlipArray[i].y;\n }\n }\n }\n\n if (miny > maxy) {\n console.log('Error: something wrong with lip coords');\n return;\n }\n\n var lipbox = [minx, miny, maxx, maxy];\n\n var lipw = lipbox[2] - lipbox[0];\n // const liph = lipbox[3] - lipbox[1];\n\n var blurradius = Math.max(1, Math.round(lipw * blurLevel));\n\n var bluroff = blurradius * 2;\n var newx0 = Math.max(0, lipbox[0] - bluroff);\n var newy0 = Math.max(0, lipbox[1] - bluroff);\n var newx1 = Math.min(w - 1, lipbox[2] + bluroff);\n var newy1 = Math.min(h - 1, lipbox[3] + bluroff);\n\n var newy_avg = Math.round((newy1 - newy0) / 2);\n\n var blurw = newx1 - newx0;\n var blurh = newy1 - newy0;\n\n canvasTemp.width = blurw;\n canvasTemp.height = blurh;\n\n // contextTemp.clearRect(0, 0, blurw, blurh);\n\n var curvelevel = 0.36;\n\n // draw outer lips\n var rmi = 6;\n\n contextTemp.beginPath();\n\n contextTemp.moveTo(outerlipArray[0].x - newx0, (outerlipArray[0].y - newy0) * size);\n\n for (var _i = 0, _l = outerlipArray.length; _i < _l; _i++) {\n var bh0 = (_i - 1 + _l) % _l;\n var p0 = _i;\n var p1 = (_i + 1) % _l;\n var bh1 = (_i + 2) % _l;\n\n var bh0pos = [outerlipArray[bh0].x - newx0, outerlipArray[bh0].y - newy0];\n var p0pos = [outerlipArray[p0].x - newx0, outerlipArray[p0].y - newy0];\n var p1pos = [outerlipArray[p1].x - newx0, outerlipArray[p1].y - newy0];\n var bh1pos = [outerlipArray[bh1].x - newx0, outerlipArray[bh1].y - newy0];\n\n var l0_dist = Math.sqrt((p1pos[0] - bh0pos[0]) * (p1pos[0] - bh0pos[0]) + (p1pos[1] - bh0pos[1]) * (p1pos[1] - bh0pos[1]));\n var l0_xu = (p1pos[0] - bh0pos[0]) / l0_dist;\n var l0_yu = (p1pos[1] - bh0pos[1]) / l0_dist;\n\n var l1_dist = Math.sqrt((p0pos[0] - bh1pos[0]) * (p0pos[0] - bh1pos[0]) + (p0pos[1] - bh1pos[1]) * (p0pos[1] - bh1pos[1]));\n var l1_xu = (p0pos[0] - bh1pos[0]) / l1_dist;\n var l1_yu = (p0pos[1] - bh1pos[1]) / l1_dist;\n\n var mydist = Math.sqrt((p0pos[0] - p1pos[0]) * (p0pos[0] - p1pos[0]) + (p0pos[1] - p1pos[1]) * (p0pos[1] - p1pos[1])) * curvelevel;\n\n var b0pos = void 0,\n b1pos = void 0,\n p0_top_size = void 0,\n p1_top_size = void 0;\n\n if (_i === 0 || _i === rmi) {\n b0pos = [p0pos[0], p0pos[1]];\n } else {\n b0pos = [p0pos[0] + mydist * l0_xu, p0pos[1] + mydist * l0_yu];\n }\n\n if (_i === rmi - 1 || _i === _l - 1) {\n b1pos = [p1pos[0], p1pos[1]];\n } else {\n b1pos = [p1pos[0] + mydist * l1_xu, p1pos[1] + mydist * l1_yu];\n }\n\n if (p0 > 0 && p0 < rmi) {\n p0_top_size = topSize;\n } else {\n p0_top_size = 1;\n }\n\n if (p1 > 0 && p1 < rmi) {\n p1_top_size = topSize;\n } else {\n p1_top_size = 1;\n }\n\n contextTemp.bezierCurveTo(b0pos[0], newy_avg + (b0pos[1] * size - newy_avg) * p0_top_size, b1pos[0], newy_avg + (b1pos[1] * size - newy_avg) * p1_top_size, p1pos[0], newy_avg + (p1pos[1] * size - newy_avg) * p1_top_size);\n }\n\n if (Boolean(lipsOpened) === true) {\n //temp inner lips\n var _curvelevel = 0.36;\n var _rmi = 4;\n var _l2 = innerlipArray.length;\n\n contextTemp.moveTo(innerlipArray[_l2 - 1].x - newx0, (innerlipArray[_l2 - 1].y - newy0) * size);\n\n for (var _i2 = _l2 - 1; _i2 >= 0; _i2--) {\n var _bh = (_i2 + 1) % _l2;\n var _p = _i2;\n var _p2 = (_i2 - 1 + _l2) % _l2;\n var _bh2 = (_i2 - 2 + _l2) % _l2;\n\n var _bh0pos = [innerlipArray[_bh].x - newx0, innerlipArray[_bh].y - newy0];\n var _p0pos = [innerlipArray[_p].x - newx0, innerlipArray[_p].y - newy0];\n var _p1pos = [innerlipArray[_p2].x - newx0, innerlipArray[_p2].y - newy0];\n var _bh1pos = [innerlipArray[_bh2].x - newx0, innerlipArray[_bh2].y - newy0];\n\n var _l0_dist = Math.sqrt((_p1pos[0] - _bh0pos[0]) * (_p1pos[0] - _bh0pos[0]) + (_p1pos[1] - _bh0pos[1]) * (_p1pos[1] - _bh0pos[1]));\n var _l0_xu = (_p1pos[0] - _bh0pos[0]) / _l0_dist;\n var _l0_yu = (_p1pos[1] - _bh0pos[1]) / _l0_dist;\n\n var _l1_dist = Math.sqrt((_p0pos[0] - _bh1pos[0]) * (_p0pos[0] - _bh1pos[0]) + (_p0pos[1] - _bh1pos[1]) * (_p0pos[1] - _bh1pos[1]));\n var _l1_xu = (_p0pos[0] - _bh1pos[0]) / _l1_dist;\n var _l1_yu = (_p0pos[1] - _bh1pos[1]) / _l1_dist;\n\n var _mydist = Math.sqrt((_p0pos[0] - _p1pos[0]) * (_p0pos[0] - _p1pos[0]) + (_p0pos[1] - _p1pos[1]) * (_p0pos[1] - _p1pos[1])) * _curvelevel;\n\n var _b0pos = void 0,\n _b1pos = void 0;\n\n if (_i2 === 0 || _i2 === _rmi) {\n _b0pos = [_p0pos[0], _p0pos[1]];\n } else {\n _b0pos = [_p0pos[0] + _mydist * _l0_xu, _p0pos[1] + _mydist * _l0_yu];\n }\n\n if (_i2 === _rmi + 1 || _i2 === 1) {\n _b1pos = [_p1pos[0], _p1pos[1]];\n } else {\n _b1pos = [_p1pos[0] + _mydist * _l1_xu, _p1pos[1] + _mydist * _l1_yu];\n }\n\n contextTemp.bezierCurveTo(_b0pos[0], _b0pos[1] * size, _b1pos[0], _b1pos[1] * size, _p1pos[0], _p1pos[1] * size);\n }\n }\n\n contextTemp.closePath();\n contextTemp.fillStyle = color;\n contextTemp.fill();\n\n return {\n canvas: canvasTemp,\n coords: [newx0, newy0 + (outerlipArray[0].y - newy0) - (outerlipArray[0].y - newy0) * size, blurw, blurh],\n newx0: newx0,\n newy0: newy0,\n blurradius: blurradius,\n lipw: lipw\n };\n}", "set overrideClip(value) {}", "function getClippingParents(element){var clippingParents=listScrollParents(getParentNode(element));var canEscapeClipping=['absolute','fixed'].indexOf(getComputedStyle$1(element).position)>=0;var clipperElement=canEscapeClipping&&isHTMLElement(element)?getOffsetParent(element):element;if(!isElement(clipperElement)){return [];}// $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\nreturn clippingParents.filter(function(clippingParent){return isElement(clippingParent)&&contains(clippingParent,clipperElement)&&getNodeName(clippingParent)!=='body';});}// Gets the maximum area that the element is visible in due to any number of", "function undoColorStretch(val) {\n return Math.pow(val, POPULATION_VIS_NONLINEARITY) * POPULATION_VIS_MAX_VALUE;\n}", "offscreen(){return this.x < -this.w}", "reset() {\n let el = this.$();\n if (!el) { return; }\n\n delete this._y;\n delete this._x;\n\n el.css({ transform: '' });\n el.height(); // Force-apply styles\n }", "function getClippingParents$1(element){var clippingParents=listScrollParents$1(getParentNode$1(element));var canEscapeClipping=['absolute','fixed'].indexOf(getComputedStyle$2(element).position)>=0;var clipperElement=canEscapeClipping&&isHTMLElement$1(element)?getOffsetParent$1(element):element;if(!isElement$1(clipperElement)){return [];}// $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\nreturn clippingParents.filter(function(clippingParent){return isElement$1(clippingParent)&&contains$1(clippingParent,clipperElement)&&getNodeName$1(clippingParent)!=='body';});}// Gets the maximum area that the element is visible in due to any number of", "hideLower() {\n const filteredTiles = this._filterForLower();\n if (!filteredTiles || !filteredTiles.length) {\n this._error(`No islands found buying for below ${this.minimumBells}.`);\n return;\n }\n\n filteredTiles.forEach((tag) => {\n const parent = tag.parentElement.parentElement.parentElement;\n if (parent) parent.setAttribute('style', 'display: none;'); \n });\n this._info(`Hidden islands lower than ${this.minimumBells}.`);\n }", "_makeAncestorsOverflowVisible() {\n this.ancestorsChanged = $();\n let ancestor = this.placeholder[0].parentNode;\n while (ancestor !== null && !$(ancestor).is(document)) {\n let curr = $(ancestor);\n if (curr.css('overflow') !== 'visible') {\n curr.css('overflow', 'visible');\n if (this.ancestorsChanged === undefined) {\n this.ancestorsChanged = curr;\n }\n else {\n this.ancestorsChanged = this.ancestorsChanged.add(curr);\n }\n }\n ancestor = ancestor.parentNode;\n }\n }", "_validateItemsSizeOverflowing(sizeDifference, noStyleChangedIgnoring) {\n const that = this,\n itemsCount = that._items.length;\n let newSize = 0,\n initialSize, itemsLocked = [], currentSize, currentlySetSize, lastLockedItem,\n containerRect = that.$.container.getBoundingClientRect();\n\n for (let i = 0; i < that._items.length; i++) {\n //Note: If the size is set in percentages via CSS, it's not possible check if it's really percentages or not \n //because even getComputedStyle returns the computed size not the original.\n //The only way to work is by setting the size property to a percentage value !\n currentlySetSize = that._items[i].style[that._measurements.dimension];\n currentSize = currentlySetSize.indexOf('%') > -1 ? currentlySetSize : that._items[i][that._measurements.size];\n\n if (!currentlySetSize && !that._items[i].size && that._items[i].size !== 0) {\n delete that._items[i]._originalSize;\n }\n\n that._items[i]._originalSize = that._items[i]._originalSize ? that._items[i]._originalSize : currentSize;\n itemsLocked.push(that._items[i].locked);\n }\n\n if (itemsLocked.indexOf(false) < 0) {\n lastLockedItem = that._items[that._items.length - 1];\n lastLockedItem.locked = false;\n }\n\n //Check how many items should be resized to fit\n for (let i = itemsCount - 1; i >= 0; i--) {\n if (that._items[i].collapsed || that._items[i].locked) {\n continue;\n }\n\n if ((that._items[i]._originalSize + '').indexOf('%') > -1) {\n that._items[i].style[that._measurements.dimension] = that._items[i]._originalSize;\n that._items[i]._sizeBeforeCollapse = containerRect[that._measurements.dimension] * parseFloat(that._items[i]._originalSize) / 100;\n continue;\n }\n\n if (sizeDifference === 0) {\n continue;\n }\n\n //Doesn't include the item paddings\n initialSize = that._items[i].getBoundingClientRect()[that._measurements.dimension];\n\n newSize = initialSize - sizeDifference;\n\n //May trigger the styleChanged event\n that._items[i].style[that._measurements.dimension] =\n (that._items[i]._sizeBeforeCollapse = Math.max(that._items[i]._sizeLimits ? that._items[i]._sizeLimits[that._measurements.minDimension] : 0, newSize)) + 'px';\n\n sizeDifference -= initialSize - that._items[i]._sizeBeforeCollapse;\n }\n\n //Reduce the min-sizes if necessary\n if (sizeDifference > 0) {\n for (let i = itemsCount - 1; i >= 0; i--) {\n if (that._items[i].collapsed) {\n continue;\n }\n\n initialSize = that._items[i].getBoundingClientRect()[that._measurements.dimension];\n newSize = initialSize - sizeDifference;\n\n let itemMin = that._items[i]._sizeLimits[that._measurements.minDimension] || that._items[i].min;\n\n if (itemMin) {\n if ((itemMin + '').indexOf('%') > -1) {\n itemMin = parseFloat(itemMin) / 100 * that._items[i].parentElement[that._measurements.size];\n }\n else {\n itemMin = parseFloat(itemMin);\n }\n\n if (itemMin > newSize) {\n //Ignore the StyleChanged event\n that._items[i]._sizeLimits.ignoreUpdate = noStyleChangedIgnoring ? false : true;\n that._items[i].style[that._measurements.minDimension] = Math.max(0, newSize) + 'px';\n }\n }\n\n if (that._items[i]._originalSize && (that._items[i]._originalSize + '').indexOf('%') > -1) {\n continue;\n }\n\n that._items[i]._sizeLimits.ignoreUpdate = noStyleChangedIgnoring ? false : true;\n that._items[i].style[that._measurements.dimension] = (that._items[i]._sizeBeforeCollapse = Math.max(0, newSize)) + 'px';\n\n sizeDifference -= initialSize - that._items[i]._sizeBeforeCollapse;\n }\n }\n\n if (lastLockedItem) {\n lastLockedItem.locked = true;\n }\n }", "_validateItemsSizeUnderflowing(sizeDifference, noStyleChangedIgnoring) {\n const that = this,\n itemsCount = that._items.length;\n let newSize = 0,\n initialSize, lastLockedItem;\n\n sizeDifference = Math.abs(sizeDifference);\n\n if (that._items.length > 0 && that._items.map(item => item.locked).indexOf(false) < 0) {\n lastLockedItem = that._items[that._items.length - 1];\n lastLockedItem.locked = false;\n }\n\n //Increase the min-size of the items if it has been changed\n for (let i = 0; i < itemsCount; i++) {\n if (that._items[i].collapsed || that._items[i][that._measurements.size] >= (that._items[i]._sizeLimits ? that._items[i]._sizeLimits[that._measurements.minDimension] : 0)) {\n continue;\n }\n\n initialSize = that._items[i][that._measurements.size];\n newSize = that._items[i][that._measurements.size] + sizeDifference;\n\n if (that._items[i][that._measurements.size] < that._items[i]._sizeLimits[that._measurements.minDimension]) {\n //Ignore the StyleChanged event\n that._items[i]._sizeLimits.ignoreUpdate = noStyleChangedIgnoring ? false : true;\n that._items[i].style[that._measurements.minDimension] =\n (that._items[i]._sizeBeforeCollapse = Math.max(0, Math.min(that._items[i]._sizeLimits[that._measurements.minDimension], newSize))) + 'px';\n }\n\n sizeDifference -= (that._items[i]._sizeBeforeCollapse || that._items[i][that._measurements.size]) - initialSize;\n\n if (sizeDifference <= 0) {\n break;\n }\n }\n\n const containerSize = that.$.container.getBoundingClientRect()[that._measurements.dimension];\n\n if (sizeDifference > 0) {\n for (let i = 0; i < itemsCount; i++) {\n if (that._items[i].collapsed || that._items[i].locked) {\n continue;\n }\n\n if (that._items[i]._originalSize !== undefined) {\n if ((that._items[i]._originalSize + '').indexOf('%') > -1) {\n that._items[i].style[that._measurements.dimension] = that._items[i]._originalSize;\n that._items[i]._sizeBeforeCollapse = (parseFloat(that._items[i]._originalSize) * containerSize) / 100;\n //delete that._items[i]._originalSize;\n }\n else if (that._items[i][that._measurements.size] >= that._items[i]._originalSize) {\n sizeDifference += that._items[i][that._measurements.size] - that._items[i]._originalSize;\n that._items[i].style[that._measurements.dimension] = (that._items[i]._sizeBeforeCollapse = that._items[i]._originalSize) + 'px';\n }\n else {\n newSize = Math.min(that._items[i]._originalSize, that._items[i][that._measurements.size] + sizeDifference);\n\n const usedSize = newSize - that._items[i][that._measurements.size];\n\n if (that._items[i][that._measurements.minDimension] < that._items[i]._sizeLimits[that._measurements.minDimension]) {\n that._items[i].style[that._measurements.minDimension] = Math.min(that._items[i]._sizeLimits[that._measurements.minDimension], newSize) + 'px';\n }\n\n that._items[i].style[that._measurements.dimension] = (that._items[i]._sizeBeforeCollapse = Math.max(0, Math.min(newSize, that._items[i]._originalSize))) + 'px';\n sizeDifference -= usedSize;\n }\n\n if (sizeDifference <= 0) {\n break;\n }\n }\n }\n }\n\n if (lastLockedItem) {\n lastLockedItem.locked = true;\n }\n }", "function reset() {\n $boundary\n .css('height', 'auto')\n .find('.placeholder')\n .remove()\n .end()\n .find('.draggable')\n .attr('style', '');\n }", "set clip(value) {}", "constructor() {\n super();\n this.offset = -10;\n this.fitToVisibleBounds = true;\n }", "culling(sg) {\n const aabb = sg.worldAABB;\n const center = aabb.centerPoint;\n const centerToCorner = aabb.lengthCenterToCorner;\n const right = this.clipping(this.right, center, centerToCorner);\n const left = this.clipping(this.left, center, centerToCorner);\n if (right === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Invisible && left === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Visible || right === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Visible && left === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Invisible) {\n return _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Invisible;\n }\n const zNear = this.clipping(this.zNear, center, centerToCorner);\n const zFar = this.clipping(this.zFar, center, centerToCorner);\n if (zNear === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Invisible && zFar === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Visible || zNear === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Visible && zFar === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Invisible) {\n return _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Invisible;\n }\n const top = this.clipping(this.top, center, centerToCorner);\n const bottom = this.clipping(this.bottom, center, centerToCorner);\n if (top === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Invisible && bottom === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Visible || top === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Visible && bottom === _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Invisible) {\n return _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Invisible;\n }\n const sum = top.index + bottom.index + right.index + left.index + zNear.index + zFar.index;\n if (sum === 6) {\n return _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Visible;\n }\n return _definitions_visibility__WEBPACK_IMPORTED_MODULE_4__[\"Visibility\"].Neutral;\n }", "function overflowCorrection(el, pos, dim, margin) {\n var suffix = dim[0].toUpperCase() + dim.slice(1),\n length = el['offset' + suffix],\n viewportLength = window['inner' + suffix],\n\n maxLength = length - (2 * margin),\n isOverflow = [\n (pos < margin),\n (pos + length + margin > viewportLength)\n ];\n if (maxLength > viewportLength) {\n pos = margin;\n $(el).css(dim, maxLength + 'px');\n } else if (isOverflow[0]) {\n pos = margin;\n } else if (isOverflow[1]) {\n pos = viewportLength - margin - length;\n }\n return pos;\n }", "function $M7BJ$var$getClippingParents(element) {\n var clippingParents = $m3DJ$export$default($IVKl$export$default(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf($S6rb$export$default(element).position) >= 0;\n var clipperElement = canEscapeClipping && $wsKO$export$isHTMLElement(element) ? $CUhI$export$default(element) : element;\n\n if (!$wsKO$export$isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return $wsKO$export$isElement(clippingParent) && $x3Ja$export$default(clippingParent, clipperElement) && $B1zX$export$default(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "get originalClip() {}", "function isFlipped()\n {\n return this.scale.x == -1;\n }", "_restoreFromMinimization() {\n const that = this;\n\n that.minimized = false;\n that.style.width = that.style.height = that.style.top = that.style.left = '';\n\n //Re-arrange the rest of the minimized windows\n that._refreshMinimizedWindowsPosition();\n }", "function setUnfixed() {\n // Only unfix the target element and the spacer if we need to.\n if (!isUnfixed()) {\n lastOffsetLeft = -1;\n\n // Hide the spacer now that the target element will fill the\n // space.\n spacer.css('display', 'none');\n\n // Remove the style attributes that were added to the target.\n // This will reverse the target back to the its original style.\n target.css({\n 'z-index' : originalZIndex,\n 'width' : '',\n 'position' : originalPosition,\n 'left' : '',\n 'top' : originalOffsetTop,\n 'margin-left' : ''\n });\n\n target.removeClass('scroll-to-fixed-fixed');\n\n if (base.options.className) {\n target.removeClass(base.options.className);\n }\n\n position = null;\n }\n }", "function clamp(pos) {\n pos.top = Math.max(Math.min(pos.top, bounds.bottom - containerNode.offsetHeight), bounds.top);\n pos.left = Math.max(Math.min(pos.left, bounds.right - containerNode.offsetWidth), bounds.left);\n }", "function clamp(pos) {\n pos.top = Math.max(Math.min(pos.top, bounds.bottom - containerNode.offsetHeight), bounds.top);\n pos.left = Math.max(Math.min(pos.left, bounds.right - containerNode.offsetWidth), bounds.left);\n }", "function clamp(pos) {\n pos.top = Math.max(Math.min(pos.top, bounds.bottom - containerNode.offsetHeight), bounds.top);\n pos.left = Math.max(Math.min(pos.left, bounds.right - containerNode.offsetWidth), bounds.left);\n }", "function clamp(pos) {\n pos.top = Math.max(Math.min(pos.top, bounds.bottom - containerNode.offsetHeight), bounds.top);\n pos.left = Math.max(Math.min(pos.left, bounds.right - containerNode.offsetWidth), bounds.left);\n }", "function clamp(pos) {\n pos.top = Math.max(Math.min(pos.top, bounds.bottom - containerNode.offsetHeight), bounds.top);\n pos.left = Math.max(Math.min(pos.left, bounds.right - containerNode.offsetWidth), bounds.left);\n }", "function stopIndicesWithElidedDims(endMask, ellipsisInsertionIndex, numElidedAxes, originalEnd, inputShape) {\n const newIndices = [...inputShape];\n const elidedAxes = getElidedAxes(numElidedAxes, ellipsisInsertionIndex);\n for (let axis = 0; axis < newIndices.length; axis++) {\n if (elidedAxes.indexOf(axis) > -1) {\n newIndices[axis] = Number.MAX_SAFE_INTEGER;\n }\n else {\n const originalAxis = unnormalizeAxis(ellipsisInsertionIndex, numElidedAxes, axis);\n let originalValue = originalEnd[originalAxis];\n if (endMask & 1 << originalAxis) {\n originalValue = Number.MAX_SAFE_INTEGER;\n }\n newIndices[axis] = originalValue;\n }\n }\n for (let i = 0; i < newIndices.length; i++) {\n // Handle negative indices\n const axisSize = inputShape[i];\n if (newIndices[i] < 0) {\n newIndices[i] += axisSize;\n }\n newIndices[i] = _util__WEBPACK_IMPORTED_MODULE_0__[\"clamp\"](0, newIndices[i], inputShape[i]);\n }\n return newIndices;\n}", "setFrozen() {\n this.isFrozen = true;\n this.target.style.top = Math.abs(this.parentContainer.getBoundingClientRect().top - this.target.getBoundingClientRect().top) + 'px';\n this.target.classList.remove('fixit--bottom');\n this.target.classList.remove('fixit--active');\n this.target.classList.add('fixit--frozen');\n }", "function sizingInvisible($el, callback) {\n var targets;\n\n // We wish to target ourselves and any parents as long as\n // they are not visible\n targets = $el.parents();\n targets.push($el[0]);\n targets = targets.not(':visible');\n swap(targets, {\n visibility: \"hidden\",\n display: \"block\",\n position: \"absolute\"\n }, callback);\n }", "function CutHides() {\n var scissors = Orion.FindTypeEx('0x0F9F').shift();\n var hides = Orion.FindTypeEx('0x1079');\n UseItemOnTargets(scissors, hides);\n\n}", "function setUnfixed() {\r\n // Only unfix the target element and the spacer if we need to.\r\n if (!isUnfixed()) {\r\n lastOffsetLeft = -1;\r\n\r\n // Hide the spacer now that the target element will fill the\r\n // space.\r\n spacer.css('display', 'none');\r\n\r\n // Remove the style attributes that were added to the target.\r\n // This will reverse the target back to the its original style.\r\n target.css({\r\n 'z-index' : originalZIndex,\r\n 'width' : '',\r\n 'position' : originalPosition,\r\n 'left' : '',\r\n 'top' : originalOffsetTop,\r\n 'margin-left' : ''\r\n });\r\n\r\n target.removeClass('scroll-to-fixed-fixed');\r\n\r\n if (base.options.className) {\r\n target.removeClass(base.options.className);\r\n }\r\n\r\n position = null;\r\n }\r\n }", "function clamp(pos) {\n pos.top = Math.max(Math.min(pos.top, bounds.bottom - containerNode.offsetHeight), bounds.top);\n pos.left = Math.max(Math.min(pos.left, bounds.right - containerNode.offsetWidth), bounds.left);\n }", "hide(){\n this.image.x=this.offset;\n }", "function getClippingParents(element) {\n var clippingParents = listScrollParents(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement);\n });\n } // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement);\n });\n } // Gets the maximum area that the element is visible in due to any number of", "function reset(){\n animate = false;\n if ((cur === 0 || cur === n - beforeN)) {\n cur = beforeN;\n $(element).css({\"margin-left\": -cur * w});\n }\n o.endChange(log);\n }", "function ignoreExteriorBorders(a, b) { return a !== b }", "reset() {\n this.parts.forEach((part) => part.setVisible(false));\n this.visibleIndex = -1;\n }", "function defineOffset() {\n if(STATE.CURRENT_SLIDE > 1) {\n STATE.OFFSET = -STATE.RESIZE_OFFSET;\n } else {\n STATE.OFFSET = STATE.OFFSET;\n }\n }", "function checkOverflow(firstHidden, lastHidden) {\n const dotsEl = component.getAllByRole(\"separator\", { hidden: true });\n const isFirstHidden = Boolean(dotsEl[0].closest(\"[hidden]\"));\n const isLastHidden = Boolean(dotsEl[1].closest(\"[hidden]\"));\n expect(isFirstHidden).to.equal(\n firstHidden,\n `leading is ${firstHidden ? \"visible\" : \"hidden\"}`\n );\n expect(isLastHidden).to.equal(\n lastHidden,\n `end is ${lastHidden ? \"visible\" : \"hidden\"}`\n );\n }", "function ClippedView(parent, offset, limit) {\n var observableEntries = parent._observableEntries;\n this.__parent = parent;\n this.__values = ko.observable(lists.newArrayList());\n this.__observables = null;\n\n var idSelector = parent._idSelector;\n\n var unwrapArguments = () => ({offset: ko.unwrap(offset), limit: ko.unwrap(limit)});\n\n var privateRecomputeTrigger = ko.observable(unwrapArguments());\n this._forceUpdateIfNecessary = () => {\n var lastArguments = privateRecomputeTrigger();\n var newArguments = unwrapArguments();\n if (lastArguments.offset !== newArguments.offset || lastArguments.limit !== newArguments.limit)\n privateRecomputeTrigger(newArguments);\n };\n\n this.__computer = ko.computed(() => {\n // the delta isn't worth much to clipping, so we reuse the __computer\n parent._deltas();\n\n privateRecomputeTrigger();\n var args = unwrapArguments();\n privateRecomputeTrigger(args);\n\n var unclipped = parent._indexedValues;\n var from = Math.min(unclipped.length, args.offset);\n var to = Math.min(unclipped.length, from + args.limit);\n\n var oldValues = this.__values.peek();\n var newValues = unclipped.slice(from, to);\n\n if (checkForChanges(idSelector, oldValues, newValues)) {\n this.__values(newValues);\n\n if (this.__observables) {\n this.__observables(this.__values.peek().map(observableEntries.addReference));\n oldValues.forEach(observableEntries.releaseReference);\n }\n }\n });\n }", "function getClippingParents(element) {\n var clippingParents = (0,_listScrollParents_js__WEBPACK_IMPORTED_MODULE_7__.default)((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_8__.default)(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_9__.default)(element).position) >= 0;\n var clipperElement = canEscapeClipping && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isHTMLElement)(element) ? (0,_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__.default)(element) : element;\n\n if (!(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clippingParent) && (0,_contains_js__WEBPACK_IMPORTED_MODULE_11__.default)(clippingParent, clipperElement) && (0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_12__.default)(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = (0,_listScrollParents_js__WEBPACK_IMPORTED_MODULE_7__.default)((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_8__.default)(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_9__.default)(element).position) >= 0;\n var clipperElement = canEscapeClipping && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isHTMLElement)(element) ? (0,_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__.default)(element) : element;\n\n if (!(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clippingParent) && (0,_contains_js__WEBPACK_IMPORTED_MODULE_11__.default)(clippingParent, clipperElement) && (0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_12__.default)(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = (0,_listScrollParents_js__WEBPACK_IMPORTED_MODULE_7__.default)((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_8__.default)(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_9__.default)(element).position) >= 0;\n var clipperElement = canEscapeClipping && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isHTMLElement)(element) ? (0,_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__.default)(element) : element;\n\n if (!(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clippingParent) && (0,_contains_js__WEBPACK_IMPORTED_MODULE_11__.default)(clippingParent, clipperElement) && (0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_12__.default)(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = (0,_listScrollParents_js__WEBPACK_IMPORTED_MODULE_7__.default)((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_8__.default)(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_9__.default)(element).position) >= 0;\n var clipperElement = canEscapeClipping && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isHTMLElement)(element) ? (0,_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__.default)(element) : element;\n\n if (!(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clippingParent) && (0,_contains_js__WEBPACK_IMPORTED_MODULE_11__.default)(clippingParent, clipperElement) && (0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_12__.default)(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "freeze() {\r\n super.freeze();\r\n this.ghostAnchor.undrag();\r\n this.onManipulationEnd();\r\n }", "reset() {\r\n\t\tlet me = this;\r\n\t\tif (me.up > 50 && me.down >= me.up) {\r\n\t\t\tme.up = 0;\r\n\t\t\tme.down = 0;\r\n\t\t}\r\n\t}", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement);\n });\n} // Gets the maximum area that the element is visible in due to any number of", "isHide() {\n return this.x < 0\n }", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n } // Gets the maximum area that the element is visible in due to any number of", "adjustIndex(index) {\n return index - this.hiddenIndices.filter(i => i < index).length;\n }", "_setInitialComponentDisplay() {\n const that = this;\n\n switch (that.scalePosition) {\n case 'near':\n that.$scaleNear.removeClass('jqx-hidden');\n that.$scaleFar.addClass('jqx-hidden');\n break;\n case 'far':\n that.$scaleNear.addClass('jqx-hidden');\n that.$scaleFar.removeClass('jqx-hidden');\n break;\n case 'both':\n that.$scaleFar.removeClass('jqx-hidden');\n that.$scaleNear.removeClass('jqx-hidden');\n break;\n case 'none':\n that.$scaleFar.addClass('jqx-hidden');\n that.$scaleNear.addClass('jqx-hidden');\n break;\n }\n that.$tooltip.addClass('jqx-hidden');\n\n if (that.ticksPosition === 'track') {\n that.$trackTicksContainer.removeClass('jqx-hidden');\n }\n }", "function animate_flag_without_saturation_overflow_area (direction){\n var index = '#filaIndiceDesb'+direction;\t \n $(index).html(\"<img src='js/css/tilde.gif' border='0' />\");\n $(index).effect(\"pulsate\",{times:3},500);\n}", "lower() {\n this.preview.style.zIndex = 0;\n }", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n } // Gets the maximum area that the element is visible in due to any number of", "flattenVisible() {\n EventBus.$emit(\"try-flatten-visible-layers\");\n }", "handleConstraints() {\n if (this.x < 0) {\n this.x = 0;\n }\n if (this.x > width - 1) {\n this.x = width - this.size;\n }\n if (this.y < 0) {\n this.y = 0;\n }\n if (this.y > height - 1) {\n this.y = height - this.size;\n }\n\n\n }", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "_renderUnslidable() {\n let firstItemValue = this.get('firstItem').value;\n let lastItemValue = this.get('lastItem').value;\n if (firstItemValue > lastItemValue) {\n const tmp = lastItemValue;\n lastItemValue = firstItemValue;\n firstItemValue = tmp;\n }\n const minText = this._formatItemValue(firstItemValue);\n const maxText = this._formatItemValue(lastItemValue);\n let minRadius = firstItemValue < (MIN_SIZE) ? (MIN_SIZE) : firstItemValue;\n let maxRadius = lastItemValue > (MAX_SIZE) ? (MAX_SIZE) : lastItemValue;\n if (minRadius > maxRadius) {\n minRadius = MIN_SIZE;\n maxRadius = MAX_SIZE;\n }\n if (this.get('layout') === 'vertical') {\n this._addCircle(maxRadius, maxRadius, minRadius, minText, 2 * maxRadius); // min\n this._addCircle(maxRadius, maxRadius * 2 + CIRCLE_GAP + minRadius, maxRadius, maxText, 2 * maxRadius); // max\n } else {\n this._addCircle(maxRadius, maxRadius, minRadius, minText, 2 * maxRadius); // min\n this._addCircle(maxRadius * 2 + CIRCLE_GAP + minRadius, maxRadius, maxRadius, maxText, 2 * maxRadius); // max\n }\n }", "function SnapBack(el) {\n // Original absolute center position\n el.style.top = '50%';\n el.style.left = '50%';\n el.style.transform = 'translate(-50%, -50%)';\n el.style.transition = 'all 0.3s ease-in-out';\n}", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement);\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement);\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function emptySquares() {\r\n return origBoard.filter((elm, i) => i===elm);\r\n}", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "RemoveClip() {}", "offscreen() {\n if (this.x < -this.width) {\n return true;\n }\n return false;\n }", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains$1(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "constructor(viewOf, qmin, qmax) {\n super(viewOf, (field, colLabel, colSchema, colData, df) =>\n _clipAnnoMatrix(field, colLabel, colSchema, colData, df, qmin, qmax)\n );\n this.isClipped = true;\n this.clipRange = [qmin, qmax];\n Object.seal(this);\n }", "function clip(x, min, max) {\n return Math.min(Math.max(x, min), max);\n}", "function blenderMoreHide (hide1, hide2){\n if (mouseOnHide2 == 1) {\n hide1.style.transform = \"scale(0)\";\n hide2.style.transform = \"translateY(-500px)\"\n }else {mouseOnHide2 = 0;}\n}", "clipTo (tree, alsoRemovecoplanarFront) {\n let node = this\n const stack = []\n do {\n if (node.polygontreenodes.length > 0) {\n tree.rootnode.clipPolygons(node.polygontreenodes, alsoRemovecoplanarFront)\n }\n if (node.front) stack.push(node.front)\n if (node.back) stack.push(node.back)\n node = stack.pop()\n } while (node !== undefined)\n }", "_updateThumbPosition() {\n const that = this;\n\n if (that._supportCSSVariables || (that.inverted ? that.checked === true : that.checked === false) || !that._innerContainerSize) {\n that.$.innerContainer.style.left = that.$.innerContainer.style.top = '';\n return;\n }\n\n if (that.inverted ? that.checked === false : that.checked) {\n if (that.orientation === 'horizontal') {\n that.$.innerContainer.style.left = (-1 * (that._innerContainerSize - that.$.switchThumb.offsetWidth)) + 'px';\n that.$.innerContainer.style.top = '';\n }\n else {\n that.$.innerContainer.style.top = (-1 * (that._innerContainerSize - that.$.switchThumb.offsetHeight)) + 'px';\n that.$.innerContainer.style.left = '';\n }\n }\n\n if (that.checked === null) {\n if (that.orientation === 'horizontal') {\n that.$.innerContainer.style.left = (-1 * (that._innerContainerSize / 2 - that.$.switchThumb.offsetWidth / 2)) + 'px';\n that.$.innerContainer.style.top = '';\n }\n else {\n that.$.innerContainer.style.top = (-1 * (that._innerContainerSize / 2 - that.$.switchThumb.offsetHeight / 2)) + 'px';\n that.$.innerContainer.style.left = '';\n }\n }\n }", "function sizingInvisible($el, callback) {\n\t\tvar targets;\n\n\t\t// We wish to target ourselves and any parents as long as\n\t\t// they are not visible\n\t\ttargets = $el.parents();\n\t\ttargets.push($el[0]);\n\t\ttargets = targets.not(':visible');\n\t\tswap(targets, {\n\t\t\tvisibility: \"hidden\",\n\t\t\tdisplay: \"block\",\n\t\t\tposition: \"absolute\"\n\t\t}, callback);\n\t}", "slide(row, dir) {\n\t\tlet nonzero = row.filter(val => val);\n\t\tnonzero = nonzero.concat(new Array(row.length - nonzero.length).fill(0));\n\t\treturn dir > 0 ? nonzero : nonzero.reverse();\n\t}", "restoreElement(element) {\n if (!element) return;\n // FIX: it has to remember the previous values\n element.style.zIndex = 0;\n element.style.position = 'static';\n }" ]
[ "0.53922856", "0.53344685", "0.5275839", "0.52355707", "0.5219449", "0.51921", "0.51732665", "0.51599693", "0.51430035", "0.5067564", "0.5045697", "0.5044952", "0.5035299", "0.50279516", "0.502498", "0.50069106", "0.4977868", "0.4969717", "0.49689186", "0.49627694", "0.4961908", "0.49289536", "0.49240142", "0.4920098", "0.48917446", "0.48909542", "0.48872912", "0.48658356", "0.48574027", "0.48520976", "0.48442876", "0.4839737", "0.48311406", "0.48310602", "0.48310602", "0.48310602", "0.48310602", "0.48310602", "0.4825272", "0.48204374", "0.48154038", "0.48108703", "0.4810822", "0.4806468", "0.47875515", "0.4773041", "0.4773041", "0.4756254", "0.47507575", "0.47502297", "0.47417113", "0.47376263", "0.47317755", "0.47180536", "0.47180536", "0.47180536", "0.47180536", "0.4707966", "0.4705611", "0.47049233", "0.47049233", "0.47049233", "0.47028702", "0.46915758", "0.46914896", "0.46830717", "0.4681826", "0.46775475", "0.46626902", "0.46621048", "0.46617177", "0.46617103", "0.46601102", "0.46599686", "0.4659282", "0.46535698", "0.46535698", "0.46535698", "0.46535698", "0.46408796", "0.4637224", "0.4637224", "0.46364224", "0.46350786", "0.4633819", "0.4633819", "0.4633819", "0.4632948", "0.4631279", "0.46304268", "0.4628014", "0.46264383", "0.46255103", "0.4624703", "0.46241614", "0.4614025", "0.46136034", "0.46093228" ]
0.47067252
59
Returns the composite rect of an element relative to its offsetParent. Composite means it takes into account transforms as well as layout.
function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { if (isFixed === void 0) { isFixed = false; } var documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__["default"])(offsetParent); var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__["default"])(elementOrVirtualElement); var isOffsetParentAnElement = Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__["isHTMLElement"])(offsetParent); var scroll = { scrollLeft: 0, scrollTop: 0 }; var offsets = { x: 0, y: 0 }; if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__["default"])(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078 Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_6__["default"])(documentElement)) { scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__["default"])(offsetParent); } if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__["isHTMLElement"])(offsetParent)) { offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__["default"])(offsetParent); offsets.x += offsetParent.clientLeft; offsets.y += offsetParent.clientTop; } else if (documentElement) { offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__["default"])(documentElement); } } return { x: rect.left + scroll.scrollLeft - offsets.x, y: rect.top + scroll.scrollTop - offsets.y, width: rect.width, height: rect.height }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCompositeRect$1(elementOrVirtualElement,offsetParent,isFixed){if(isFixed===void 0){isFixed=false;}var documentElement=getDocumentElement$1(offsetParent);var rect=getBoundingClientRect$1(elementOrVirtualElement);var isOffsetParentAnElement=isHTMLElement$1(offsetParent);var scroll={scrollLeft:0,scrollTop:0};var offsets={x:0,y:0};if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed){if(getNodeName$1(offsetParent)!=='body'||// https://github.com/popperjs/popper-core/issues/1078\nisScrollParent$1(documentElement)){scroll=getNodeScroll$1(offsetParent);}if(isHTMLElement$1(offsetParent)){offsets=getBoundingClientRect$1(offsetParent);offsets.x+=offsetParent.clientLeft;offsets.y+=offsetParent.clientTop;}else if(documentElement){offsets.x=getWindowScrollBarX$1(documentElement);}}return {x:rect.left+scroll.scrollLeft-offsets.x,y:rect.top+scroll.scrollTop-offsets.y,width:rect.width,height:rect.height};}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement;\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (!isFixed) {\n if (getNodeName(offsetParent) !== 'body') {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement = getDocumentElement(offsetParent)) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement;\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (!isFixed) {\n if (getNodeName(offsetParent) !== 'body') {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement = getDocumentElement(offsetParent)) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }", "function getCompositeRect(elementOrVirtualElement,offsetParent,isFixed){if(isFixed===void 0){isFixed=false;}var documentElement=getDocumentElement(offsetParent);var rect=getBoundingClientRect(elementOrVirtualElement);var isOffsetParentAnElement=isHTMLElement(offsetParent);var scroll={scrollLeft:0,scrollTop:0};var offsets={x:0,y:0};if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed){if(getNodeName(offsetParent)!=='body'||// https://github.com/popperjs/popper-core/issues/1078\nisScrollParent(documentElement)){scroll=getNodeScroll(offsetParent);}if(isHTMLElement(offsetParent)){offsets=getBoundingClientRect(offsetParent);offsets.x+=offsetParent.clientLeft;offsets.y+=offsetParent.clientTop;}else if(documentElement){offsets.x=getWindowScrollBarX(documentElement);}}return {x:rect.left+scroll.scrollLeft-offsets.x,y:rect.top+scroll.scrollTop-offsets.y,width:rect.width,height:rect.height};}", "function getCompositeRect(elementOrVirtualElement,offsetParent,isFixed){if(isFixed===void 0){isFixed=false;}var documentElement=getDocumentElement(offsetParent);var rect=getBoundingClientRect(elementOrVirtualElement);var isOffsetParentAnElement=isHTMLElement(offsetParent);var scroll={scrollLeft:0,scrollTop:0};var offsets={x:0,y:0};if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed){if(getNodeName(offsetParent)!=='body'||// https://github.com/popperjs/popper-core/issues/1078\nisScrollParent(documentElement)){scroll=getNodeScroll(offsetParent);}if(isHTMLElement(offsetParent)){offsets=getBoundingClientRect(offsetParent);offsets.x+=offsetParent.clientLeft;offsets.y+=offsetParent.clientTop;}else if(documentElement){offsets.x=getWindowScrollBarX(documentElement);}}return {x:rect.left+scroll.scrollLeft-offsets.x,y:rect.top+scroll.scrollTop-offsets.y,width:rect.width,height:rect.height};}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (!isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(offsetParent);\n var rect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(elementOrVirtualElement);\n var isOffsetParentAnElement = (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if ((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_4__.default)(documentElement)) {\n scroll = (0,_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_5__.default)(offsetParent);\n }\n\n if ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent)) {\n offsets = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_6__.default)(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(offsetParent);\n var rect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(elementOrVirtualElement);\n var isOffsetParentAnElement = (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if ((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_4__.default)(documentElement)) {\n scroll = (0,_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_5__.default)(offsetParent);\n }\n\n if ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent)) {\n offsets = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_6__.default)(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(offsetParent);\n var rect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(elementOrVirtualElement);\n var isOffsetParentAnElement = (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if ((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_4__.default)(documentElement)) {\n scroll = (0,_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_5__.default)(offsetParent);\n }\n\n if ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent)) {\n offsets = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_6__.default)(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(offsetParent);\n var rect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(elementOrVirtualElement);\n var isOffsetParentAnElement = (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if ((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_4__.default)(documentElement)) {\n scroll = (0,_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_5__.default)(offsetParent);\n }\n\n if ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent)) {\n offsets = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_6__.default)(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' ||\n // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent);\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (!isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(documentElement)) {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement;\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (!isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body') {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent)) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent);\n var offsetParentIsScaled = Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent) && isElementScaled(offsetParent);\n var documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent);\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement, offsetParentIsScaled);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(documentElement)) {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getOuterRect(el,origin){var offset=el.offset();var left=offset.left-(origin?origin.left:0);var top=offset.top-(origin?origin.top:0);return{left:left,right:left+el.outerWidth(),top:top,bottom:top+el.outerHeight()};}", "function getOuterRect(el, origin) {\n var offset = el.offset();\n var left = offset.left - (origin ? origin.left : 0);\n var top = offset.top - (origin ? origin.top : 0);\n return {\n left: left,\n right: left + el.outerWidth(),\n top: top,\n bottom: top + el.outerHeight()\n };\n}", "function getOuterRect(el, origin) {\n var offset = el.offset();\n var left = offset.left - (origin ? origin.left : 0);\n var top = offset.top - (origin ? origin.top : 0);\n return {\n left: left,\n right: left + el.outerWidth(),\n top: top,\n bottom: top + el.outerHeight()\n };\n}", "function getOuterRect(el, origin) {\n var offset = el.offset();\n var left = offset.left - (origin ? origin.left : 0);\n var top = offset.top - (origin ? origin.top : 0);\n return {\n left: left,\n right: left + el.outerWidth(),\n top: top,\n bottom: top + el.outerHeight()\n };\n}", "function getOuterRect(el, origin) {\n var offset = el.offset();\n var left = offset.left - (origin ? origin.left : 0);\n var top = offset.top - (origin ? origin.top : 0);\n return {\n left: left,\n right: left + el.outerWidth(),\n top: top,\n bottom: top + el.outerHeight()\n };\n}", "function getLayoutRect$1(element){var clientRect=getBoundingClientRect$1(element);// Use the clientRect sizes if it's not been transformed.\n// Fixes https://github.com/popperjs/popper-core/issues/1223\nvar width=element.offsetWidth;var height=element.offsetHeight;if(Math.abs(clientRect.width-width)<=1){width=clientRect.width;}if(Math.abs(clientRect.height-height)<=1){height=clientRect.height;}return {x:element.offsetLeft,y:element.offsetTop,width:width,height:height};}", "function getElRect($element) {\n var el = $element[0];\n var isBody = el.tagName === 'BODY';\n var elRect = el.getBoundingClientRect();\n var isSvg = window.SVGElement && el instanceof window.SVGElement;\n var elOffset = isBody ? {\n top: 0,\n left: 0\n } : isSvg ? null : $element.offset();\n var scroll = {\n scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop()\n };\n var outerDims = isBody ? {\n width: $(window).width(),\n height: $(window).height()\n } : null;\n return _.extend({}, elRect, scroll, outerDims, elOffset);\n}", "function getOuterRect(el, origin) {\n\tvar offset = el.offset();\n\tvar left = offset.left - (origin ? origin.left : 0);\n\tvar top = offset.top - (origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.outerWidth(),\n\t\ttop: top,\n\t\tbottom: top + el.outerHeight()\n\t};\n}", "function getOuterRect(el, origin) {\n\tvar offset = el.offset();\n\tvar left = offset.left - (origin ? origin.left : 0);\n\tvar top = offset.top - (origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.outerWidth(),\n\t\ttop: top,\n\t\tbottom: top + el.outerHeight()\n\t};\n}", "function getOuterRect(el, origin) {\n\tvar offset = el.offset();\n\tvar left = offset.left - (origin ? origin.left : 0);\n\tvar top = offset.top - (origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.outerWidth(),\n\t\ttop: top,\n\t\tbottom: top + el.outerHeight()\n\t};\n}", "function getOuterRect(el, origin) {\n\tvar offset = el.offset();\n\tvar left = offset.left - (origin ? origin.left : 0);\n\tvar top = offset.top - (origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.outerWidth(),\n\t\ttop: top,\n\t\tbottom: top + el.outerHeight()\n\t};\n}", "function getOuterRect(el, origin) {\n\tvar offset = el.offset();\n\tvar left = offset.left - (origin ? origin.left : 0);\n\tvar top = offset.top - (origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.outerWidth(),\n\t\ttop: top,\n\t\tbottom: top + el.outerHeight()\n\t};\n}", "function getOuterRect(el, origin) {\n\tvar offset = el.offset();\n\tvar left = offset.left - (origin ? origin.left : 0);\n\tvar top = offset.top - (origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.outerWidth(),\n\t\ttop: top,\n\t\tbottom: top + el.outerHeight()\n\t};\n}", "function getOuterRect(el, origin) {\n\tvar offset = el.offset();\n\tvar left = offset.left - (origin ? origin.left : 0);\n\tvar top = offset.top - (origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.outerWidth(),\n\t\ttop: top,\n\t\tbottom: top + el.outerHeight()\n\t};\n}", "function getOuterRect(el, origin) {\n\t\tvar offset = el.offset();\n\t\tvar left = offset.left - (origin ? origin.left : 0);\n\t\tvar top = offset.top - (origin ? origin.top : 0);\n\n\t\treturn {\n\t\t\tleft: left,\n\t\t\tright: left + el.outerWidth(),\n\t\t\ttop: top,\n\t\t\tbottom: top + el.outerHeight()\n\t\t};\n\t}", "function getOffsetRectangle(parent, elem) {\n return offsetRectangle(\n topLeftCorner(parent.getBoundingClientRect()),\n elem.getBoundingClientRect()\n );\n}", "function getLayoutRect(element) {\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n }", "function getLayoutRect(element) {\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n }", "_getOriginRect() {\n const origin = this._origin;\n if (origin instanceof _angular_core__WEBPACK_IMPORTED_MODULE_1__[\"ElementRef\"]) {\n return origin.nativeElement.getBoundingClientRect();\n }\n // Check for Element so SVG elements are also supported.\n if (origin instanceof Element) {\n return origin.getBoundingClientRect();\n }\n const width = origin.width || 0;\n const height = origin.height || 0;\n // If the origin is a point, return a client rect as if it was a 0x0 element at the point.\n return {\n top: origin.y,\n bottom: origin.y + height,\n left: origin.x,\n right: origin.x + width,\n height,\n width\n };\n }", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n }", "function getLayoutRect(element) {\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n}", "function getLayoutRect(element) {\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n}", "function getLayoutRect(element) {\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n}", "function getLayoutRect(element) {\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n}", "function getLayoutRect(element) {\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n}", "function getLayoutRect(element) {\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n}", "function getLayoutRect(element) {\n var clientRect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__.default)(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__.default)(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__.default)(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__.default)(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function relativeBBox(elem, container) {\n var bb = elem.getBoundingClientRect()\n var ref = container.getBoundingClientRect()\n\n var left = bb.left - ref.left\n var top = bb.top - ref.top\n\n return {\n left: left, x: left,\n top: top, y: top,\n right: left + bb.width,\n down: top + bb.height,\n width: bb.width,\n height: bb.height,\n cx: left + bb.width / 2,\n cy: top + bb.height / 2\n }\n}", "function relativeBBox(elem, container) {\n var bb = elem.getBoundingClientRect()\n var ref = container.getBoundingClientRect()\n\n var left = bb.left - ref.left\n var top = bb.top - ref.top\n\n return {\n left: left, x: left,\n top: top, y: top,\n right: left + bb.width,\n down: top + bb.height,\n width: bb.width,\n height: bb.height,\n cx: left + bb.width / 2,\n cy: top + bb.height / 2\n }\n}", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n }", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getRelativeRect(child, parent) {\n\t return _extends({}, getRelativePosition(child, parent), {\n\t width: child.width,\n\t height: child.height\n\t });\n\t}", "function getAbsoluteBoundingRect(element) {\n const rect = element.getBoundingClientRect();\n\n return {\n x: rect.x + document.documentElement.scrollLeft,\n y: rect.y + document.documentElement.scrollTop,\n\n // Width and height shouldn't change based on bounds relativity so they don't need anything special\n width: rect.right - rect.left,\n height: rect.bottom - rect.top,\n };\n}", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 0.5) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 0.5) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getContentRect(el,origin){var offset=el.offset();// just outside of border, margin not included\nvar left=offset.left+getCssFloat(el,'border-left-width')+getCssFloat(el,'padding-left')-(origin?origin.left:0);var top=offset.top+getCssFloat(el,'border-top-width')+getCssFloat(el,'padding-top')-(origin?origin.top:0);return{left:left,right:left+el.width(),top:top,bottom:top+el.height()};}", "function getContentRect(el, origin) {\n var offset = el.offset(); // just outside of border, margin not included\n var left = offset.left + getCssFloat(el, 'border-left-width') + getCssFloat(el, 'padding-left') -\n (origin ? origin.left : 0);\n var top = offset.top + getCssFloat(el, 'border-top-width') + getCssFloat(el, 'padding-top') -\n (origin ? origin.top : 0);\n return {\n left: left,\n right: left + el.width(),\n top: top,\n bottom: top + el.height()\n };\n}", "function getContentRect(el, origin) {\n var offset = el.offset(); // just outside of border, margin not included\n var left = offset.left + getCssFloat(el, 'border-left-width') + getCssFloat(el, 'padding-left') -\n (origin ? origin.left : 0);\n var top = offset.top + getCssFloat(el, 'border-top-width') + getCssFloat(el, 'padding-top') -\n (origin ? origin.top : 0);\n return {\n left: left,\n right: left + el.width(),\n top: top,\n bottom: top + el.height()\n };\n}", "function getContentRect(el, origin) {\n var offset = el.offset(); // just outside of border, margin not included\n var left = offset.left + getCssFloat(el, 'border-left-width') + getCssFloat(el, 'padding-left') -\n (origin ? origin.left : 0);\n var top = offset.top + getCssFloat(el, 'border-top-width') + getCssFloat(el, 'padding-top') -\n (origin ? origin.top : 0);\n return {\n left: left,\n right: left + el.width(),\n top: top,\n bottom: top + el.height()\n };\n}", "function getContentRect(el, origin) {\n var offset = el.offset(); // just outside of border, margin not included\n var left = offset.left + getCssFloat(el, 'border-left-width') + getCssFloat(el, 'padding-left') -\n (origin ? origin.left : 0);\n var top = offset.top + getCssFloat(el, 'border-top-width') + getCssFloat(el, 'padding-top') -\n (origin ? origin.top : 0);\n return {\n left: left,\n right: left + el.width(),\n top: top,\n bottom: top + el.height()\n };\n}", "function __getRect(domObj) {\r\n return new Rect(domObj.clientWidth*1, domObj.clientHeight*1);\r\n}", "function getContentRect(el, origin) {\n\tvar offset = el.offset(); // just outside of border, margin not included\n\tvar left = offset.left + getCssFloat(el, 'border-left-width') + getCssFloat(el, 'padding-left') -\n\t\t(origin ? origin.left : 0);\n\tvar top = offset.top + getCssFloat(el, 'border-top-width') + getCssFloat(el, 'padding-top') -\n\t\t(origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.width(),\n\t\ttop: top,\n\t\tbottom: top + el.height()\n\t};\n}", "function getContentRect(el, origin) {\n\tvar offset = el.offset(); // just outside of border, margin not included\n\tvar left = offset.left + getCssFloat(el, 'border-left-width') + getCssFloat(el, 'padding-left') -\n\t\t(origin ? origin.left : 0);\n\tvar top = offset.top + getCssFloat(el, 'border-top-width') + getCssFloat(el, 'padding-top') -\n\t\t(origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.width(),\n\t\ttop: top,\n\t\tbottom: top + el.height()\n\t};\n}", "function getContentRect(el, origin) {\n\tvar offset = el.offset(); // just outside of border, margin not included\n\tvar left = offset.left + getCssFloat(el, 'border-left-width') + getCssFloat(el, 'padding-left') -\n\t\t(origin ? origin.left : 0);\n\tvar top = offset.top + getCssFloat(el, 'border-top-width') + getCssFloat(el, 'padding-top') -\n\t\t(origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.width(),\n\t\ttop: top,\n\t\tbottom: top + el.height()\n\t};\n}", "function getContentRect(el, origin) {\n\tvar offset = el.offset(); // just outside of border, margin not included\n\tvar left = offset.left + getCssFloat(el, 'border-left-width') + getCssFloat(el, 'padding-left') -\n\t\t(origin ? origin.left : 0);\n\tvar top = offset.top + getCssFloat(el, 'border-top-width') + getCssFloat(el, 'padding-top') -\n\t\t(origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.width(),\n\t\ttop: top,\n\t\tbottom: top + el.height()\n\t};\n}", "function getContentRect(el, origin) {\n\tvar offset = el.offset(); // just outside of border, margin not included\n\tvar left = offset.left + getCssFloat(el, 'border-left-width') + getCssFloat(el, 'padding-left') -\n\t\t(origin ? origin.left : 0);\n\tvar top = offset.top + getCssFloat(el, 'border-top-width') + getCssFloat(el, 'padding-top') -\n\t\t(origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.width(),\n\t\ttop: top,\n\t\tbottom: top + el.height()\n\t};\n}", "function getContentRect(el, origin) {\n\tvar offset = el.offset(); // just outside of border, margin not included\n\tvar left = offset.left + getCssFloat(el, 'border-left-width') + getCssFloat(el, 'padding-left') -\n\t\t(origin ? origin.left : 0);\n\tvar top = offset.top + getCssFloat(el, 'border-top-width') + getCssFloat(el, 'padding-top') -\n\t\t(origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.width(),\n\t\ttop: top,\n\t\tbottom: top + el.height()\n\t};\n}", "function getContentRect(el, origin) {\n\tvar offset = el.offset(); // just outside of border, margin not included\n\tvar left = offset.left + getCssFloat(el, 'border-left-width') + getCssFloat(el, 'padding-left') -\n\t\t(origin ? origin.left : 0);\n\tvar top = offset.top + getCssFloat(el, 'border-top-width') + getCssFloat(el, 'padding-top') -\n\t\t(origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.width(),\n\t\ttop: top,\n\t\tbottom: top + el.height()\n\t};\n}", "function getLayoutRect(element){var clientRect=getBoundingClientRect(element);// Use the clientRect sizes if it's not been transformed.\n// Fixes https://github.com/popperjs/popper-core/issues/1223\nvar width=element.offsetWidth;var height=element.offsetHeight;if(Math.abs(clientRect.width-width)<=1){width=clientRect.width;}if(Math.abs(clientRect.height-height)<=1){height=clientRect.height;}return {x:element.offsetLeft,y:element.offsetTop,width:width,height:height};}", "function getLayoutRect(element){var clientRect=getBoundingClientRect(element);// Use the clientRect sizes if it's not been transformed.\n// Fixes https://github.com/popperjs/popper-core/issues/1223\nvar width=element.offsetWidth;var height=element.offsetHeight;if(Math.abs(clientRect.width-width)<=1){width=clientRect.width;}if(Math.abs(clientRect.height-height)<=1){height=clientRect.height;}return {x:element.offsetLeft,y:element.offsetTop,width:width,height:height};}", "function getClippingRect(element, boundary, rootBoundary) {\n const mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n const clippingParents = [...mainClippingParents, rootBoundary];\n const firstClippingParent = clippingParents[0];\n const clippingRect = clippingParents.reduce((accRect, clippingParent) => {\n const rect = getClientRectFromMixedType(element, clippingParent);\n accRect.top = Math.max(rect.top, accRect.top);\n accRect.right = Math.min(rect.right, accRect.right);\n accRect.bottom = Math.min(rect.bottom, accRect.bottom);\n accRect.left = Math.max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}", "function getContentRect(el, origin) {\n\t\tvar offset = el.offset(); // just outside of border, margin not included\n\t\tvar left = offset.left + getCssFloat(el, 'border-left-width') + getCssFloat(el, 'padding-left') -\n\t\t\t(origin ? origin.left : 0);\n\t\tvar top = offset.top + getCssFloat(el, 'border-top-width') + getCssFloat(el, 'padding-top') -\n\t\t\t(origin ? origin.top : 0);\n\n\t\treturn {\n\t\t\tleft: left,\n\t\t\tright: left + el.width(),\n\t\t\ttop: top,\n\t\t\tbottom: top + el.height()\n\t\t};\n\t}", "function getRect(element) {\r\n var rect;\r\n if (element) {\r\n if (element === window) {\r\n rect = {\r\n left: 0,\r\n top: 0,\r\n width: window.innerWidth,\r\n height: window.innerHeight,\r\n right: window.innerWidth,\r\n bottom: window.innerHeight\r\n };\r\n }\r\n else if (element.getBoundingClientRect) {\r\n rect = element.getBoundingClientRect();\r\n }\r\n }\r\n return rect;\r\n}", "function getRect(element) {\r\n var rect;\r\n if (element) {\r\n if (element === window) {\r\n rect = {\r\n left: 0,\r\n top: 0,\r\n width: window.innerWidth,\r\n height: window.innerHeight,\r\n right: window.innerWidth,\r\n bottom: window.innerHeight\r\n };\r\n }\r\n else if (element.getBoundingClientRect) {\r\n rect = element.getBoundingClientRect();\r\n }\r\n }\r\n return rect;\r\n}", "function getRelativeRect(child, parent) {\n return _objectSpread2(_objectSpread2({}, getRelativePosition(child, parent)), {}, {\n width: child.width,\n height: child.height\n });\n}", "function getRect(element) {\n var rect;\n if (element) {\n if (element === window) {\n rect = {\n left: 0,\n top: 0,\n width: window.innerWidth,\n height: window.innerHeight,\n right: window.innerWidth,\n bottom: window.innerHeight,\n };\n }\n else if (element.getBoundingClientRect) {\n rect = element.getBoundingClientRect();\n }\n }\n return rect;\n}", "function getRect(element) {\n var rect;\n if (element) {\n if (element === window) {\n rect = {\n left: 0,\n top: 0,\n width: window.innerWidth,\n height: window.innerHeight,\n right: window.innerWidth,\n bottom: window.innerHeight\n };\n }\n else if (element.getBoundingClientRect) {\n rect = element.getBoundingClientRect();\n }\n }\n return rect;\n}", "function getRect(element) {\n var rect;\n if (element) {\n if (element === window) {\n rect = {\n left: 0,\n top: 0,\n width: window.innerWidth,\n height: window.innerHeight,\n right: window.innerWidth,\n bottom: window.innerHeight\n };\n }\n else if (element.getBoundingClientRect) {\n rect = element.getBoundingClientRect();\n }\n }\n return rect;\n}", "function getRect(element) {\n var rect;\n if (element) {\n if (element === window) {\n rect = {\n left: 0,\n top: 0,\n width: window.innerWidth,\n height: window.innerHeight,\n right: window.innerWidth,\n bottom: window.innerHeight\n };\n }\n else if (element.getBoundingClientRect) {\n rect = element.getBoundingClientRect();\n }\n }\n return rect;\n}", "function getRect(element) {\n var rect;\n if (element) {\n if (element === window) {\n rect = {\n left: 0,\n top: 0,\n width: window.innerWidth,\n height: window.innerHeight,\n right: window.innerWidth,\n bottom: window.innerHeight\n };\n }\n else if (element.getBoundingClientRect) {\n rect = element.getBoundingClientRect();\n }\n }\n return rect;\n}", "function getRectangle(el){\n var box = el.getBoundingClientRect(),\n top = Math.round(box.top + window.pageYOffset),\n left = Math.round(box.left + window.pageXOffset),\n height = typeof el.offsetHeight === 'undefined' ? 0 : el.offsetHeight,\n width = typeof el.offsetWidth === 'undefined' ? 0 : el.offsetWidth;\n\n return { top: top, left: left, height: height, width: width, meanY: top + height / 2}\n }", "function getOuterRect(el) {\n\tvar offset = el.offset();\n\n\treturn {\n\t\tleft: offset.left,\n\t\tright: offset.left + el.outerWidth(),\n\t\ttop: offset.top,\n\t\tbottom: offset.top + el.outerHeight()\n\t};\n}", "function currentBounds(){var cntr=element?element.parent():null;var parent=cntr?cntr.parent():null;return parent?self.clientRect(parent):null;}", "function getOuterRect(el) {\n var offset = el.offset();\n\n return {\n left: offset.left,\n right: offset.left + el.outerWidth(),\n top: offset.top,\n bottom: offset.top + el.outerHeight()\n };\n }", "getRect() {\n this.rect = this.el.getBoundingClientRect();\n }", "function getContentRect(el) {\n\tvar offset = el.offset(); // just outside of border, margin not included\n\tvar left = offset.left + getCssFloat(el, 'border-left-width') + getCssFloat(el, 'padding-left');\n\tvar top = offset.top + getCssFloat(el, 'border-top-width') + getCssFloat(el, 'padding-top');\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.width(),\n\t\ttop: top,\n\t\tbottom: top + el.height()\n\t};\n}", "function Position_GetDisplayRect(html)\n{\n\t//Added default rect values and a try catch to resolve a bug caused by IE9 in rare instances\n\tvar rect = { top: 0, left: 0, right: 0, bottom: 0 };\n\ttry\n\t{\n\t\t///\n\t\t//the get bounding client rect is relative to the parent window.\n\t\t//It needs to be scaled according to that window\n\t\t///\n\t\t//Get the bounding client rect (THESE ARE FOR THE IFRAME WHERE THE ELEMENT IS)\n\t\trect = html.getBoundingClientRect();\n\t\t//create a new position rect\n\t\trect = new Position_Rect(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);\n\t\t//try to see if we have an iFrame\n\t\tvar iFrame = Get_FrameElement(html);\n\t\t//set the scale according to whether we have a parent IFrame or we are the final one\n\t\tvar scale = iFrame ? Get_InterpreterDisplayScaleOnly() : 1;\n\t\t//if we are in chromium\n\t\tif (__BROWSER_CHROMIUM)\n\t\t{\n\t\t\t//adjust by zoom (if its final then its 1 * the zoom only scale)\n\t\t\tscale *= Get_ZoomedScaleWithoutInterpreterScale(null, html, true);\n\t\t}\n\t\t//are we in ie? and we have iframes?\n\t\tif (__BROWSER_IE11_OR_LESS && iFrame)\n\t\t{\n\t\t\t//IE11 behaves differently depending on the position of the object\n\t\t\tscale *= Get_ZoomedScaleWithoutInterpreterScaleIE11(iFrame);\n\t\t\t//we need to manually correct the object's scrollposition\n\t\t\tfor (var current = html.parentNode; current && !/html/i.test(current.tagName); current = current.parentNode)\n\t\t\t{\n\t\t\t\t//get its scroll position\n\t\t\t\tvar scrollPos = Get_Number(current.scrollTop, null);\n\t\t\t\t//check if it has a vertical scroll position\n\t\t\t\tif (scrollPos != null)\n\t\t\t\t{\n\t\t\t\t\t//reset it\n\t\t\t\t\tcurrent.scrollTop = scrollPos;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//modify rect by scale\n\t\trect.left *= scale;\n\t\trect.top *= scale;\n\t\trect.width *= scale;\n\t\trect.height *= scale;\n\t\t//valid?\n\t\tif (iFrame)\n\t\t{\n\t\t\t//create a fake rect for the iframe border\n\t\t\tvar iFrameRect = new Position_Rect(0, 0, 0, 0);\n\t\t\t//correct the rect for the border and padding\n\t\t\tiFrameRect.CorrectForBorderPadding(iFrame);\n\t\t\t//adjust the main rect for the top,left padding of the iframe\n\t\t\trect.left += iFrameRect.left;\n\t\t\trect.top += iFrameRect.top;\n\t\t\t//get its display rect\n\t\t\tiFrameRect = Position_GetDisplayRect(iFrame);\n\t\t\t//add it to ours\n\t\t\trect.left += iFrameRect.left;\n\t\t\trect.top += iFrameRect.top;\n\t\t}\n\t\t//touch enabled browser?\n\t\telse if (__BROWSER_IS_TOUCH_ENABLED)\n\t\t{\n\t\t\t//correct the position to match scrolling\n\t\t\trect.left += document.body.scrollLeft;\n\t\t\trect.top = rect.top + document.body.scrollTop;\n\t\t}\n\t\t//correct the right and bottom\n\t\trect.right = rect.left + rect.width;\n\t\trect.bottom = rect.top + rect.height;\n\t}\n\tcatch (err)\n\t{\n\t\t//do nothing\n\t}\n\t//return it\n\treturn rect;\n}" ]
[ "0.7891602", "0.77760273", "0.77760273", "0.7752504", "0.7752504", "0.7725987", "0.7713349", "0.7690697", "0.7690697", "0.7666688", "0.7666688", "0.7666688", "0.7666688", "0.7664581", "0.7625197", "0.76134926", "0.76134926", "0.76134926", "0.76093906", "0.7569486", "0.7538812", "0.70069337", "0.65975094", "0.65975094", "0.65975094", "0.65975094", "0.6565932", "0.65604764", "0.6548781", "0.6548781", "0.6548781", "0.6548781", "0.6548781", "0.6548781", "0.6548781", "0.6540378", "0.6526651", "0.6522922", "0.6522922", "0.65124816", "0.6484995", "0.6481692", "0.6481692", "0.6481692", "0.6481692", "0.6481692", "0.6481692", "0.64725083", "0.64725083", "0.64725083", "0.64725083", "0.64716697", "0.64716697", "0.64682645", "0.64537776", "0.64537776", "0.64537776", "0.64537776", "0.64496785", "0.64496785", "0.64496785", "0.642393", "0.6420478", "0.63954735", "0.6372775", "0.6367688", "0.6367688", "0.6367688", "0.6367688", "0.6360213", "0.6344911", "0.6344911", "0.6344911", "0.6344911", "0.6344911", "0.6344911", "0.6344911", "0.6343945", "0.6343945", "0.6340529", "0.6340499", "0.6322507", "0.6322507", "0.6304196", "0.62863344", "0.62832457", "0.62832457", "0.62832457", "0.62832457", "0.6280653", "0.62683904", "0.62579536", "0.62475985", "0.6239933", "0.61346596", "0.6108957" ]
0.7628378
18
Gets the entire size of the scrollable document area, even extending outside of the `` and `` rect bounds if horizontally scrollable
function getDocumentRect(element) { var html = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__["default"])(element); var winScroll = Object(_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_3__["default"])(element); var body = element.ownerDocument.body; var width = Math.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); var height = Math.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); var x = -winScroll.scrollLeft + Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_2__["default"])(element); var y = -winScroll.scrollTop; if (Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(body || html).direction === 'rtl') { x += Math.max(html.clientWidth, body ? body.clientWidth : 0) - width; } return { width: width, height: height, x: x, y: y }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function f_documentSize() {\n\n var n_scrollX = 0,\n n_scrollY = 0;\n\n if (typeof (window.pageYOffset) == 'number') {\n n_scrollX = window.pageXOffset;\n n_scrollY = window.pageYOffset;\n }\n else if (document.body && (document.body.scrollLeft || document.body.scrollTop)) {\n n_scrollX = document.body.scrollLeft;\n n_scrollY = document.body.scrollTop;\n }\n else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {\n n_scrollX = document.documentElement.scrollLeft;\n n_scrollY = document.documentElement.scrollTop;\n }\n\n if (typeof (window.innerWidth) == 'number')\n return [window.innerWidth, window.innerHeight, n_scrollX, n_scrollY];\n if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))\n return [document.documentElement.clientWidth, document.documentElement.clientHeight, n_scrollX, n_scrollY];\n if (document.body && (document.body.clientWidth || document.body.clientHeight))\n return [document.body.clientWidth, document.body.clientHeight, n_scrollX, n_scrollY];\n return [0, 0];\n}", "function returnScrollbarWidth() {\n let scrollbarWidth = innerWindowWidth() - doc.querySelector('html').clientWidth;\n\n return scrollbarWidth;\n}", "function getScrollbarWidth(){\n let scrollbarSize = 0;\n //mozilla firefox scroll hack\n //on a up to date version document.documentElement.style[\"scrollbar-width\"] is a string (so CSS is working)\n if (/firefox/i.test(navigator.userAgent) ? document.documentElement.style[\"scrollbar-width\"] === undef : false) {\n\n //small css trick to get the scrollbar width (must be 17px but cannot be sure)\n\n let\n scrollable = doc.createElement('div'),\n contents = doc.createElement('div'),\n scrollablestyle, contentsstyle;\n\n scrollable.appendChild(contents);\n scrollablestyle = contentsstyle = \"width: 100%;padding:0;margin:0;display:block;overflow: unset;height:auto;\";\n scrollablestyle += \"overflow-y: scroll;opacity:0;z-index:-1;\";\n contentsstyle += \"height: 1px;\";\n scrollable.style = scrollablestyle;\n contents.style = contentsstyle;\n doc.body.appendChild(scrollable);\n scrollbarSize = scrollable.offsetWidth - contents.offsetWidth;\n doc.body.removeChild(scrollable);\n }\n return scrollbarSize;\n }", "function htmlScrollSize() {\n var rect = document.documentElement.getBoundingClientRect();\n return [rect.width, rect.height];\n}", "function returnScrollbarWidth() {\n let scrollbarWidth = innerWindowWidth() - document.querySelector('html').clientWidth;\n \n return scrollbarWidth;\n}", "getViewportSize() {\n if (!this.isBrowserUIEnabled) {\n return this.toolWindow.getViewportSize();\n }\n\n return this.rdmFrame.contentWindow.getViewportSize();\n }", "function getScrollbarWidth() {\n return window.innerWidth - document.documentElement.clientWidth;\n}", "function getScrollbarSize() {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.width = '99px';\n scrollDiv.style.height = '99px';\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n var scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarSize;\n }", "function getScrollbarSize() {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.width = '99px';\n scrollDiv.style.height = '99px';\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n var scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarSize;\n}", "function getScrollbarSize() {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.width = '99px';\n scrollDiv.style.height = '99px';\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n var scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarSize;\n}", "function getScrollbarSize() {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.width = '99px';\n scrollDiv.style.height = '99px';\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n var scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarSize;\n}", "function getScrollbarSize() {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.width = '99px';\n scrollDiv.style.height = '99px';\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n var scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarSize;\n}", "function getScrollbarSize() {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.width = '99px';\n scrollDiv.style.height = '99px';\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n var scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarSize;\n}", "function getScrollbarSize() {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.width = '99px';\n scrollDiv.style.height = '99px';\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n var scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarSize;\n}", "function getScrollbarSize() {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.width = '99px';\n scrollDiv.style.height = '99px';\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n var scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarSize;\n}", "function getScrollbarSize() {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.width = '99px';\n scrollDiv.style.height = '99px';\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n var scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarSize;\n}", "function getScrollbarSize() {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.width = '99px';\n scrollDiv.style.height = '99px';\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n var scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarSize;\n}", "function getScrollbarSize() {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.width = '99px';\n scrollDiv.style.height = '99px';\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n var scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarSize;\n}", "function getScrollbarSize() {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.width = '99px';\n scrollDiv.style.height = '99px';\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n var scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarSize;\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n }", "function getDocumentRect$1(element){var _element$ownerDocumen;var html=getDocumentElement$1(element);var winScroll=getWindowScroll$1(element);var body=(_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body;var width=max$1(html.scrollWidth,html.clientWidth,body?body.scrollWidth:0,body?body.clientWidth:0);var height=max$1(html.scrollHeight,html.clientHeight,body?body.scrollHeight:0,body?body.clientHeight:0);var x=-winScroll.scrollLeft+getWindowScrollBarX$1(element);var y=-winScroll.scrollTop;if(getComputedStyle$2(body||html).direction==='rtl'){x+=max$1(html.clientWidth,body?body.clientWidth:0)-width;}return {width:width,height:height,x:x,y:y};}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n }", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n var html = _getDocumentElementJsDefault.default(element);\n var winScroll = _getWindowScrollJsDefault.default(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = _mathJs.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = _mathJs.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + _getWindowScrollBarXJsDefault.default(element);\n var y = -winScroll.scrollTop;\n if (_getComputedStyleJsDefault.default(body || html).direction === 'rtl') x += _mathJs.max(html.clientWidth, body ? body.clientWidth : 0) - width;\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function xDocSize()\n{\n var b=document.body, e=document.documentElement;\n var esw=0, eow=0, bsw=0, bow=0, esh=0, eoh=0, bsh=0, boh=0;\n if (e) {\n esw = e.scrollWidth;\n eow = e.offsetWidth;\n esh = e.scrollHeight;\n eoh = e.offsetHeight;\n }\n if (b) {\n bsw = b.scrollWidth;\n bow = b.offsetWidth;\n bsh = b.scrollHeight;\n boh = b.offsetHeight;\n }\n// alert('compatMode: ' + document.compatMode + '\\n\\ndocumentElement.scrollHeight: ' + esh + '\\ndocumentElement.offsetHeight: ' + eoh + '\\nbody.scrollHeight: ' + bsh + '\\nbody.offsetHeight: ' + boh + '\\n\\ndocumentElement.scrollWidth: ' + esw + '\\ndocumentElement.offsetWidth: ' + eow + '\\nbody.scrollWidth: ' + bsw + '\\nbody.offsetWidth: ' + bow);\n return {w:Math.max(esw,eow,bsw,bow),h:Math.max(esh,eoh,bsh,boh)};\n}", "function get_scroll_bar_width() {\n\n // no need on responsive mode.\n if ($(\"body\").hasClass(\"yp-responsive-device-mode\")) {\n return 0;\n }\n\n // If no scrollbar, return zero.\n if (iframe.height() <= $(window).height() && $(\"body\").hasClass((\"yp-metric-disable\"))) {\n return 0;\n }\n\n var inner = document.createElement('p');\n inner.style.width = \"100%\";\n inner.style.height = \"200px\";\n\n var outer = document.createElement('div');\n outer.style.position = \"absolute\";\n outer.style.top = \"0px\";\n outer.style.left = \"0px\";\n outer.style.visibility = \"hidden\";\n outer.style.width = \"200px\";\n outer.style.height = \"150px\";\n outer.style.overflow = \"hidden\";\n outer.appendChild(inner);\n\n document.body.appendChild(outer);\n var w1 = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n var w2 = inner.offsetWidth;\n if (w1 == w2) w2 = outer.clientWidth;\n\n document.body.removeChild(outer);\n\n return (w1 - w2);\n\n }", "function xDocSize()\r\n{\r\n var b=document.body, e=document.documentElement;\r\n var esw=0, eow=0, bsw=0, bow=0, esh=0, eoh=0, bsh=0, boh=0;\r\n if (e) {\r\n esw = e.scrollWidth;\r\n eow = e.offsetWidth;\r\n esh = e.scrollHeight;\r\n eoh = e.offsetHeight;\r\n }\r\n if (b) {\r\n bsw = b.scrollWidth;\r\n bow = b.offsetWidth;\r\n bsh = b.scrollHeight;\r\n boh = b.offsetHeight;\r\n }\r\n// alert('compatMode: ' + document.compatMode + '\\n\\ndocumentElement.scrollHeight: ' + esh + '\\ndocumentElement.offsetHeight: ' + eoh + '\\nbody.scrollHeight: ' + bsh + '\\nbody.offsetHeight: ' + boh + '\\n\\ndocumentElement.scrollWidth: ' + esw + '\\ndocumentElement.offsetWidth: ' + eow + '\\nbody.scrollWidth: ' + bsw + '\\nbody.offsetWidth: ' + bow);\r\n return {w:Math.max(esw,eow,bsw,bow),h:Math.max(esh,eoh,bsh,boh)};\r\n}", "function getScrollbarWidth() {\n var div = $('<div style=\"width:50px;height:50px;overflow:hidden;position:absolute;top:-200px;left:-200px;\"><div style=\"height:100px;\"></div></div>');\n $('body').append(div);\n var w1 = $('div', div).innerWidth();\n div.css('overflow-y', 'auto');\n var w2 = $('div', div).innerWidth();\n $(div).remove();\n return (w1 - w2);\n }", "function getScrollerWidth() {\n\t\tvar scr = null;\n\t\tvar inn = null;\n\t\tvar wNoScroll = 0;\n\t\tvar wScroll = 0;\n\n\t\t// Outer scrolling div\n\t\tscr = document.createElement('div');\n\t\tscr.style.position = 'absolute';\n\t\tscr.style.top = '-1000px';\n\t\tscr.style.left = '-1000px';\n\t\tscr.style.width = '100px';\n\t\tscr.style.height = '50px';\n\t\t// Start with no scrollbar\n\t\tscr.style.overflow = 'hidden';\n\n\t\t// Inner content div\n\t\tinn = document.createElement('div');\n\t\tinn.style.width = '100%';\n\t\tinn.style.height = '200px';\n\n\t\t// Put the inner div in the scrolling div\n\t\tscr.appendChild(inn);\n\t\t// Append the scrolling div to the doc\n\t\tdocument.body.appendChild(scr);\n\n\t\t// Width of the inner div sans scrollbar\n\t\twNoScroll = inn.offsetWidth;\n\t\t// Add the scrollbar\n\t\tscr.style.overflow = 'auto';\n\t\t// Width of the inner div width scrollbar\n\t\twScroll = inn.offsetWidth;\n\n\t\t// Remove the scrolling div from the doc\n\t\tdocument.body.removeChild(document.body.lastChild);\n\n\t\t// Pixel width of the scroller\n\t\treturn (wNoScroll - wScroll);\n\t}", "function getDocumentRect(element){var _element$ownerDocumen;var html=getDocumentElement(element);var winScroll=getWindowScroll(element);var body=(_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body;var width=max(html.scrollWidth,html.clientWidth,body?body.scrollWidth:0,body?body.clientWidth:0);var height=max(html.scrollHeight,html.clientHeight,body?body.scrollHeight:0,body?body.clientHeight:0);var x=-winScroll.scrollLeft+getWindowScrollBarX(element);var y=-winScroll.scrollTop;if(getComputedStyle$1(body||html).direction==='rtl'){x+=max(html.clientWidth,body?body.clientWidth:0)-width;}return {width:width,height:height,x:x,y:y};}", "function getDocumentRect(element){var _element$ownerDocumen;var html=getDocumentElement(element);var winScroll=getWindowScroll(element);var body=(_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body;var width=max(html.scrollWidth,html.clientWidth,body?body.scrollWidth:0,body?body.clientWidth:0);var height=max(html.scrollHeight,html.clientHeight,body?body.scrollHeight:0,body?body.clientHeight:0);var x=-winScroll.scrollLeft+getWindowScrollBarX(element);var y=-winScroll.scrollTop;if(getComputedStyle(body||html).direction==='rtl'){x+=max(html.clientWidth,body?body.clientWidth:0)-width;}return {width:width,height:height,x:x,y:y};}", "function getScrollbarWidth() {\n if ($(\"html\").is(\"[data-minimalscrollbar]\")) {\n return 0\n }\n let $t = $(\"<div/>\").css({\n position: \"absolute\",\n top: \"-100px\",\n overflowX: \"hidden\",\n overflowY: \"scroll\"\n }).prependTo(\"body\")\n let out = $t[0].offsetWidth - $t[0].clientWidth\n $t.remove()\n return out\n }", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n const width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n const height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width,\n height,\n x,\n y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "_getScrollbarWidth() {\n if (this._scrollbarWidth === null) {\n const $el = $('<div>test</div>')\n .css({\n visibility: 'hidden',\n position: 'absolute',\n left: -10000,\n top: -10000,\n })\n .appendTo(document.body);\n const width = $el.width();\n\n $el.css('overflow-y', 'scroll');\n const newWidth = $el.width();\n\n $el.remove();\n\n this._scrollbarWidth = newWidth - width;\n }\n\n return this._scrollbarWidth;\n }", "getScrollSize(_id) {\n const _elem = this._elements[_id];\n let [w, h] = [0, 0];\n if (_elem) {\n [w, h] = [_elem.scrollWidth, _elem.scrollHeight];\n }\n else {\n console.warn('ELEM.getScrollSize(', _id, '): Element not found');\n }\n return [w, h];\n }", "getScrollSize(_id) {\n const _elem = this._elements[_id];\n let [w, h] = [0, 0];\n if (_elem) {\n [w, h] = [_elem.scrollWidth, _elem.scrollHeight];\n }\n else {\n console.warn('ELEM.getScrollSize(', _id, '): Element not found');\n }\n return [w, h];\n }", "function getScrollbarWidths(el){var leftRightWidth=el[0].offsetWidth-el[0].clientWidth;var bottomWidth=el[0].offsetHeight-el[0].clientHeight;var widths;leftRightWidth=sanitizeScrollbarWidth(leftRightWidth);bottomWidth=sanitizeScrollbarWidth(bottomWidth);widths={left:0,right:0,top:0,bottom:bottomWidth};if(getIsLeftRtlScrollbars()&&el.css('direction')==='rtl'){// is the scrollbar on the left side?\nwidths.left=leftRightWidth;}else{widths.right=leftRightWidth;}return widths;}", "getViewportRect() {\n // Use the document element's bounding rect rather than the window scroll properties\n // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n // can disagree when the page is pinch-zoomed (on devices that support touch).\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n // We use the documentElement instead of the body because, by default (without a css reset)\n // browsers typically give the document body an 8px margin, which is not included in\n // getBoundingClientRect().\n const scrollPosition = this.getViewportScrollPosition();\n const {\n width,\n height\n } = this.getViewportSize();\n return {\n top: scrollPosition.top,\n left: scrollPosition.left,\n bottom: scrollPosition.top + height,\n right: scrollPosition.left + width,\n height,\n width\n };\n }", "function getWidth() {\r\n return Math.max(\r\n document.body.scrollWidth,\r\n document.documentElement.scrollWidth,\r\n document.body.offsetWidth,\r\n document.documentElement.offsetWidth,\r\n document.documentElement.clientWidth\r\n );\r\n}", "function getScrollbarWidth() {\n const inner = document.createElement('p');\n\n inner.style.width = '100%';\n inner.style.height = '200px';\n\n const outer = document.createElement('div');\n\n outer.style.position = 'absolute';\n outer.style.top = '0px';\n outer.style.left = '0px';\n outer.style.visibility = 'hidden';\n outer.style.width = '200px';\n outer.style.height = '150px';\n outer.style.overflow = 'hidden';\n outer.appendChild(inner);\n\n document.body.appendChild(outer);\n\n const w1 = inner.offsetWidth;\n\n outer.style.overflow = 'scroll';\n\n let w2 = inner.offsetWidth;\n\n if (w1 === w2) {\n w2 = outer.clientWidth;\n }\n\n document.body.removeChild(outer);\n\n return (w1 - w2);\n}", "function computeScrollbarWidthsForEl(el) {\n return {\n x: el.offsetHeight - el.clientHeight,\n y: el.offsetWidth - el.clientWidth,\n };\n }", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var winScroll = Object(_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_4__[\"max\"])(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_4__[\"max\"])(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(element);\n var y = -winScroll.scrollTop;\n\n if (Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(body || html).direction === 'rtl') {\n x += Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_4__[\"max\"])(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var winScroll = Object(_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_4__[\"max\"])(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_4__[\"max\"])(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(element);\n var y = -winScroll.scrollTop;\n\n if (Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(body || html).direction === 'rtl') {\n x += Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_4__[\"max\"])(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var winScroll = Object(_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_4__[\"max\"])(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_4__[\"max\"])(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(element);\n var y = -winScroll.scrollTop;\n\n if (Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(body || html).direction === 'rtl') {\n x += Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_4__[\"max\"])(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getWidth() {\n return Math.max(\n document.body.scrollWidth,\n document.documentElement.scrollWidth,\n document.body.offsetWidth,\n document.documentElement.offsetWidth,\n document.documentElement.clientWidth\n );\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(element);\n var winScroll = (0,_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_1__.default)(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_3__.default)(element);\n var y = -winScroll.scrollTop;\n\n if ((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_4__.default)(body || html).direction === 'rtl') {\n x += (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(element);\n var winScroll = (0,_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_1__.default)(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_3__.default)(element);\n var y = -winScroll.scrollTop;\n\n if ((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_4__.default)(body || html).direction === 'rtl') {\n x += (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(element);\n var winScroll = (0,_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_1__.default)(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_3__.default)(element);\n var y = -winScroll.scrollTop;\n\n if ((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_4__.default)(body || html).direction === 'rtl') {\n x += (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(element);\n var winScroll = (0,_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_1__.default)(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_3__.default)(element);\n var y = -winScroll.scrollTop;\n\n if ((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_4__.default)(body || html).direction === 'rtl') {\n x += (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getScrollbarWidth() {\n\n // Creating invisible container\n const outer = document.createElement('div');\n outer.style.visibility = 'hidden';\n outer.style.overflow = 'scroll'; // forcing scrollbar to appear\n outer.style.msOverflowStyle = 'scrollbar'; // needed for WinJS apps\n document.body.appendChild(outer);\n \n // Creating inner element and placing it in the container\n const inner = document.createElement('div');\n outer.appendChild(inner);\n \n // Calculating difference between container's full width and the child width\n const scrollbarWidth = (outer.offsetWidth - inner.offsetWidth);\n \n // Removing temporary elements from the DOM\n outer.parentNode.removeChild(outer);\n \n return scrollbarWidth;\n }", "function getWidth() {\n return Math.max(\n document.body.scrollWidth,\n document.documentElement.scrollWidth,\n document.body.offsetWidth,\n document.documentElement.offsetWidth,\n document.documentElement.clientWidth\n );\n}", "function getPageSize(boolWithScroll,oDoc)\r\n{ \r\n\tif(oDoc==undefined)oDoc = document;\r\n\r\n\tvar win = window;\r\n\r\n\tvar intWidth = 0;\r\n\tvar intHeight = 0;\r\n\r\n\tif(boolWithScroll==undefined)boolWithScroll=false;\r\n\tif (win.innerHeight && win.scrollMaxY) \r\n\t{\r\n\t\t//-- Firefox \r\n\t\tvar intScrollY = (boolWithScroll)?win.scrollMaxY:0;\r\n\t\tvar intScrollX = (boolWithScroll)?win.scrollMaxX:0;\r\n\t\tintHeight = win.innerHeight + intScrollY;\r\n\t\tintWidth = win.innerWidth + intScrollX; \r\n\t} \r\n if (oDoc.body.scrollHeight > oDoc.body.offsetHeight)\r\n\t{ \r\n\t\t//-- all but Explorer Mac \r\n\t\tif(boolWithScroll)\r\n\t\t{\r\n\t\t\tintHeight = oDoc.body.scrollHeight; \r\n\t\t\tintWidth = oDoc.body.scrollWidth; \r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tintHeight = oDoc.body.offsetHeight; \r\n\t\t\tintWidth = oDoc.body.offsetWidth; \r\n\t\t}\r\n\t} \r\n\telse \r\n\t{ \r\n\t\t//-- works in Explorer 6 Strict, Mozilla (not FF) and Safari \r\n\t\tintHeight = oDoc.body.offsetHeight; \r\n\t\tintWidth = oDoc.body.offsetWidth; \r\n\t} \r\n\t\r\n\tvar info = new Object();\r\n\tinfo.width = intWidth;\r\n\tinfo.height = intHeight;\r\n\treturn info;\r\n}", "function ___getPageSize() {\r\n var xScroll, yScroll;\r\n if (window.innerHeight && window.scrollMaxY) {\r\n xScroll = window.innerWidth + window.scrollMaxX;\r\n yScroll = window.innerHeight + window.scrollMaxY;\r\n } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac\r\n xScroll = document.body.scrollWidth;\r\n yScroll = document.body.scrollHeight;\r\n } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari\r\n xScroll = document.body.offsetWidth;\r\n yScroll = document.body.offsetHeight;\r\n }\r\n var windowWidth, windowHeight;\r\n if (self.innerHeight) { // all except Explorer\r\n if(document.documentElement.clientWidth){\r\n windowWidth = document.documentElement.clientWidth;\r\n } else {\r\n windowWidth = self.innerWidth;\r\n }\r\n windowHeight = self.innerHeight;\r\n } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode\r\n windowWidth = document.documentElement.clientWidth;\r\n windowHeight = document.documentElement.clientHeight;\r\n } else if (document.body) { // other Explorers\r\n windowWidth = document.body.clientWidth;\r\n windowHeight = document.body.clientHeight;\r\n }\r\n // for small pages with total height less then height of the viewport\r\n if(yScroll < windowHeight){\r\n pageHeight = windowHeight;\r\n } else {\r\n pageHeight = yScroll;\r\n }\r\n // for small pages with total width less then width of the viewport\r\n if(xScroll < windowWidth){\r\n pageWidth = xScroll;\r\n } else {\r\n pageWidth = windowWidth;\r\n }\r\n arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);\r\n return arrayPageSize;\r\n }", "function getContentWidth() {\n // window.innerWidth to get the scrollable size of the window (irrespective of zoom)\n // window.outerWidth to get the size of the visible area\n return Promise.resolve({\n scrollWidth: window.innerWidth,\n viewportWidth: window.outerWidth\n });\n}", "function getClientDim() {\n\tvar nwX, nwY, seX, seY;\n\tif (self.pageYOffset) // all except Explorer\n\t{\n\t nwX = self.pageXOffset;\n\t seX = self.innerWidth + nwX;\n\t nwY = self.pageYOffset;\n\t seY = self.innerHeight + nwY;\n\t}\n\telse if (document.documentElement && document.documentElement.scrollTop) // Explorer 6 Strict\n\t{\n\t nwX = document.documentElement.scrollLeft;\n\t seX = document.documentElement.clientWidth + nwX;\n\t nwY = document.documentElement.scrollTop;\n\t seY = document.documentElement.clientHeight + nwY;\n\t}\n\telse if (document.body) // all other Explorers\n\t{\n\t nwX = document.body.scrollLeft;\n\t seX = document.body.clientWidth + nwX;\n\t nwY = document.body.scrollTop;\n\t seY = document.body.clientHeight + nwY;\n\t}\n\treturn {'nw' : new coordinate(nwX, nwY), 'se' : new coordinate(seX, seY)};\n}", "function getHeight()\n\t{\n\t\tvar B=0;\n\t\tvar A=getScrollXY()[1];\n\t\tif(self.innerHeight)\n\t\t{\n\t\t\tB=self.innerHeight+A*2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(document.documentElement&&document.documentElement.clientHeight)\n\t\t\t{\n\t\t\t\tB=document.documentElement.clientHeight+A*2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(document.body)\n\t\t\t\t{\n\t\t\t\t\tB=document.body.clientHeight+A*2\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\t\n\t\n\t\treturn B\n\t}", "function getLayoutViewportSize() {\n return { width: document.documentElement.clientWidth, height: document.documentElement.clientHeight };\n}", "function innerCanvasArea() {\n var total = parseInt(innerCanvas.style.width) * 2;\n return total;\n }", "function ___getPageSize() {\n\t\t\tvar xScroll, yScroll;\n\t\t\tif (window.innerHeight && window.scrollMaxY) {\t\n\t\t\t\txScroll = window.innerWidth + window.scrollMaxX;\n\t\t\t\tyScroll = window.innerHeight + window.scrollMaxY;\n\t\t\t} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac\n\t\t\t\txScroll = document.body.scrollWidth;\n\t\t\t\tyScroll = document.body.scrollHeight;\n\t\t\t} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari\n\t\t\t\txScroll = document.body.offsetWidth;\n\t\t\t\tyScroll = document.body.offsetHeight;\n\t\t\t}\n\t\t\tvar windowWidth, windowHeight;\n\t\t\tif (self.innerHeight) {\t// all except Explorer\n\t\t\t\tif(document.documentElement.clientWidth){\n\t\t\t\t\twindowWidth = document.documentElement.clientWidth;\n\t\t\t\t} else {\n\t\t\t\t\twindowWidth = self.innerWidth;\n\t\t\t\t}\n\t\t\t\twindowHeight = self.innerHeight;\n\t\t\t} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode\n\t\t\t\twindowWidth = document.documentElement.clientWidth;\n\t\t\t\twindowHeight = document.documentElement.clientHeight;\n\t\t\t} else if (document.body) { // other Explorers\n\t\t\t\twindowWidth = document.body.clientWidth;\n\t\t\t\twindowHeight = document.body.clientHeight;\n\t\t\t}\n\t\t\t// for small pages with total height less then height of the viewport\n\t\t\tif(yScroll < windowHeight){\n\t\t\t\tpageHeight = windowHeight;\n\t\t\t} else {\n\t\t\t\tpageHeight = yScroll;\n\t\t\t}\n\t\t\t// for small pages with total width less then width of the viewport\n\t\t\tif(xScroll < windowWidth){\n\t\t\t\tpageWidth = xScroll;\n\t\t\t} else {\n\t\t\t\tpageWidth = windowWidth;\n\t\t\t}\n\t\t\tarrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);\n\t\t\treturn arrayPageSize;\n\t\t}", "function getScrollbarWidth() {\n var outer = document.createElement(\"div\");\n outer.style.visibility = \"hidden\";\n outer.style.width = \"100px\";\n document.body.appendChild(outer);\n\n var widthNoScroll = outer.offsetWidth;\n // force scrollbars\n outer.style.overflow = \"scroll\";\n\n // add innerdiv\n var inner = document.createElement(\"div\");\n inner.style.width = \"100%\";\n outer.appendChild(inner);\n\n var widthWithScroll = inner.offsetWidth;\n\n // remove divs\n outer.parentNode.removeChild(outer);\n\n return widthNoScroll - widthWithScroll;\n }", "function getWidth()\n\t{\n\t\tvar A=0;\n\t\tvar B=getScrollXY()[0];\n\t\tif(self.innerWidth)\n\t\t{\n\t\t\tA=self.innerWidth+B*2\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(document.documentElement&&document.documentElement.clientHeight)\n\t\t\t{\n\t\t\t\tA=document.documentElement.clientWidth+B*2\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(document.body)\n\t\t\t\t{\n\t\t\t\t\tA=document.body.clientWidth+B*2\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn A\n\t}", "function sizeScrollbar(){\n\t\tvar remainder = scrollContent.width() - scrollPane.width();\n\t\tvar proportion = remainder / scrollContent.width();\n\t\tvar handleSize = scrollPane.width() - (proportion * scrollPane.width());\n\t\tscrollbar.find('.ui-slider-handle').css({\n\t\t\twidth: handleSize,\n\t\t\t'margin-left': -handleSize/2\n\t\t});\n\t\thandleHelper.width('').width( scrollbar.width() - handleSize);\n\t}", "function ___getPageSize() {\r\n\t\t\tvar xScroll, yScroll;\r\n\t\t\tif (window.innerHeight && window.scrollMaxY) {\t\r\n\t\t\t\txScroll = window.innerWidth + window.scrollMaxX;\r\n\t\t\t\tyScroll = window.innerHeight + window.scrollMaxY;\r\n\t\t\t} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac\r\n\t\t\t\txScroll = document.body.scrollWidth;\r\n\t\t\t\tyScroll = document.body.scrollHeight;\r\n\t\t\t} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari\r\n\t\t\t\txScroll = document.body.offsetWidth;\r\n\t\t\t\tyScroll = document.body.offsetHeight;\r\n\t\t\t}\r\n\t\t\tvar windowWidth, windowHeight;\r\n\t\t\tif (self.innerHeight) {\t// all except Explorer\r\n\t\t\t\tif(document.documentElement.clientWidth){\r\n\t\t\t\t\twindowWidth = document.documentElement.clientWidth; \r\n\t\t\t\t} else {\r\n\t\t\t\t\twindowWidth = self.innerWidth;\r\n\t\t\t\t}\r\n\t\t\t\twindowHeight = self.innerHeight;\r\n\t\t\t} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode\r\n\t\t\t\twindowWidth = document.documentElement.clientWidth;\r\n\t\t\t\twindowHeight = document.documentElement.clientHeight;\r\n\t\t\t} else if (document.body) { // other Explorers\r\n\t\t\t\twindowWidth = document.body.clientWidth;\r\n\t\t\t\twindowHeight = document.body.clientHeight;\r\n\t\t\t}\t\r\n\t\t\t// for small pages with total height less then height of the viewport\r\n\t\t\tif(yScroll < windowHeight){\r\n\t\t\t\tpageHeight = windowHeight;\r\n\t\t\t} else { \r\n\t\t\t\tpageHeight = yScroll;\r\n\t\t\t}\r\n\t\t\t// for small pages with total width less then width of the viewport\r\n\t\t\tif(xScroll < windowWidth){\t\r\n\t\t\t\tpageWidth = xScroll;\t\t\r\n\t\t\t} else {\r\n\t\t\t\tpageWidth = windowWidth;\r\n\t\t\t}\r\n\t\t\tarrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);\r\n\t\t\treturn arrayPageSize;\r\n\t\t}", "function getScrollbarWidth() {\r\n if (_scrollbarWidth === undefined) {\r\n var scrollDiv = document.createElement('div');\r\n scrollDiv.style.setProperty('width', '100px');\r\n scrollDiv.style.setProperty('height', '100px');\r\n scrollDiv.style.setProperty('overflow', 'scroll');\r\n scrollDiv.style.setProperty('position', 'absolute');\r\n scrollDiv.style.setProperty('top', '-9999px');\r\n document.body.appendChild(scrollDiv);\r\n // Get the scrollbar width\r\n _scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\r\n // Delete the DIV\r\n document.body.removeChild(scrollDiv);\r\n }\r\n return _scrollbarWidth;\r\n}", "function getScrollbarWidth() {\r\n if (_scrollbarWidth === undefined) {\r\n var scrollDiv = document.createElement('div');\r\n scrollDiv.style.setProperty('width', '100px');\r\n scrollDiv.style.setProperty('height', '100px');\r\n scrollDiv.style.setProperty('overflow', 'scroll');\r\n scrollDiv.style.setProperty('position', 'absolute');\r\n scrollDiv.style.setProperty('top', '-9999px');\r\n document.body.appendChild(scrollDiv);\r\n // Get the scrollbar width\r\n _scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\r\n // Delete the DIV\r\n document.body.removeChild(scrollDiv);\r\n }\r\n return _scrollbarWidth;\r\n}", "getViewportRect() {\n // Use the document element's bounding rect rather than the window scroll properties\n // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n // can disagree when the page is pinch-zoomed (on devices that support touch).\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n // We use the documentElement instead of the body because, by default (without a css reset)\n // browsers typically give the document body an 8px margin, which is not included in\n // getBoundingClientRect().\n const scrollPosition = this.getViewportScrollPosition();\n const { width, height } = this.getViewportSize();\n return {\n top: scrollPosition.top,\n left: scrollPosition.left,\n bottom: scrollPosition.top + height,\n right: scrollPosition.left + width,\n height,\n width,\n };\n }", "getViewportRect() {\n // Use the document element's bounding rect rather than the window scroll properties\n // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n // can disagree when the page is pinch-zoomed (on devices that support touch).\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n // We use the documentElement instead of the body because, by default (without a css reset)\n // browsers typically give the document body an 8px margin, which is not included in\n // getBoundingClientRect().\n const scrollPosition = this.getViewportScrollPosition();\n const { width, height } = this.getViewportSize();\n return {\n top: scrollPosition.top,\n left: scrollPosition.left,\n bottom: scrollPosition.top + height,\n right: scrollPosition.left + width,\n height,\n width,\n };\n }", "function getScrollbarWidth() {\n if (_scrollbarWidth === undefined) {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.setProperty('width', '100px');\n scrollDiv.style.setProperty('height', '100px');\n scrollDiv.style.setProperty('overflow', 'scroll');\n scrollDiv.style.setProperty('position', 'absolute');\n scrollDiv.style.setProperty('top', '-9999px');\n document.body.appendChild(scrollDiv);\n // Get the scrollbar width\n _scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n // Delete the DIV\n document.body.removeChild(scrollDiv);\n }\n return _scrollbarWidth;\n}", "function getScrollbarWidth() {\n if (_scrollbarWidth === undefined) {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.setProperty('width', '100px');\n scrollDiv.style.setProperty('height', '100px');\n scrollDiv.style.setProperty('overflow', 'scroll');\n scrollDiv.style.setProperty('position', 'absolute');\n scrollDiv.style.setProperty('top', '-9999px');\n document.body.appendChild(scrollDiv);\n // Get the scrollbar width\n _scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n // Delete the DIV\n document.body.removeChild(scrollDiv);\n }\n return _scrollbarWidth;\n}", "function getScrollbarWidth() {\n if (_scrollbarWidth === undefined) {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.setProperty('width', '100px');\n scrollDiv.style.setProperty('height', '100px');\n scrollDiv.style.setProperty('overflow', 'scroll');\n scrollDiv.style.setProperty('position', 'absolute');\n scrollDiv.style.setProperty('top', '-9999px');\n document.body.appendChild(scrollDiv);\n // Get the scrollbar width\n _scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n // Delete the DIV\n document.body.removeChild(scrollDiv);\n }\n return _scrollbarWidth;\n}", "function getScrollbarWidth() {\n if (_scrollbarWidth === undefined) {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.setProperty('width', '100px');\n scrollDiv.style.setProperty('height', '100px');\n scrollDiv.style.setProperty('overflow', 'scroll');\n scrollDiv.style.setProperty('position', 'absolute');\n scrollDiv.style.setProperty('top', '-9999px');\n document.body.appendChild(scrollDiv);\n // Get the scrollbar width\n _scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n // Delete the DIV\n document.body.removeChild(scrollDiv);\n }\n return _scrollbarWidth;\n}", "function getScrollbarWidth() {\n if (_scrollbarWidth === undefined) {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.setProperty('width', '100px');\n scrollDiv.style.setProperty('height', '100px');\n scrollDiv.style.setProperty('overflow', 'scroll');\n scrollDiv.style.setProperty('position', 'absolute');\n scrollDiv.style.setProperty('top', '-9999px');\n document.body.appendChild(scrollDiv);\n // Get the scrollbar width\n _scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n // Delete the DIV\n document.body.removeChild(scrollDiv);\n }\n return _scrollbarWidth;\n}", "function getScrollbarWidth() {\n if (_scrollbarWidth === undefined) {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.setProperty('width', '100px');\n scrollDiv.style.setProperty('height', '100px');\n scrollDiv.style.setProperty('overflow', 'scroll');\n scrollDiv.style.setProperty('position', 'absolute');\n scrollDiv.style.setProperty('top', '-9999px');\n document.body.appendChild(scrollDiv);\n // Get the scrollbar width\n _scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n // Delete the DIV\n document.body.removeChild(scrollDiv);\n }\n return _scrollbarWidth;\n}", "function ___getPageSize() {\n\t\t\tvar xScroll, yScroll;\n\t\t\tif (window.innerHeight && window.scrollMaxY) {\t\n\t\t\t\txScroll = window.innerWidth + window.scrollMaxX;\n\t\t\t\tyScroll = window.innerHeight + window.scrollMaxY;\n\t\t\t} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac\n\t\t\t\txScroll = document.body.scrollWidth;\n\t\t\t\tyScroll = document.body.scrollHeight;\n\t\t\t} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari\n\t\t\t\txScroll = document.body.offsetWidth;\n\t\t\t\tyScroll = document.body.offsetHeight;\n\t\t\t}\n\t\t\tvar windowWidth, windowHeight;\n\t\t\tif (self.innerHeight) {\t// all except Explorer\n\t\t\t\tif(document.documentElement.clientWidth){\n\t\t\t\t\twindowWidth = document.documentElement.clientWidth; \n\t\t\t\t} else {\n\t\t\t\t\twindowWidth = self.innerWidth;\n\t\t\t\t}\n\t\t\t\twindowHeight = self.innerHeight;\n\t\t\t} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode\n\t\t\t\twindowWidth = document.documentElement.clientWidth;\n\t\t\t\twindowHeight = document.documentElement.clientHeight;\n\t\t\t} else if (document.body) { // other Explorers\n\t\t\t\twindowWidth = document.body.clientWidth;\n\t\t\t\twindowHeight = document.body.clientHeight;\n\t\t\t}\t\n\t\t\t// for small pages with total height less then height of the viewport\n\t\t\tif(yScroll < windowHeight){\n\t\t\t\tpageHeight = windowHeight;\n\t\t\t} else { \n\t\t\t\tpageHeight = yScroll;\n\t\t\t}\n\t\t\t// for small pages with total width less then width of the viewport\n\t\t\tif(xScroll < windowWidth){\t\n\t\t\t\tpageWidth = xScroll;\t\t\n\t\t\t} else {\n\t\t\t\tpageWidth = windowWidth;\n\t\t\t}\n\t\t\tarrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);\n\t\t\treturn arrayPageSize;\n\t\t}", "function getDocWidth() {\n\t\t\tvar D = document;\n\t\t\treturn Math.max(\n\t\t\t\tMath.max(D.body.scrollWidth, D.documentElement.scrollWidth),\n\t\t\t\tMath.max(D.body.offsetWidth, D.documentElement.offsetWidth),\n\t\t\t\tMath.max(D.body.clientWidth, D.documentElement.clientWidth)\n\t\t\t);\n\t\t}", "function dh() {\r\n // Make an adjustment to documents in scrolling frames so that the\r\n // scrollbars are only displayed when necessary.\r\n var a = 8; // XXX This should be 2. We need a first ele var in each frame.\r\n if (self != self.parent &&\r\n objAtt(parent.frames[self.name], \"scrolling\") == \"no\") a = 0;\r\n\r\n if (ie) return document.body.scrollHeight + a;\r\n\r\n // Gecko-based browsers do not report the height including document margins\r\n // so we need to make an educated guess. Look for the first visible element\r\n // and assume it's y position is equal to the top and bottom document\r\n // margins.\r\n var r = document.height;\r\n if (document.body.childNodes.length > 0) {\r\n for (var i = 0; i < document.body.childNodes.length; i++) {\r\n if (document.body.childNodes[i].nodeType == 1 &&\r\n objCss(document.body.childNodes[i], \"display\") != \"none\") {\r\n r += 2 * (absPos(document.body.childNodes[i]).y);\r\n break;\r\n }\r\n }\r\n }\r\n return r + a;\r\n}", "function calcScroll() {\n let div = document.createElement('div');\n\n div.style.width = '50px';\n div.style.height = '50px';\n div.style.overflowY = 'scroll';\n div.style.visibility = 'hidden';\n\n document.body.appendChild(div);\n let scrollWidth = div.offsetWidth - div.clientWidth;\n div.remove();\n\n return scrollWidth;\n}", "function find_height(){\n\n\ttotal_height=0;\n\n\tcurrent_node=document.getElementById(\"file_area\");\n\n\twhile(current_node!=null && current_node.id!=\"pagecontainer\"){\n\n\t\ttotal_height+=current_node.offsetTop;\n\t\t\n\t\tcurrent_node = current_node.parentNode;\n\t\t\n\t}\n\n\tdrag_manager.initial_scroll = drag_manager.scroll_value;\n\n\treturn total_height - drag_manager.scroll_value - drag_manager.body_scroll;\n\t\t\n}", "function getWindowSize(){\t\n\tvar xScroll, yScroll;\n\t\n\tif (window.innerHeight && window.scrollMaxY) {\n\t\txScroll = document.body.scrollWidth;\n\t\tyScroll = window.innerHeight + window.scrollMaxY;\n\t} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac\n\t\txScroll = document.body.scrollWidth;\n\t\tyScroll = document.body.scrollHeight;\n\t} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari\n\t\txScroll = document.body.offsetWidth;\n\t\tyScroll = document.body.offsetHeight;\n\t}\n\t\n\tvar windowWidth, windowHeight;\n\tif (self.innerHeight) {\t// all except Explorer\n\t\twindowWidth = self.innerWidth;\n\t\twindowHeight = self.innerHeight;\n\t} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode\n\t\twindowWidth = document.documentElement.clientWidth;\n\t\twindowHeight = document.documentElement.clientHeight;\n\t} else if (document.body) { // other Explorers\n\t\twindowWidth = document.body.clientWidth;\n\t\twindowHeight = document.body.clientHeight;\n\t}\t\n\t\n\t// for small pages with total height less then height of the viewport\n\tif(yScroll < windowHeight){\n\t\tpageHeight = windowHeight;\n\t} else { \n\t\tpageHeight = yScroll;\n\t}\n\n\t// for small pages with total width less then width of the viewport\n\tif(xScroll < windowWidth){\t\n\t\tpageWidth = windowWidth;\n\t} else {\n\t\tpageWidth = xScroll;\n\t}\n\n\n\tarrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) \n\treturn arrayPageSize;\n}", "function measureForScrollbars(cm) {\n var scroll = cm.display.scroller;\n return {\n clientHeight: scroll.clientHeight,\n barHeight: cm.display.scrollbarV.clientHeight,\n scrollWidth: scroll.scrollWidth, clientWidth: scroll.clientWidth,\n hScrollbarTakesSpace: hScrollbarTakesSpace(cm),\n barWidth: cm.display.scrollbarH.clientWidth,\n docHeight: Math.round(cm.doc.height + paddingVert(cm.display))\n };\n }", "function measureForScrollbars(cm) {\n var scroll = cm.display.scroller;\n return {\n clientHeight: scroll.clientHeight,\n barHeight: cm.display.scrollbarV.clientHeight,\n scrollWidth: scroll.scrollWidth, clientWidth: scroll.clientWidth,\n hScrollbarTakesSpace: hScrollbarTakesSpace(cm),\n barWidth: cm.display.scrollbarH.clientWidth,\n docHeight: Math.round(cm.doc.height + paddingVert(cm.display))\n };\n }", "function measureForScrollbars(cm) {\n var scroll = cm.display.scroller;\n return {\n clientHeight: scroll.clientHeight,\n barHeight: cm.display.scrollbarV.clientHeight,\n scrollWidth: scroll.scrollWidth, clientWidth: scroll.clientWidth,\n hScrollbarTakesSpace: hScrollbarTakesSpace(cm),\n barWidth: cm.display.scrollbarH.clientWidth,\n docHeight: Math.round(cm.doc.height + paddingVert(cm.display))\n };\n }", "function measureForScrollbars(cm) {\n var scroll = cm.display.scroller;\n return {\n clientHeight: scroll.clientHeight,\n barHeight: cm.display.scrollbarV.clientHeight,\n scrollWidth: scroll.scrollWidth, clientWidth: scroll.clientWidth,\n hScrollbarTakesSpace: hScrollbarTakesSpace(cm),\n barWidth: cm.display.scrollbarH.clientWidth,\n docHeight: Math.round(cm.doc.height + paddingVert(cm.display))\n };\n }", "function getScrollbarWidth() {\n var outer = document.createElement(\"div\");\n outer.style.visibility = \"hidden\";\n outer.style.width = \"100px\";\n outer.style.msOverflowStyle = \"scrollbar\"; // needed for WinJS apps\n\n document.body.appendChild(outer);\n\n var widthNoScroll = outer.offsetWidth;\n // force scrollbars\n outer.style.overflow = \"scroll\";\n\n // add innerdiv\n var inner = document.createElement(\"div\");\n inner.style.width = \"100%\";\n outer.appendChild(inner); \n\n var widthWithScroll = inner.offsetWidth;\n\n // remove divs\n outer.parentNode.removeChild(outer);\n\n return widthNoScroll - widthWithScroll;\n}", "function getBodyHeight() {\n // Initialize height to zero\n var height = 0;\n // Initialize scrollHeight to zero\n var scrollHeight = 0;\n // Initialize offsetHeight to zero\n var offsetHeight = 0;\n // Initialize maxHeight to zero\n var maxHeight;\n // If document.height has some value then ...\n if (document.height) {\n // Set height to document.height\n height = document.height;\n } // If document.body has some value then ...\n else if (document.body) {\n // If document.body.scrollHeight has some value then ...\n if (document.body.scrollHeight) {\n // Set height & scrollHeight to document.body.scrollHeight\n height = scrollHeight = document.body.scrollHeight;\n }\n // If document.body.offsetHeight has some value then ...\n if (document.body.offsetHeight) {\n // Set height & offsetHeight to document.body.offsetHeight\n height = offsetHeight = document.body.offsetHeight;\n }\n // If scrollHeight & offsetHeight \n // both have some value then ...\n if (scrollHeight && offsetHeight) {\n // Set height & maxHeight to maximum value\n // among scrollHeight & offsetHeight\n height = maxHeight = Math.max(scrollHeight, offsetHeight);\n }\n }\n // If browser is Microsoft Internet Explorer then ...\n if (navigator.appName == \"Microsoft Internet Explorer\") {\n return height;\n } // If browser is NOT Microsoft Internet Explorer then ...\n else {\n // width to be returned is the available height\n // multiplied by\n // ratio of device-logical YDPIs\n return (window.screen.availHeight) * (screen.deviceYDPI / screen.logicalYDPI);\n }\n}", "_getWidth() {\n const measurer = this._document.createElement('div');\n measurer.className = 'modal-scrollbar-measure';\n const body = this._document.body;\n body.appendChild(measurer);\n const width = measurer.getBoundingClientRect().width - measurer.clientWidth;\n body.removeChild(measurer);\n return width;\n }", "function measureForScrollbars(cm) {\n var d = cm.display, gutterW = d.gutters.offsetWidth;\n var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n return {\n clientHeight: d.scroller.clientHeight,\n viewHeight: d.wrapper.clientHeight,\n scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n viewWidth: d.wrapper.clientWidth,\n barLeft: cm.options.fixedGutter ? gutterW : 0,\n docHeight: docH,\n scrollHeight: docH + scrollGap(cm) + d.barHeight,\n nativeBarWidth: d.nativeBarWidth,\n gutterWidth: gutterW\n }\n }", "function measureForScrollbars(cm) {\n var d = cm.display, gutterW = d.gutters.offsetWidth;\n var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n return {\n clientHeight: d.scroller.clientHeight,\n viewHeight: d.wrapper.clientHeight,\n scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n viewWidth: d.wrapper.clientWidth,\n barLeft: cm.options.fixedGutter ? gutterW : 0,\n docHeight: docH,\n scrollHeight: docH + scrollGap(cm) + d.barHeight,\n nativeBarWidth: d.nativeBarWidth,\n gutterWidth: gutterW\n }\n }", "function measureForScrollbars(cm) {\n var d = cm.display, gutterW = d.gutters.offsetWidth;\n var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n return {\n clientHeight: d.scroller.clientHeight,\n viewHeight: d.wrapper.clientHeight,\n scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n viewWidth: d.wrapper.clientWidth,\n barLeft: cm.options.fixedGutter ? gutterW : 0,\n docHeight: docH,\n scrollHeight: docH + scrollGap(cm) + d.barHeight,\n nativeBarWidth: d.nativeBarWidth,\n gutterWidth: gutterW\n }\n }", "function measureForScrollbars(cm) {\n var d = cm.display, gutterW = d.gutters.offsetWidth;\n var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n return {\n clientHeight: d.scroller.clientHeight,\n viewHeight: d.wrapper.clientHeight,\n scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n viewWidth: d.wrapper.clientWidth,\n barLeft: cm.options.fixedGutter ? gutterW : 0,\n docHeight: docH,\n scrollHeight: docH + scrollGap(cm) + d.barHeight,\n nativeBarWidth: d.nativeBarWidth,\n gutterWidth: gutterW\n }\n }", "function measureForScrollbars(cm) {\n var d = cm.display, gutterW = d.gutters.offsetWidth;\n var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n return {\n clientHeight: d.scroller.clientHeight,\n viewHeight: d.wrapper.clientHeight,\n scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n viewWidth: d.wrapper.clientWidth,\n barLeft: cm.options.fixedGutter ? gutterW : 0,\n docHeight: docH,\n scrollHeight: docH + scrollGap(cm) + d.barHeight,\n nativeBarWidth: d.nativeBarWidth,\n gutterWidth: gutterW\n }\n }", "function measureForScrollbars(cm) {\n var d = cm.display, gutterW = d.gutters.offsetWidth;\n var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n return {\n clientHeight: d.scroller.clientHeight,\n viewHeight: d.wrapper.clientHeight,\n scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n viewWidth: d.wrapper.clientWidth,\n barLeft: cm.options.fixedGutter ? gutterW : 0,\n docHeight: docH,\n scrollHeight: docH + scrollGap(cm) + d.barHeight,\n nativeBarWidth: d.nativeBarWidth,\n gutterWidth: gutterW\n }\n }", "function measureForScrollbars(cm) {\n var d = cm.display, gutterW = d.gutters.offsetWidth;\n var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n return {\n clientHeight: d.scroller.clientHeight,\n viewHeight: d.wrapper.clientHeight,\n scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n viewWidth: d.wrapper.clientWidth,\n barLeft: cm.options.fixedGutter ? gutterW : 0,\n docHeight: docH,\n scrollHeight: docH + scrollGap(cm) + d.barHeight,\n nativeBarWidth: d.nativeBarWidth,\n gutterWidth: gutterW\n }\n }", "function measureForScrollbars(cm) {\n var d = cm.display, gutterW = d.gutters.offsetWidth;\n var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n return {\n clientHeight: d.scroller.clientHeight,\n viewHeight: d.wrapper.clientHeight,\n scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n viewWidth: d.wrapper.clientWidth,\n barLeft: cm.options.fixedGutter ? gutterW : 0,\n docHeight: docH,\n scrollHeight: docH + scrollGap(cm) + d.barHeight,\n nativeBarWidth: d.nativeBarWidth,\n gutterWidth: gutterW\n }\n }" ]
[ "0.7022485", "0.68761426", "0.6817225", "0.6808684", "0.67120975", "0.67102104", "0.65767074", "0.6525715", "0.64900756", "0.64900756", "0.64900756", "0.64900756", "0.64900756", "0.64900756", "0.64900756", "0.64900756", "0.64900756", "0.64900756", "0.64900756", "0.64710325", "0.646383", "0.64301765", "0.6424323", "0.6415856", "0.6405724", "0.64012825", "0.63884413", "0.6376177", "0.6333968", "0.63307136", "0.63142544", "0.631268", "0.631268", "0.631268", "0.6309101", "0.6296642", "0.6296642", "0.62916327", "0.6277226", "0.6277226", "0.62304795", "0.6229305", "0.621166", "0.6211596", "0.62024635", "0.6180023", "0.6180023", "0.6180023", "0.6178248", "0.6174473", "0.6174473", "0.6174473", "0.6174473", "0.61689556", "0.61626685", "0.6154904", "0.61517817", "0.61503315", "0.6147255", "0.6135584", "0.6130297", "0.6121911", "0.6113338", "0.6111445", "0.61114264", "0.6110806", "0.6109305", "0.6103048", "0.6103048", "0.60973233", "0.60973233", "0.6095712", "0.6095712", "0.6095712", "0.6095712", "0.6095712", "0.6095712", "0.60817605", "0.60792947", "0.6067909", "0.6062345", "0.60500234", "0.60466903", "0.6044026", "0.6044026", "0.6044026", "0.6044026", "0.6040007", "0.60377336", "0.60181653", "0.6006024", "0.6006024", "0.6006024", "0.6006024", "0.6006024", "0.6006024", "0.6006024", "0.6006024" ]
0.6241363
42
Returns the layout rect of an element relative to its offsetParent. Layout means it doesn't take into account transforms.
function getLayoutRect(element) { return { x: element.offsetLeft, y: element.offsetTop, width: element.offsetWidth, height: element.offsetHeight }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n }", "function getLayoutRect$1(element){var clientRect=getBoundingClientRect$1(element);// Use the clientRect sizes if it's not been transformed.\n// Fixes https://github.com/popperjs/popper-core/issues/1223\nvar width=element.offsetWidth;var height=element.offsetHeight;if(Math.abs(clientRect.width-width)<=1){width=clientRect.width;}if(Math.abs(clientRect.height-height)<=1){height=clientRect.height;}return {x:element.offsetLeft,y:element.offsetTop,width:width,height:height};}", "function getLayoutRect(element) {\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n }", "function getLayoutRect(element) {\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n }", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n }", "function getLayoutRect(element) {\n var clientRect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__.default)(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__.default)(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__.default)(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element) {\n var clientRect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__.default)(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getLayoutRect(element){var clientRect=getBoundingClientRect(element);// Use the clientRect sizes if it's not been transformed.\n// Fixes https://github.com/popperjs/popper-core/issues/1223\nvar width=element.offsetWidth;var height=element.offsetHeight;if(Math.abs(clientRect.width-width)<=1){width=clientRect.width;}if(Math.abs(clientRect.height-height)<=1){height=clientRect.height;}return {x:element.offsetLeft,y:element.offsetTop,width:width,height:height};}", "function getLayoutRect(element){var clientRect=getBoundingClientRect(element);// Use the clientRect sizes if it's not been transformed.\n// Fixes https://github.com/popperjs/popper-core/issues/1223\nvar width=element.offsetWidth;var height=element.offsetHeight;if(Math.abs(clientRect.width-width)<=1){width=clientRect.width;}if(Math.abs(clientRect.height-height)<=1){height=clientRect.height;}return {x:element.offsetLeft,y:element.offsetTop,width:width,height:height};}", "function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 0.5) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 0.5) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' ||\n // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (!isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement,offsetParent,isFixed){if(isFixed===void 0){isFixed=false;}var documentElement=getDocumentElement(offsetParent);var rect=getBoundingClientRect(elementOrVirtualElement);var isOffsetParentAnElement=isHTMLElement(offsetParent);var scroll={scrollLeft:0,scrollTop:0};var offsets={x:0,y:0};if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed){if(getNodeName(offsetParent)!=='body'||// https://github.com/popperjs/popper-core/issues/1078\nisScrollParent(documentElement)){scroll=getNodeScroll(offsetParent);}if(isHTMLElement(offsetParent)){offsets=getBoundingClientRect(offsetParent);offsets.x+=offsetParent.clientLeft;offsets.y+=offsetParent.clientTop;}else if(documentElement){offsets.x=getWindowScrollBarX(documentElement);}}return {x:rect.left+scroll.scrollLeft-offsets.x,y:rect.top+scroll.scrollTop-offsets.y,width:rect.width,height:rect.height};}", "function getCompositeRect(elementOrVirtualElement,offsetParent,isFixed){if(isFixed===void 0){isFixed=false;}var documentElement=getDocumentElement(offsetParent);var rect=getBoundingClientRect(elementOrVirtualElement);var isOffsetParentAnElement=isHTMLElement(offsetParent);var scroll={scrollLeft:0,scrollTop:0};var offsets={x:0,y:0};if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed){if(getNodeName(offsetParent)!=='body'||// https://github.com/popperjs/popper-core/issues/1078\nisScrollParent(documentElement)){scroll=getNodeScroll(offsetParent);}if(isHTMLElement(offsetParent)){offsets=getBoundingClientRect(offsetParent);offsets.x+=offsetParent.clientLeft;offsets.y+=offsetParent.clientTop;}else if(documentElement){offsets.x=getWindowScrollBarX(documentElement);}}return {x:rect.left+scroll.scrollLeft-offsets.x,y:rect.top+scroll.scrollTop-offsets.y,width:rect.width,height:rect.height};}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement;\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (!isFixed) {\n if (getNodeName(offsetParent) !== 'body') {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement = getDocumentElement(offsetParent)) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement;\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (!isFixed) {\n if (getNodeName(offsetParent) !== 'body') {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement = getDocumentElement(offsetParent)) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }", "function getElementPositionRelativeToLayoutViewport(element) {\n return element.getBoundingClientRect();\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent);\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (!isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(documentElement)) {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent);\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement);\n var isOffsetParentAnElement = Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(documentElement)) {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent);\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement);\n var isOffsetParentAnElement = Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(documentElement)) {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent);\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement);\n var isOffsetParentAnElement = Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(documentElement)) {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent);\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement);\n var isOffsetParentAnElement = Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(documentElement)) {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent);\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement);\n var isOffsetParentAnElement = Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(documentElement)) {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect$1(elementOrVirtualElement,offsetParent,isFixed){if(isFixed===void 0){isFixed=false;}var documentElement=getDocumentElement$1(offsetParent);var rect=getBoundingClientRect$1(elementOrVirtualElement);var isOffsetParentAnElement=isHTMLElement$1(offsetParent);var scroll={scrollLeft:0,scrollTop:0};var offsets={x:0,y:0};if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed){if(getNodeName$1(offsetParent)!=='body'||// https://github.com/popperjs/popper-core/issues/1078\nisScrollParent$1(documentElement)){scroll=getNodeScroll$1(offsetParent);}if(isHTMLElement$1(offsetParent)){offsets=getBoundingClientRect$1(offsetParent);offsets.x+=offsetParent.clientLeft;offsets.y+=offsetParent.clientTop;}else if(documentElement){offsets.x=getWindowScrollBarX$1(documentElement);}}return {x:rect.left+scroll.scrollLeft-offsets.x,y:rect.top+scroll.scrollTop-offsets.y,width:rect.width,height:rect.height};}", "function getOuterRect(el,origin){var offset=el.offset();var left=offset.left-(origin?origin.left:0);var top=offset.top-(origin?origin.top:0);return{left:left,right:left+el.outerWidth(),top:top,bottom:top+el.outerHeight()};}", "function getElRect($element) {\n var el = $element[0];\n var isBody = el.tagName === 'BODY';\n var elRect = el.getBoundingClientRect();\n var isSvg = window.SVGElement && el instanceof window.SVGElement;\n var elOffset = isBody ? {\n top: 0,\n left: 0\n } : isSvg ? null : $element.offset();\n var scroll = {\n scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop()\n };\n var outerDims = isBody ? {\n width: $(window).width(),\n height: $(window).height()\n } : null;\n return _.extend({}, elRect, scroll, outerDims, elOffset);\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(offsetParent);\n var rect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(elementOrVirtualElement);\n var isOffsetParentAnElement = (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if ((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_4__.default)(documentElement)) {\n scroll = (0,_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_5__.default)(offsetParent);\n }\n\n if ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent)) {\n offsets = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_6__.default)(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(offsetParent);\n var rect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(elementOrVirtualElement);\n var isOffsetParentAnElement = (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if ((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_4__.default)(documentElement)) {\n scroll = (0,_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_5__.default)(offsetParent);\n }\n\n if ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent)) {\n offsets = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_6__.default)(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(offsetParent);\n var rect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(elementOrVirtualElement);\n var isOffsetParentAnElement = (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if ((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_4__.default)(documentElement)) {\n scroll = (0,_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_5__.default)(offsetParent);\n }\n\n if ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent)) {\n offsets = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_6__.default)(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(offsetParent);\n var rect = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(elementOrVirtualElement);\n var isOffsetParentAnElement = (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if ((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_4__.default)(documentElement)) {\n scroll = (0,_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_5__.default)(offsetParent);\n }\n\n if ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_2__.isHTMLElement)(offsetParent)) {\n offsets = (0,_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_1__.default)(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_6__.default)(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "get _positionRect() {\n if (!this._positionRectMemo && this.positionTarget) {\n this._positionRectMemo = this.positionTarget.getBoundingClientRect();\n }\n\n return this._positionRectMemo;\n }", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent);\n var offsetParentIsScaled = Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent) && isElementScaled(offsetParent);\n var documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent);\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement, offsetParentIsScaled);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(documentElement)) {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n var html = _getDocumentElementJsDefault.default(element);\n var winScroll = _getWindowScrollJsDefault.default(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = _mathJs.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = _mathJs.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + _getWindowScrollBarXJsDefault.default(element);\n var y = -winScroll.scrollTop;\n if (_getComputedStyleJsDefault.default(body || html).direction === 'rtl') x += _mathJs.max(html.clientWidth, body ? body.clientWidth : 0) - width;\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement;\n var rect = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(elementOrVirtualElement);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (!isFixed) {\n if (Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent) !== 'body') {\n scroll = Object(_getNodeScroll_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent);\n }\n\n if (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(offsetParent)) {\n offsets = Object(_getBoundingClientRect_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(offsetParent)) {\n offsets.x = Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n const width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n const height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width,\n height,\n x,\n y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n }", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n }", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "_getOriginRect() {\n const origin = this._origin;\n if (origin instanceof _angular_core__WEBPACK_IMPORTED_MODULE_1__[\"ElementRef\"]) {\n return origin.nativeElement.getBoundingClientRect();\n }\n // Check for Element so SVG elements are also supported.\n if (origin instanceof Element) {\n return origin.getBoundingClientRect();\n }\n const width = origin.width || 0;\n const height = origin.height || 0;\n // If the origin is a point, return a client rect as if it was a 0x0 element at the point.\n return {\n top: origin.y,\n bottom: origin.y + height,\n left: origin.x,\n right: origin.x + width,\n height,\n width\n };\n }", "function pos(el) {\n var o = { x:el.offsetLeft, y:el.offsetTop }\n while((el = el.offsetParent))\n // ATLASSIAN - AUI-3542 - add border width to the calculation of o.x and o.y\n o.x+=el.offsetLeft+el.clientLeft, o.y+=el.offsetTop+el.clientTop\n\n return o\n }", "function getVisualViewportRectRelativeToLayoutViewport() {\n var visualViewport = getVisualViewport();\n var pos = {\n left: visualViewport.offsetLeft,\n top: visualViewport.offsetTop\n };\n var size = {\n width: visualViewport.width,\n height: visualViewport.height\n };\n return Geometry.makeClientRect(pos, size);\n}", "function getDocumentRect$1(element){var _element$ownerDocumen;var html=getDocumentElement$1(element);var winScroll=getWindowScroll$1(element);var body=(_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body;var width=max$1(html.scrollWidth,html.clientWidth,body?body.scrollWidth:0,body?body.clientWidth:0);var height=max$1(html.scrollHeight,html.clientHeight,body?body.scrollHeight:0,body?body.clientHeight:0);var x=-winScroll.scrollLeft+getWindowScrollBarX$1(element);var y=-winScroll.scrollTop;if(getComputedStyle$2(body||html).direction==='rtl'){x+=max$1(html.clientWidth,body?body.clientWidth:0)-width;}return {width:width,height:height,x:x,y:y};}", "function getOuterRect(el) {\n var offset = el.offset();\n\n return {\n left: offset.left,\n right: offset.left + el.outerWidth(),\n top: offset.top,\n bottom: offset.top + el.outerHeight()\n };\n }", "function getOuterRect(el, origin) {\n var offset = el.offset();\n var left = offset.left - (origin ? origin.left : 0);\n var top = offset.top - (origin ? origin.top : 0);\n return {\n left: left,\n right: left + el.outerWidth(),\n top: top,\n bottom: top + el.outerHeight()\n };\n}", "function getOuterRect(el, origin) {\n var offset = el.offset();\n var left = offset.left - (origin ? origin.left : 0);\n var top = offset.top - (origin ? origin.top : 0);\n return {\n left: left,\n right: left + el.outerWidth(),\n top: top,\n bottom: top + el.outerHeight()\n };\n}", "function getOuterRect(el, origin) {\n var offset = el.offset();\n var left = offset.left - (origin ? origin.left : 0);\n var top = offset.top - (origin ? origin.top : 0);\n return {\n left: left,\n right: left + el.outerWidth(),\n top: top,\n bottom: top + el.outerHeight()\n };\n}", "function getOuterRect(el, origin) {\n var offset = el.offset();\n var left = offset.left - (origin ? origin.left : 0);\n var top = offset.top - (origin ? origin.top : 0);\n return {\n left: left,\n right: left + el.outerWidth(),\n top: top,\n bottom: top + el.outerHeight()\n };\n}", "function getElementAbsolutePos(element) {\n\tvar res = new Object();\n\tres.x = 0; res.y = 0;\n\tif (element !== null) {\n\t\tif (element.getBoundingClientRect) {\n\t\t\tvar viewportElement = document.documentElement;\n\t\t\tvar box = element.getBoundingClientRect();\n\t\t\tvar scrollLeft = viewportElement.scrollLeft;\n\t\t\tvar scrollTop = viewportElement.scrollTop;\n\n\t\t\tres.x = box.left + scrollLeft;\n\t\t\tres.y = box.top + scrollTop;\n\n\t\t}\n\t\telse { //for old browsers\n\t\t\tres.x = element.offsetLeft;\n\t\t\tres.y = element.offsetTop;\n\n\t\t\tvar parentNode = element.parentNode;\n\t\t\tvar borderWidth = null;\n\n\t\t\twhile (offsetParent != null) {\n\t\t\t\tres.x += offsetParent.offsetLeft;\n\t\t\t\tres.y += offsetParent.offsetTop;\n\n\t\t\t\tvar parentTagName =\n\t\t\t\toffsetParent.tagName.toLowerCase();\n\n\t\t\t\tif ((__isIEOld && parentTagName != \"table\") ||\n\t\t\t\t\t((__isFireFoxNew || __isChrome) &&\n\t\t\t\t\tparentTagName == \"td\")) {\n\t\t\t\t\tborderWidth = kGetBorderWidth\n\t\t\t\t\t(offsetParent);\n\t\t\t\t\tres.x += borderWidth.left;\n\t\t\t\t\tres.y += borderWidth.top;\n\t\t\t\t}\n\n\t\t\t\tif (offsetParent != document.body &&\n\t\t\t\t\toffsetParent != document.documentElement) {\n\t\t\t\t\tres.x -= offsetParent.scrollLeft;\n\t\t\t\t\tres.y -= offsetParent.scrollTop;\n\t\t\t\t}\n\n\n\t\t\t\t//next lines are necessary to fix the problem \n\t\t\t\t//with offsetParent\n\t\t\t\tif (!__isIE && !__isOperaOld || __isIENew) {\n\t\t\t\t\twhile (offsetParent != parentNode &&\n\t\t\t\t\tparentNode !== null) {\n\t\t\t\t\t\tres.x -= parentNode.scrollLeft;\n\t\t\t\t\t\tres.y -= parentNode.scrollTop;\n\t\t\t\t\t\tif (__isFireFoxOld || __isWebKit)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tborderWidth =\n\t\t\t\t\t\t\tkGetBorderWidth(parentNode);\n\t\t\t\t\t\t\tres.x += borderWidth.left;\n\t\t\t\t\t\t\tres.y += borderWidth.top;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparentNode = parentNode.parentNode;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tparentNode = offsetParent.parentNode;\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\t\t}\n\t}\n\treturn res;\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var winScroll = Object(_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_4__[\"max\"])(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_4__[\"max\"])(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(element);\n var y = -winScroll.scrollTop;\n\n if (Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(body || html).direction === 'rtl') {\n x += Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_4__[\"max\"])(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var winScroll = Object(_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_4__[\"max\"])(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_4__[\"max\"])(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(element);\n var y = -winScroll.scrollTop;\n\n if (Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(body || html).direction === 'rtl') {\n x += Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_4__[\"max\"])(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var winScroll = Object(_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_4__[\"max\"])(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_4__[\"max\"])(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(element);\n var y = -winScroll.scrollTop;\n\n if (Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(body || html).direction === 'rtl') {\n x += Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_4__[\"max\"])(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function GetElementAbsolutePos(element) {\r\n\tvar res = new Object();\r\n\tres.x = 0; res.y = 0;\r\n\tif (element !== null) {\r\n\t\tres.x = element.offsetLeft; \r\n\t\tres.y = element.offsetTop; \r\n \t\r\n\t\tvar offsetParent = element.offsetParent;\r\n\t\tvar parentNode = element.parentNode;\r\n\r\n\t\twhile (offsetParent !== null) {\r\n\t\t\tres.x += offsetParent.offsetLeft;\r\n\t\t\tres.y += offsetParent.offsetTop;\r\n\r\n\t\t\tif (offsetParent != document.body && offsetParent != document.documentElement) {\r\n\t\t\t\tres.x -= offsetParent.scrollLeft;\r\n\t\t\t\tres.y -= offsetParent.scrollTop;\r\n\t\t\t}\r\n\t\t\t//next lines are necessary to support FireFox problem with offsetParent\r\n\t\t\tif (__isFireFox) {\r\n\t\t\t\twhile (offsetParent != parentNode && parentNode !== null) {\r\n\t\t\t\t\tres.x -= parentNode.scrollLeft;\r\n\t\t\t\t\tres.y -= parentNode.scrollTop;\r\n\t\t\t\t\t\r\n\t\t\t\t\tparentNode = parentNode.parentNode;\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t\tparentNode = offsetParent.parentNode;\r\n\t\t\toffsetParent = offsetParent.offsetParent;\r\n\t\t}\r\n\t}\r\n return res;\r\n}", "function getAbsoluteBoundingRect(element) {\n const rect = element.getBoundingClientRect();\n\n return {\n x: rect.x + document.documentElement.scrollLeft,\n y: rect.y + document.documentElement.scrollTop,\n\n // Width and height shouldn't change based on bounds relativity so they don't need anything special\n width: rect.right - rect.left,\n height: rect.bottom - rect.top,\n };\n}", "function getDocumentRect(element){var _element$ownerDocumen;var html=getDocumentElement(element);var winScroll=getWindowScroll(element);var body=(_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body;var width=max(html.scrollWidth,html.clientWidth,body?body.scrollWidth:0,body?body.clientWidth:0);var height=max(html.scrollHeight,html.clientHeight,body?body.scrollHeight:0,body?body.clientHeight:0);var x=-winScroll.scrollLeft+getWindowScrollBarX(element);var y=-winScroll.scrollTop;if(getComputedStyle(body||html).direction==='rtl'){x+=max(html.clientWidth,body?body.clientWidth:0)-width;}return {width:width,height:height,x:x,y:y};}", "function getDocumentRect(element){var _element$ownerDocumen;var html=getDocumentElement(element);var winScroll=getWindowScroll(element);var body=(_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body;var width=max(html.scrollWidth,html.clientWidth,body?body.scrollWidth:0,body?body.clientWidth:0);var height=max(html.scrollHeight,html.clientHeight,body?body.scrollHeight:0,body?body.clientHeight:0);var x=-winScroll.scrollLeft+getWindowScrollBarX(element);var y=-winScroll.scrollTop;if(getComputedStyle$1(body||html).direction==='rtl'){x+=max(html.clientWidth,body?body.clientWidth:0)-width;}return {width:width,height:height,x:x,y:y};}", "function getOuterRect(el) {\n\tvar offset = el.offset();\n\n\treturn {\n\t\tleft: offset.left,\n\t\tright: offset.left + el.outerWidth(),\n\t\ttop: offset.top,\n\t\tbottom: offset.top + el.outerHeight()\n\t};\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(element);\n var winScroll = (0,_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_1__.default)(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_3__.default)(element);\n var y = -winScroll.scrollTop;\n\n if ((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_4__.default)(body || html).direction === 'rtl') {\n x += (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(element);\n var winScroll = (0,_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_1__.default)(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_3__.default)(element);\n var y = -winScroll.scrollTop;\n\n if ((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_4__.default)(body || html).direction === 'rtl') {\n x += (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(element);\n var winScroll = (0,_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_1__.default)(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_3__.default)(element);\n var y = -winScroll.scrollTop;\n\n if ((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_4__.default)(body || html).direction === 'rtl') {\n x += (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = (0,_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__.default)(element);\n var winScroll = (0,_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_1__.default)(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + (0,_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_3__.default)(element);\n var y = -winScroll.scrollTop;\n\n if ((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_4__.default)(body || html).direction === 'rtl') {\n x += (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_2__.max)(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var html = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var winScroll = Object(_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(element);\n var body = element.ownerDocument.body;\n var width = Math.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = Math.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(element);\n var y = -winScroll.scrollTop;\n\n if (Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(body || html).direction === 'rtl') {\n x += Math.max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var html = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var winScroll = Object(_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(element);\n var body = element.ownerDocument.body;\n var width = Math.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = Math.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(element);\n var y = -winScroll.scrollTop;\n\n if (Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(body || html).direction === 'rtl') {\n x += Math.max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getDocumentRect(element) {\n var html = Object(_getDocumentElement_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var winScroll = Object(_getWindowScroll_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(element);\n var body = element.ownerDocument.body;\n var width = Math.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = Math.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + Object(_getWindowScrollBarX_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(element);\n var y = -winScroll.scrollTop;\n\n if (Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(body || html).direction === 'rtl') {\n x += Math.max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "function getOffsetRectangle(parent, elem) {\n return offsetRectangle(\n topLeftCorner(parent.getBoundingClientRect()),\n elem.getBoundingClientRect()\n );\n}", "function getLayoutViewportPositionRelativeToPage() {\n var documentClientRect = document.documentElement.getBoundingClientRect();\n return { top: -documentClientRect.top, left: -documentClientRect.left };\n}", "function getOffsetParent$1(element){var window=getWindow$1(element);var offsetParent=getTrueOffsetParent$1(element);while(offsetParent&&isTableElement$1(offsetParent)&&getComputedStyle$2(offsetParent).position==='static'){offsetParent=getTrueOffsetParent$1(offsetParent);}if(offsetParent&&(getNodeName$1(offsetParent)==='html'||getNodeName$1(offsetParent)==='body'&&getComputedStyle$2(offsetParent).position==='static')){return window;}return offsetParent||getContainingBlock$1(element)||window;}", "function getOuterRect(el, origin) {\n\t\tvar offset = el.offset();\n\t\tvar left = offset.left - (origin ? origin.left : 0);\n\t\tvar top = offset.top - (origin ? origin.top : 0);\n\n\t\treturn {\n\t\t\tleft: left,\n\t\t\tright: left + el.outerWidth(),\n\t\t\ttop: top,\n\t\t\tbottom: top + el.outerHeight()\n\t\t};\n\t}", "function getOuterRect(el, origin) {\n\tvar offset = el.offset();\n\tvar left = offset.left - (origin ? origin.left : 0);\n\tvar top = offset.top - (origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.outerWidth(),\n\t\ttop: top,\n\t\tbottom: top + el.outerHeight()\n\t};\n}", "function getOuterRect(el, origin) {\n\tvar offset = el.offset();\n\tvar left = offset.left - (origin ? origin.left : 0);\n\tvar top = offset.top - (origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.outerWidth(),\n\t\ttop: top,\n\t\tbottom: top + el.outerHeight()\n\t};\n}", "function getOuterRect(el, origin) {\n\tvar offset = el.offset();\n\tvar left = offset.left - (origin ? origin.left : 0);\n\tvar top = offset.top - (origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.outerWidth(),\n\t\ttop: top,\n\t\tbottom: top + el.outerHeight()\n\t};\n}", "function getOuterRect(el, origin) {\n\tvar offset = el.offset();\n\tvar left = offset.left - (origin ? origin.left : 0);\n\tvar top = offset.top - (origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.outerWidth(),\n\t\ttop: top,\n\t\tbottom: top + el.outerHeight()\n\t};\n}", "function getOuterRect(el, origin) {\n\tvar offset = el.offset();\n\tvar left = offset.left - (origin ? origin.left : 0);\n\tvar top = offset.top - (origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.outerWidth(),\n\t\ttop: top,\n\t\tbottom: top + el.outerHeight()\n\t};\n}", "function getOuterRect(el, origin) {\n\tvar offset = el.offset();\n\tvar left = offset.left - (origin ? origin.left : 0);\n\tvar top = offset.top - (origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.outerWidth(),\n\t\ttop: top,\n\t\tbottom: top + el.outerHeight()\n\t};\n}", "function getOuterRect(el, origin) {\n\tvar offset = el.offset();\n\tvar left = offset.left - (origin ? origin.left : 0);\n\tvar top = offset.top - (origin ? origin.top : 0);\n\n\treturn {\n\t\tleft: left,\n\t\tright: left + el.outerWidth(),\n\t\ttop: top,\n\t\tbottom: top + el.outerHeight()\n\t};\n}", "function get_xy(el) {\n\tvar box = el.getBoundingClientRect();\n\treturn {\n\t\tx: box.left,\n\t\ty: box.top\n\t};\n}" ]
[ "0.7596064", "0.75740224", "0.75492454", "0.75492454", "0.7531196", "0.74806494", "0.74806494", "0.74806494", "0.7473557", "0.7473557", "0.7473557", "0.7473557", "0.7459579", "0.7459579", "0.7459579", "0.7459579", "0.7425433", "0.7425433", "0.7415084", "0.69288355", "0.69194037", "0.6885279", "0.6857103", "0.6857103", "0.6810463", "0.6810463", "0.6790883", "0.6790272", "0.6790272", "0.6790272", "0.67848915", "0.67848915", "0.67384195", "0.6735288", "0.6702765", "0.6702765", "0.6702765", "0.6702765", "0.6702765", "0.66988313", "0.6692755", "0.6666703", "0.66539836", "0.66539836", "0.66539836", "0.66539836", "0.66441065", "0.6621598", "0.66103053", "0.6571121", "0.6549146", "0.65181935", "0.65027344", "0.64835155", "0.64835155", "0.64835155", "0.6474521", "0.6474521", "0.6473968", "0.64337397", "0.64117706", "0.6395913", "0.63857967", "0.6355325", "0.6355325", "0.6355325", "0.6355325", "0.6345563", "0.63335335", "0.63335335", "0.63335335", "0.6332394", "0.63285583", "0.63132375", "0.63129807", "0.63100594", "0.6308097", "0.6308097", "0.6308097", "0.6308097", "0.62851644", "0.62851644", "0.62851644", "0.62838525", "0.6279212", "0.6252545", "0.6233698", "0.62277025", "0.62277025", "0.62277025", "0.62277025", "0.62277025", "0.62277025", "0.62277025", "0.62167424" ]
0.74802
13
return the containing block
function getContainingBlock(element) { var currentNode = Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_5__["default"])(element); while (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__["isHTMLElement"])(currentNode) && ['html', 'body'].indexOf(Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__["default"])(currentNode)) < 0) { var css = Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(currentNode); // This is non-exhaustive but covers the most common CSS properties that // create a containing block. if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') { return currentNode; } else { currentNode = currentNode.parentNode; } } return null; } // Gets the closest ancestor positioned element. Handles some edge cases,
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var currentNode = Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(element);\n\n while (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(currentNode) && ['html', 'body'].indexOf(Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(currentNode)) < 0) {\n var css = Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle_getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle_getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle_getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function $CUhI$var$getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && $wsKO$export$isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = $S6rb$export$default(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = $IVKl$export$default(element);\n\n while ($wsKO$export$isHTMLElement(currentNode) && ['html', 'body'].indexOf($B1zX$export$default(currentNode)) < 0) {\n var css = $S6rb$export$default(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().includes('firefox');\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].includes(css.willChange) || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "get block() { \n return this._block;\n }", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "isBlock() {\n const parentNode = this.parentNode\n return (parentNode && parentNode.isContainer())\n }", "block() {\n const startToken = this.curr;\n\n let declarations = this.declarations();\n let compound = this.compound_statement();\n return new AST.BlockNode(declarations, compound);\n }", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n if (isIE && _instanceOfJs.isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = _getComputedStyleJsDefault.default(element);\n if (elementCss.position === 'fixed') return null;\n }\n var currentNode = _getParentNodeJsDefault.default(element);\n while(_instanceOfJs.isHTMLElement(currentNode) && [\n 'html',\n 'body'\n ].indexOf(_getNodeNameJsDefault.default(currentNode)) < 0){\n var css = _getComputedStyleJsDefault.default(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || [\n 'transform',\n 'perspective'\n ].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') return currentNode;\n else currentNode = currentNode.parentNode;\n }\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock$1(element){var isFirefox=navigator.userAgent.toLowerCase().indexOf('firefox')!==-1;var isIE=navigator.userAgent.indexOf('Trident')!==-1;if(isIE&&isHTMLElement$1(element)){// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\nvar elementCss=getComputedStyle$2(element);if(elementCss.position==='fixed'){return null;}}var currentNode=getParentNode$1(element);while(isHTMLElement$1(currentNode)&&['html','body'].indexOf(getNodeName$1(currentNode))<0){var css=getComputedStyle$2(currentNode);// This is non-exhaustive but covers the most common CSS properties that\n// create a containing block.\n// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\nif(css.transform!=='none'||css.perspective!=='none'||css.contain==='paint'||['transform','perspective'].indexOf(css.willChange)!==-1||isFirefox&&css.willChange==='filter'||isFirefox&&css.filter&&css.filter!=='none'){return currentNode;}else {currentNode=currentNode.parentNode;}}return null;}// Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle$1(element);\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n var currentNode = getParentNode(element);\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n return null;\n } // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle$1(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n } // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__.default)(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = (0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_2__.default)(element);\n\n while ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(currentNode) && ['html', 'body'].indexOf((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(currentNode)) < 0) {\n var css = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__.default)(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__.default)(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = (0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_2__.default)(element);\n\n while ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(currentNode) && ['html', 'body'].indexOf((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(currentNode)) < 0) {\n var css = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__.default)(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__.default)(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = (0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_2__.default)(element);\n\n while ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(currentNode) && ['html', 'body'].indexOf((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(currentNode)) < 0) {\n var css = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__.default)(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__.default)(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = (0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_2__.default)(element);\n\n while ((0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(currentNode) && ['html', 'body'].indexOf((0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_3__.default)(currentNode)) < 0) {\n var css = (0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_1__.default)(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(element);\n\n while (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(currentNode) && ['html', 'body'].indexOf(Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(currentNode)) < 0) {\n var css = Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(element);\n\n while (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(currentNode) && ['html', 'body'].indexOf(Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(currentNode)) < 0) {\n var css = Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element){var isFirefox=navigator.userAgent.toLowerCase().indexOf('firefox')!==-1;var isIE=navigator.userAgent.indexOf('Trident')!==-1;if(isIE&&isHTMLElement(element)){// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\nvar elementCss=getComputedStyle(element);if(elementCss.position==='fixed'){return null;}}var currentNode=getParentNode(element);while(isHTMLElement(currentNode)&&['html','body'].indexOf(getNodeName(currentNode))<0){var css=getComputedStyle(currentNode);// This is non-exhaustive but covers the most common CSS properties that\n// create a containing block.\n// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\nif(css.transform!=='none'||css.perspective!=='none'||css.contain==='paint'||['transform','perspective'].indexOf(css.willChange)!==-1||isFirefox&&css.willChange==='filter'||isFirefox&&css.filter&&css.filter!=='none'){return currentNode;}else {currentNode=currentNode.parentNode;}}return null;}// Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element){var isFirefox=navigator.userAgent.toLowerCase().indexOf('firefox')!==-1;var isIE=navigator.userAgent.indexOf('Trident')!==-1;if(isIE&&isHTMLElement(element)){// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\nvar elementCss=getComputedStyle$1(element);if(elementCss.position==='fixed'){return null;}}var currentNode=getParentNode(element);while(isHTMLElement(currentNode)&&['html','body'].indexOf(getNodeName(currentNode))<0){var css=getComputedStyle$1(currentNode);// This is non-exhaustive but covers the most common CSS properties that\n// create a containing block.\n// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\nif(css.transform!=='none'||css.perspective!=='none'||css.contain==='paint'||['transform','perspective'].indexOf(css.willChange)!==-1||isFirefox&&css.willChange==='filter'||isFirefox&&css.filter&&css.filter!=='none'){return currentNode;}else {currentNode=currentNode.parentNode;}}return null;}// Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle_getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle_getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getEnclosingBlockScopeContainer(node) {\n var current = node.parent;\n while (current) {\n if (isFunctionLike(current)) {\n return current;\n }\n switch (current.kind) {\n case 256 /* SourceFile */:\n case 227 /* CaseBlock */:\n case 252 /* CatchClause */:\n case 225 /* ModuleDeclaration */:\n case 206 /* ForStatement */:\n case 207 /* ForInStatement */:\n case 208 /* ForOfStatement */:\n return current;\n case 199 /* Block */:\n // function block is not considered block-scope container\n // see comment in binder.ts: bind(...), case for SyntaxKind.Block\n if (!isFunctionLike(current.parent)) {\n return current;\n }\n }\n current = current.parent;\n }\n }", "function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle$1(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,", "function getCurrentBlock(editor) {\n return getNearbyBlock(editor, \"current\");\n}", "_getEffectiveParent() {\n let p = this.parent;\n while (p instanceof BlockScope && !p._closedOver) {\n p = p.parent;\n }\n return p;\n }", "getHeadBlock() {\n // Your code here\n\n }", "function ensureBlock() {\n\t return t.ensureBlock(this.node);\n\t}", "function ensureBlock() {\n\t return t.ensureBlock(this.node);\n\t}", "get nextBlock () {\n return this.API.getBlock().then(({header:{height}})=>new Promise(async resolve=>{\n while (true) {\n await new Promise(ok=>setTimeout(ok, 1000))\n const now = await this.API.getBlock()\n if (now.header.height > height) {\n resolve()\n break\n }\n }\n }))\n }", "function getBlocks(){\n return blocks;\n }", "getBlockInternal(widget, position) {\n if (position.index === '' || isNullOrUndefined(position)) {\n return undefined;\n }\n let index = position.index.indexOf(';');\n let value = position.index.substring(0, index);\n position.index = position.index.substring(index).replace(';', '');\n let node = widget;\n // if (node instanceof WSection && value === 'HF') {\n // //Gets the block in Header footers.\n // let blockObj: BlockInfo = this.getBlock((node as WSection).headerFooters, position);\n // tslint:disable-next-line:max-line-length\n // return { 'node': (!isNullOrUndefined(blockObj)) ? blockObj.node : undefined, 'position': (!isNullOrUndefined(blockObj)) ? blockObj.position : undefined };\n // }\n index = parseInt(value, 10);\n let childWidget = this.selection.getBlockByIndex(widget, index);\n if (childWidget) {\n let child = childWidget;\n if (position.index.indexOf(';') >= 0) {\n if (child instanceof ParagraphWidget) {\n if (position.index.indexOf(';') >= 0) {\n position.index = '0';\n }\n return { 'node': child, 'position': position };\n }\n if (child instanceof Widget) {\n let blockObj = this.getBlockInternal(child, position);\n // tslint:disable-next-line:max-line-length\n return { 'node': (!isNullOrUndefined(blockObj)) ? blockObj.node : undefined, 'position': (!isNullOrUndefined(blockObj)) ? blockObj.position : undefined };\n }\n }\n else {\n return { 'node': child, 'position': position };\n }\n }\n else {\n return { 'node': node, 'position': position };\n }\n return { 'node': node, 'position': position };\n }", "get lastBlock() {\n\t\treturn this.chain.slice(-1)[0];\n\t}", "function create_if_block_1$b(ctx) {\n\t\tlet p;\n\t\tlet t;\n\t\tlet current;\n\t\tlet if_block0 = !/*expanded*/ ctx[1] && create_if_block_3$5();\n\n\t\tfunction select_block_type(ctx, dirty) {\n\t\t\tif (/*canExpand*/ ctx[3]) return create_if_block_2$9;\n\t\t\treturn create_else_block$7;\n\t\t}\n\n\t\tlet current_block_type = select_block_type(ctx);\n\t\tlet if_block1 = current_block_type(ctx);\n\n\t\treturn {\n\t\t\tc() {\n\t\t\t\tp = element(\"p\");\n\t\t\t\tif (if_block0) if_block0.c();\n\t\t\t\tt = space();\n\t\t\t\tif_block1.c();\n\t\t\t\tattr(p, \"class\", \"iif-footer-block-title\");\n\t\t\t},\n\t\t\tm(target, anchor) {\n\t\t\t\tinsert(target, p, anchor);\n\t\t\t\tif (if_block0) if_block0.m(p, null);\n\t\t\t\tappend(p, t);\n\t\t\t\tif_block1.m(p, null);\n\t\t\t\tcurrent = true;\n\t\t\t},\n\t\t\tp(ctx, dirty) {\n\t\t\t\tif (!/*expanded*/ ctx[1]) {\n\t\t\t\t\tif (if_block0) {\n\t\t\t\t\t\tif (dirty & /*expanded*/ 2) {\n\t\t\t\t\t\t\ttransition_in(if_block0, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif_block0 = create_if_block_3$5();\n\t\t\t\t\t\tif_block0.c();\n\t\t\t\t\t\ttransition_in(if_block0, 1);\n\t\t\t\t\t\tif_block0.m(p, t);\n\t\t\t\t\t}\n\t\t\t\t} else if (if_block0) {\n\t\t\t\t\tgroup_outros();\n\n\t\t\t\t\ttransition_out(if_block0, 1, 1, () => {\n\t\t\t\t\t\tif_block0 = null;\n\t\t\t\t\t});\n\n\t\t\t\t\tcheck_outros();\n\t\t\t\t}\n\n\t\t\t\tif_block1.p(ctx, dirty);\n\t\t\t},\n\t\t\ti(local) {\n\t\t\t\tif (current) return;\n\t\t\t\ttransition_in(if_block0);\n\t\t\t\tcurrent = true;\n\t\t\t},\n\t\t\to(local) {\n\t\t\t\ttransition_out(if_block0);\n\t\t\t\tcurrent = false;\n\t\t\t},\n\t\t\td(detaching) {\n\t\t\t\tif (detaching) detach(p);\n\t\t\t\tif (if_block0) if_block0.d();\n\t\t\t\tif_block1.d();\n\t\t\t}\n\t\t};\n\t}", "function GetBlocks() {\n return blocks;\n}", "function ensureBlock() {\n return t.ensureBlock(this.node);\n}", "function currentBlock() {\r\n _doGet('/chain/height');\r\n }", "function getBlock(index) {\n if (pooledBlocks.length) {\n return pooledBlocks.pop();\n }\n\n // create new bloc\n var block;\n transclude(function(clone, scope) {\n block = {\n element: clone,\n new: true,\n scope: scope\n };\n\n updateScope(scope, index);\n initState(items[index]);\n scope.$element = clone; // attach element to scope so it can be accessed in controller\n parentNode.appendChild(clone[0]);\n scope.$on('$destroy', function () {\n clone\n .off('blur', onBlur)\n .off('focus', onFocus);\n });\n });\n return block;\n }", "function getCurrentBlock(node){\n // if input is a selection, then convert from a text node to a \"real\" HTML tag by getting the node where the selection started\n if(node instanceof Selection){\n node = node.anchorNode.parentElement;\n }\n \n // within the selection, there's a Text object, which holds the content of the \"real\" HTML tag. But I need to get the proper tag.\n if(node instanceof Text){\n node = node.parentElement;\n }\n \n // now the node must be a \"real\" HTML tag\n if(node.tagName == \"SPAN\" || node.tagName == \"A\"){\n return node.parentNode;\n }else{\n return node;\n }\n}", "function create_if_block$t(ctx) {\n\t\tlet block;\n\t\tlet current;\n\n\t\tblock = new Block({\n\t\t\t\tprops: {\n\t\t\t\t\ttype: \"footer\",\n\t\t\t\t\t$$slots: { default: [create_default_slot$h] },\n\t\t\t\t\t$$scope: { ctx }\n\t\t\t\t}\n\t\t\t});\n\n\t\treturn {\n\t\t\tc() {\n\t\t\t\tcreate_component(block.$$.fragment);\n\t\t\t},\n\t\t\tm(target, anchor) {\n\t\t\t\tmount_component(block, target, anchor);\n\t\t\t\tcurrent = true;\n\t\t\t},\n\t\t\tp(ctx, dirty) {\n\t\t\t\tconst block_changes = {};\n\n\t\t\t\tif (dirty & /*$$scope, icon, icons, route, customisations, customise, hasIcons, infoBlockTitle, infoBlock*/ 767) {\n\t\t\t\t\tblock_changes.$$scope = { dirty, ctx };\n\t\t\t\t}\n\n\t\t\t\tblock.$set(block_changes);\n\t\t\t},\n\t\t\ti(local) {\n\t\t\t\tif (current) return;\n\t\t\t\ttransition_in(block.$$.fragment, local);\n\t\t\t\tcurrent = true;\n\t\t\t},\n\t\t\to(local) {\n\t\t\t\ttransition_out(block.$$.fragment, local);\n\t\t\t\tcurrent = false;\n\t\t\t},\n\t\t\td(detaching) {\n\t\t\t\tdestroy_component(block, detaching);\n\t\t\t}\n\t\t};\n\t}", "getTopBlockData(parent_uid) {\n // Look for the UID and string contents of the top-child of a parent\n let top_block = window.roamAlphaAPI.q('[:find ?bUID ?bText :in $ ?pUID :where[?b :block/uid ?bUID][?b :block/string ?bText][?b :block/order 0][?p :block/children ?b][?p :block/uid ?pUID]]', parent_uid);\n if (typeof (top_block) === 'undefined' || top_block == null || top_block.length == 0) {\n // If there were no results or a problem with the results, return false\n // This will keep the loop in waitForBlockUID() going\n // Though if there's a systematic error it won't go on infinitely because waitForBlockUID() will eventually throw an error\n return false;\n } else {\n // If the search returned a block's info, return it for matching\n // If there's any problem with the values returned, make sure to catch any error\n try {\n let top_block_data = {\n uid: top_block[0][0],\n text: top_block[0][1]\n }\n return top_block_data;\n } catch(e) {\n console.error(e);\n }\n }\n }", "getBlockRegion(block, globalPoint) {\n // substract window scrolling from global point to get viewport coordinates\n const vpt = globalPoint.sub(new Vector2D(window.scrollX, window.scrollY));\n // compare against viewport bounds of node representing the block\n const box = this.layout.nodeFromElement(block).el.getBoundingClientRect();\n // compare to bounds\n if (vpt.x < box.left || vpt.x > box.right || vpt.y < box.top || vpt.y > box.bottom) {\n return 'none';\n }\n // context menu area?\n if (vpt.x >= box.right - kT.contextDotsW) {\n return 'dots';\n }\n // in block but nowhere special\n return 'main';\n }", "getLatestBlock(){\n\t\treturn this.chain[this.chain.length - 1];\n\t}", "getLatestBlock() {\n return this.chain[this.chain.length - 1]\n }", "async checkForNewBlock() {\n try {\n const blockHeight = await this.polkadotAPI.getBlockHeight()\n\n // if we get a newer block then expected query for all the outstanding blocks\n while (blockHeight > this.height) {\n this.height = this.height ? this.height++ : blockHeight\n this.newBlockHandler(this.height)\n\n // we are safe, that the chain produced a block so it didn't hang up\n if (this.chainHangup) clearTimeout(this.chainHangup)\n }\n } catch (error) {\n console.error('Failed to check for a new block', error)\n Sentry.captureException(error)\n }\n }", "getBlockInternal(widget, position) {\n if (position === '' || isNullOrUndefined(position)) {\n return undefined;\n }\n let index = position.indexOf(';');\n let value = position.substring(0, index);\n position = position.substring(index).replace(';', '');\n let node = widget;\n // if (node instanceof Widget && value === 'HF') {\n // //Gets the block in Header footers.\n // let blockObj: BlockInfo = this.getBlock((node as WSection).headersFooters, position);\n // tslint:disable-next-line:max-line-length\n // return { 'node': (!isNullOrUndefined(blockObj)) ? blockObj.node : undefined, 'position': (!isNullOrUndefined(blockObj)) ? blockObj.position : undefined };\n // }\n index = parseInt(value, 10);\n if (index >= 0 && index < widget.childWidgets.length) {\n let child = widget.childWidgets[(index)];\n if (position.indexOf(';') >= 0) {\n if (child instanceof ParagraphWidget) {\n if (position.indexOf(';') >= 0) {\n position = '0';\n }\n return child;\n }\n if (child instanceof BlockWidget) {\n let blockObj = this.getBlockInternal(child, position);\n return blockObj;\n }\n }\n else {\n return child;\n }\n }\n else {\n return node;\n }\n return node;\n }", "getLatestBlock() {\n return this.chain[this.chain.length - 1];\n }", "getLatestBlock() {\n return this.chain[this.chain.length - 1];\n }", "getLatestBlock() {\n return this.chain[this.chain.length - 1];\n }", "getLastestBlock(){\r\n return this.chain[this.chain.length - 1];\r\n }", "get_blocks() {\n\t\t\treturn this.blocks\n\t\t}", "genesisBlock() {\n return new Block([], \"\");\n }", "getLatestBlock () {\n return this.chain[this.chain.length -1];\n }", "function isBlock() {\n return !rElem && rBlock;\n}", "getGenesisBlock(){\r\n return this.chain[0];\r\n }", "getLatestBlock() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.ksnDriver.getLatestBlock();\n });\n }", "function create_if_block$1(ctx) {\n var await_block_anchor;\n var promise;\n var current;\n var info = {\n ctx: ctx,\n current: null,\n token: null,\n pending: create_pending_block$1,\n then: create_then_block$1,\n \"catch\": create_catch_block$1,\n value: 14,\n blocks: [,,,]\n };\n handle_promise(promise =\n /*exists*/\n ctx[5], info);\n return {\n c: function c() {\n await_block_anchor = empty();\n info.block.c();\n },\n m: function m(target, anchor) {\n insert(target, await_block_anchor, anchor);\n info.block.m(target, info.anchor = anchor);\n\n info.mount = function () {\n return await_block_anchor.parentNode;\n };\n\n info.anchor = await_block_anchor;\n current = true;\n },\n p: function p(new_ctx, dirty) {\n ctx = new_ctx;\n info.ctx = ctx;\n if (dirty &\n /*exists*/\n 32 && promise !== (promise =\n /*exists*/\n ctx[5]) && handle_promise(promise, info)) ;else {\n var child_ctx = ctx.slice();\n child_ctx[14] = info.resolved;\n info.block.p(child_ctx, dirty);\n }\n },\n i: function i(local) {\n if (current) return;\n transition_in(info.block);\n current = true;\n },\n o: function o(local) {\n for (var i = 0; i < 3; i += 1) {\n var _block2 = info.blocks[i];\n transition_out(_block2);\n }\n\n current = false;\n },\n d: function d(detaching) {\n if (detaching) detach(await_block_anchor);\n info.block.d(detaching);\n info.token = null;\n info = null;\n }\n };\n } // (1:0) <script> import Alert from \"svelte-material-icons/Alert.svelte\"; import CheckBold from \"svelte-material-icons/CheckBold.svelte\"; import { Circle }", "function wrapSelfAndSiblingsInDefaultBlock(container, offset) {\n\t\t\t\tvar newBlock, parentBlock, startNode, node, next, rootBlockName, blockName = newBlockName || 'P';\n\n\t\t\t\t// Not in a block element or in a table cell or caption\n\t\t\t\tparentBlock = dom.getParent(container, dom.isBlock);\n\t\t\t\tif (!parentBlock || !canSplitBlock(parentBlock)) {\n\t\t\t\t\tparentBlock = parentBlock || editableRoot;\n\n\t\t\t\t\tif (parentBlock == editor.getBody() || isTableCell(parentBlock)) {\n\t\t\t\t\t\trootBlockName = parentBlock.nodeName.toLowerCase();\n\t\t\t\t\t} else {\n\t\t\t\t\t\trootBlockName = parentBlock.parentNode.nodeName.toLowerCase();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!parentBlock.hasChildNodes()) {\n\t\t\t\t\t\tnewBlock = dom.create(blockName);\n\t\t\t\t\t\tsetForcedBlockAttrs(newBlock);\n\t\t\t\t\t\tparentBlock.appendChild(newBlock);\n\t\t\t\t\t\trng.setStart(newBlock, 0);\n\t\t\t\t\t\trng.setEnd(newBlock, 0);\n\t\t\t\t\t\treturn newBlock;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Find parent that is the first child of parentBlock\n\t\t\t\t\tnode = container;\n\t\t\t\t\twhile (node.parentNode != parentBlock) {\n\t\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Loop left to find start node start wrapping at\n\t\t\t\t\twhile (node && !dom.isBlock(node)) {\n\t\t\t\t\t\tstartNode = node;\n\t\t\t\t\t\tnode = node.previousSibling;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (startNode && schema.isValidChild(rootBlockName, blockName.toLowerCase())) {\n\t\t\t\t\t\tnewBlock = dom.create(blockName);\n\t\t\t\t\t\tsetForcedBlockAttrs(newBlock);\n\t\t\t\t\t\tstartNode.parentNode.insertBefore(newBlock, startNode);\n\n\t\t\t\t\t\t// Start wrapping until we hit a block\n\t\t\t\t\t\tnode = startNode;\n\t\t\t\t\t\twhile (node && !dom.isBlock(node)) {\n\t\t\t\t\t\t\tnext = node.nextSibling;\n\t\t\t\t\t\t\tnewBlock.appendChild(node);\n\t\t\t\t\t\t\tnode = next;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Restore range to it's past location\n\t\t\t\t\t\trng.setStart(container, offset);\n\t\t\t\t\t\trng.setEnd(container, offset);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn container;\n\t\t\t}", "function wrapSelfAndSiblingsInDefaultBlock(container, offset) {\n\t\t\t\tvar newBlock, parentBlock, startNode, node, next, rootBlockName, blockName = newBlockName || 'P';\n\n\t\t\t\t// Not in a block element or in a table cell or caption\n\t\t\t\tparentBlock = dom.getParent(container, dom.isBlock);\n\t\t\t\tif (!parentBlock || !canSplitBlock(parentBlock)) {\n\t\t\t\t\tparentBlock = parentBlock || editableRoot;\n\n\t\t\t\t\tif (parentBlock == editor.getBody() || isTableCell(parentBlock)) {\n\t\t\t\t\t\trootBlockName = parentBlock.nodeName.toLowerCase();\n\t\t\t\t\t} else {\n\t\t\t\t\t\trootBlockName = parentBlock.parentNode.nodeName.toLowerCase();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!parentBlock.hasChildNodes()) {\n\t\t\t\t\t\tnewBlock = dom.create(blockName);\n\t\t\t\t\t\tsetForcedBlockAttrs(newBlock);\n\t\t\t\t\t\tparentBlock.appendChild(newBlock);\n\t\t\t\t\t\trng.setStart(newBlock, 0);\n\t\t\t\t\t\trng.setEnd(newBlock, 0);\n\t\t\t\t\t\treturn newBlock;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Find parent that is the first child of parentBlock\n\t\t\t\t\tnode = container;\n\t\t\t\t\twhile (node.parentNode != parentBlock) {\n\t\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Loop left to find start node start wrapping at\n\t\t\t\t\twhile (node && !dom.isBlock(node)) {\n\t\t\t\t\t\tstartNode = node;\n\t\t\t\t\t\tnode = node.previousSibling;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (startNode && schema.isValidChild(rootBlockName, blockName.toLowerCase())) {\n\t\t\t\t\t\tnewBlock = dom.create(blockName);\n\t\t\t\t\t\tsetForcedBlockAttrs(newBlock);\n\t\t\t\t\t\tstartNode.parentNode.insertBefore(newBlock, startNode);\n\n\t\t\t\t\t\t// Start wrapping until we hit a block\n\t\t\t\t\t\tnode = startNode;\n\t\t\t\t\t\twhile (node && !dom.isBlock(node)) {\n\t\t\t\t\t\t\tnext = node.nextSibling;\n\t\t\t\t\t\t\tnewBlock.appendChild(node);\n\t\t\t\t\t\t\tnode = next;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Restore range to it's past location\n\t\t\t\t\t\trng.setStart(container, offset);\n\t\t\t\t\t\trng.setEnd(container, offset);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn container;\n\t\t\t}", "function wrapSelfAndSiblingsInDefaultBlock(container, offset) {\n\t\t\t\tvar newBlock, parentBlock, startNode, node, next, rootBlockName, blockName = newBlockName || 'P';\n\n\t\t\t\t// Not in a block element or in a table cell or caption\n\t\t\t\tparentBlock = dom.getParent(container, dom.isBlock);\n\t\t\t\tif (!parentBlock || !canSplitBlock(parentBlock)) {\n\t\t\t\t\tparentBlock = parentBlock || editableRoot;\n\n\t\t\t\t\tif (parentBlock == editor.getBody() || isTableCell(parentBlock)) {\n\t\t\t\t\t\trootBlockName = parentBlock.nodeName.toLowerCase();\n\t\t\t\t\t} else {\n\t\t\t\t\t\trootBlockName = parentBlock.parentNode.nodeName.toLowerCase();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!parentBlock.hasChildNodes()) {\n\t\t\t\t\t\tnewBlock = dom.create(blockName);\n\t\t\t\t\t\tsetForcedBlockAttrs(newBlock);\n\t\t\t\t\t\tparentBlock.appendChild(newBlock);\n\t\t\t\t\t\trng.setStart(newBlock, 0);\n\t\t\t\t\t\trng.setEnd(newBlock, 0);\n\t\t\t\t\t\treturn newBlock;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Find parent that is the first child of parentBlock\n\t\t\t\t\tnode = container;\n\t\t\t\t\twhile (node.parentNode != parentBlock) {\n\t\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Loop left to find start node start wrapping at\n\t\t\t\t\twhile (node && !dom.isBlock(node)) {\n\t\t\t\t\t\tstartNode = node;\n\t\t\t\t\t\tnode = node.previousSibling;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (startNode && schema.isValidChild(rootBlockName, blockName.toLowerCase())) {\n\t\t\t\t\t\tnewBlock = dom.create(blockName);\n\t\t\t\t\t\tsetForcedBlockAttrs(newBlock);\n\t\t\t\t\t\tstartNode.parentNode.insertBefore(newBlock, startNode);\n\n\t\t\t\t\t\t// Start wrapping until we hit a block\n\t\t\t\t\t\tnode = startNode;\n\t\t\t\t\t\twhile (node && !dom.isBlock(node)) {\n\t\t\t\t\t\t\tnext = node.nextSibling;\n\t\t\t\t\t\t\tnewBlock.appendChild(node);\n\t\t\t\t\t\t\tnode = next;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Restore range to it's past location\n\t\t\t\t\t\trng.setStart(container, offset);\n\t\t\t\t\t\trng.setEnd(container, offset);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn container;\n\t\t\t}", "getLatestBlock(){\n return this.chain[this.chain.length];\n }", "get isBlock() {\n return this.type.isBlock;\n }", "getLatestBlock(){\n return this.chain[this.chain.length - 1];\n }", "getLatestBlock(){\n return this.chain[this.chain.length - 1];\n }", "genesisBlock() {\n //Since it returns the first block the initial values should be send by us\n //returns an object holding our genesis block details\n return new Block(new Date(), \"Genesis Block\", \"0\");\n }", "function getBlocks() {\n return document.getElementsByClassName(\"child\");\n }", "getLatestBlock(){\n return this.chain[this.chain.length-1];\n }", "completeBlock() {\r\n let block = this.block;\r\n return new Promise(async (resolve) => {\r\n if (!isCompleteBlock(block)) return resolve(false);\r\n await this.writeBlock(block);\r\n block = await this.createNewCurrentBlock(block.index + 1);\r\n return resolve(true);\r\n });\r\n }", "function quickParseBlock() {\n const node = this.startNode();\n const prevPos = this.context.length - 1;\n\n node.body = [];\n\n do {\n this.next();\n } while (this.context.length > prevPos);\n\n this.next();\n return this.finishNode(node, \"BlockStatement\");\n}", "function aaObtainFurthestBlock(p, formattingElementEntry) {\n var furthestBlock = null;\n\n for (var i = p.openElements.stackTop; i >= 0; i--) {\n var element = p.openElements.items[i];\n\n if (element === formattingElementEntry.element) break;\n\n if (p._isSpecialElement(element)) furthestBlock = element;\n }\n\n if (!furthestBlock) {\n p.openElements.popUntilElementPopped(\n formattingElementEntry.element,\n );\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n\n return furthestBlock;\n }", "getNextParagraphBlock(block) {\n if (block.nextRenderedWidget instanceof ParagraphWidget) {\n return block.nextRenderedWidget;\n }\n else if (block.nextRenderedWidget instanceof TableWidget) {\n return this.getFirstParagraphInFirstCell(block.nextRenderedWidget);\n }\n if (block.containerWidget instanceof TableCellWidget) {\n return this.getNextParagraphCell(block.containerWidget);\n }\n else if (block.containerWidget instanceof BodyWidget) {\n let bodyWidget = block.containerWidget;\n return this.getNextParagraph(block.containerWidget);\n }\n else if (block.containerWidget instanceof HeaderFooterWidget && this.isMoveDownOrMoveUp) {\n return this.getFirstBlockInNextHeaderFooter(block);\n }\n return undefined;\n }", "getLatestBlock(){\r\n return this.chain[this.chain.length-1];\r\n }", "getBlock(blockheight) {\n return this.chain.get(this.lexi(blockheight))\n .then((block) => {\n return JSON.parse(block);\n });\n }", "parseBlock() {\n\t\tvar program = this.delimited('{', '}', null, this.parseExpression.bind(this));\n\t\treturn {\n\t\t\ttype: 'block',\n\t\t\texpressions: program\n\t\t};\n\t}", "getPrevBlock(){\n return this.chain[this.chain.length-1]; // return previous block obj\n }", "getLatestBlock() {\n return this.chain[this.chain.length - 1];\n }", "getLatestBlock() {\n return this.chain[this.chain.length - 1];\n }", "function returnBlockStatement(block) {\n if (block.type === 'Program')\n return block\n\n if (block.type === 'FunctionExpression'\n || block.type === 'FunctionDeclaration')\n return block.body\n\n // TODO what about the try / catch stuffs : they declare a new scope\n}", "get block() {\n return this.makeMap(\"a,address,code,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video\")\n }", "function findBlock() {\n\tconsole.log('in findBlock')\n\tvar data = {\n\t\turl : window.location.href,\n\t\tsite_url: window.location.protocol + \"//\" + window.location.host\n\t}\n var selection = window.getSelection();\n\tif (selection.rangeCount === 0)\n return data;\n var isStart = true;\n\tvar element = getSelectionBoundaryElement(selection, isStart);\n\tconsole.log(element);\n\tvar xpath = getXPath(element);\n\tconsole.log(xpath);\n\tdata.xpath = xpath;\n console.log(data);\n\treturn data;\n}", "getBlock() {\n const self = this\n return new Promise(function(resolve, reject) {\n self.myBlockChain.getBlock(0).then((block) => {\n resolve(JSON.stringify(block));\n }).catch((err) => { reject(err);});\n })\n }", "get block () { return this.API.getBlock() }", "parent() {\n if (!this.buffer)\n return this.yieldNode((this.mode & exports.IterMode.IncludeAnonymous) ? this._tree._parent : this._tree.parent);\n if (this.stack.length)\n return this.yieldBuf(this.stack.pop());\n let parent = (this.mode & exports.IterMode.IncludeAnonymous) ? this.buffer.parent : this.buffer.parent.nextSignificantParent();\n this.buffer = null;\n return this.yieldNode(parent);\n }", "function aaObtainFurthestBlock(p, formattingElementEntry) {\n let furthestBlock = null;\n\n for (let i = p.openElements.stackTop; i >= 0; i--) {\n const element = p.openElements.items[i];\n\n if (element === formattingElementEntry.element) {\n break;\n }\n\n if (p._isSpecialElement(element)) {\n furthestBlock = element;\n }\n }\n\n if (!furthestBlock) {\n p.openElements.popUntilElementPopped(formattingElementEntry.element);\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n\n return furthestBlock;\n}", "function aaObtainFurthestBlock(p, formattingElementEntry) {\n let furthestBlock = null;\n\n for (let i = p.openElements.stackTop; i >= 0; i--) {\n const element = p.openElements.items[i];\n\n if (element === formattingElementEntry.element) {\n break;\n }\n\n if (p._isSpecialElement(element)) {\n furthestBlock = element;\n }\n }\n\n if (!furthestBlock) {\n p.openElements.popUntilElementPopped(formattingElementEntry.element);\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n\n return furthestBlock;\n}", "function aaObtainFurthestBlock(p, formattingElementEntry) {\n let furthestBlock = null;\n\n for (let i = p.openElements.stackTop; i >= 0; i--) {\n const element = p.openElements.items[i];\n\n if (element === formattingElementEntry.element) {\n break;\n }\n\n if (p._isSpecialElement(element)) {\n furthestBlock = element;\n }\n }\n\n if (!furthestBlock) {\n p.openElements.popUntilElementPopped(formattingElementEntry.element);\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n\n return furthestBlock;\n}", "function aaObtainFurthestBlock(p, formattingElementEntry) {\n let furthestBlock = null;\n\n for (let i = p.openElements.stackTop; i >= 0; i--) {\n const element = p.openElements.items[i];\n\n if (element === formattingElementEntry.element) {\n break;\n }\n\n if (p._isSpecialElement(element)) {\n furthestBlock = element;\n }\n }\n\n if (!furthestBlock) {\n p.openElements.popUntilElementPopped(formattingElementEntry.element);\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n\n return furthestBlock;\n}", "function aaObtainFurthestBlock(p, formattingElementEntry) {\r\n var furthestBlock = null;\r\n\r\n for (var i = p.openElements.stackTop; i >= 0; i--) {\r\n var element = p.openElements.items[i];\r\n\r\n if (element === formattingElementEntry.element)\r\n break;\r\n\r\n if (p._isSpecialElement(element))\r\n furthestBlock = element;\r\n }\r\n\r\n if (!furthestBlock) {\r\n p.openElements.popUntilElementPopped(formattingElementEntry.element);\r\n p.activeFormattingElements.removeEntry(formattingElementEntry);\r\n }\r\n\r\n return furthestBlock;\r\n}", "function aaObtainFurthestBlock(p, formattingElementEntry) {\n var furthestBlock = null;\n\n for (var i = p.openElements.stackTop; i >= 0; i--) {\n var element = p.openElements.items[i];\n\n if (element === formattingElementEntry.element)\n break;\n\n if (p._isSpecialElement(element))\n furthestBlock = element;\n }\n\n if (!furthestBlock) {\n p.openElements.popUntilElementPopped(formattingElementEntry.element);\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n\n return furthestBlock;\n}", "function aaObtainFurthestBlock(p, formattingElementEntry) {\n var furthestBlock = null;\n\n for (var i = p.openElements.stackTop; i >= 0; i--) {\n var element = p.openElements.items[i];\n\n if (element === formattingElementEntry.element)\n break;\n\n if (p._isSpecialElement(element))\n furthestBlock = element;\n }\n\n if (!furthestBlock) {\n p.openElements.popUntilElementPopped(formattingElementEntry.element);\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n\n return furthestBlock;\n}", "function aaObtainFurthestBlock(p, formattingElementEntry) {\n var furthestBlock = null;\n\n for (var i = p.openElements.stackTop; i >= 0; i--) {\n var element = p.openElements.items[i];\n\n if (element === formattingElementEntry.element)\n break;\n\n if (p._isSpecialElement(element))\n furthestBlock = element;\n }\n\n if (!furthestBlock) {\n p.openElements.popUntilElementPopped(formattingElementEntry.element);\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n\n return furthestBlock;\n}", "function aaObtainFurthestBlock(p, formattingElementEntry) {\n var furthestBlock = null;\n\n for (var i = p.openElements.stackTop; i >= 0; i--) {\n var element = p.openElements.items[i];\n\n if (element === formattingElementEntry.element)\n break;\n\n if (p._isSpecialElement(element))\n furthestBlock = element;\n }\n\n if (!furthestBlock) {\n p.openElements.popUntilElementPopped(formattingElementEntry.element);\n p.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n\n return furthestBlock;\n}" ]
[ "0.6571231", "0.65461355", "0.65461355", "0.65461355", "0.6516638", "0.6516638", "0.65010834", "0.64936745", "0.64802283", "0.6474632", "0.64665604", "0.64612967", "0.6339487", "0.633014", "0.63266474", "0.62810093", "0.627958", "0.627958", "0.627958", "0.627958", "0.62716997", "0.62716997", "0.6270516", "0.62631047", "0.61915004", "0.6188052", "0.6188052", "0.6188052", "0.6186668", "0.6150248", "0.61496365", "0.6059483", "0.60400474", "0.6038796", "0.6038796", "0.60003513", "0.5993845", "0.5981692", "0.5947187", "0.59281516", "0.5907062", "0.5900166", "0.5894992", "0.5875446", "0.58737564", "0.5866937", "0.5860562", "0.58595717", "0.5854988", "0.58533347", "0.58364046", "0.58290654", "0.581875", "0.581875", "0.581875", "0.5801784", "0.5801559", "0.57880515", "0.57796067", "0.57719374", "0.57616735", "0.57605296", "0.5760227", "0.57541865", "0.57541865", "0.57541865", "0.5744336", "0.57442397", "0.57409865", "0.57409865", "0.57404447", "0.57374096", "0.5731789", "0.5718994", "0.57123125", "0.5710143", "0.5688367", "0.5687244", "0.56852925", "0.56838155", "0.568022", "0.56660736", "0.56660736", "0.5665878", "0.5665305", "0.5654761", "0.5649587", "0.5641367", "0.5627729", "0.56163687", "0.56163687", "0.56163687", "0.56163687", "0.56155413", "0.561306", "0.561306", "0.561306", "0.561306" ]
0.6577409
1
such as table ancestors and cross browser bugs.
function getOffsetParent(element) { var window = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(element); var offsetParent = getTrueOffsetParent(element); while (offsetParent && Object(_isTableElement_js__WEBPACK_IMPORTED_MODULE_4__["default"])(offsetParent) && Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(offsetParent).position === 'static') { offsetParent = getTrueOffsetParent(offsetParent); } if (offsetParent && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__["default"])(offsetParent) === 'body' && Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(offsetParent).position === 'static') { return window; } return offsetParent || getContainingBlock(element) || window; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function k(e,t){return c(e,\"table\")&&c(11!==t.nodeType?t:t.firstChild,\"tr\")&&me(\">tbody\",e)[0]||e}", "function gtGrdObj(tdObj) { try { var ele = tdObj.parentNode.parentNode.parentNode; if (ele.tagName.toLowerCase() == \"tbody\") le = ele.parentNode; return ele; } catch (e) { return null; } }", "function manipulationTarget( elem, content ) { // 5634\n\tif ( nodeName( elem, \"table\" ) && // 5635\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) { // 5636\n // 5637\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem; // 5638\n\t} // 5639\n // 5640\n\treturn elem; // 5641\n} // 5642", "function getParentTableObj(id)\r\n{\r\n\tvar gBlock = getGridBlock(id);\r\n\tif(!gBlock)\r\n\t\treturn false;\r\n\tvar tag = $(gBlock).tagName();\r\n\tvar parent;\r\n\t\r\n\tif(tag == 'div')\r\n\t\tparent = gBlock;\r\n\telse if(tag == 'table')\r\n\t{\r\n\t\tparent = $(gBlock).parent();\r\n\t\tif($(parent).tagName()!='div')\r\n\t\t\treturn false;\r\n\t\tif($(parent).attr('id')!='grid_block'+id && $(parent).attr('id')!='resize_cell'+id)\t\r\n\t\t\treturn false;\r\n\t}\r\n\telse\r\n\t\treturn false;\r\n\t\r\n\tif(!$(parent).length)\r\n\t\treturn false;\r\n\telse\r\n\t\treturn parent;\r\n}", "function k(e, t) {\n return o(e, \"table\") && o(11 !== t.nodeType ? t : t.firstChild, \"tr\") ? he(\">tbody\", e)[0] || e : e;\n }", "function vc_getElementAbsolutePos(elemID) { \n var element; \n if (typeof(elemID) == \"string\") { \n element = document.getElementById(elemID); \n } \n else { \n element = elemID; \n } \n \n var res = new Object(); \n res.x = 0; res.y = 0; \n if (element !== null) { \n res.x = element.offsetLeft; \n \n var offsetParent = element.offsetParent; \n var offsetParentTagName = offsetParent != null ? offsetParent.tagName.toLowerCase() : \"\"; \n \n if (__isIENew && offsetParentTagName == 'td') { \n res.y = element.scrollTop; \n } \n else { \n res.y = element.offsetTop; \n } \n \n var parentNode = element.parentNode; \n var borderWidth = null; \n \n while (offsetParent != null) { \n res.x += offsetParent.offsetLeft; \n res.y += offsetParent.offsetTop; \n \n var parentTagName = offsetParent.tagName.toLowerCase(); \n \n if ((__isIEOld && parentTagName != \"table\") || (__isFireFoxNew && parentTagName == \"td\") || __isChrome) { \n borderWidth = vc_getBorderWidth(offsetParent); \n res.x += borderWidth.left; \n res.y += borderWidth.top; \n } \n \n if (offsetParent != document.body && offsetParent != document.documentElement) { \n res.x -= offsetParent.scrollLeft; \n res.y -= offsetParent.scrollTop; \n } \n \n \n //next lines are necessary to fix the problem with offsetParent \n if (!__isIE && !__isOperaOld || __isIENew) { \n while (offsetParent != parentNode && parentNode !== null) { \n res.x -= parentNode.scrollLeft; \n res.y -= parentNode.scrollTop; \n if (__isFireFoxOld || __isWebKit) { \n borderWidth = vc_getBorderWidth(parentNode); \n res.x += borderWidth.left; \n res.y += borderWidth.top; \n } \n parentNode = parentNode.parentNode; \n } \n } \n \n parentNode = offsetParent.parentNode; \n offsetParent = offsetParent.offsetParent; \n } \n } \n return res; \n}", "function r(a,b){return fa.nodeName(a,\"table\")&&fa.nodeName(11!==b.nodeType?b:b.firstChild,\"tr\")?a.getElementsByTagName(\"tbody\")[0]||a.appendChild(a.ownerDocument.createElement(\"tbody\")):a}", "function hiLightDown(currentElement)\n\t{\n\t\tvar eTR=currentElement.parentNode;\n\t\t\n\t\tif(eTR.tagName != \"TR\")\n\t\t\treturn;\n\t\n\t\tvar nRowIndex=eTR.rowIndex;\n\t\tvar nTotalRows=eTR.parentNode.rows.length;\n\t\tvar bJumpOutOfSubTree=false;\n\t\t\n\t\tif(nRowIndex%2!=0)\n\t\t{\n\t\t\tif(nRowIndex+1 <= nTotalRows-1)\n\t\t\t\teTR.parentNode.rows(nRowIndex+1).cells(1).fireEvent(\"onclick\");\n\t\t\telse\n\t\t\t\tbJumpOutOfSubTree=true;\t\n\t\t}\t\t\n\t\telse\n\t\t{\n\t\t\tif( (nRowIndex < nTotalRows-1) && (eTR.parentNode.rows(nRowIndex+1).style.display !='none'))\n\t\t\t\t_hiLightTopOfSebTree(eTR.parentNode.rows(nRowIndex+1));\n\t\t\telse if (nRowIndex < nTotalRows-2)\n\t\t\t\t\teTR.parentNode.rows(nRowIndex+2).cells(1).fireEvent(\"onclick\");\n\t\t\telse\n\t\t\t\tbJumpOutOfSubTree=true;\t\t\t\n\t\t}\t\n\t\n\t\tif(bJumpOutOfSubTree)\n\t\t{\n\t\t\tvar eTD=eTR.parentNode.parentNode.parentNode;\n\t\t\thiLightDown(eTD);\n\t\t}\n\t}", "function table_makeSubTreeUnSelectable(tableid)\r\n{\r\n var tableobj = document.getElementById(tableid);\r\n if (tableobj != null)\r\n {\r\n\r\n var checkboxes;\r\n\r\n // IE has a document object per element\r\n if(tableobj.document)\r\n checkboxes = tableobj.document.getElementsByTagName(\"INPUT\");\r\n else\r\n checkboxes = document.getElementsByTagName(\"INPUT\");\r\n\r\n if (checkboxes != null)\r\n {\r\n var len = checkboxes.length;\r\n var j = 0;\r\n for(var i=0; i<len; i++)\r\n {\r\n if (checkboxes[i].id == tableid+\"_rowselector\")\r\n {\r\n j++;\r\n// if (checkboxes[i].checked)\r\n// {\r\n // get owning row\r\n var rowobj = checkboxes[i];\r\n while (rowobj != null && rowobj.tagName != \"TR\")\r\n {\r\n if (rowobj.parentElement)\r\n {\r\n rowobj = rowobj.parentElement;\r\n }\r\n else\r\n {\r\n rowobj = rowobj.parentNode;\r\n }\r\n }\r\n if (rowobj.className == \"tableRow0\")\r\n {\r\n checkboxes[i].style.display=\"none\";\r\n checkboxes[i].disabled = true;\r\n }\r\n // }\r\n }\r\n }\r\n }\r\n }\r\n return null;\r\n}", "function m(a,b){return _.nodeName(a,\"table\")&&_.nodeName(11!==b.nodeType?b:b.firstChild,\"tr\")?a.getElementsByTagName(\"tbody\")[0]||a.appendChild(a.ownerDocument.createElement(\"tbody\")):a}", "getTables() {\n return this.root.getChain().map(node => node.table).filter(table => table);\n }", "function thingie(table, parent, nextSibling, i) {\r\n var j, row, rowTuple;\r\n\r\n var tableBody = table.tBodies[0];\r\n \r\n // Clear data rows, which might belong in a subsequent table.\r\n for (j = 0; row = tableBody.rows[j]; ++j)\r\n {\r\n if (row.cells[0].tagName == \"TD\") {\r\n --j;\r\n tableBody.removeChild(row); \r\n }\r\n }\r\n \r\n \r\n // Add the children that belong here.\r\n \r\n // Toss the rows into tables, one tablefull (BUGS_PER_TABLE) at a time.\r\n // Unfortunately, DOM 2 HTML insertRow is for creating *new* rows, so use DOM 2 Core.\r\n \r\n for (j = i * BUGS_PER_TABLE; (j < (i+1) * BUGS_PER_TABLE) && (rowTuple = rows[j]); ++j) {\r\n row = rowTuple[2];\r\n \r\n if (j % 2)\r\n row.className = row.className.replace(/bz_odd/, \"bz_even\");\r\n else\r\n row.className = row.className.replace(/bz_even/, \"bz_odd\");\r\n \r\n tableBody.appendChild(row);\r\n }\r\n \r\n // Put it back into the document. \r\n parent.insertBefore(table, nextSibling);\r\n }", "function getOffsetParent(element){var window=getWindow(element);var offsetParent=getTrueOffsetParent(element);while(offsetParent&&isTableElement(offsetParent)&&getComputedStyle(offsetParent).position==='static'){offsetParent=getTrueOffsetParent(offsetParent);}if(offsetParent&&(getNodeName(offsetParent)==='html'||getNodeName(offsetParent)==='body'&&getComputedStyle(offsetParent).position==='static')){return window;}return offsetParent||getContainingBlock(element)||window;}", "function hl(cb)\r\n{\r\n if (ie)\r\n {\r\n\t while (cb.tagName != \"TR\")\r\n\t {\r\n\t\t cb = cb.parentElement;\r\n\t }\r\n }\r\n else\r\n {\r\n\t while (cb.tagName != \"TR\")\r\n\t {\r\n\t\t cb = cb.parentNode;\r\n\t }\r\n }\r\n cb.className = 'hlight';\r\n}", "function getOffsetParent(element){var window=getWindow(element);var offsetParent=getTrueOffsetParent(element);while(offsetParent&&isTableElement(offsetParent)&&getComputedStyle$1(offsetParent).position==='static'){offsetParent=getTrueOffsetParent(offsetParent);}if(offsetParent&&(getNodeName(offsetParent)==='html'||getNodeName(offsetParent)==='body'&&getComputedStyle$1(offsetParent).position==='static')){return window;}return offsetParent||getContainingBlock(element)||window;}", "normalize_table() {\n var trs = document.getElementById('ComparisonTable').getElementsByTagName('tr'), len = trs.length, max = 0, td;\n // first we search for the longest table row in terms of # of children \n for (var i = len; i--;) {\n if (trs[i].children.length > max) max = trs[i].children.length;\n }\n // now we can fill the other rows\n for (var j = len; j--;) {\n while (trs[j].children.length < max) {\n td = document.createElement('td');\n trs[j].appendChild(td);\n }\n }\n }", "function getParent(obj, ele){ /* method to get a parentNode of a particular type. */\r\n\t\tvar table = obj;\r\n\t\tdo{\r\n\t\t\ttable = table.parentNode;\r\n\t\t}while(!table.nodeName.match(new RegExp(ele, \"i\")));\r\n\t\treturn table;\r\n\t}", "function manipulationTarget(elem, content) {\n return jQuery.nodeName(elem, \"table\") &&\n jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ?\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) :\n elem;\n }", "updateChildLocationForTable(top, tableWidget) {\n for (let i = 0; i < tableWidget.childWidgets.length; i++) {\n let rowWidget = tableWidget.childWidgets[i];\n rowWidget.x = rowWidget.x;\n rowWidget.y = top;\n this.updateChildLocationForRow(top, rowWidget);\n top += rowWidget.height;\n }\n }", "getTable(startPosition, endPosition) {\n if (!isNullOrUndefined(startPosition.paragraph.associatedCell) && !isNullOrUndefined(endPosition.paragraph.associatedCell)) {\n let startTable = startPosition.paragraph.associatedCell.ownerTable;\n let endTable = startPosition.paragraph.associatedCell.ownerTable;\n if (startTable === endTable) {\n return startTable;\n }\n else {\n if (startTable.contains(startPosition.paragraph.associatedCell)) {\n return startTable;\n }\n else if (endTable.contains(startPosition.paragraph.associatedCell)) {\n return endTable;\n }\n else if (!startTable.isInsideTable || !endTable.isInsideTable) {\n return undefined;\n }\n else {\n do {\n startTable = startTable.associatedCell.ownerTable;\n if (startTable === endTable || startTable.contains(endTable.associatedCell)) {\n return startTable;\n }\n else if (endTable.contains(startTable.associatedCell)) {\n return endTable;\n }\n } while (!isNullOrUndefined(startTable.associatedCell));\n }\n }\n }\n return undefined;\n }", "function resetTreeVisiblity () {\n let row = bookmarksTable.rows[0]; // Start at first row in table (which btw cannot be hidden)\n let level;\n while (row != null) {\n\t// We are on an intended to be visible row,\n\trow.hidden = false;\n\t// Check if this is a folder and if meant to be open\n\tif ((row.dataset.type == \"folder\") // This is a folder, check its intended state\n\t\t&& (row.firstElementChild.firstElementChild.firstElementChild.classList\n\t\t\t .contains(\"twistieac\"))\n\t ) {\n\t // It is closed, then all its children are hidden ..\n\t level = parseInt(row.dataset.level, 10);\n\t while ((row = row.nextElementSibling) != null) {\n\t\tif (parseInt(row.dataset.level, 10) <= level)\n\t\t break; // Stop when lower or same level\n\t\trow.hidden = true;\n\t }\n\t}\n\telse row = row.nextElementSibling;\n }\n}", "function getOffsetParent$1(element){var window=getWindow$1(element);var offsetParent=getTrueOffsetParent$1(element);while(offsetParent&&isTableElement$1(offsetParent)&&getComputedStyle$2(offsetParent).position==='static'){offsetParent=getTrueOffsetParent$1(offsetParent);}if(offsetParent&&(getNodeName$1(offsetParent)==='html'||getNodeName$1(offsetParent)==='body'&&getComputedStyle$2(offsetParent).position==='static')){return window;}return offsetParent||getContainingBlock$1(element)||window;}", "function selectedNodeIsATableNode(dom,offsets,selNode){\n var retVal = false;\n\n switch (selNode.tagName){\n\n case \"TABLE\":\n case \"TR\":\n retVal = true;\n break;\n case \"TD\":\n case \"TH\":\n if ( !cursorIsInsideOfTableCell(dom,offsets,selNode) ){\n retVal = true;\n break;\n }\n default:\n break;\n\n }\n\n return retVal;\n\n}", "function findParentTrRow(srcElement) {\r\n var curElement = srcElement;\r\n while (curElement && (curElement.tagName.toUpperCase() != \"TR\")) {\r\n curElement = curElement.parentElement;\r\n }\r\n return (curElement.tagName.toUpperCase() == 'TR' ? curElement : null);\r\n}", "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}", "function getElementAbsolutePos(element) {\n var res = new Object();\n res.x = 0;\n res.y = 0;\n if (element !== null) {\n if (element.getBoundingClientRect) {\n var viewportElement = document.documentElement;\n var box = element.getBoundingClientRect();\n var scrollLeft = viewportElement.scrollLeft;\n var scrollTop = viewportElement.scrollTop;\n\n res.x = box.left + scrollLeft;\n res.y = box.top + scrollTop;\n\n }\n else { //for old browsers\n res.x = element.offsetLeft;\n res.y = element.offsetTop;\n\n var parentNode = element.parentNode;\n var borderWidth = null;\n\n while (offsetParent != null) {\n res.x += offsetParent.offsetLeft;\n res.y += offsetParent.offsetTop;\n\n var parentTagName =\n offsetParent.tagName.toLowerCase();\n\n if ((__isIEOld && parentTagName != \"table\") ||\n ((__isFireFoxNew || __isChrome) &&\n parentTagName == \"td\")) {\n borderWidth = kGetBorderWidth\n (offsetParent);\n res.x += borderWidth.left;\n res.y += borderWidth.top;\n }\n\n if (offsetParent != document.body &&\n offsetParent != document.documentElement) {\n res.x -= offsetParent.scrollLeft;\n res.y -= offsetParent.scrollTop;\n }\n\n\n //next lines are necessary to fix the problem\n //with offsetParent\n if (!__isIE && !__isOperaOld || __isIENew) {\n while (offsetParent != parentNode &&\n parentNode !== null) {\n res.x -= parentNode.scrollLeft;\n res.y -= parentNode.scrollTop;\n if (__isFireFoxOld || __isWebKit) {\n borderWidth =\n kGetBorderWidth(parentNode);\n res.x += borderWidth.left;\n res.y += borderWidth.top;\n }\n parentNode = parentNode.parentNode;\n }\n }\n\n parentNode = offsetParent.parentNode;\n offsetParent = offsetParent.offsetParent;\n }\n }\n }\n return res;\n}", "function findAncestorOffsetKey(node){var searchNode=node;while(searchNode&&searchNode!==document.documentElement){var key=getSelectionOffsetKeyForNode(searchNode);if(key!=null){return key;}searchNode=searchNode.parentNode;}return null;}", "function inBaseTreeView() { }", "function _hiLightTopOfSebTree(eTR)\n\t{\n\t\tvar eTBody=eTR.cells(1).firstChild.firstChild;\n\t\teTBody.rows(0).cells(1).fireEvent(\"onclick\");\n\t}", "function setUpTablesArray(unqiuePathOfTable)\n{\n\t//two-d array to hold each table's children frame info\n\tarrTablesChildrenFrames[unqiuePathOfTable] = new Array();\n}", "function table_highlightSelectedRowForChild(obj, state)\r\n{\r\n if (state == null) state = true;\r\n\r\n var rowobj = obj;\r\n while (rowobj != null && rowobj.tagName != \"TR\")\r\n {\r\n if (rowobj.parentElement)\r\n {\r\n rowobj = rowobj.parentElement;\r\n }\r\n else\r\n {\r\n rowobj = rowobj.parentNode;\r\n }\r\n }\r\n if (rowobj != null)\r\n {\r\n if (state == true)\r\n {\r\n rowobj.originalClassName = rowobj.className;\r\n rowobj.className = \"rowHighlight\";\r\n rowobj.cells[0].childNodes[0].style.backgroundColor = \"\";\r\n }\r\n else\r\n {\r\n if (rowobj.originalClassName != null)\r\n rowobj.className = rowobj.originalClassName;\r\n }\r\n }\r\n\r\n\r\n}", "function manipulationTarget( elem, content ) {\n if ( nodeName( elem, \"table\" ) &&\n nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n return jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n }\n\n return elem;\n }", "function getRowsTable(row)\n{\n return row.parent().attr(\"id\");\n}", "function snavAddParentRequiredRows(parentId) {\r\n var parentElId = 'td-node--' + parentId;\r\n jQuery('#' + parentElId + ' .org-chart-expand-or-collapse').show();\r\n Ext.select('#' + parentElId + ' .org-chart-show-subordinates').setStyle('display', 'none');\r\n var markup = \"<table id='tbl-nodes-of--\" + parentId + \"' class='org-chart-table' cellpadding='0' cellspacing='0' style='jtable-layout: fixed; visibility: inherit'> \";\r\n markup += \"<tr id='tr-parent-line--\" + parentId + \"' class='parent-line-row'>\";\r\n markup += '</tr>';\r\n\r\n // child lines\r\n markup += \"<tr id='tr-child-line--\" + parentId + \"' class='child-line-row'>\";\r\n // markup += snavRenderRows('tmpChildLine', nodes);\r\n markup += '</tr>';\r\n\r\n // child nodes\r\n markup += \"<tr id='tr-child-content--\" + parentId + \"' class='child-content-row'>\";\r\n // markup += snavRenderRows('tmpChildNode', nodes);\r\n markup += '</tr>';\r\n markup += \"</table> \";\r\n\r\n jQuery('#' + parentElId).append(markup);\r\n}", "function layout (root) { \n inherit(inhTable(0), root); \n \n var old_tablebox_1 = visit_tablebox_1;\n visit_tablebox_1 = function (node) { old_tablebox_1(node); addCols(node); };\n inherit(inhTable(1), root); \n visit_tablebox_1 = old_tablebox_1; \n inherit(inhTable(2), root); \n \n synthesize(synTable(3), root);\n inherit(inhTable(4), root);\n inherit(inhTable(5), root);\n synthesize(synTable(6), root);\n\n //inorder traversal\n var old_visit_7 = visit_7;\n var old_visit_tablebox_7 = visit_tablebox_7;\n visit_tablebox_7 = function(node){visitTableInorder(node,old_visit_tablebox_7); return true;};\n visit_7 = reroute(patchGetChildrenStackable(visit_7,getChildrenRaw), \"col\", patchGetChildrenStackable(visit_7,patchedGetChildren));\n visit_7(root);\n visit_tablebox_7 = old_visit_tablebox_7;\n visit_7 = old_visit_7;\n\n inherit(inhTable(8), root);\n}", "function shouldMovePopupBackToTable(popupDiv)\n{\n var tableId = popupDiv.getAttribute('tableid');\n if(tableId != null)\n {\n var tableBean = document.getElementById(tableId);\n return tableBean == popupDiv.parentNode;\n }\n return false;\n}", "function bindAncestorScrollEvents() {\n var elem = (hasFrozenRows && !options.frozenBottom) ? $canvasBottomL[0] : $canvasTopL[0];\n while ((elem = elem.parentNode) != document.body && elem != null) {\n // bind to scroll containers only\n if (elem == $viewportTopL[0] || elem.scrollWidth != elem.clientWidth || elem.scrollHeight != elem.clientHeight) {\n var $elem = $(elem);\n if (!$boundAncestors) {\n $boundAncestors = $elem;\n } else {\n $boundAncestors = $boundAncestors.add($elem);\n }\n $elem.on(\"scroll.\" + uid, handleActiveCellPositionChange);\n }\n }\n }", "function getTableTextColumnMissingParentTableError() {\n return Error(\"Text column could not find a parent table for registration.\");\n }", "function firstCommonAncestor() {\n \n}", "shiftChildLocationForTableWidget(tableWidget, shiftTop) {\n tableWidget.y = tableWidget.y + shiftTop;\n for (let i = 0; i < tableWidget.childWidgets.length; i++) {\n let childWidget = tableWidget.childWidgets[i];\n if (childWidget instanceof TableRowWidget) {\n this.shiftChildLocationForTableRowWidget(childWidget, shiftTop);\n }\n }\n }", "function hasRedundantParent( node )\n{\n var rc = false;\n\n if ( arrayContains(redundantTagCandidates, node.tagName ) )\n {\n var parent = node.parentNode;\n\n // Find controlling parent\n while( parent != null )\n {\n if ( node.tagName == parent.tagName )\n {\n // Compare parent and child attribute name/value pairs\n var cArrs = parseAttributes( node, true, true );\n var pArrs = parseAttributes( parent, true, true );\n var cNames = cArrs[0];\n var cValues = cArrs[1];\n var pNames = pArrs[0];\n var pValues = pArrs[1];\n\n if ( cNames.length == pNames.length && cValues.length == pValues.length )\n {\n cNames.sort();\n pNames.sort();\n cValues.sort();\n pValues.sort();\n\n var len = cNames.length;\n for( var i = 0; i < len; i++ )\n {\n // note in js: undefined == undefined is true\n if ( pNames[i] != cNames[i] || cValues[i] != pValues[i] )\n break;\n }\n\n rc = (i == len); // if we got through everything they're the same\n }\n\n if ( rc ) // if we're redundant, we're done\n break;\n\n // Otherwise, if we're not actually overriding anything on this\n // parent, we may still be redundant with an uber parent. Cycle through\n // the child's attributes and if none are present on parent keep going\n //\n var bKeepGoing = true;\n for( var i = 0; i < cNames.length; i++ )\n {\n if ( arrayContains(pNames, cNames[i] ) )\n {\n bKeepGoing = false;\n break;\n }\n }\n\n if ( !bKeepGoing )\n break;\n } else if ( node.tagName == 'TABLE' || parent.tagName == 'TABLE') {\n break;\n }\n\n parent = parent.parentNode;\n }\n }\n\n return rc;\n}", "function snavRemoveEndTopLines() {\r\n var trs = jQuery('.child-line-row');\r\n for (var i = 0; i < trs.length; i++) {\r\n var tr = trs[i];\r\n var tds = jQuery(tr).find('td');\r\n jQuery(tds[0]).removeClass('top');\r\n var lastIndex = tds.length - 1;\r\n jQuery(tds[lastIndex]).removeClass('top');\r\n }\r\n}", "function manipulationTarget(elem, content) {\n return jQuery.nodeName(elem, \"table\") &&\n jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) :\n elem;\n }", "parent() {\n return this._ancestors.top();\n }", "isAncestor(value) {\n return isPlainObject(value) && Node.isNodeList(value.children);\n }", "_diffTables(oTable, nTable) {\n\t\tconst oTableName = oTable.tableName;\n\t\tconst nTableName = nTable.tableName;\n\t\tconst tableNameHasChanged = oTableName !== nTableName;\n\t\tconst {\n\t\t\tcharset: nCharset,\n\t\t\tcollation: nCollation,\n\t\t\tcolumns: nColumns\n\t\t} = nTable.schema;\n\n\t\tconst {\n\t\t\tcharset: oCharset,\n\t\t\tcollation: oCollation,\n\t\t\tcolumns: oColumns\n\t\t} = oTable.schema;\n\n\t\tif ( tableNameHasChanged ) {\n\t\t\tthis._renameTable('up', oTableName, nTableName);\n\t\t\tthis._renameTable('dn', nTableName, oTableName);\n\t\t}\n\n\t\tif ( (nCharset !== oCharset) || (nCollation !== oCollation) ) {\n\t\t\tthis._changeTableCharset('up', nTableName, nCharset, nCollation, oCharset, oCollation);\n\t\t\tthis._changeTableCharset('dn', oTableName, oCharset,oCollation);\n\t\t}\n\n\t\tconst columnsDiff = deepDiff(oColumns, nColumns) || [];\n\t\tcolumnsDiff.forEach(d => {\n\t\t\tconst colName = d.path[0];\n\t\t\t// 'N' indicates a newly added property/element\n\t\t\tif (d.kind === 'N') {\n\t\t\t\tconst nCol = nColumns[colName];\n\t\t\t\tthis._addColumn('up', nTableName, colName, nCol);\n\t\t\t\tthis._dropColumn('dn', nTableName, colName);\n\t\t\t}\n\t\t\t// 'E' indicates a property/element was edited\n\t\t\t// 'A' indicates a change occurred within an array\n\t\t\telse if (d.kind === 'E' || d.kind === 'A') {\n\t\t\t\tconst nCol = nColumns[colName];\n\t\t\t\tconst oCol = oColumns[colName];\n\t\t\t\tthis._alterColumn('up', nTableName, colName, nCol);\n\t\t\t\tthis._alterColumn('dn', oTableName, colName, oCol);\n\t\t\t}\n\t\t\t// 'D' indicates a property/element was deleted\n\t\t\t// Changin `if (d.kind === 'D')` into `else`\n\t\t\t// Point? Fixing istanbul coverage report.\n\t\t\t// The `d.kind` can only be `D` anyways and relevant tests are passed!\n\t\t\telse {\n\t\t\t\tthis._dropColumn('up', nTableName, colName);\n\t\t\t\tthis._addColumn('dn', oTableName, colName, oColumns[colName]);\n\t\t\t}\n\t\t});\n\n\t\tthis._diffTableIndexes(oTable, nTable);\n\t}", "function handleDragGetTr(e) {\r\n var elt = e.target;\r\n while(elt != null && elt.tagName != \"TR\") {\r\n elt = elt.parentNode;\r\n }\r\n return elt == null ? e.target : elt;\r\n}", "function _fix_table_heads(table)\n {\n var sizer_tr = {left:null, top:null, wide:null, high:null};\n var sizer_td = {left:null, top:null, wide:null, high:null};\n var sizer_th = {left:null, top:null, wide:null, high:null};\n \n function is_tr_el(node)\n {\n return node.nodeType==1 && node.tagName.toLowerCase()==\"tr\";\n }\n\n function is_th_el(node)\n {\n return node.nodeType==1 && node.tagName.toLowerCase()==\"th\";\n }\n\n // search nextSiblings for match\n function find_matched_headfix_row(tr, hf_name)\n {\n while ((tr=tr.nextSibling))\n if (is_tr_el(tr))\n if (class_includes(tr,hf_name))\n return tr;\n\n return null;\n }\n\n function reposition_element(ref, flo, sizer)\n {\n var ref_par = ref.parentNode;\n var os = get_relative_offset(ref, ref_par);\n flo.style.left = px(os.left + sizer.left);\n flo.style.top = px(os.top + sizer.top);\n }\n\n function resize_element(ref, flo, sizer)\n {\n flo.style.height = px(ref.offsetHeight + sizer.high);\n flo.style.width = px(ref.offsetWidth + sizer.wide);\n }\n\n function calculate_sizer(ref, flo, sizer)\n {\n sizer.left = ref.clientLeft - flo.clientLeft;\n sizer.top = ref.clientTop - flo.clientTop;\n\n sizer.wide = ref.clientWidth - flo.clientWidth;\n sizer.high = ref.clientHeight - flo.clientHeight;\n }\n\n function align_cells(ref, flo)\n {\n var r,f, i;\n\n r = firstChildEl(ref);\n f = firstChildEl(flo);\n\n if (!r || !f)\n return;\n\n var sizer = null;\n switch(r.tagName.toLowerCase())\n {\n case \"th\": sizer = sizer_th; break;\n case \"td\": sizer = sizer_td; break;\n }\n\n if (sizer.wide==null)\n {\n reposition_element(r,f,sizer);\n resize_element(r,f,sizer);\n calculate_sizer(r,f,sizer);\n }\n\n while (r && f)\n {\n reposition_element(r,f,sizer);\n resize_element(r,f,sizer);\n\n r = nextSiblingEl(r);\n f = nextSiblingEl(f);\n }\n }\n\n function align_pair(ref, flo)\n {\n var sizer = null;\n switch(ref.tagName.toLowerCase())\n {\n case \"tr\": sizer = sizer_tr; break;\n case \"th\": sizer = sizer_th; break;\n case \"td\": sizer = sizer_td; break;\n }\n \n var osref = get_doc_offset(ref);\n flo.style.left = px(osref.left);\n flo.style.top = px(osref.top);\n resize_element(ref,flo,sizer);\n\n if (sizer.high===null)\n {\n calculate_sizer(ref,flo,sizer);\n\n if (sizer.left || sizer.top)\n reposition_element(ref,flo,sizer);\n if (sizer.wide || sizer.high)\n resize_element(ref,flo,sizer);\n }\n\n var first = firstChildEl(ref);\n if (first)\n {\n var ftag = first.tagName.toLowerCase();\n if (ftag==\"th\" || ftag==\"td\")\n align_cells(ref, flo);\n }\n }\n\n var re_headfix = /headfix_\\S+/;\n function align_paired_rows(thead)\n {\n var rematch, trmatch;\n var currow = firstChildEl(thead);\n while (currow)\n {\n if (is_tr_el(currow))\n if ((match=currow.className.match(re_headfix)))\n if ((trmatch=find_matched_headfix_row(currow, match[0])))\n {\n if (class_includes(currow,\"floater\"))\n align_pair(trmatch,currow,sizer_tr);\n else\n align_pair(currow,trmatch,sizer_tr);\n }\n currow = nextSiblingEl(currow);\n }\n }\n\n // replace function with function in closure:\n _fix_table_heads = function(tab)\n {\n var thead = tab.getElementsByTagName(\"thead\");\n if (thead && thead.length)\n align_paired_rows(thead[0]);\n };\n\n // must explicitely call the function when setting up the closure:\n _fix_table_heads(table);\n \n } // end of _fix_table_heads", "function manipulationTarget( elem, content ) {\n \tif ( nodeName( elem, \"table\" ) &&\n \t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n \t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n \t}\n\n \treturn elem;\n }", "function tableCellViewer()\n{\n /**\n * Updates the view for the given accessible.\n *\n * @param aAccessible\n * The given accessible\n */\n this.update = function tableCellViewer_update(aAccessible)\n {\n if (!(aAccessible instanceof nsIAccessibleTableCell))\n return false;\n\n // columnIndex\n var columnIndex = aAccessible.columnIndex;\n this.columnIndexElm.textContent = columnIndex;\n\n // rowIndex\n var rowIndex = aAccessible.rowIndex;\n this.rowIndexElm.textContent = rowIndex;\n\n // columnExtent\n var columnExtent = aAccessible.columnExtent;\n this.columnExtentElm.textContent = columnExtent;\n \n // rowIndex\n var rowExtent = aAccessible.rowExtent;\n this.rowExtentElm.textContent = rowExtent;\n\n // isSelected\n var isSelected = aAccessible.isSelected();\n this.isSelectedElm.textContent = isSelected;\n\n // table, columnHeaderCells, rowHeaderCells\n this.addRelated(aAccessible);\n\n return true;\n }\n\n /**\n * Clear the view's data.\n */\n this.clear = function tableCellViewer_clear()\n {\n this.mTreeBox.view = null;\n\n this.columnIndexElm.textContent = \"\";\n this.rowIndexElm.textContent = \"\";\n this.columnExtentElm.textContent = \"\";\n this.rowExtentElm.textContent = \"\";\n this.isSelectedElm.textContent = \"\";\n }\n\n this.isCommandEnabled = function tableCellViewer_isCommandEnable(aCommand)\n {\n if (aCommand == \"cmdEditInspectInNewWindow\") {\n return this.mTreeView.selection.count == 1;\n }\n return false;\n },\n\n /**\n * Prepares 'inspectInNewView' command.\n */\n this.inspectInNewView = function tableCellViewer_inspectInNewView()\n {\n if (this.mTreeView.selection.count == 1) {\n var minAndMax = {};\n this.mTreeView.selection.getRangeAt(0, minAndMax, minAndMax);\n var node = this.mTreeView.getDOMNode(minAndMax.value);\n if (node) {\n inspectObject(node);\n }\n }\n }\n\n //////////////////////////////////////////////////////////////////////////////\n //// private\n\n this.addRelated = function tableCellViewer_addRelated(aAccessible)\n {\n this.mTreeView = new TableCellTreeView(aAccessible);\n this.mTreeBox.view = this.mTreeView;\n }\n\n this.mTree = document.getElementById(\"tableCell:accObjects\");\n this.mTreeBox = this.mTree.treeBoxObject;\n\n this.columnIndexElm = document.getElementById(\"tableCell:columnIndex\");\n this.rowIndexElm = document.getElementById(\"tableCell:rowIndex\");\n this.columnExtentElm = document.getElementById(\"tableCell:columnExtent\");\n this.rowExtentElm = document.getElementById(\"tableCell:rowExtent\");\n this.isSelectedElm = document.getElementById(\"tableCell:isSelected\");\n}", "function manipulationTarget( elem, content ) {\r\n\tif ( nodeName( elem, \"table\" ) &&\r\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\r\n\r\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\r\n\t}\r\n\r\n\treturn elem;\r\n}", "get ancestors () {\n return this.parents.reduce((parents, patch) => {\n return parents.concat([ patch ]).concat(patch.parents);\n }, []);\n }", "function findRelatives(event) {\n var relatives = {};\n\n // finds closest parent of match or quantified type, sets ID on relatives object\n var parentID = $(event.toElement).closest('.match, .quantified').attr('id');\n relatives.parentID = parseInt(parentID);\n\n relatives.leftSibID = handlerHelpers.findLeftSibling(event);\n\n if (relatives.leftSibID === undefined && relatives.parentID === undefined){\n console.log('no parent node and no left sibling. Drop the copy and revert. YOU GET NOTHINGGGGG');\n return;\n }\n return relatives;\n }", "function xPrevSib(e,t)\r\n{\r\n var s = e ? e.previousSibling : null;\r\n if (t) while(s && s.nodeName != t) {s=s.previousSibling;}\r\n else while(s && s.nodeType != 1) {s=s.previousSibling;}\r\n return s;\r\n}", "function grabHeadersAndHighlightRelatedCells(element){\n\t\tvar table = $(element).closest(\"table\");\n\t\tif($(table).attr(\"role\") != \"presentation\"){\n\t\t\t//TODO: does role=none matter?\n\t\t\tvar rowIndex = $(element).attr('data-tANDI508-rowIndex');\n\t\t\tvar rowMember = $(element).attr(\"data-tANDI508-rowMember\");\n\t\t\tvar colIndex = $(element).attr('data-tANDI508-colIndex');\n\t\t\tvar colMember = $(element).attr(\"data-tANDI508-colMember\");\n\t\t\tvar headers = $.trim($(element).attr(\"headers\"));\n\t\t\tvar idsArray, referencedId, referencedElement;\n\t\t\t//Find Related <th> cells\n\t\t\t//==HEADERS/ID MODE==//\n\t\t\tif((mode == \"headers/id mode\") && headers){\n\t\t\t\tidsArray = headers.split(\" \");\n\t\t\t\tfor (var x=0;x<idsArray.length;x++){\n\t\t\t\t\t//Can the id be found somewhere on the page?\n\t\t\t\t\treferencedId = andiUtility.escapeCssCharactersInId(idsArray[x]);\n\t\t\t\t\treferencedElement = $(\"#\"+referencedId);\n\t\t\t\t\t\n\t\t\t\t\tif($(referencedElement).html() !== undefined){\n\t\t\t\t\t\tif($(referencedElement).is(\"th\") || $(referencedElement).is(\"td\")){\n\t\t\t\t\t\t\tassociatedThText += andiUtility.formatForHtml(andiUtility.getTextOfTree($(referencedElement))) + tANDI.associatedThDelimeter;\n\t\t\t\t\t\t\t$(referencedElement).addClass(\"tANDI508-highlight\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//==SCOPE MODE==//\n\t\t\telse if(mode == \"scope mode\"){\n\t\t\t\tif($(element).is(\"td\")){\n\t\t\t\t\t//Highlight associating <th> for this <td>\n\t\t\t\t\t$(table).find(\"th.ANDI508-element\").filter(':visible').each(function(){\n\t\t\t\t\t\t//get associated th from col\n\t\t\t\t\t\tif(index_greaterThan(rowIndex, $(this).attr(\"data-tANDI508-rowIndex\"))\n\t\t\t\t\t\t&& index_match(colIndex, $(this).attr(\"data-tANDI508-colIndex\"))\n\t\t\t\t\t\t&& !index_match(rowIndex, $(this).attr(\"data-tANDI508-rowIndex\")))\n\t\t\t\t\t\t{//add associatedThText and highlight the cell from whence it came\n\t\t\t\t\t\t\t$(this).addClass(\"tANDI508-highlight\");\n\t\t\t\t\t\t\tassociatedThText += andiUtility.formatForHtml(andiUtility.getTextOfTree($(this))) + tANDI.associatedThDelimeter;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//get associated th from row\n\t\t\t\t\t\tif(index_greaterThan(colIndex, $(this).attr(\"data-tANDI508-colIndex\"))\n\t\t\t\t\t\t&& index_match(rowIndex, $(this).attr(\"data-tANDI508-rowIndex\"))\n\t\t\t\t\t\t&& !index_match(colIndex, $(this).attr(\"data-tANDI508-colIndex\")))\n\t\t\t\t\t\t{//add associatedThText\n\t\t\t\t\t\t\t$(this).addClass(\"tANDI508-highlight\");\n\t\t\t\t\t\t\tassociatedThText += andiUtility.formatForHtml(andiUtility.getTextOfTree($(this))) + tANDI.associatedThDelimeter;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Highlight associating <th> and <td> for this th\n\t\t\tif($(element).is(\"th\")){\n\t\t\t\tvar scope = $(element).attr(\"scope\");\n\t\t\t\tvar id = $(element).attr(\"id\");\n\t\t\t\tif((mode == \"scope mode\")){\n\t\t\t\t\t$(table).find(\"th.ANDI508-element,td.ANDI508-element\").filter(':visible').each(function(){\n\t\t\t\t\t\tif(scope){\n\t\t\t\t\t\t\t//th has scope\n\t\t\t\t\t\t\tif((scope == \"col\" || scope == \"colgroup\")\n\t\t\t\t\t\t\t\t&& !index_greaterThan(rowIndex, $(this).attr(\"data-tANDI508-rowIndex\"))\n\t\t\t\t\t\t\t\t&& index_match(colIndex,$(this).attr(\"data-tANDI508-colIndex\")))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//alert(rowIndex+\" \"+$(this).attr(\"data-tANDI508-rowIndex\"));\n\t\t\t\t\t\t\t\t$(this).addClass(\"tANDI508-highlight\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if((scope == \"row\" || scope == \"rowgroup\")\n\t\t\t\t\t\t\t\t&& !index_greaterThan(colIndex, $(this).attr(\"data-tANDI508-colIndex\"))\n\t\t\t\t\t\t\t\t&& index_match(rowIndex,$(this).attr(\"data-tANDI508-rowIndex\")))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$(this).addClass(\"tANDI508-highlight\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t//th has no scope\n\t\t\t\t\t\t\t//**Assumed associations - this is where it gets sketchy**\n\t\t\t\t\t\t\tif($(this).is(\"td\")){\n\t\t\t\t\t\t\t\tif(index_match(colIndex, $(this).attr(\"data-tANDI508-colIndex\")) || index_match(rowIndex,$(this).attr(\"data-tANDI508-rowIndex\")))\n\t\t\t\t\t\t\t\t\t$(this).addClass(\"tANDI508-highlight\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//No scope assumptions relating to other th\n\t\t\t\t\t\t\telse if($(this).is(\"th\")){\n\t\t\t\t\t\t\t\tif(rowIndex == \"0\"\n\t\t\t\t\t\t\t\t\t&& index_match(colIndex,$(this).attr(\"data-tANDI508-colIndex\"))\n\t\t\t\t\t\t\t\t\t&& !index_greaterThan(rowIndex, $(this).attr(\"data-tANDI508-rowIndex\")))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$(this).addClass(\"tANDI508-highlight\");\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});\n\t\t\t\t}\n\t\t\t\telse if((mode == \"headers/id mode\") && id){//might have headers attributes pointing to this <th>\n\t\t\t\t\t$(table).find(\"th.ANDI508-element,td.ANDI508-element\").filter(':visible').each(function(){\n\t\t\t\t\t\theaders = $(this).attr(\"headers\");\n\t\t\t\t\t\tif(headers){\n\t\t\t\t\t\t\tidsArray = headers.split(\" \");\n\t\t\t\t\t\t\tfor (var x=0;x<idsArray.length;x++){\n\t\t\t\t\t\t\t\tif(id==idsArray[x]){\n\t\t\t\t\t\t\t\t\t$(this).addClass(\"tANDI508-highlight\");\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});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function mt(e){var t=null,i=e;if(i.liDom.previousSibling){var n=gt(i.liDom.previousSibling);t=n||i.liDom.previousSibling.node}else t=i.parent;return t}", "checkInternalPointers () {\n if (this.left) {\n if (this.left.parent !== this) throw new Error(`Parent pointer broken for key ${this.key}`)\n this.left.checkInternalPointers()\n }\n\n if (this.right) {\n if (this.right.parent !== this) throw new Error(`Parent pointer broken for key ${this.key}`)\n this.right.checkInternalPointers()\n }\n }", "function DoHL()\n{\nvar e = window.event.srcElement;\nwhile (e.tagName!=\"TR\")\n{e=e.parentElement;}\nif (e.className!='SL')\ne.className='HL';\n}", "function openAncestorCollections(p) {\n statusClear();\n openCols(allAncestorCollections(p));\n}", "function manipulationTarget( elem, content ) {\n\t\tif ( nodeName( elem, \"table\" ) &&\n\t\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\t\n\t\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t\t}\n\t\n\t\treturn elem;\n\t}", "function fixAssocTable( table ){\n\tvar startName = 'wp' + table.id;\n\tvar trs = table.getElementsByTagName( 'tr' );\n\tfor( var r = 1; r < trs.length; r++ ){\n\t\tvar tr = trs[r];\n\t\tvar inputs = tr.getElementsByTagName( 'input' );\n\t\tinputs[inputs.length - 1].onclick = removeGroupBoolCallback( table, r );\n\t}\n}", "rangeParent() {\n let common = !this.range ? undefined : this.range.commonAncestorContainer;\n return !common\n ? undefined\n : common.nodeType == 1\n ? common\n : common.parentElement;\n }", "function manipulationTarget(elem, content) {\r\n\t\treturn jQuery.nodeName(elem, \"table\") &&\r\n\t\t\tjQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ?\r\n\r\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\r\n\t\t\telem.appendChild(elem.ownerDocument.createElement(\"tbody\")) :\r\n\t\t\telem;\r\n\t}", "getOuterDepth() {\n mustInherit();\n }", "function tableOldDelete(table){\r\n while(table.firstChild){\r\n table.removeChild(table.firstChild)\r\n }\r\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}", "function manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( \">tbody\", elem )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}" ]
[ "0.644592", "0.60404134", "0.58399045", "0.5824815", "0.5816764", "0.58050925", "0.58031654", "0.5723343", "0.5681813", "0.56641525", "0.55932623", "0.55502594", "0.5542227", "0.55275595", "0.55019903", "0.5501747", "0.54964644", "0.54465336", "0.5414919", "0.53851664", "0.53699994", "0.5359685", "0.5349196", "0.5348332", "0.53357935", "0.5331286", "0.52875197", "0.5255654", "0.5245511", "0.5223192", "0.52181476", "0.51924205", "0.5188832", "0.51766646", "0.51755315", "0.5163727", "0.51630497", "0.51547545", "0.5153597", "0.51477325", "0.51461667", "0.51369685", "0.5133457", "0.5132938", "0.51324725", "0.51296604", "0.5126058", "0.5121573", "0.512046", "0.5112801", "0.5111687", "0.5097779", "0.5095239", "0.50898105", "0.5083714", "0.50730467", "0.50695604", "0.5067519", "0.5060002", "0.5055485", "0.5055134", "0.5054228", "0.5053458", "0.50509024", "0.5047774", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475", "0.5041475" ]
0.0
-1
:: declare function isElement(node: mixed): boolean %checks(node instanceof Element);
function isElement(node) { var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(node).Element; return node instanceof OwnElement || node instanceof Element; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isElement(node) {\r\n return (node && node.nodeType === node_types.ELEMENT_NODE) || false;\r\n }", "function isElement(value) {\n return isType(value, 'Element');\n}", "function isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}", "function isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}", "function isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n }", "function isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement;\n }", "function isElement(value) { return Boolean(value) && value.nodeType === 1; }", "function isElement(node) {\n var nodeType = node.nodeType;\n // If the property is clobbered, we can assume it is an `HTMLFormElement`, and\n // thus an `Element`.\n return (nodeType === Node.ELEMENT_NODE) || (typeof nodeType !== 'number');\n}", "function isElement(element) {\n return element instanceof Element || element instanceof HTMLDocument;\n}", "isElement (obj) { return obj instanceof Element }", "_isElementNode(element) {\n return element.nodeType === this._document.ELEMENT_NODE;\n }", "function isElement(el) {\n return el instanceof Object && el && el.nodeType === 1;\n}", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "_isElementNode(element) {\n return element.nodeType === this._document.ELEMENT_NODE;\n }", "_isElementNode(element) {\n return element.nodeType === this._document.ELEMENT_NODE;\n }", "_isElementNode(element) {\n return element.nodeType === this._document.ELEMENT_NODE;\n }", "_isElementNode(element) {\n return element.nodeType === this._document.ELEMENT_NODE;\n }", "function isElement(o) {\n return !!o && o.nodeType === 1;\n}", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n}", "function isElement(elem){\n\treturn elem.type === \"tag\" || elem.type === \"style\" || elem.type === \"script\";\n}", "function isElement(o){\n return (\n typeof HTMLElement === \"function\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\"\n );\n }", "function isElement(o){\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\"\n);\n}", "function isElement(obj) {\n\treturn obj && obj.nodeType == 1;\n}", "function isElement(obj) {\n return obj instanceof HTMLElement;\n}", "function isElement(o){\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\"\n );\n }", "function isElement(o){\n return (\n typeof HTMLElement === 'object' ? o instanceof HTMLElement : // DOM2\n o && typeof o === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName==='string'\n )\n}", "function isValidElement(elem) {\n return !!elem && elem.nodeType === 1;\n }", "function isElement(o) {\n return (typeof HTMLElement === \"object\" ? o instanceof HTMLElement : o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\");\n}", "function isElement(o) {\n return o && (typeof o === 'undefined' ? 'undefined' : _typeof(o)) === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName === 'string';\n}", "function isElement(o) {\n return typeof HTMLElement === 'object'\n ? o instanceof HTMLElement //DOM2\n : o &&\n typeof o === 'object' &&\n o !== null &&\n o.nodeType === 1 &&\n typeof o.nodeName === 'string';\n}", "function isElement(domNode) {\n return domNode.nodeType !== undefined;\n}", "function isElement(o){\n\t\t\treturn (\n\t\t\t\ttypeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n\t\t\t\to && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\"\n\t\t\t);\n\t\t}", "function isElement(o) {\n return (typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\");\n }", "function isElement(o) {\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement :\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\"\n );\n }", "function isElement(o) {\n\t\treturn (\n\t\t\ttypeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n\t\t\to && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\"\n\t\t);\n\t}", "function isElement(o){\n\t\t\treturn (typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n\t\t\t\to && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\")\n\t\t}", "function _isElement(o){\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o.nodeType === 1 && typeof o.nodeName===\"string\"\n );\n }", "function isElement(o) {\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\"\n );\n }", "function isElement(o) {\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\"\n );\n }", "function isElement(o) {\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\"\n );\n }", "function isElement(o) {\n return (\n typeof HTMLElement === 'object' ? o instanceof HTMLElement : //DOM2\n o && typeof o === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName === 'string'\n );\n }", "function isElement (o) {\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\"\n );\n }", "function isElement( o ) {\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\"\n );\n }", "function isElement(obj) {\n return !!((typeof HTMLElement === 'undefined' ? 'undefined' : _typeof(HTMLElement)) === 'object' ? obj instanceof HTMLElement : obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string');\n }", "isElement(value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0_is_plain_object__[\"a\" /* default */])(value) && Node.isNodeList(value.children) && !Editor.isEditor(value);\n }", "function isRealElement(value) {\n return value instanceof Element;\n}", "function isElement(obj) {\n return !!((typeof HTMLElement === 'undefined' ? 'undefined' : _typeof(HTMLElement)) === 'object' ? obj instanceof HTMLElement : obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string');\n }", "function isElement(obj) {\n return !!((typeof HTMLElement === 'undefined' ? 'undefined' : _typeof(HTMLElement)) === 'object' ? obj instanceof HTMLElement : obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string');\n}", "function isInputElement(element) {\n return element.nodeName == 'input';\n}", "function is_dom_element(obj) {\n return !!(obj && obj.nodeType === 1);\n}", "function isRealElement(value) {\n return value instanceof Element;\n }", "function isInputElement(element) {\n return element.nodeName.toLowerCase() == 'input';\n}", "function isInputElement(element) {\n return element.nodeName.toLowerCase() == 'input';\n}", "function isInputElement(element) {\n return element.nodeName.toLowerCase() == 'input';\n}", "function isInputElement(element) {\n return element.nodeName.toLowerCase() == 'input';\n}", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement;\n }", "function isDOMElement(node) {\n return (\n node && typeof node === 'object' && node.nodeType === 1 && typeof node.nodeName === 'string'\n );\n}", "checkNodeEl(el) {\n return el.nodeType === 1;\n }", "function isElement(obj) {\n return obj instanceof selection || typeof HTMLElement === 'object'\n ? obj instanceof HTMLElement // DOM2\n : obj && typeof obj === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string';\n }", "static _isDomElement(el) {\n try {\n return el instanceof HTMLElement;\n } catch(e) {\n //Older browser unsupported?\n throw new Error('Browser is unsupported');\n }\n }", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n }", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isElement(obj) {\n try {\n //Using W3 DOM2 (works for FF, Opera and Chrom)\n return obj instanceof HTMLElement;\n }\n catch (e) {\n //Browsers not supporting W3 DOM2 don't have HTMLElement and\n //an exception is thrown and we end up here. Testing some\n //properties that all elements have. (works on IE7)\n return (typeof obj === \"object\") && (obj.nodeType === 1) && (typeof obj.style === \"object\") && (typeof obj.ownerDocument === \"object\");\n }\n }", "function checkElem(elem) {\n return elem && elem.length > 0;\n}", "function checkElem(elem) {\n return elem && elem.length > 0;\n}", "function isElement(obj) {\n return obj instanceof d3.selection || typeof HTMLElement === 'object'\n ? obj instanceof HTMLElement // DOM2\n : obj && typeof obj === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string';\n}", "function isHTMLElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isNodeOneOf(elem,nodeTypeArray){if(nodeTypeArray.indexOf(elem.nodeName)!==-1){return true;}}", "function is(el, obj){\n return el instanceof obj\n}", "function is(el, obj){\r\n return el instanceof obj\r\n}", "function isHTMLElement(...args) {\n return args.every(arg => arg instanceof HTMLElement);\n}", "function isElement(target) {\n return !!target && typeof target['tagName'] === 'string';\n }", "function _is(el, obj) {\n return el instanceof obj;\n }", "function isFormElement(element) {\r\n \tif (!element) {\r\n \t\talert('Elemento nao informado.');\r\n \t\treturn false;\r\n \t}\r\n \t\r\n \tif (element.type && (element.type == 'text' \r\n \t\t|| element.type == 'textarea' \r\n \t\t|| element.type == 'select'\r\n \t\t|| element.type == 'select-one'\r\n \t\t|| element.type == 'select-multiple' \r\n \t\t|| element.type == 'submit' \r\n \t\t|| element.type == 'radio'\r\n \t\t|| element.type == 'hidden'\r\n \t\t|| element.type == 'checkbox')) {\r\n \t\t\r\n \t\treturn true;\r\n \t}\r\n \t\r\n \treturn false;\r\n }", "function _isValidElement( element ) {\n\t\t\tvar $element = fxcm.lib.isJqueryElement( element ) ? element : $( element );\n\t\t\treturn $element && $element.length;\n\t\t}", "function _isValidElement( element ) {\n\t\t\tvar $element = fxcm.lib.isJqueryElement( element ) ? element : $( element );\n\t\t\treturn $element && $element.length;\n\t\t}", "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", "function isNodeInDOM(node) {\n var ancestor = node;\n while (ancestor.parentNode) {\n ancestor = ancestor.parentNode;\n }\n // ancestor should be a document\n return !!ancestor.body;\n }", "function isNode(node) {\r\n return node && node.nodeType && node.nodeName &&\r\n toString.call(node) === '[object Node]';\r\n }" ]
[ "0.8382677", "0.8284299", "0.82442254", "0.82442254", "0.82243174", "0.820981", "0.8030375", "0.7993636", "0.79593444", "0.7908723", "0.79004717", "0.7876576", "0.77236146", "0.77236146", "0.77236146", "0.77236146", "0.77236146", "0.77236146", "0.77236146", "0.77236146", "0.77236146", "0.7722213", "0.7722213", "0.7722213", "0.7722213", "0.7704916", "0.7701354", "0.7678169", "0.76426536", "0.758828", "0.7578464", "0.75451463", "0.75213856", "0.75201154", "0.74827605", "0.7457997", "0.74446654", "0.74381065", "0.7412285", "0.7385209", "0.7359409", "0.7356762", "0.73558617", "0.73520064", "0.735125", "0.7346295", "0.7346295", "0.7346295", "0.73268056", "0.7306978", "0.729628", "0.7295049", "0.72895944", "0.7274102", "0.7244368", "0.7224855", "0.7169679", "0.71484447", "0.71364117", "0.7087281", "0.70627964", "0.70627964", "0.70627964", "0.6997813", "0.69817746", "0.6970366", "0.692835", "0.68860435", "0.68713146", "0.68646866", "0.68646866", "0.68646866", "0.68646866", "0.68646866", "0.68646866", "0.68574303", "0.68553996", "0.68553996", "0.6802404", "0.67919695", "0.67919695", "0.67919695", "0.67919695", "0.67919695", "0.67896247", "0.6780613", "0.6760316", "0.6709148", "0.6704985", "0.66515386", "0.6642238", "0.6640879", "0.6640879", "0.66283476", "0.661137", "0.6559388" ]
0.8041029
9
:: declare function isHTMLElement(node: mixed): boolean %checks(node instanceof HTMLElement);
function isHTMLElement(node) { var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(node).HTMLElement; return node instanceof OwnElement || node instanceof HTMLElement; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement;\n }", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n }", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(...args) {\n return args.every(arg => arg instanceof HTMLElement);\n}", "function is_dom_element(obj) {\n return !!(obj && obj.nodeType === 1);\n}", "function isElement(obj) {\n return obj instanceof HTMLElement;\n}", "function isElement(o){\n return (\n typeof HTMLElement === \"function\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\"\n );\n }", "function isElement(o){\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\"\n);\n}", "function _isElement(o){\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o.nodeType === 1 && typeof o.nodeName===\"string\"\n );\n }", "function isElement(o){\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\"\n );\n }", "function isElement(o){\n return (\n typeof HTMLElement === 'object' ? o instanceof HTMLElement : // DOM2\n o && typeof o === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName==='string'\n )\n}", "static _isDomElement(el) {\n try {\n return el instanceof HTMLElement;\n } catch(e) {\n //Older browser unsupported?\n throw new Error('Browser is unsupported');\n }\n }", "function isElement(o) {\n return typeof HTMLElement === 'object'\n ? o instanceof HTMLElement //DOM2\n : o &&\n typeof o === 'object' &&\n o !== null &&\n o.nodeType === 1 &&\n typeof o.nodeName === 'string';\n}", "function isElement(o) {\n return (typeof HTMLElement === \"object\" ? o instanceof HTMLElement : o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\");\n}", "function isElement(obj) {\n return !!((typeof HTMLElement === 'undefined' ? 'undefined' : _typeof(HTMLElement)) === 'object' ? obj instanceof HTMLElement : obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string');\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n}", "function isElement(o) {\n return (typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\");\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(o){\n\t\t\treturn (typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n\t\t\t\to && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\")\n\t\t}", "function isElement(value) { return Boolean(value) && value.nodeType === 1; }", "function isElement(o) {\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement :\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\"\n );\n }", "function isElement (o) {\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\"\n );\n }", "function isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}", "function isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}", "function isElement(o) {\n return (\n typeof HTMLElement === 'object' ? o instanceof HTMLElement : //DOM2\n o && typeof o === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName === 'string'\n );\n }", "function isElement(o){\n\t\t\treturn (\n\t\t\t\ttypeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n\t\t\t\to && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\"\n\t\t\t);\n\t\t}", "function isElement(o) {\n return !!o && o.nodeType === 1;\n}", "function isElement(obj) {\n return !!((typeof HTMLElement === 'undefined' ? 'undefined' : _typeof(HTMLElement)) === 'object' ? obj instanceof HTMLElement : obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string');\n }", "function isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement;\n }", "function isElement(o) {\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\"\n );\n }", "function isElement(o) {\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\"\n );\n }", "function isElement(o) {\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\"\n );\n }", "function isElement( o ) {\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\"\n );\n }", "function isElement(element) {\n return element instanceof Element || element instanceof HTMLDocument;\n}", "function isElement(o) {\n\t\treturn (\n\t\t\ttypeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n\t\t\to && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\"\n\t\t);\n\t}", "function isElement(el) {\n return el instanceof Object && el && el.nodeType === 1;\n}", "function isElement(domNode) {\n return domNode.nodeType !== undefined;\n}", "function isElement(obj) {\n return !!((typeof HTMLElement === 'undefined' ? 'undefined' : _typeof(HTMLElement)) === 'object' ? obj instanceof HTMLElement : obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string');\n}", "function isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n }", "function isElement(obj) {\n\treturn obj && obj.nodeType == 1;\n}", "function isElement(node) {\r\n return (node && node.nodeType === node_types.ELEMENT_NODE) || false;\r\n }", "_isElementNode(element) {\n return element.nodeType === this._document.ELEMENT_NODE;\n }", "function isElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}", "function isElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}", "function isElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}", "function isElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}", "function isElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}", "isElement (obj) { return obj instanceof Element }", "function isElement(elem){\n\treturn elem.type === \"tag\" || elem.type === \"style\" || elem.type === \"script\";\n}", "function isElement(node) {\n var nodeType = node.nodeType;\n // If the property is clobbered, we can assume it is an `HTMLFormElement`, and\n // thus an `Element`.\n return (nodeType === Node.ELEMENT_NODE) || (typeof nodeType !== 'number');\n}", "function isElement(o) {\n return o && (typeof o === 'undefined' ? 'undefined' : _typeof(o)) === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName === 'string';\n}", "function isValidElement(elem) {\n return !!elem && elem.nodeType === 1;\n }", "function isDOMElement(node) {\n return (\n node && typeof node === 'object' && node.nodeType === 1 && typeof node.nodeName === 'string'\n );\n}", "function isDomNode(thing) {\n\t return thing instanceof Node;\n\t}", "function isElement(obj) {\n return obj instanceof selection || typeof HTMLElement === 'object'\n ? obj instanceof HTMLElement // DOM2\n : obj && typeof obj === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string';\n }", "_isElementNode(element) {\n return element.nodeType === this._document.ELEMENT_NODE;\n }", "_isElementNode(element) {\n return element.nodeType === this._document.ELEMENT_NODE;\n }", "_isElementNode(element) {\n return element.nodeType === this._document.ELEMENT_NODE;\n }", "_isElementNode(element) {\n return element.nodeType === this._document.ELEMENT_NODE;\n }", "function isElement(obj) {\n try {\n //Using W3 DOM2 (works for FF, Opera and Chrom)\n return obj instanceof HTMLElement;\n }\n catch (e) {\n //Browsers not supporting W3 DOM2 don't have HTMLElement and\n //an exception is thrown and we end up here. Testing some\n //properties that all elements have. (works on IE7)\n return (typeof obj === \"object\") && (obj.nodeType === 1) && (typeof obj.style === \"object\") && (typeof obj.ownerDocument === \"object\");\n }\n }", "function isInputElement(element) {\n return element.nodeName == 'input';\n}", "function documentElementCheck () {\n const docNode = document.documentElement.nodeName;\n if (docNode) {\n return docNode.toLowerCase() === 'html';\n }\n return true;\n}", "isDOM(a) {\n if (typeof a === 'object' && a.nodeType !== undefined) {\n return true;\n }\n\n return false;\n }", "function isInputElement(element) {\n return element.nodeName.toLowerCase() == 'input';\n}", "checkNodeEl(el) {\n return el.nodeType === 1;\n }", "function isInputElement(element) {\n return element.nodeName.toLowerCase() == 'input';\n}", "function isInputElement(element) {\n return element.nodeName.toLowerCase() == 'input';\n}", "function isInputElement(element) {\n return element.nodeName.toLowerCase() == 'input';\n}", "function isElement(value) {\n return isType(value, 'Element');\n}", "function isDomNode(x) {\n return (x.nodeType != undefined);\n }", "function isElement(obj) {\n return obj instanceof d3.selection || typeof HTMLElement === 'object'\n ? obj instanceof HTMLElement // DOM2\n : obj && typeof obj === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string';\n}", "function isNodeInDOM(node) {\n var ancestor = node;\n while (ancestor.parentNode) {\n ancestor = ancestor.parentNode;\n }\n // ancestor should be a document\n return !!ancestor.body;\n }", "isElement(value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0_is_plain_object__[\"a\" /* default */])(value) && Node.isNodeList(value.children) && !Editor.isEditor(value);\n }", "function isElement(target) {\n return !!target && typeof target['tagName'] === 'string';\n }", "function isNodeLike(obj) {\n return obj && (obj.nodeType === 1 || obj.nodeType === 9);\n }", "function canUseDOM() {\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n}", "function isNode(node) {\r\n return node && node.nodeType && node.nodeName &&\r\n toString.call(node) === '[object Node]';\r\n }", "function _isNode(o){\n return (\n typeof Node === \"object\" ? o instanceof Node : \n o && typeof o === \"object\" && typeof o.nodeType === \"number\" && typeof o.nodeName===\"string\"\n );\n }", "function isNode(o){\n return (\n typeof Node === \"object\" ? o instanceof Node : \n o && typeof o === \"object\" && typeof o.nodeType === \"number\" && typeof o.nodeName===\"string\"\n );\n}", "function isHtmlNode(node) {\r\n var ns;\r\n return typeof (ns = node.namespaceURI) == UNDEF || (ns === null || ns == \"http://www.w3.org/1999/xhtml\");\r\n }", "function isRealElement(value) {\n return value instanceof Element;\n}", "function is(el, obj){\n return el instanceof obj\n}", "function isNode(o) {\n return (typeof Node === \"object\" ? o instanceof Node : o && typeof o === \"object\" && typeof o.nodeType === \"number\" && typeof o.nodeName === \"string\");\n}" ]
[ "0.8737659", "0.8675658", "0.86612", "0.86612", "0.86612", "0.86612", "0.86612", "0.86612", "0.7916347", "0.7902608", "0.7893526", "0.78727096", "0.7868743", "0.78667384", "0.7830389", "0.7815138", "0.7805558", "0.7801422", "0.7790422", "0.7715513", "0.76926965", "0.76883626", "0.76818514", "0.76818514", "0.76818514", "0.76818514", "0.76818514", "0.76818514", "0.76818514", "0.76818514", "0.76818514", "0.76778114", "0.7672897", "0.76539546", "0.7652869", "0.7652009", "0.7652009", "0.7644876", "0.7642252", "0.76401985", "0.76385", "0.76365", "0.7633558", "0.7633558", "0.7633558", "0.7626962", "0.7617594", "0.7613527", "0.7606037", "0.7581952", "0.7578725", "0.7567518", "0.751706", "0.74918914", "0.7481879", "0.7454065", "0.7454065", "0.7454065", "0.7454065", "0.7454065", "0.74317425", "0.7421991", "0.73764044", "0.73316246", "0.7328533", "0.73138154", "0.72589076", "0.72182786", "0.7182242", "0.7182242", "0.7182242", "0.7182242", "0.7173452", "0.71568984", "0.7121759", "0.7113776", "0.7058432", "0.70429206", "0.70402086", "0.70402086", "0.70402086", "0.6980265", "0.69607496", "0.69591665", "0.6949851", "0.685913", "0.685519", "0.67534006", "0.67214334", "0.66525346", "0.66146684", "0.66055775", "0.6590503", "0.6531959", "0.65033233", "0.6467794" ]
0.86149305
11
:: declare function isShadowRoot(node: mixed): boolean %checks(node instanceof ShadowRoot);
function isShadowRoot(node) { var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(node).ShadowRoot; return node instanceof OwnElement || node instanceof ShadowRoot; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isShadowRoot(node) {\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}", "function isShadowRoot(node) {\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}", "function isShadowRoot(node) {\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}", "function isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}", "function isNodeFromTemplate(node) {\n if (isFalse$3(node instanceof Node)) {\n return false;\n } // TODO [#1250]: skipping the shadowRoot instances itself makes no sense, we need to revisit\n // this with locker\n\n\n if (node instanceof ShadowRoot) {\n return false;\n }\n\n if (useSyntheticShadow) {\n // TODO [#1252]: old behavior that is still used by some pieces of the platform,\n // specifically, nodes inserted manually on places where `lwc:dom=\"manual\"` directive is not\n // used, will be considered global elements.\n if (isUndefined$4(node.$shadowResolver$)) {\n return false;\n }\n }\n\n const root = node.getRootNode();\n return root instanceof ShadowRoot;\n }", "function isShadowRoot(nodeImpl) {\n return Boolean(nodeImpl && nodeImpl.nodeType === NODE_TYPE.DOCUMENT_FRAGMENT_NODE && \"host\" in nodeImpl);\n}", "function shadowTree_isConnected(element) {\n /**\n * An element is connected if its shadow-including root is a document.\n */\n return util_1.Guard.isDocumentNode(TreeAlgorithm_1.tree_rootNode(element, true));\n}", "function isNodeInDOM(node) {\n var ancestor = node;\n while (ancestor.parentNode) {\n ancestor = ancestor.parentNode;\n }\n // ancestor should be a document\n return !!ancestor.body;\n }", "function isRoot() {\n return this.source === this.value;\n}", "isRootElement() {\n return !this.parent;\n }", "_isElementNode(element) {\n return element.nodeType === this._document.ELEMENT_NODE;\n }", "function _supportsShadowDom() {\n if (shadowDomIsSupported == null) {\n const head = typeof document !== 'undefined' ? document.head : null;\n shadowDomIsSupported = !!(head && (head.createShadowRoot || head.attachShadow));\n }\n\n return shadowDomIsSupported;\n}", "function _supportsShadowDom() {\n if (shadowDomIsSupported == null) {\n const head = typeof document !== 'undefined' ? document.head : null;\n shadowDomIsSupported = !!(head && (head.createShadowRoot || head.attachShadow));\n }\n return shadowDomIsSupported;\n}", "function _supportsShadowDom() {\n if (shadowDomIsSupported == null) {\n const head = typeof document !== 'undefined' ? document.head : null;\n shadowDomIsSupported = !!(head && (head.createShadowRoot || head.attachShadow));\n }\n return shadowDomIsSupported;\n}", "function isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement;\n }", "function _supportsShadowDom() {\n if (shadowDomIsSupported == null) {\n var head = typeof document !== 'undefined' ? document.head : null;\n shadowDomIsSupported = !!(head && (head.createShadowRoot || head.attachShadow));\n }\n\n return shadowDomIsSupported;\n }", "function isDOMElement(node) {\n return (\n node && typeof node === 'object' && node.nodeType === 1 && typeof node.nodeName === 'string'\n );\n}", "function hasStylingInputShadow(tNode, isClassBased) {\n return (tNode.flags & (isClassBased ? 16\n /* hasClassInput */\n : 32\n /* hasStyleInput */\n )) !== 0;\n}", "function isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}", "function isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}", "function isNode(node) {\r\n return node && node.nodeType && node.nodeName &&\r\n toString.call(node) === '[object Node]';\r\n }", "_isElementNode(element) {\n return element.nodeType === this._document.ELEMENT_NODE;\n }", "_isElementNode(element) {\n return element.nodeType === this._document.ELEMENT_NODE;\n }", "_isElementNode(element) {\n return element.nodeType === this._document.ELEMENT_NODE;\n }", "_isElementNode(element) {\n return element.nodeType === this._document.ELEMENT_NODE;\n }", "function isElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}", "function isElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}", "function isElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}", "function isElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}", "function isElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}", "function hasStylingInputShadow(tNode, isClassBased) {\n return (tNode.flags & (isClassBased ? 16 /* hasClassInput */ : 32 /* hasStyleInput */)) !== 0;\n}", "function hasStylingInputShadow(tNode, isClassBased) {\n return (tNode.flags & (isClassBased ? 16 /* hasClassInput */ : 32 /* hasStyleInput */)) !== 0;\n}", "function hasStylingInputShadow(tNode, isClassBased) {\n return (tNode.flags & (isClassBased ? 16 /* hasClassInput */ : 32 /* hasStyleInput */)) !== 0;\n}", "function hasStylingInputShadow(tNode, isClassBased) {\n return (tNode.flags & (isClassBased ? 16 /* hasClassInput */ : 32 /* hasStyleInput */)) !== 0;\n}", "function hasStylingInputShadow(tNode, isClassBased) {\n return (tNode.flags & (isClassBased ? 16 /* hasClassInput */ : 32 /* hasStyleInput */)) !== 0;\n}", "function hasStylingInputShadow(tNode, isClassBased) {\n return (tNode.flags & (isClassBased ? 16 /* hasClassInput */ : 32 /* hasStyleInput */)) !== 0;\n}", "function isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n }", "isAtRootLevel() {\n return this.namespaceAndFunctionDepth === 0;\n }", "checkIfContainer(container){\n return container.hasOwnProperty('children');\n }", "function hasStylingInputShadow(tNode, isClassBased) {\n return (tNode.flags & (isClassBased ? 16\n /* hasClassInput */\n : 32\n /* hasStyleInput */\n )) !== 0;\n }", "function isElement(domNode) {\n return domNode.nodeType !== undefined;\n}", "function is_dom_element(obj) {\n return !!(obj && obj.nodeType === 1);\n}", "isRoot () {\r\n return this.parent === null\r\n }", "_isAttachedToDOM() {\n const element = this._elementRef.nativeElement;\n if (element.getRootNode) {\n const rootNode = element.getRootNode();\n // If the element is inside the DOM the root node will be either the document\n // or the closest shadow root, otherwise it'll be the element itself.\n return rootNode && rootNode !== element;\n }\n // Otherwise fall back to checking if it's in the document. This doesn't account for\n // shadow DOM, however browser that support shadow DOM should support `getRootNode` as well.\n return document.documentElement.contains(element);\n }", "function isNodeLike(obj) {\n return obj && (obj.nodeType === 1 || obj.nodeType === 9);\n }", "function checkElementIdShadowing(value) {\n return value && value.nodeType === undefined ? value : undefined;\n }", "function checkElementIdShadowing(value) {\n return value && value.nodeType === undefined ? value : undefined;\n }", "function checkElementIdShadowing(value) {\n return value && value.nodeType === undefined ? value : undefined;\n }", "function checkElementIdShadowing(value) {\n return value && value.nodeType === undefined ? value : undefined;\n }", "function checkElementIdShadowing(value) {\n return value && value.nodeType === undefined ? value : undefined;\n }", "function checkElementIdShadowing(value) {\n return value && value.nodeType === undefined ? value : undefined;\n}", "function checkElementIdShadowing(value) {\n return value && value.nodeType === undefined ? value : undefined;\n}", "isElement(value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0_is_plain_object__[\"a\" /* default */])(value) && Node.isNodeList(value.children) && !Editor.isEditor(value);\n }", "isDOM(a) {\n if (typeof a === 'object' && a.nodeType !== undefined) {\n return true;\n }\n\n return false;\n }", "function hasChildNodes(node) {\n return firstChild(node) != null;\n}", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement;\n }", "get shadowEnabled() {\n let shadow = false\n this.clip._root.children.forEach(elt => shadow = elt.castShadow)\n return shadow\n }", "function _isNode(o){\n return (\n typeof Node === \"object\" ? o instanceof Node : \n o && typeof o === \"object\" && typeof o.nodeType === \"number\" && typeof o.nodeName===\"string\"\n );\n }", "function forRoots(node, cb) {\n var root = node.shadowRoot;\n while(root) {\n forSubtree(root, cb);\n root = root.olderShadowRoot;\n }\n}", "function isBoxShadow(obj, key) {\n if(key === 'shadowOffset') {\n if(Object.keys(obj).length === 2 && 'width' in obj && 'height' in obj) {\n return true;\n }\n }\n return false;\n}", "function isBoxShadow(obj, key) {\n if(key === 'shadowOffset') {\n if(Object.keys(obj).length === 2 && 'width' in obj && 'height' in obj) {\n return true;\n }\n }\n return false;\n}", "function getRoot(node) \r\n {\r\n for (; node; node = node.parentNode) {\r\n if (node.toString() === \"[object ShadowRoot]\") {\r\n return node;\r\n }\r\n }\r\n return document;\r\n }", "function isNode(source){\n if (window.Node) {\n return source instanceof Node;\n }\n else {\n // the document is a special Node and doesn't have many of\n // the common properties so we use an identity check instead.\n if (source === document) \n return true;\n return (typeof source.nodeType === 'number' &&\n source.attributes &&\n source.childNodes &&\n source.cloneNode);\n }\n }", "function isNode(source) {\r\n return false; // LJF change here -- I don't care that I am breaking\r\n // this for the browser. at all.\r\n if ( window.Node ) {\r\n return source instanceof Node;\r\n } else {\r\n // the document is a special Node and doesn't have many of\r\n // the common properties so we use an identity check instead.\r\n if ( source === document ) return true;\r\n return (\r\n typeof source.nodeType === 'number' &&\r\n\tsource.attributes &&\r\n\tsource.childNodes &&\r\n\tsource.cloneNode\r\n );\r\n }\r\n}", "function isNode(o){\n return (\n typeof Node === \"object\" ? o instanceof Node : \n o && typeof o === \"object\" && typeof o.nodeType === \"number\" && typeof o.nodeName===\"string\"\n );\n}", "function isNode(source) {\r\n if ( window.Node ) {\r\n return source instanceof Node;\r\n } else {\r\n // the document is a special Node and doesn't have many of\r\n // the common properties so we use an identity check instead.\r\n if ( source === document ) return true;\r\n return (\r\n typeof source.nodeType === 'number' &&\r\n source.attributes &&\r\n source.childNodes &&\r\n source.cloneNode\r\n );\r\n }\r\n }", "isRoot() {\nreturn this.parent === null;\n}", "checkNodeEl(el) {\n return el.nodeType === 1;\n }", "get isRoot() {\r\n return !this.parent;\r\n }", "connectedCallback() {\n \tsuper.connectedCallback();\n \t\n \tvar element = this;\n while(element.parentNode && (element = element.parentNode)) {\n if(element instanceof ShadowRoot){\n console.error(\"This element does not support shadow roots. Please use a <slot> for the element instead.\", element);\n }\n }\n }", "has(_shadow, _prop) {\n return true;\n }", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isDomNode(thing) {\n\t return thing instanceof Node;\n\t}", "function documentElementCheck () {\n const docNode = document.documentElement.nodeName;\n if (docNode) {\n return docNode.toLowerCase() === 'html';\n }\n return true;\n}", "function isHTMLElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isDomNode(x) {\n return (x.nodeType != undefined);\n }", "function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n }", "function shouldExamineNode(n) {\n return !(ts.isBlock(n) || ts.isModuleBlock(n) || ts.isModuleDeclaration(n) ||\n ts.isSourceFile(n) || (n.parent && ts.isTypeNode(n.parent)) ||\n ts.isJSDoc(n) || isInStockLibraries(n));\n}", "function checkSubtree() {\n \n}", "function isNode(o) {\n return (\n typeof Node === 'object' ? o instanceof Node :\n o && typeof o === 'object' && typeof o.nodeType === 'number' && typeof o.nodeName === 'string'\n );\n }", "function isNode(nodeImpl) {\n return Boolean(nodeImpl && \"nodeType\" in nodeImpl);\n}", "function isNode(o) {\n return (typeof Node === \"object\" ? o instanceof Node : o && typeof o === \"object\" && typeof o.nodeType === \"number\" && typeof o.nodeName === \"string\");\n}", "function isNode(x) {\n return x !== null && typeof x === \"object\" && typeof x.type === \"string\";\n}", "function isNode(o) {\n return (\n typeof Node === \"object\" ? o instanceof Node :\n o && typeof o === \"object\" && typeof o.nodeType === \"number\" && typeof o.nodeName === \"string\"\n );\n }", "function hasAsChild(root, child) {\n var length = root.children.length;\n for (var i = 0; i < length; i += 1) {\n /* istanbul ignore else */\n if (root.children.item(i) === child) {\n return true;\n }\n }\n return false;\n}", "function isElement(node) {\r\n return (node && node.nodeType === node_types.ELEMENT_NODE) || false;\r\n }", "isRootFound() {\n return Boolean(this.config.root);\n }", "function isNode(o) {\n return (typeof Node === \"object\" ? o instanceof Node :\n o && typeof o === \"object\" && typeof o.nodeType === \"number\" && typeof o.nodeName === \"string\");\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }" ]
[ "0.8680744", "0.8680744", "0.8680744", "0.8438347", "0.76588", "0.7561594", "0.7287328", "0.6510092", "0.6408967", "0.63789946", "0.6372652", "0.6343795", "0.6338062", "0.6338062", "0.6333699", "0.6287767", "0.6284319", "0.6242045", "0.6234838", "0.6234838", "0.6209619", "0.6203672", "0.6203672", "0.6203672", "0.6203672", "0.6197937", "0.6197937", "0.6197937", "0.6197937", "0.6197937", "0.6192695", "0.6192695", "0.6192695", "0.6192695", "0.6192695", "0.6192695", "0.6175797", "0.61710495", "0.61635906", "0.6121764", "0.6117748", "0.610471", "0.6092705", "0.60835147", "0.60758185", "0.6066153", "0.6066153", "0.6066153", "0.6066153", "0.6066153", "0.60577416", "0.60577416", "0.6046363", "0.6015342", "0.60050875", "0.59946275", "0.599023", "0.59599036", "0.5950616", "0.59339607", "0.59339607", "0.5933157", "0.5930388", "0.5913831", "0.5913436", "0.5912369", "0.5909906", "0.5906181", "0.58922845", "0.5889414", "0.5884255", "0.58838975", "0.58838975", "0.58838975", "0.58838975", "0.58838975", "0.58838975", "0.58803076", "0.586693", "0.5865895", "0.5865895", "0.5865895", "0.5865895", "0.5865895", "0.5862794", "0.58543634", "0.5824439", "0.5820864", "0.5819708", "0.58151126", "0.5803713", "0.580209", "0.5794418", "0.5793796", "0.5775894", "0.57719094", "0.57667106", "0.57615215", "0.57615215" ]
0.85925835
4
given a DOM element, return the list of all scroll parents, up the list of ancesors until we get to the top window object. This list is what we attach scroll listeners to, because if any of these parent elements scroll, we'll need to recalculate the reference element's position.
function listScrollParents(element, list) { if (list === void 0) { list = []; } var scrollParent = Object(_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(element); var isBody = Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_2__["default"])(scrollParent) === 'body'; var win = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_3__["default"])(scrollParent); var target = isBody ? [win].concat(win.visualViewport || [], Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_4__["default"])(scrollParent) ? scrollParent : []) : scrollParent; var updatedList = list.concat(target); return isBody ? updatedList : // $FlowFixMe: isBody tells us target will be an HTMLElement here updatedList.concat(listScrollParents(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_1__["default"])(target))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listScrollParents(element,list){var _element$ownerDocumen;if(list===void 0){list=[];}var scrollParent=getScrollParent(element);var isBody=scrollParent===((_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body);var win=getWindow(scrollParent);var target=isBody?[win].concat(win.visualViewport||[],isScrollParent(scrollParent)?scrollParent:[]):scrollParent;var updatedList=list.concat(target);return isBody?updatedList:// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\nupdatedList.concat(listScrollParents(getParentNode(target)));}", "function listScrollParents(element,list){var _element$ownerDocumen;if(list===void 0){list=[];}var scrollParent=getScrollParent(element);var isBody=scrollParent===((_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body);var win=getWindow(scrollParent);var target=isBody?[win].concat(win.visualViewport||[],isScrollParent(scrollParent)?scrollParent:[]):scrollParent;var updatedList=list.concat(target);return isBody?updatedList:// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\nupdatedList.concat(listScrollParents(getParentNode(target)));}", "function listScrollParents$1(element,list){var _element$ownerDocumen;if(list===void 0){list=[];}var scrollParent=getScrollParent$1(element);var isBody=scrollParent===((_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body);var win=getWindow$1(scrollParent);var target=isBody?[win].concat(win.visualViewport||[],isScrollParent$1(scrollParent)?scrollParent:[]):scrollParent;var updatedList=list.concat(target);return isBody?updatedList:// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\nupdatedList.concat(listScrollParents$1(getParentNode$1(target)));}", "getAncestorScrollContainers(elementRef) {\n const scrollingContainers = [];\n this.scrollContainers.forEach((_subscription, scrollable) => {\n if (this._scrollableContainsElement(scrollable, elementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n return scrollingContainers;\n }", "getAncestorScrollContainers(elementOrElementRef) {\n const scrollingContainers = [];\n this.scrollContainers.forEach((_subscription, scrollable) => {\n if (this._scrollableContainsElement(scrollable, elementOrElementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n return scrollingContainers;\n }", "getAncestorScrollContainers(elementOrElementRef) {\n const scrollingContainers = [];\n this.scrollContainers.forEach((_subscription, scrollable) => {\n if (this._scrollableContainsElement(scrollable, elementOrElementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n return scrollingContainers;\n }", "getAncestorScrollContainers(elementOrElementRef) {\n const scrollingContainers = [];\n this.scrollContainers.forEach((_subscription, scrollable) => {\n if (this._scrollableContainsElement(scrollable, elementOrElementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n return scrollingContainers;\n }", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = Object(_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = Object(_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = Object(_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], Object(_isScrollParent_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n if (list === void 0) {\n list = [];\n }\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList :\n // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n }", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = (0,_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__.default)(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = (0,_getWindow_js__WEBPACK_IMPORTED_MODULE_1__.default)(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_2__.default)(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_3__.default)(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = (0,_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__.default)(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = (0,_getWindow_js__WEBPACK_IMPORTED_MODULE_1__.default)(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_2__.default)(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_3__.default)(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = (0,_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__.default)(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = (0,_getWindow_js__WEBPACK_IMPORTED_MODULE_1__.default)(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_2__.default)(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_3__.default)(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = (0,_getScrollParent_js__WEBPACK_IMPORTED_MODULE_0__.default)(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = (0,_getWindow_js__WEBPACK_IMPORTED_MODULE_1__.default)(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], (0,_isScrollParent_js__WEBPACK_IMPORTED_MODULE_2__.default)(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_3__.default)(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}", "function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n }", "function getClippingParents(el) {\n var parents = [];\n while (el instanceof HTMLElement) { // will stop when gets to document or null\n var computedStyle = window.getComputedStyle(el);\n if (computedStyle.position === 'fixed') {\n break;\n }\n if ((/(auto|scroll)/).test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {\n parents.push(el);\n }\n el = el.parentNode;\n }\n return parents;\n}", "function getClippingParents(el) {\n var parents = [];\n\n while (el instanceof HTMLElement) {\n // will stop when gets to document or null\n var computedStyle = window.getComputedStyle(el);\n\n if (computedStyle.position === 'fixed') {\n break;\n }\n\n if (/(auto|scroll)/.test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {\n parents.push(el);\n }\n\n el = el.parentNode;\n }\n\n return parents;\n }", "function getClippingParents(el) {\n var parents = [];\n while (el instanceof HTMLElement) { // will stop when gets to document or null\n var computedStyle = window.getComputedStyle(el);\n if (computedStyle.position === 'fixed') {\n break;\n }\n if ((/(auto|scroll)/).test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {\n parents.push(el);\n }\n el = el.parentNode;\n }\n return parents;\n }", "function getClippingParents(el) {\n var parents = [];\n while (el instanceof HTMLElement) { // will stop when gets to document or null\n var computedStyle = window.getComputedStyle(el);\n if (computedStyle.position === 'fixed') {\n break;\n }\n if ((/(auto|scroll)/).test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {\n parents.push(el);\n }\n el = el.parentNode;\n }\n return parents;\n }", "function getClippingParents(el) {\n var parents = [];\n while (el instanceof HTMLElement) { // will stop when gets to document or null\n var computedStyle = window.getComputedStyle(el);\n if (computedStyle.position === 'fixed') {\n break;\n }\n if ((/(auto|scroll)/).test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {\n parents.push(el);\n }\n el = el.parentNode;\n }\n return parents;\n }", "function getClippingParents(el) {\n var parents = [];\n while (el instanceof HTMLElement) { // will stop when gets to document or null\n var computedStyle = window.getComputedStyle(el);\n if (computedStyle.position === 'fixed') {\n break;\n }\n if ((/(auto|scroll)/).test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {\n parents.push(el);\n }\n el = el.parentNode;\n }\n return parents;\n }", "ancestorScrolled(elementOrElementRef, auditTimeInMs) {\n const ancestors = this.getAncestorScrollContainers(elementOrElementRef);\n return this.scrolled(auditTimeInMs).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_7__.filter)(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }", "ancestorScrolled(elementOrElementRef, auditTimeInMs) {\n const ancestors = this.getAncestorScrollContainers(elementOrElementRef);\n return this.scrolled(auditTimeInMs).pipe(filter(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }", "function overflowingAncestor(el) {\n var elems = [];\n var body = document.body;\n var rootScrollHeight = root.scrollHeight;\n do {\n var cached = getCache(el, false);\n if (cached) {\n return setCache(elems, cached);\n }\n elems.push(el);\n if (rootScrollHeight === el.scrollHeight) {\n var topOverflowsNotHidden = overflowNotHidden(root) && overflowNotHidden(body);\n var isOverflowCSS = topOverflowsNotHidden || overflowAutoOrScroll(root);\n if (isFrame && isContentOverflowing(root) || \n !isFrame && isOverflowCSS) {\n return setCache(elems, getScrollRoot()); \n }\n } else if (isContentOverflowing(el) && overflowAutoOrScroll(el)) {\n return setCache(elems, el);\n }\n } while ((el = el.parentElement));\n }", "function overflowingAncestor(el) {\n var elems = [];\n var body = document.body;\n var rootScrollHeight = root.scrollHeight;\n do {\n var cached = getCache(el, false);\n if (cached) {\n return setCache(elems, cached);\n }\n elems.push(el);\n if (rootScrollHeight === el.scrollHeight) {\n var topOverflowsNotHidden = overflowNotHidden(root) && overflowNotHidden(body);\n var isOverflowCSS = topOverflowsNotHidden || overflowAutoOrScroll(root);\n if (isFrame && isContentOverflowing(root) || \n !isFrame && isOverflowCSS) {\n return setCache(elems, getScrollRoot()); \n }\n } else if (isContentOverflowing(el) && overflowAutoOrScroll(el)) {\n return setCache(elems, el);\n }\n } while ((el = el.parentElement));\n }", "ancestorScrolled(elementOrElementRef, auditTimeInMs) {\n const ancestors = this.getAncestorScrollContainers(elementOrElementRef);\n return this.scrolled(auditTimeInMs).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__[\"filter\"])(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }", "function getScrollParent(element, includeHidden) {\n var LAST_RESORT = document.documentElement;\n var style = getComputedStyle(element);\n var excludeStaticParent = style.position === \"absolute\";\n var overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/;\n\n if (style.position === \"fixed\")\n return LAST_RESORT;\n for (var parent = element; parent = parent.parentElement;) {\n style = getComputedStyle(parent);\n if (excludeStaticParent && style.position === \"static\") {\n continue;\n }\n if (overflowRegex.test(style.overflow + style.overflowY + style.overflowX))\n return parent;\n }\n\n return LAST_RESORT;\n}", "function getScrollParent(element){var style=window.getComputedStyle(element);var excludeStaticParent=style.position===\"absolute\";var overflowRegex=/(auto|scroll)/;if(style.position===\"fixed\")return document.body;for(var parent=element;parent=parent.parentElement;){style=window.getComputedStyle(parent);if(excludeStaticParent&&style.position===\"static\"){continue;}if(overflowRegex.test(style.overflow+style.overflowY+style.overflowX))return parent;}return document.body;}", "ancestorScrolled(elementRef, auditTimeInMs) {\n const ancestors = this.getAncestorScrollContainers(elementRef);\n return this.scrolled(auditTimeInMs).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__[\"filter\"])(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }", "function overflowingAncestor(el) {\n var elems = [];\n var body = document.body;\n var rootScrollHeight = root.scrollHeight;\n do {\n var cached = cache[uniqueID(el)];\n if (cached) {\n return setCache(elems, cached);\n }\n elems.push(el);\n if (rootScrollHeight === el.scrollHeight) {\n var topOverflowsNotHidden = overflowNotHidden(root) && overflowNotHidden(body);\n var isOverflowCSS = topOverflowsNotHidden || overflowAutoOrScroll(root);\n if (isFrame && isContentOverflowing(root) || !isFrame && isOverflowCSS) {\n return setCache(elems, getScrollRoot());\n }\n } else if (isContentOverflowing(el) && overflowAutoOrScroll(el)) {\n return setCache(elems, el);\n }\n } while (el = el.parentElement);\n }", "function overflowingAncestor(el) {\n var elems = [];\n var body = document.body;\n var rootScrollHeight = root.scrollHeight;\n do {\n var cached = cache[uniqueID(el)];\n if (cached) {\n return setCache(elems, cached);\n }\n elems.push(el);\n if (rootScrollHeight === el.scrollHeight) {\n var topOverflowsNotHidden = overflowNotHidden(root) && overflowNotHidden(body);\n var isOverflowCSS = topOverflowsNotHidden || overflowAutoOrScroll(root);\n if (isFrame && isContentOverflowing(root) || \n !isFrame && isOverflowCSS) {\n return setCache(elems, getScrollRoot()); \n }\n } else if (isContentOverflowing(el) && overflowAutoOrScroll(el)) {\n return setCache(elems, el);\n }\n } while (el = el.parentElement);\n}", "function overflowingAncestor(el) {\n var elems = [];\n var body = document.body;\n var rootScrollHeight = root.scrollHeight;\n do {\n var cached = cache[uniqueID(el)];\n if (cached) {\n return setCache(elems, cached);\n }\n elems.push(el);\n if (rootScrollHeight === el.scrollHeight) {\n var topOverflowsNotHidden = overflowNotHidden(root) && overflowNotHidden(body);\n var isOverflowCSS = topOverflowsNotHidden || overflowAutoOrScroll(root);\n if (isFrame && isContentOverflowing(root) || \n !isFrame && isOverflowCSS) {\n return setCache(elems, getScrollRoot()); \n }\n } else if (isContentOverflowing(el) && overflowAutoOrScroll(el)) {\n return setCache(elems, el);\n }\n } while (el = el.parentElement);\n}", "function bindAncestorScrollEvents() {\n var elem = (hasFrozenRows && !options.frozenBottom) ? $canvasBottomL[0] : $canvasTopL[0];\n while ((elem = elem.parentNode) != document.body && elem != null) {\n // bind to scroll containers only\n if (elem == $viewportTopL[0] || elem.scrollWidth != elem.clientWidth || elem.scrollHeight != elem.clientHeight) {\n var $elem = $(elem);\n if (!$boundAncestors) {\n $boundAncestors = $elem;\n } else {\n $boundAncestors = $boundAncestors.add($elem);\n }\n $elem.on(\"scroll.\" + uid, handleActiveCellPositionChange);\n }\n }\n }", "function overflowingAncestor(el) {\r\n var elems = [];\r\n var body = document.body;\r\n var rootScrollHeight = root.scrollHeight;\r\n do {\r\n var cached = cache[uniqueID(el)];\r\n if (cached) {\r\n return setCache(elems, cached);\r\n }\r\n elems.push(el);\r\n if (rootScrollHeight === el.scrollHeight) {\r\n var topOverflowsNotHidden = overflowNotHidden(root) && overflowNotHidden(body);\r\n var isOverflowCSS = topOverflowsNotHidden || overflowAutoOrScroll(root);\r\n if (isFrame && isContentOverflowing(root) || \r\n !isFrame && isOverflowCSS) {\r\n return setCache(elems, getScrollRoot()); \r\n }\r\n } else if (isContentOverflowing(el) && overflowAutoOrScroll(el)) {\r\n return setCache(elems, el);\r\n }\r\n } while (el = el.parentElement);\r\n}", "function overflowingAncestor(el) {\r\n var elems = [];\r\n var body = document.body;\r\n var rootScrollHeight = root.scrollHeight;\r\n do {\r\n var cached = cache[uniqueID(el)];\r\n if (cached) {\r\n return setCache(elems, cached);\r\n }\r\n elems.push(el);\r\n if (rootScrollHeight === el.scrollHeight) {\r\n var topOverflowsNotHidden = overflowNotHidden(root) && overflowNotHidden(body);\r\n var isOverflowCSS = topOverflowsNotHidden || overflowAutoOrScroll(root);\r\n if (isFrame && isContentOverflowing(root) || \r\n !isFrame && isOverflowCSS) {\r\n return setCache(elems, getScrollRoot()); \r\n }\r\n } else if (isContentOverflowing(el) && overflowAutoOrScroll(el)) {\r\n return setCache(elems, el);\r\n }\r\n } while (el = el.parentElement);\r\n}", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement);\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement);\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement);\n });\n } // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement);\n });\n } // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(element);\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement);\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = Object(_listScrollParents_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(element).position) >= 0;\n var clipperElement = canEscapeClipping && Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isHTMLElement\"])(element) ? Object(_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(element) : element;\n\n if (!Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_7__[\"isElement\"])(clippingParent) && Object(_contains_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(clippingParent, clipperElement) && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getScrollParent(el){var position=el.css('position');var scrollParent=el.parents().filter(function(){var parent=$(this);return /(auto|scroll)/.test(parent.css('overflow')+parent.css('overflow-y')+parent.css('overflow-x'));}).eq(0);return position==='fixed'||!scrollParent.length?$(el[0].ownerDocument||document):scrollParent;}", "function GetScrolledParent(ele){ //returns a parent element for which scrolling is active. null if no scrolling\n\tvar p = ele.parentElement;\n\twhile(p){\n\t\tif (p.scrollHeight > p.offsetHeight) return p;// we could have checked for overflow, but this test\n\t\t\t\t\t\t\t\t\t\t\t\t\t // ensure that the region is indeed being scrolled\n\t\tp = p.parentElement;\n\t}\n\treturn null; //no scrolling parent..\n}", "function getClippingParents(element){var clippingParents=listScrollParents(getParentNode(element));var canEscapeClipping=['absolute','fixed'].indexOf(getComputedStyle$1(element).position)>=0;var clipperElement=canEscapeClipping&&isHTMLElement(element)?getOffsetParent(element):element;if(!isElement(clipperElement)){return [];}// $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\nreturn clippingParents.filter(function(clippingParent){return isElement(clippingParent)&&contains(clippingParent,clipperElement)&&getNodeName(clippingParent)!=='body';});}// Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element){var clippingParents=listScrollParents(getParentNode(element));var canEscapeClipping=['absolute','fixed'].indexOf(getComputedStyle(element).position)>=0;var clipperElement=canEscapeClipping&&isHTMLElement(element)?getOffsetParent(element):element;if(!isElement(clipperElement)){return [];}// $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\nreturn clippingParents.filter(function(clippingParent){return isElement(clippingParent)&&contains(clippingParent,clipperElement)&&getNodeName(clippingParent)!=='body';});}// Gets the maximum area that the element is visible in due to any number of", "function getScrollEventTarget(element, rootParent) {\n if (rootParent === void 0) {\n rootParent = window;\n }\n\n var node = element;\n\n while (node && node.tagName !== 'HTML' && node.tagName !== 'BODY' && node.nodeType === 1 && node !== rootParent) {\n var _window$getComputedSt = window.getComputedStyle(node),\n overflowY = _window$getComputedSt.overflowY;\n\n if (overflowY === 'scroll' || overflowY === 'auto') {\n return node;\n }\n\n node = node.parentNode;\n }\n\n return rootParent;\n}", "function getClippingParents(element) {\n const clippingParents = getScrollParents(getParentNode(element));\n const canEscapeClipping = ['absolute', 'fixed'].includes(getComputedStyle$1(element).position);\n const clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // @ts-ignore isElement check ensures we return Array<Element>\n\n\n return clippingParents.filter(clippingParent => isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body');\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getScrollParent(parent, child) {\n var element = child;\n var scrollTop = 0;\n\n while (element && element !== parent) {\n element = element.parentNode;\n scrollTop += element.scrollTop;\n }\n return scrollTop;\n}", "function getScrollParent(parent, child) {\n var element = child;\n var scrollTop = 0;\n\n while (element && element !== parent) {\n element = element.parentNode;\n scrollTop += element.scrollTop;\n }\n return scrollTop;\n}", "function getScrollParent(parent, child) {\n var element = child;\n var scrollTop = 0;\n\n while (element && element !== parent) {\n element = element.parentNode;\n scrollTop += element.scrollTop;\n }\n return scrollTop;\n}", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n } // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = (0,_listScrollParents_js__WEBPACK_IMPORTED_MODULE_7__.default)((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_8__.default)(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_9__.default)(element).position) >= 0;\n var clipperElement = canEscapeClipping && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isHTMLElement)(element) ? (0,_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__.default)(element) : element;\n\n if (!(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clippingParent) && (0,_contains_js__WEBPACK_IMPORTED_MODULE_11__.default)(clippingParent, clipperElement) && (0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_12__.default)(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = (0,_listScrollParents_js__WEBPACK_IMPORTED_MODULE_7__.default)((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_8__.default)(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_9__.default)(element).position) >= 0;\n var clipperElement = canEscapeClipping && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isHTMLElement)(element) ? (0,_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__.default)(element) : element;\n\n if (!(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clippingParent) && (0,_contains_js__WEBPACK_IMPORTED_MODULE_11__.default)(clippingParent, clipperElement) && (0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_12__.default)(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = (0,_listScrollParents_js__WEBPACK_IMPORTED_MODULE_7__.default)((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_8__.default)(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_9__.default)(element).position) >= 0;\n var clipperElement = canEscapeClipping && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isHTMLElement)(element) ? (0,_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__.default)(element) : element;\n\n if (!(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clippingParent) && (0,_contains_js__WEBPACK_IMPORTED_MODULE_11__.default)(clippingParent, clipperElement) && (0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_12__.default)(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = (0,_listScrollParents_js__WEBPACK_IMPORTED_MODULE_7__.default)((0,_getParentNode_js__WEBPACK_IMPORTED_MODULE_8__.default)(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf((0,_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_9__.default)(element).position) >= 0;\n var clipperElement = canEscapeClipping && (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isHTMLElement)(element) ? (0,_getOffsetParent_js__WEBPACK_IMPORTED_MODULE_10__.default)(element) : element;\n\n if (!(0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return (0,_instanceOf_js__WEBPACK_IMPORTED_MODULE_4__.isElement)(clippingParent) && (0,_contains_js__WEBPACK_IMPORTED_MODULE_11__.default)(clippingParent, clipperElement) && (0,_getNodeName_js__WEBPACK_IMPORTED_MODULE_12__.default)(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains$1(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n } // Gets the maximum area that the element is visible in due to any number of", "function getClippingParents(element) {\n var clippingParents = _listScrollParentsJsDefault.default(_getParentNodeJsDefault.default(element));\n var canEscapeClipping = [\n 'absolute',\n 'fixed'\n ].indexOf(_getComputedStyleJsDefault.default(element).position) >= 0;\n var clipperElement = canEscapeClipping && _instanceOfJs.isHTMLElement(element) ? _getOffsetParentJsDefault.default(element) : element;\n if (!_instanceOfJs.isElement(clipperElement)) return [];\n // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n return clippingParents.filter(function(clippingParent) {\n return _instanceOfJs.isElement(clippingParent) && _containsJsDefault.default(clippingParent, clipperElement) && _getNodeNameJsDefault.default(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of", "function parents(element) {\n var list = []\n while (element.parentNode && element.parentNode.nodeType == 1) {\n list.push(element = element.parentNode)\n }\n return list\n}", "function getClippingParents$1(element){var clippingParents=listScrollParents$1(getParentNode$1(element));var canEscapeClipping=['absolute','fixed'].indexOf(getComputedStyle$2(element).position)>=0;var clipperElement=canEscapeClipping&&isHTMLElement$1(element)?getOffsetParent$1(element):element;if(!isElement$1(clipperElement)){return [];}// $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\nreturn clippingParents.filter(function(clippingParent){return isElement$1(clippingParent)&&contains$1(clippingParent,clipperElement)&&getNodeName$1(clippingParent)!=='body';});}// Gets the maximum area that the element is visible in due to any number of", "getScrollEventTarget(element, root = window) {\n let node = element;\n\n while (\n node &&\n node.tagName !== \"HTML\" &&\n node.nodeType === 1 &&\n node !== root\n ) {\n const { overflowY } = window.getComputedStyle(node);\n\n if (overflowScrollReg.test(overflowY)) {\n if (node.tagName !== \"BODY\") {\n return node;\n }\n\n // see: https://github.com/youzan/vant/issues/3823\n const { overflowY: htmlOverflowY } = window.getComputedStyle(\n node.parentNode\n );\n\n if (overflowScrollReg.test(htmlOverflowY)) {\n return node;\n }\n }\n node = node.parentNode;\n }\n\n return root;\n }", "function findScrollableParent(startingElement) {\n var el = startingElement;\n var doc = Object(_dom_getDocument__WEBPACK_IMPORTED_MODULE_0__[\"getDocument\"])(startingElement);\n // First do a quick scan for the scrollable attribute.\n while (el && el !== doc.body) {\n if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) === 'true') {\n return el;\n }\n el = el.parentElement;\n }\n // If we haven't found it, the use the slower method: compute styles to evaluate if overflow is set.\n el = startingElement;\n while (el && el !== doc.body) {\n if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) !== 'false') {\n var computedStyles = getComputedStyle(el);\n var overflowY = computedStyles ? computedStyles.getPropertyValue('overflow-y') : '';\n if (overflowY && (overflowY === 'scroll' || overflowY === 'auto')) {\n return el;\n }\n }\n el = el.parentElement;\n }\n // Fall back to window scroll.\n if (!el || el === doc.body) {\n // tslint:disable-next-line:no-any\n el = Object(_dom_getWindow__WEBPACK_IMPORTED_MODULE_2__[\"getWindow\"])(startingElement);\n }\n return el;\n}", "function getClippingParents(element) {\n const clippingParents = listScrollParents_1.default(getParentNode_1.default(element));\n const canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle_1.default(element).position) >= 0;\n const clipperElement = canEscapeClipping && instanceOf_1.isHTMLElement(element) ? getOffsetParent_1.default(element) : element;\n if (!instanceOf_1.isElement(clipperElement)) {\n return [];\n }\n // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n return clippingParents.filter(clippingParent => instanceOf_1.isElement(clippingParent) && contains_1.default(clippingParent, clipperElement) && getNodeName_1.default(clippingParent) !== 'body');\n}", "function findScrollableParent(startingElement) {\n var el = startingElement;\n var doc = (0,_dom_getDocument__WEBPACK_IMPORTED_MODULE_1__.getDocument)(startingElement);\n // First do a quick scan for the scrollable attribute.\n while (el && el !== doc.body) {\n if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) === 'true') {\n return el;\n }\n el = el.parentElement;\n }\n // If we haven't found it, the use the slower method: compute styles to evaluate if overflow is set.\n el = startingElement;\n while (el && el !== doc.body) {\n if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) !== 'false') {\n var computedStyles = getComputedStyle(el);\n var overflowY = computedStyles ? computedStyles.getPropertyValue('overflow-y') : '';\n if (overflowY && (overflowY === 'scroll' || overflowY === 'auto')) {\n return el;\n }\n }\n el = el.parentElement;\n }\n // Fall back to window scroll.\n if (!el || el === doc.body) {\n el = (0,_dom_getWindow__WEBPACK_IMPORTED_MODULE_2__.getWindow)(startingElement);\n }\n return el;\n}", "function findScrollableParent(startingElement) {\n var el = startingElement;\n var doc = (0,_dom_getDocument__WEBPACK_IMPORTED_MODULE_1__.getDocument)(startingElement);\n // First do a quick scan for the scrollable attribute.\n while (el && el !== doc.body) {\n if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) === 'true') {\n return el;\n }\n el = el.parentElement;\n }\n // If we haven't found it, the use the slower method: compute styles to evaluate if overflow is set.\n el = startingElement;\n while (el && el !== doc.body) {\n if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) !== 'false') {\n var computedStyles = getComputedStyle(el);\n var overflowY = computedStyles ? computedStyles.getPropertyValue('overflow-y') : '';\n if (overflowY && (overflowY === 'scroll' || overflowY === 'auto')) {\n return el;\n }\n }\n el = el.parentElement;\n }\n // Fall back to window scroll.\n if (!el || el === doc.body) {\n el = (0,_dom_getWindow__WEBPACK_IMPORTED_MODULE_2__.getWindow)(startingElement);\n }\n return el;\n}", "function getScrollParent(el) {\n var position = el.css('position');\n var scrollParent = el.parents().filter(function () {\n var parent = $(this);\n return (/(auto|scroll)/).test(parent.css('overflow') + parent.css('overflow-y') + parent.css('overflow-x'));\n }).eq(0);\n return position === 'fixed' || !scrollParent.length ? $(el[0].ownerDocument || document) : scrollParent;\n}", "function getScrollParent(el) {\n var position = el.css('position');\n var scrollParent = el.parents().filter(function () {\n var parent = $(this);\n return (/(auto|scroll)/).test(parent.css('overflow') + parent.css('overflow-y') + parent.css('overflow-x'));\n }).eq(0);\n return position === 'fixed' || !scrollParent.length ? $(el[0].ownerDocument || document) : scrollParent;\n}", "function getScrollParent(el) {\n var position = el.css('position');\n var scrollParent = el.parents().filter(function () {\n var parent = $(this);\n return (/(auto|scroll)/).test(parent.css('overflow') + parent.css('overflow-y') + parent.css('overflow-x'));\n }).eq(0);\n return position === 'fixed' || !scrollParent.length ? $(el[0].ownerDocument || document) : scrollParent;\n}", "function getScrollParent(el) {\n var position = el.css('position');\n var scrollParent = el.parents().filter(function () {\n var parent = $(this);\n return (/(auto|scroll)/).test(parent.css('overflow') + parent.css('overflow-y') + parent.css('overflow-x'));\n }).eq(0);\n return position === 'fixed' || !scrollParent.length ? $(el[0].ownerDocument || document) : scrollParent;\n}", "function findPos(element) {\n\t var curtop = 0;\n\n\t if (element.offsetParent) {\n\t do {\n\t curtop += element.offsetTop;\n\t } while (element = element.offsetParent);\n\n\t return [curtop];\n\t }\n\t}", "function findScrollableParent(startingElement) {\n var el = startingElement;\n // First do a quick scan for the scrollable attribute.\n while (el && el !== document.body) {\n if (el.getAttribute(exports.DATA_IS_SCROLLABLE_ATTRIBUTE) === 'true') {\n return el;\n }\n el = el.parentElement;\n }\n // If we haven't found it, the use the slower method: compute styles to evaluate if overflow is set.\n el = startingElement;\n while (el && el !== document.body) {\n if (el.getAttribute(exports.DATA_IS_SCROLLABLE_ATTRIBUTE) !== 'false') {\n var styles_1 = getComputedStyle(el);\n var overflowY = styles_1 ? styles_1.getPropertyValue('overflow-y') : '';\n if (overflowY && (overflowY === 'scroll' || overflowY === 'auto')) {\n return el;\n }\n }\n el = el.parentElement;\n }\n // Fall back to window scroll.\n if (!el || el === document.body) {\n el = window;\n }\n return el;\n}", "function findScrollableParent(startingElement) {\n var el = startingElement;\n // First do a quick scan for the scrollable attribute.\n while (el && el !== document.body) {\n if (el.getAttribute(exports.DATA_IS_SCROLLABLE_ATTRIBUTE) === 'true') {\n return el;\n }\n el = el.parentElement;\n }\n // If we haven't found it, the use the slower method: compute styles to evaluate if overflow is set.\n el = startingElement;\n while (el && el !== document.body) {\n if (el.getAttribute(exports.DATA_IS_SCROLLABLE_ATTRIBUTE) !== 'false') {\n var styles_1 = getComputedStyle(el);\n var overflowY = styles_1 ? styles_1.getPropertyValue('overflow-y') : '';\n if (overflowY && (overflowY === 'scroll' || overflowY === 'auto')) {\n return el;\n }\n }\n el = el.parentElement;\n }\n // Fall back to window scroll.\n if (!el || el === document.body) {\n el = window;\n }\n return el;\n}", "scrollIfNeeded() {\n const el = this.ref,\n parent = el.parentElement,\n overTop = el.offsetTop - parent.offsetTop < parent.scrollTop,\n overBottom = el.offsetTop - parent.offsetTop + el.clientHeight >\n parent.scrollTop + parent.clientHeight;\n\n if (overTop || overBottom) {\n parent.scrollTop = el.offsetTop - parent.offsetTop -\n parent.clientHeight / 2 + el.clientHeight / 2;\n }\n }", "function getOffsetParent(element) {\n var window = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && Object(_isTableElement_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(offsetParent) && Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent) === 'body' && Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent).position === 'static') {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}", "function getOffsetParent(element) {\n var window = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && Object(_isTableElement_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(offsetParent) && Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent) === 'body' && Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent).position === 'static') {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}", "function getOffsetParent(element) {\n var window = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && Object(_isTableElement_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(offsetParent) && Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(offsetParent) === 'body' && Object(_getComputedStyle_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(offsetParent).position === 'static') {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}", "function findScrollableParent(startingElement) {\n var el = startingElement;\n // First do a quick scan for the scrollable attribute.\n while (el && el !== document.body) {\n if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) === 'true') {\n return el;\n }\n el = el.parentElement;\n }\n // If we haven't found it, the use the slower method: compute styles to evaluate if overflow is set.\n el = startingElement;\n while (el && el !== document.body) {\n if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) !== 'false') {\n var computedStyles = getComputedStyle(el);\n var overflowY = computedStyles ? computedStyles.getPropertyValue('overflow-y') : '';\n if (overflowY && (overflowY === 'scroll' || overflowY === 'auto')) {\n return el;\n }\n }\n el = el.parentElement;\n }\n // Fall back to window scroll.\n if (!el || el === document.body) {\n // tslint:disable-next-line:no-any\n el = window;\n }\n return el;\n}" ]
[ "0.7336887", "0.7336887", "0.7206998", "0.7164338", "0.71565545", "0.70627344", "0.70627344", "0.6962485", "0.6962485", "0.6962485", "0.6908932", "0.68747437", "0.68747437", "0.68747437", "0.68747437", "0.6838458", "0.6838458", "0.6838458", "0.6838458", "0.6838458", "0.6824641", "0.6708657", "0.66608053", "0.66457695", "0.66457695", "0.66457695", "0.66457695", "0.64679885", "0.6387315", "0.6350276", "0.6350276", "0.63445896", "0.6312066", "0.6307403", "0.63035786", "0.629005", "0.6257573", "0.6257573", "0.6253632", "0.62182295", "0.62182295", "0.62094176", "0.62094176", "0.6200492", "0.6200492", "0.6177908", "0.6177908", "0.6177908", "0.61672896", "0.61653924", "0.61653924", "0.61653924", "0.61552656", "0.61097133", "0.6090688", "0.6089835", "0.6047909", "0.6045243", "0.6037087", "0.60281193", "0.60157406", "0.60157406", "0.60157406", "0.60120195", "0.60120195", "0.60120195", "0.60120195", "0.6006856", "0.6005665", "0.6005665", "0.6005665", "0.6005665", "0.59997916", "0.59997916", "0.59997916", "0.59978986", "0.5993388", "0.5985044", "0.5981137", "0.5941509", "0.59299505", "0.5923914", "0.5879693", "0.5868678", "0.58393854", "0.58393854", "0.57983136", "0.57983136", "0.57983136", "0.57983136", "0.574992", "0.57458", "0.57458", "0.5727912", "0.5726943", "0.5726943", "0.5726943", "0.5717635" ]
0.68420655
17
Round the offsets to the nearest suitable subpixel based on the DPR. Zooming can change the DPR, but it seems to report a value that will cleanly divide the values into the appropriate subpixels.
function roundOffsets(_ref) { var x = _ref.x, y = _ref.y; var win = window; var dpr = win.devicePixelRatio || 1; return { x: Math.round(x * dpr) / dpr || 0, y: Math.round(y * dpr) / dpr || 0 }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function roundOffsetsByDPR(_ref){var x=_ref.x,y=_ref.y;var win=window;var dpr=win.devicePixelRatio||1;return {x:round(round(x*dpr)/dpr)||0,y:round(round(y*dpr)/dpr)||0};}", "function roundOffsetsByDPR(_ref){var x=_ref.x,y=_ref.y;var win=window;var dpr=win.devicePixelRatio||1;return {x:round(round(x*dpr)/dpr)||0,y:round(round(y*dpr)/dpr)||0};}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n }", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n }", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x, y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: _mathJs.round(x * dpr) / dpr || 0,\n y: _mathJs.round(y * dpr) / dpr || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}", "function roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}", "function roundOffsetsByDPR$1(_ref){var x=_ref.x,y=_ref.y;var win=window;var dpr=win.devicePixelRatio||1;return {x:round$1(round$1(x*dpr)/dpr)||0,y:round$1(round$1(y*dpr)/dpr)||0};}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(x * dpr) / dpr) || 0,\n y: Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(x * dpr) / dpr) || 0,\n y: Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(x * dpr) / dpr) || 0,\n y: Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(Object(_utils_math_js__WEBPACK_IMPORTED_MODULE_6__[\"round\"])(y * dpr) / dpr) || 0\n };\n}", "function $ebtt$var$roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: $FuL6$export$round($FuL6$export$round(x * dpr) / dpr) || 0,\n y: $FuL6$export$round($FuL6$export$round(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)((0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(x * dpr) / dpr) || 0,\n y: (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)((0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)((0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(x * dpr) / dpr) || 0,\n y: (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)((0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)((0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(x * dpr) / dpr) || 0,\n y: (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)((0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(y * dpr) / dpr) || 0\n };\n}", "function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)((0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(x * dpr) / dpr) || 0,\n y: (0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)((0,_utils_math_js__WEBPACK_IMPORTED_MODULE_0__.round)(y * dpr) / dpr) || 0\n };\n}", "function roundOffsets(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0\n };\n }", "function roundOffsets(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0\n };\n }", "function roundOffsets({ x, y }): Offsets {\n const dpr = window.devicePixelRatio || 1;\n\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0,\n };\n}", "static roundToNearestPixel(layoutSize: number): number {\n const ratio = PixelRatio.get();\n return Math.round(layoutSize * ratio) / ratio;\n }", "snapToGrip (val) {\n return parseFloat((this.gridResolution * Math.round(val / this.gridResolution)).toFixed(2));\n }", "function pixelDist() {\r\n\tvar min = bounds.getSouthWest();\r\n\tvar max = bounds.getNorthEast();\r\n\t\r\n\tvar x = Math.abs(max.lng() - min.lng())/dojo.contentBox(\"map_canvas\").w;\r\n\tvar y = Math.abs(max.lat() - min.lat())/dojo.contentBox(\"map_canvas\").h;\r\n\t\r\n\tvar r = Math.pow(10,7);\r\n\tpixels = {\"x\": Math.round(x*r)/r, \"y\": Math.round(y*r)/r};\r\n}", "function zoomFactor(){\n\tvar percentOffFloor = (transform.position.y - zoomFloor)/zoomCeiling;\n\treturn percentOffFloor + 1;\n}", "function _GetNewScaleFromPx(fingersDistanceVariation)\n\t{\n\t\t//compute the scale\n\t\tvar newScale = Math.max(_MinScale, Math.min(_MaxScale, (_LastScale || __SIMULATOR.Scale) + fingersDistanceVariation * _ScalePerPixel));\n\n\t\t//boost it by 100 and divide it again\n\t\treturn Math.round(newScale * 100) / 100;\n\t}", "valueToPx(value) {\n const that = this.context,\n lengthRangeRatio = that._measurements.trackLength / that._range;\n\n let result;\n\n if (that._normalLayout) {\n result = lengthRangeRatio * (value - that._drawMin);\n }\n else {\n result = lengthRangeRatio * (that._drawMax - value);\n }\n\n return Math.round(result);\n }", "function getTolerance(pt, nextPt) {\n var xFrac = pt[0] / xLen;\n var yFrac = pt[1] / yLen;\n var offScreenFraction = Math.max(0, -xFrac, xFrac - 1, -yFrac, yFrac - 1);\n if (offScreenFraction && latestXFrac !== undefined && crossesViewport(xFrac, yFrac, latestXFrac, latestYFrac)) {\n offScreenFraction = 0;\n }\n if (offScreenFraction && nextPt && crossesViewport(xFrac, yFrac, nextPt[0] / xLen, nextPt[1] / yLen)) {\n offScreenFraction = 0;\n }\n return (1 + constants.toleranceGrowth * offScreenFraction) * baseTolerance;\n }", "function adjustDist(dist, dpi) {\n if (!dist) {\n return;\n }\n return dist * 90 / dpi;\n }", "function radiusToZoom(radius)\n{\n return Math.round(14-Math.log(radius)/Math.LN2);\n}", "function calc_precision (zoom) {\n\tvar fixedAmount = -1;\n\tvar size = 40;\n\n\tif (zoom > 4)\n\t\tfixedAmount = 0;\n\n\tif (zoom >= 8) {\n\t\tfixedAmount = 1;\n\t}\n\n\tif (zoom >= 10) {\n\t\tfixedAmount = 2;\n\t}\n\n\tif (zoom >= 11) {\n\t\tfixedAmount = 8;\n\t}\n\n\treturn [fixedAmount, size];\n}", "function dZoom(d) {\n return 1 - ((d >= 0) ? Math.min(d, 0.9) :\n 1 / (1 / Math.max(d, -0.3) + 3.222));\n}", "function dZoom(d) {\n return 1 - ((d >= 0) ? Math.min(d, 0.9) :\n 1 / (1 / Math.max(d, -0.3) + 3.222));\n}", "function dZoom(d) {\n\t return 1 - ((d >= 0) ? Math.min(d, 0.9) :\n\t 1 / (1 / Math.max(d, -0.3) + 3.222));\n\t }", "function dZoom(d) {\n\t return 1 - ((d >= 0) ? Math.min(d, 0.9) :\n\t 1 / (1 / Math.max(d, -0.3) + 3.222));\n\t }", "snpMDG(v) {\n // console.log(v)\n // console.log(Math.round(v/this.cellSize/this.scale) * this.cellSize/this.scale)\n return Math.round(v/this.cellSize) * this.cellSize\n }", "dpi () {\n return this.chart.width / this.interval.width * this.zoom.value;\n }", "p(pos) { return Math.ceil((pos-1)/this.d); }", "function dZoom(d) {\n return 1 - (d >= 0 ? Math.min(d, 0.9) : 1 / (1 / Math.max(d, -0.3) + 3.222));\n}", "function convertDpToPixel(dp)\n{\n\t//\n\treturn Math.round(dp * deviceDensity);\n}", "function round(number, increment, offset) {\n return Math.ceil((number - offset) / increment ) * increment + offset;\n }", "function getPixelPrecision(dataExtent, pixelExtent) {\n\t var log = Math.log;\n\t var LN10 = Math.LN10;\n\t var dataQuantity = Math.floor(log(dataExtent[1] - dataExtent[0]) / LN10);\n\t var sizeQuantity = Math.round(log(Math.abs(pixelExtent[1] - pixelExtent[0])) / LN10); // toFixed() digits argument must be between 0 and 20.\n\t\n\t var precision = Math.min(Math.max(-dataQuantity + sizeQuantity, 0), 20);\n\t return !isFinite(precision) ? 20 : precision;\n\t }", "function f(val)\n\t {\n\t // Enforce limits\n\t val = Math.min(val, max);\n\t val = Math.max(val, min);\n\t return Math.round((val - min) * scale + axisMargin);\n\t }", "function f(val)\n\t {\n\t // Enforce limits\n\t val = Math.min(val, max);\n\t val = Math.max(val, min);\n\t return Math.round((val - min) * scale + axisMargin);\n\t }", "function snapToGrid(value, resolution) {\n // return Math.round(value/interval) * interval;\n if (value < 0) {\n var val = Math.abs(value)\n var result = Math.ceil(val/resolution) * resolution\n return (result * -1)\n } else {\n return (Math.ceil(value/resolution) * resolution)\n }\n }", "calcRadius(factor, corners) {\n let distance = this.farestToMid(corners)\n return Math.floor(distance * factor)\n }", "function getPixelPrecision(dataExtent, pixelExtent) {\n var log = Math.log;\n var LN10 = Math.LN10;\n var dataQuantity = Math.floor(log(dataExtent[1] - dataExtent[0]) / LN10);\n var sizeQuantity = Math.round(log(Math.abs(pixelExtent[1] - pixelExtent[0])) / LN10); // toFixed() digits argument must be between 0 and 20.\n\n var precision = Math.min(Math.max(-dataQuantity + sizeQuantity, 0), 20);\n return !isFinite(precision) ? 20 : precision;\n}", "function updateRadius(){\n var zoom = mymap.getZoom();\n \n switch(zoom) {\n case 13 : return 8;\n case 14 : return 10;\n case 15 : return 12;\n case 16 : return 14;\n case 17 : return 16;\n case 18 : return 18;\n default : return 8; \n }\n }", "roundPx(devicePixelRatio = window.devicePixelRatio || 1) {\n const me = this;\n me._x = DomHelper.roundPx(me._x, devicePixelRatio);\n me._y = DomHelper.roundPx(me._y, devicePixelRatio);\n me._width = DomHelper.roundPx(me._width, devicePixelRatio);\n me._height = DomHelper.roundPx(me._height, devicePixelRatio);\n return me;\n }", "get overridePixelPerfect() {}", "_toPixelScale(value) {\n const rangeToTrack = this._trackTotalLength / (this.props.max - this.props.min);\n return (value - this.props.min) * rangeToTrack;\n }", "function radiusToZoom(radius){\n radius *= 0.00035;\n return Math.round(14-Math.log(radius)/Math.LN2) - 1;\n}", "function roundToNearestHundreth(x){\n return (x).toFixed(2);\n }", "calcValue() {\n const trackRatio = this.normalize(this.thumb.position().left, 0, this.track.innerWidth() - (this.thumbOffset * 2));\n return (trackRatio * (this.max - this.min)) + this.min;\n }", "function getMetersPerPixel() {\n if (!_map) return 0;\n var y = _map.getSize().y,\n x = _map.getSize().x;\n // calculate the distance the one side of the map to the other using the haversine formula\n var maxMeters = _map.containerPointToLatLng([0, y]).distanceTo(_map.containerPointToLatLng([x, y]));\n return maxMeters / x;\n }", "function getTolerance(pt) {\n var xFrac = pt[0] / xa._length;\n var yFrac = pt[1] / ya._length;\n return (1 + constants.toleranceGrowth * Math.max(0, -xFrac, xFrac - 1, -yFrac, yFrac - 1)) * baseTolerance;\n }", "function getTolerance(pt) {\n\t var xFrac = pt[0] / xa._length,\n\t yFrac = pt[1] / ya._length;\n\t return (1 + 10 * Math.max(0, -xFrac, xFrac - 1, -yFrac, yFrac - 1)) * baseTolerance;\n\t }", "function getTolerance(pt) {\n\t var xFrac = pt[0] / xa._length,\n\t yFrac = pt[1] / ya._length;\n\t return (1 + 10 * Math.max(0, -xFrac, xFrac - 1, -yFrac, yFrac - 1)) * baseTolerance;\n\t }", "function getTolerance(pt) {\n var xFrac = pt[0] / xa._length,\n yFrac = pt[1] / ya._length;\n return (1 + 10 * Math.max(0, -xFrac, xFrac - 1, -yFrac, yFrac - 1)) * baseTolerance;\n }", "function conv(val) {\n\t\treturn Math.round((val / resolution) * (resolution-1));\n\t}", "function getDeviceZoomRatio() {\n // For IE10, IE11, Firefox\n if (window.screen.deviceXDPI && window.screen.logicalXDPI) {\n return window.screen.deviceXDPI / window.screen.logicalXDPI;\n }\n else if (window.devicePixelRatio) {\n return window.devicePixelRatio;\n }\n else {\n return 1;\n }\n }", "valueToPx(value) {\n const ignored = JQX.Utilities.BigNumber.ignoreBigIntNativeSupport;\n\n JQX.Utilities.BigNumber.ignoreBigIntNativeSupport = true;\n\n const that = this.context,\n lengthRangeRatio = new JQX.Utilities.BigNumber(that._measurements.trackLength).divide(new JQX.Utilities.BigNumber(that._range));\n\n let result;\n\n if (that._normalLayout) {\n const drawMin = that._drawMin instanceof JQX.Utilities.BigNumber ? that._drawMin : new JQX.Utilities.BigNumber(that._drawMin);\n\n value = new JQX.Utilities.BigNumber(value);\n result = parseFloat((lengthRangeRatio.multiply(value.subtract(drawMin))).toString());\n }\n else {\n const drawMax = that._drawMax instanceof JQX.Utilities.BigNumber ? that._drawMax : new JQX.Utilities.BigNumber(that._drawMax);\n\n result = parseFloat(this.round(((drawMax.subtract(value)).multiply(lengthRangeRatio))).toString());\n }\n\n JQX.Utilities.BigNumber.ignoreBigIntNativeSupport = ignored;\n return result;\n }", "function getMetersPerPixel() {\n if (!_map) return 0;\n var y = _map.getSize().y,\n x = _map.getSize().x;\n // calculate the distance the one side of the map to the other using the haversine formula\n var maxMeters = _map.containerPointToLatLng([0, y]).distanceTo(_map.containerPointToLatLng([x, y]));\n return maxMeters / x;\n}", "cramp(\n min,max,round, // Float\n ) {\n const {_sx,_sy,_scale} = this\n return Point.init(_sx,_sy,\n _scale < min ? min : max < _scale ? max :\n 0 < round ? Math.ceil(_scale / round) * round : _scale\n )\n }", "_calcStepRounded(value) {\n var s = Math.round(value/this.step) * this.step;\n\n // make sure it isnt rounding out of our range; should only do so by one step:\n s = s < this.min ? s + this.step : s;\n s = s > this.max ? s - this.step : s;\n\n return s;\n }", "function getDeviceZoomRatio() {\n // For IE10, IE11, Firefox\n if (window.screen.deviceXDPI && window.screen.logicalXDPI) {\n return window.screen.deviceXDPI / window.screen.logicalXDPI;\n } else if (window.devicePixelRatio) {\n return window.devicePixelRatio;\n } else {\n return 1;\n }\n }", "function getZoomValue(angle_lng,angle_lat,pixelWidth, pixelHeight) {\n\tvar GLOBE_WIDTH = 256; // a constant in Google's map projection\n\n\t// Longitude goes from 180 to -180\n\tif(angle_lng < 0) {\n\t\tangle_lng += 360;\n\t}\n\n\t// Latitude goes from -90 to 90\n\tif(angle_lat < 0) {\n\t\tangle_lat += 180;\n\t}\n\n\treturn Math.max(\n\t\t\t// calculate zoom with closest point and show 4 times as much space\n\t\t\tMath.min(\n\t\t\t\t\tMath.round(Math.log(pixelWidth * 360 / angle_lng / GLOBE_WIDTH) / Math.LN2) - 2,\n\t\t\t\t\tMath.round(Math.log(pixelHeight * 180 / angle_lat / GLOBE_WIDTH) / Math.LN2) - 2)\n\t\t\t\t\t, 1);\n}", "function GetZoomFactor()\n {\n var factor = 1;\n if (document.body.getBoundingClientRect) {\n var rect = document.body.getBoundingClientRect();\n var physicalW = rect.right - rect.left;\n var logicalW = document.body.offsetWidth;\n factor = Math.round((physicalW / logicalW) * 100) / 100;\n }\n return factor;\n }", "function calculatePixelRatio() {\n var ctx = document.createElement(\"canvas\").getContext(\"2d\"),\n dpr = window.devicePixelRatio || 1,\n bsr = ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio || 1;\n\n return dpr / bsr;\n}", "static getPixelSizeForLayoutSize(layoutSize: number): number {\n return Math.round(layoutSize * PixelRatio.get());\n }", "function latScale(value) {\n\treturn Math.round((value - minlat) * parseInt(map.css('width')) / (maxlat - minlat));\n}", "function applyRatio (v) {\n return Math.round(v * ratio * 10000) / 10000;\n}", "function roundMinMax(factor) {\n factor = parseFloat(factor);\n var minNum = parseFloat(min.value);\n var maxNum = parseFloat(max.value);\n\n var minMod = min.value % factor;\n var maxMod = max.value % factor;\n var minVal = minMod < factor / 2 ? minNum - minMod : minNum + (factor - minMod);\n var maxVal = maxMod < factor / 2 ? maxNum - maxMod : maxNum + (factor - maxMod);\n\n min.value = minVal.toFixed(2);\n max.value = maxVal.toFixed(2);\n min.step = factor;\n max.step = factor;\n adjustLabel(max_input, max);\n adjustLabel(min_input, min);\n }", "_calcMovePrecision() {\n let precision = (this.o.maxVal - this.o.minVal) / 127;\n return precision;\n }", "function toDips(px) {\n return px / react_native_1.PixelRatio.get();\n}", "function tolerance(zoomLevel) {\n return 2 * Math.pow(2, -zoomLevel);\n}", "function getRelativeScale(to) {\r\n\t\tsets = $['mapsettings'];\r\n\t\tvar percentxy = new Point((sets.resolutions[to-1].width/sets.resolutions[sets.resolutions.length-1].width),(sets.resolutions[to-1].height/sets.resolutions[sets.resolutions.length-1].height));\t\r\n\t\treturn percentxy;\r\n\t}", "pixelSpaceConversion(lat: number, worldSize: number, interpolationT: number): number { // eslint-disable-line\n return 1.0;\n }", "function offsetToPercentage(g, offsetX, offsetY) {\n // This is calculating the pixel offset of the leftmost date.\n var xOffset = g.toDomCoords(g.xAxisRange()[0], null)[0];\n var yar0 = g.yAxisRange(0);\n\n // This is calculating the pixel of the higest value. (Top pixel)\n var yOffset = g.toDomCoords(null, yar0[1])[1];\n\n // x y w and h are relative to the corner of the drawing area,\n // so that the upper corner of the drawing area is (0, 0).\n var x = offsetX - xOffset;\n var y = offsetY - yOffset;\n\n // This is computing the rightmost pixel, effectively defining the\n // width.\n var w = g.toDomCoords(g.xAxisRange()[1], null)[0] - xOffset;\n\n // This is computing the lowest pixel, effectively defining the height.\n var h = g.toDomCoords(null, yar0[0])[1] - yOffset;\n\n // Percentage from the left.\n var xPct = w === 0 ? 0 : (x / w);\n // Percentage from the top.\n var yPct = h === 0 ? 0 : (y / h);\n\n // The (1-) part below changes it from \"% distance down from the top\"\n // to \"% distance up from the bottom\".\n return [xPct, (1-yPct)];\n}", "function zoom(value) {\n return value * zoomLevel;\n}", "function calcCircleRadius() {\n\t/* Calc max radius: */\n\tvar latLng1 = myMap.getBounds().getNorthEast();\n\tvar latLng2 = myMap.getBounds().getSouthWest();\n\tvar distance = distanceInMeter(latLng1.lat(), latLng1.lng(), \n\t\t\tlatLng2.lat(), latLng2.lng());\n\t\n\tvar maxRadius = distance * 0.22; // 22% fits very well..\n\t// TODO zoom level 0 und 1 passen hier fuer nicht ganz..\n\tvar radInM = ((currentSliderValue) / MAX_SLIDER_VALUE) * maxRadius;\n\tcurrentRange = Math.round(radInM);\n\treturn radInM;\n}", "function offsetToPercentage(g, offsetX, offsetY) {\n // This is calculating the pixel offset of the leftmost date.\n let xOffset = g.toDomCoords(g.xAxisRange()[0], null)[0];\n let yar0 = g.yAxisRange(0);\n\n // This is calculating the pixel of the highest value. (Top pixel)\n let yOffset = g.toDomCoords(null, yar0[1])[1];\n\n // x y w and h are relative to the corner of the drawing area,\n // so that the upper corner of the drawing area is (0, 0).\n let x = offsetX - xOffset;\n let y = offsetY - yOffset;\n\n // This is computing the rightmost pixel, effectively defining the\n // width.\n let w = g.toDomCoords(g.xAxisRange()[1], null)[0] - xOffset;\n\n // This is computing the lowest pixel, effectively defining the height.\n let h = g.toDomCoords(null, yar0[0])[1] - yOffset;\n\n // Percentage from the left.\n let xPct = w === 0 ? 0 : (x / w);\n // Percentage from the top.\n let yPct = h === 0 ? 0 : (y / h);\n\n // The (1-) part below changes it from \"% distance down from the top\"\n // to \"% distance up from the bottom\".\n return [xPct, (1 - yPct)];\n }", "function doMath()\n\t{\n\t\treturn pixels/baseValue;\n\t}", "function coordRound(v) {\n var w = Math.floor(v);\n var d = v - w;\n d = Math.round(d * 10000) / 10000;\n return w + d;\n}", "function maybeUpdateRectForZooming(measure, rect) {\n\t if (!window.screen || screen.logicalXDPI == null ||\n\t screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n\t return rect;\n\t var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n\t var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n\t return {left: rect.left * scaleX, right: rect.right * scaleX,\n\t top: rect.top * scaleY, bottom: rect.bottom * scaleY};\n\t }", "function maybeUpdateRectForZooming(measure, rect) {\n\t if (!window.screen || screen.logicalXDPI == null ||\n\t screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n\t return rect;\n\t var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n\t var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n\t return {left: rect.left * scaleX, right: rect.right * scaleX,\n\t top: rect.top * scaleY, bottom: rect.bottom * scaleY};\n\t }", "function maybeUpdateRectForZooming(measure, rect) {\n\t if (!window.screen || screen.logicalXDPI == null ||\n\t screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n\t return rect;\n\t var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n\t var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n\t return {left: rect.left * scaleX, right: rect.right * scaleX,\n\t top: rect.top * scaleY, bottom: rect.bottom * scaleY};\n\t }", "function PIXEL_RATIO() {\r\n var ctx1 = document.createElement(\"canvas\").getContext(\"2d\"),\r\n dpr = window.devicePixelRatio || 1,\r\n bsr = ctx1.webkitBackingStorePixelRatio ||\r\n ctx1.mozBackingStorePixelRatio ||\r\n ctx1.msBackingStorePixelRatio ||\r\n ctx1.oBackingStorePixelRatio ||\r\n ctx1.backingStorePixelRatio || 1;\r\n console.log(\"ratio:\"+ dpr / bsr);\r\n return dpr / bsr;\r\n}" ]
[ "0.76612175", "0.76612175", "0.7594366", "0.7575892", "0.75079095", "0.7487574", "0.7478452", "0.7478452", "0.7478452", "0.7478452", "0.7478452", "0.74562436", "0.74562436", "0.7409175", "0.7368129", "0.7309801", "0.7309801", "0.7309801", "0.7267761", "0.7250976", "0.7250976", "0.7250976", "0.7250976", "0.6857452", "0.6857452", "0.63798726", "0.6314425", "0.5816284", "0.57455444", "0.56931645", "0.56839967", "0.56717587", "0.56021446", "0.56005096", "0.55882514", "0.55476874", "0.5522004", "0.5522004", "0.5471829", "0.5471829", "0.5453581", "0.54195595", "0.5411916", "0.54066247", "0.53715515", "0.5342215", "0.5337563", "0.5334204", "0.5334204", "0.5324156", "0.5298652", "0.5294102", "0.52920765", "0.52905273", "0.5287437", "0.5285105", "0.5277179", "0.52664995", "0.5264266", "0.5258373", "0.5256846", "0.5250231", "0.5250231", "0.5244601", "0.52352977", "0.5226926", "0.52165264", "0.5214889", "0.5205505", "0.52041143", "0.52020913", "0.5199489", "0.51970786", "0.5172568", "0.5138733", "0.5138135", "0.5132438", "0.51199305", "0.5112633", "0.5091992", "0.5086982", "0.5081714", "0.50764835", "0.5076238", "0.50698596", "0.50502074", "0.50478727", "0.5047069", "0.50269365", "0.5017592", "0.5017592", "0.5017592", "0.501686" ]
0.6730193
30
On visiting object, check for its dependencies and visit them recursively
function sort(modifier) { visited.add(modifier.name); var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); requires.forEach(function (dep) { if (!visited.has(dep)) { var depModifier = map.get(dep); if (depModifier) { sort(depModifier); } } }); result.push(modifier); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function traverse(object, ancestors, visitor) {\n var key, child, tempList;\n\n visitor.call(null, object);\n for (key in object) {\n if (object.hasOwnProperty(key)) {\n child = object[key];\n if (typeof child === 'object' && child !== null) {\n tempList = ancestors.concat(object.type);\n traverse(child, tempList, visitor);\n // call checkStructure at every leaf\n } else {\n checkStructure(ancestors);\n }\n }\n }\n }", "function detectCycleRecursive(inputObj) {\n if (visitedTypes[inputObj.name]) {\n return;\n }\n\n visitedTypes[inputObj.name] = true;\n fieldPathIndexByTypeName[inputObj.name] = fieldPath.length;\n var fields = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(inputObj.getFields());\n\n for (var _i30 = 0; _i30 < fields.length; _i30++) {\n var field = fields[_i30];\n\n if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[\"isNonNullType\"])(field.type) && Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[\"isInputObjectType\"])(field.type.ofType)) {\n var fieldType = field.type.ofType;\n var cycleIndex = fieldPathIndexByTypeName[fieldType.name];\n fieldPath.push(field);\n\n if (cycleIndex === undefined) {\n detectCycleRecursive(fieldType);\n } else {\n var cyclePath = fieldPath.slice(cycleIndex);\n var pathStr = cyclePath.map(function (fieldObj) {\n return fieldObj.name;\n }).join('.');\n context.reportError(\"Cannot reference Input Object \\\"\".concat(fieldType.name, \"\\\" within itself through a series of non-null fields: \\\"\").concat(pathStr, \"\\\".\"), cyclePath.map(function (fieldObj) {\n return fieldObj.astNode;\n }));\n }\n\n fieldPath.pop();\n }\n }\n\n fieldPathIndexByTypeName[inputObj.name] = undefined;\n }", "function detectCycleRecursive(inputObj) {\n if (visitedTypes[inputObj.name]) {\n return;\n }\n\n visitedTypes[inputObj.name] = true;\n fieldPathIndexByTypeName[inputObj.name] = fieldPath.length;\n var fields = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(inputObj.getFields());\n\n for (var _i30 = 0; _i30 < fields.length; _i30++) {\n var field = fields[_i30];\n\n if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_11__[\"isNonNullType\"])(field.type) && Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_11__[\"isInputObjectType\"])(field.type.ofType)) {\n var fieldType = field.type.ofType;\n var cycleIndex = fieldPathIndexByTypeName[fieldType.name];\n fieldPath.push(field);\n\n if (cycleIndex === undefined) {\n detectCycleRecursive(fieldType);\n } else {\n var cyclePath = fieldPath.slice(cycleIndex);\n var pathStr = cyclePath.map(function (fieldObj) {\n return fieldObj.name;\n }).join('.');\n context.reportError(\"Cannot reference Input Object \\\"\".concat(fieldType.name, \"\\\" within itself through a series of non-null fields: \\\"\").concat(pathStr, \"\\\".\"), cyclePath.map(function (fieldObj) {\n return fieldObj.astNode;\n }));\n }\n\n fieldPath.pop();\n }\n }\n\n fieldPathIndexByTypeName[inputObj.name] = undefined;\n }", "function detectCycleRecursive(inputObj) {\n if (visitedTypes[inputObj.name]) {\n return;\n }\n\n visitedTypes[inputObj.name] = true;\n fieldPathIndexByTypeName[inputObj.name] = fieldPath.length;\n var fields = (0, _objectValues5.default)(inputObj.getFields());\n\n for (var _i30 = 0; _i30 < fields.length; _i30++) {\n var field = fields[_i30];\n\n if ((0, _definition.isNonNullType)(field.type) && (0, _definition.isInputObjectType)(field.type.ofType)) {\n var fieldType = field.type.ofType;\n var cycleIndex = fieldPathIndexByTypeName[fieldType.name];\n fieldPath.push(field);\n\n if (cycleIndex === undefined) {\n detectCycleRecursive(fieldType);\n } else {\n var cyclePath = fieldPath.slice(cycleIndex);\n var pathStr = cyclePath.map(function (fieldObj) {\n return fieldObj.name;\n }).join('.');\n context.reportError(\"Cannot reference Input Object \\\"\".concat(fieldType.name, \"\\\" within itself through a series of non-null fields: \\\"\").concat(pathStr, \"\\\".\"), cyclePath.map(function (fieldObj) {\n return fieldObj.astNode;\n }));\n }\n\n fieldPath.pop();\n }\n }\n\n fieldPathIndexByTypeName[inputObj.name] = undefined;\n }", "function detectCycleRecursive(inputObj) {\n if (visitedTypes[inputObj.name]) {\n return;\n }\n\n visitedTypes[inputObj.name] = true;\n fieldPathIndexByTypeName[inputObj.name] = fieldPath.length;\n var fields = (0, _objectValues.default)(inputObj.getFields());\n\n for (var _i30 = 0; _i30 < fields.length; _i30++) {\n var field = fields[_i30];\n\n if ((0, _definition.isNonNullType)(field.type) && (0, _definition.isInputObjectType)(field.type.ofType)) {\n var fieldType = field.type.ofType;\n var cycleIndex = fieldPathIndexByTypeName[fieldType.name];\n fieldPath.push(field);\n\n if (cycleIndex === undefined) {\n detectCycleRecursive(fieldType);\n } else {\n var cyclePath = fieldPath.slice(cycleIndex);\n var pathStr = cyclePath.map(function (fieldObj) {\n return fieldObj.name;\n }).join('.');\n context.reportError(\"Cannot reference Input Object \\\"\".concat(fieldType.name, \"\\\" within itself through a series of non-null fields: \\\"\").concat(pathStr, \"\\\".\"), cyclePath.map(function (fieldObj) {\n return fieldObj.astNode;\n }));\n }\n\n fieldPath.pop();\n }\n }\n\n fieldPathIndexByTypeName[inputObj.name] = undefined;\n }", "async function walk(oid) {\n visited.add(oid);\n const { type, object } = await _readObject({ fs, cache, gitdir, oid });\n // Recursively resolve annotated tags\n if (type === 'tag') {\n const tag = GitAnnotatedTag.from(object);\n const commit = tag.headers().object;\n return walk(commit)\n }\n if (type !== 'commit') {\n throw new ObjectTypeError(oid, type, 'commit')\n }\n if (!shallows.has(oid)) {\n const commit = GitCommit.from(object);\n const parents = commit.headers().parent;\n for (oid of parents) {\n if (!finishingSet.has(oid) && !visited.has(oid)) {\n await walk(oid);\n }\n }\n }\n }", "function traverse(object, visitor) {\n var key, child;\n\n if (visitor.call(null, object) === false) {\n return;\n }\n for (key in object) {\n if (object.hasOwnProperty(key)) {\n child = object[key];\n if (typeof child === 'object' && child !== null) {\n traverse(child, visitor);\n }\n }\n }\n}", "function traverse(object, visitor) {\n var child;\n\n if (!object) {\n return;\n }\n\n if (visitor.call(null, object) === false) {\n return false;\n }\n for (var i = 0, keys = Object.keys(object); i < keys.length; i++) {\n child = object[keys[i]];\n if (typeof child === 'object' && child !== null) {\n if (traverse(child, visitor) === false) {\n return false;\n }\n }\n }\n }", "function traverse(object, visitor, master) {\r\n var key, child, parent, path;\r\n\r\n parent = (typeof master === 'undefined') ? [] : master;\r\n\r\n if (visitor.call(null, object, parent) === false) {\r\n return;\r\n }\r\n for (key in object) {\r\n if (object.hasOwnProperty(key)) {\r\n child = object[key];\r\n path = [ object ];\r\n path.push(parent);\r\n if (typeof child === 'object' && child !== null) {\r\n traverse(child, visitor, path);\r\n }\r\n }\r\n }\r\n }", "function traverseBroad(object, visitor) {\n var child;\n\n if (!object) {\n return;\n }\n\n if (visitor.call(null, object) === false) {\n return false;\n }\n for (var i = 0, keys = Object.keys(object); i < keys.length; i++) {\n child = object[key];\n if (typeof child === 'object' && child !== null) {\n traverseBroad(child, visitor);\n }\n }\n }", "function getDepsRecursive(field, visited = []) {\n\tif (visited.indexOf(field) !== -1) return\n\n\tvisited.push(field)\n\tfor (let dep of field.directDependencies) getDepsRecursive(dep, visited)\n\n\treturn visited\n}", "function circularReferenceCheck(shadows) {\n // if any of the current objects to process exist in the queue\n // then throw an error.\n shadows.forEach(function (item) {\n if (item instanceof Object && visited.indexOf(item) > -1) {\n throw new Error('Circular reference error');\n }\n });\n // if none of the current objects were in the queue\n // then add references to the queue.\n visited = visited.concat(shadows);\n }", "function checkStructure(object, structure) {\n var key, child, tempList;\n \n visitor.call(null, object);\n for (key in object) {\n if (object.hasOwnProperty(key)) {\n child = object[key];\n if (typeof child === 'object' && child !== null) {\n tempList = ancestors.concat(object.type);\n traverse(child, tempList, visitor);\n // call checkStructure at every leaf\n } else {\n checkStructure(ancestors);\n }\n }\n }\n }", "function traverse(config) {\n const tree = [];\n const stack = [config.filename];\n\n while (stack.length) {\n const dependency = stack.pop();\n debug(`traversing ${dependency}`);\n\n if (config.visited[dependency]) {\n populateFromCache(dependency);\n } else {\n traverseDependency(dependency);\n }\n }\n\n return tree;\n\n function traverseDependency(dependency) {\n const localConfig = config.clone();\n localConfig.filename = dependency;\n\n let dependencies = module.exports._getDependencies(localConfig);\n\n if (config.filter) {\n debug('using filter function to filter out dependencies');\n debug(`number of dependencies before filtering: ${dependencies.length}`);\n dependencies = dependencies.filter(function (filePath) {\n return localConfig.filter(filePath, localConfig.filename);\n });\n debug(`number of dependencies after filtering: ${dependencies.length}`);\n }\n\n debug('cabinet-resolved all dependencies: ', dependencies); // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n\n tree[dependency] = dependencies;\n const filePathMap = config.pathMap.find(pathMapEntry => pathMapEntry.file === dependency);\n if (!filePathMap) throw new Error(`file ${dependency} is missing from PathMap`);\n config.visited[dependency] = {\n pathMap: filePathMap,\n missing: config.nonExistent[dependency],\n error: config.errors[dependency]\n };\n stack.push(...dependencies);\n }\n\n function populateFromCache(dependency) {\n debug(`already visited ${dependency}. Will try to find it and its dependencies in the cache`);\n const dependenciesStack = [dependency];\n\n while (dependenciesStack.length) {\n findAllDependenciesInCache(dependenciesStack);\n }\n }\n\n function findAllDependenciesInCache(dependenciesStack) {\n const dependency = dependenciesStack.pop();\n\n if (!config.visited[dependency]) {\n debug(`unable to find ${dependency} in the cache, it was probably filtered before`);\n return;\n }\n\n debug(`found ${dependency} in the cache`);\n const dependencies = config.visited[dependency].pathMap.dependencies.map(d => d.resolvedDep); // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n\n tree[dependency] = dependencies;\n config.pathMap.push(config.visited[dependency].pathMap);\n\n if (config.visited[dependency].missing) {\n config.nonExistent[dependency] = config.visited[dependency].missing;\n }\n\n if (config.visited[dependency].error) {\n config.errors[dependency] = config.visited[dependency].error;\n }\n\n dependencies.forEach(d => {\n if (!tree[d]) dependenciesStack.push(d);\n });\n }\n}", "function iterate(obj) {\n // watch for objects we've already iterated so we won't end in endless cycle\n // for cases like var foo = {}; foo.bar = foo; iterate(foo);\n var walked = [];\n var stack = [{obj: obj, stack: ''}];\n while (stack.length > 0) {\n var item = stack.pop();\n var obj = item.obj;\n for (var property in obj) {\n if (obj.hasOwnProperty(property)) {\n if (typeof obj[property] == \"object\") {\n // check if we haven't iterated through the reference yet\n var alreadyFound = false;\n for (var i = 0; i < walked.length; i++) {\n if (walked[i] === obj[property]) {\n alreadyFound = true;\n break;\n }\n }\n // new object reference\n if (!alreadyFound) {\n walked.push(obj[property]);\n stack.push({obj: obj[property], stack: item.stack + '.' + property});\n }\n }\n else {\n console.log(item.stack + '.' + property + \"=\" + obj[property]);\n }\n }\n }\n }\n }", "detectCycles() {\n\t\t\tconst flatOrder = Array.from(this.orderedNodes);\n\n\t\t\tfor (let i = 0; i < flatOrder.length; i++) {\n\t\t\t\tconst node = flatOrder[i];\n\n\t\t\t\tfor (const imp of node.analyze.value.importFirstUsage) {\n\t\t\t\t\tconst subnode = node.getNodeFromRelativeDependency(imp.source);\n\t\t\t\t\tif (subnode === undefined) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst resolved = subnode.resolveImport(imp.imported, imp.loc);\n\t\t\t\t\tif (resolved.type !== \"FOUND\") {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Hoisted exports will always be accessible\n\t\t\t\t\tif (resolved.record.valueType === \"function\") {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst dep = resolved.node;\n\n\t\t\t\t\tconst isBefore = flatOrder.indexOf(dep) > i;\n\t\t\t\t\tif (isBefore) {\n\t\t\t\t\t\tthis.flagCycle(node, dep, imp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function helper(node, visited, stack) {\n visited.add(node);\n if (deps[node] != undefined) {\n for (let i = 0; i < deps[node].length; i++) {\n let dep_node = deps[node][i];\n if (!visited.has(dep_node)) {\n helper(dep_node, visited, stack);\n }\n }\n }\n stack.push(node);\n}", "async function walk (oid) {\n visited.add(oid);\n let { type, object } = await GitObjectManager.read({ fs, gitdir, oid });\n if (type !== 'commit') {\n throw new Error(`Expected type commit but type is ${type}`)\n }\n let commit = GitCommit.from(object);\n let parents = commit.headers().parent;\n for (oid of parents) {\n if (!finishingSet.has(oid) && !visited.has(oid)) {\n await walk(oid);\n }\n }\n }", "function _dfs(obj, cb) { \n\t// Recursive fn\n\tfunction _walk(current) {\n\t\t// Run callback\n\t\tcb(current);\n\t\t// Destructure to get children\n\t\tconst {\n\t\t\tchildren\n\t\t} = current;\n\n\t\tif (children) {\n\t\t\tchildren.forEach(e => {\n\t\t\t\t_walk(e);\n\t\t\t});\n\t\t}\n\t};\n\n\twalk(obj);\n}", "function walkObject()\n\t\t{\n\t\t\tfunction process(value, index, depth)\n\t\t\t{\n\t\t\t\ttrace(indent(depth) + '[' +index+ '] ' + value);\n\t\t\t}\n\n\t\t\tUtils.walk(arr, process);\n\t\t\tUtils.walk(obj, process);\n\t\t}", "function visit(name) {\n var field = map[name];\n if (name in marked) {\n console.warn(\"Cyclic dependency among fields detected in %O\", fieldList);\n return fieldList;\n }\n if (!(name in visited)) {\n marked[name] = true;\n forEachDep(field, function(depName) {\n visit(depName);\n });\n delete marked[name];\n visited[name] = true;\n result.push(field);\n }\n }", "async function walk(oid) {\n if (visited.has(oid)) return\n visited.add(oid);\n const { type, object } = await _readObject({ fs, cache, gitdir, oid });\n if (type === 'tag') {\n const tag = GitAnnotatedTag.from(object);\n const obj = tag.headers().object;\n await walk(obj);\n } else if (type === 'commit') {\n const commit = GitCommit.from(object);\n const tree = commit.headers().tree;\n await walk(tree);\n } else if (type === 'tree') {\n const tree = GitTree.from(object);\n for (const entry of tree) {\n // add blobs to the set\n // skip over submodules whose type is 'commit'\n if (entry.type === 'blob') {\n visited.add(entry.oid);\n }\n // recurse for trees\n if (entry.type === 'tree') {\n await walk(entry.oid);\n }\n }\n }\n }", "function checkChildren(object) {\n let analyzedObject = {\n elements: [],\n };\n // go through every child and fetch component decorators\n if (typeof object.children != 'undefined') {\n object.children.forEach(val => {\n let componentInfo = getComponentInfo(val);\n let componentDecorators = getChildComponentDecorators(componentInfo);\n let componentInputs = getChildComponentInputs(componentInfo);\n\n // Create the element and put it in the array\n let element = {\n componentInfo: componentInfo,\n componentDecorators: componentDecorators,\n inputs: componentInputs,\n };\n analyzedObject.elements = [...analyzedObject.elements, element];\n //checkChildren(val);\n });\n }\n return analyzedObject;\n}", "function traverse(config, dependencies, bindings, root, visit) {\n // a stack\n var stack = new Array();\n stack.push(root);\n\n while (stack.length > 0) {\n var plugin = stack.pop();\n\n visit(config[plugin]);\n\n // get all children\n if (!dependencies.hasOwnProperty(plugin)) {\n console.error('Could not find plugin', plugin);\n break;\n }\n var consumes = dependencies[plugin];\n\n for (var i = 0; i < consumes.length; i++) {\n if (!bindings.hasOwnProperty(consumes[i]) || bindings[consumes[i]].length == 0) {\n console.error('Could not find service implementation', consumes[i]);\n break;\n }\n\n stack.push(bindings[consumes[i]][0]);\n }\n }\n}", "checkNodesForCircularDependencies(graph) {\n // for each node in the dependency graph, check for circular dependencies\n for (let nodeName in this.graph.nodes) {\n let dependencyPathTaken = []; // record of path when looking for cicular dependency; reset each time\n logger_1.default.system.debug(`BootDependencyGraph.checkNodesForCircularDependencies -- nodeName=${nodeName}`);\n let isCircular = this.testOneNodeForCircularPath(dependencyPathTaken, nodeName);\n if (isCircular) {\n this.errorDiag = new DGDiagnostics(`${this.context} circular dependency`, dependencyPathTaken);\n this.graphState = \"error\";\n throw this.errorDiag.description;\n }\n }\n }", "function cycleCheck(node, path) {\n if (!node) {\n return;\n }\n const children = [...node.loadDependencyNames, ...node.lazyDependencyNames];\n for (const child of children) {\n if (path.indexOf(child) !== -1) {\n throw new Error(`Cyclic dependency detected! Module ${node.name} has a dependency ${child} that is also a parent!`);\n }\n cycleCheck(moduleDefinitions[child], [...path, child]);\n }\n }", "function walkObjectProcess()\n\t\t{\n\t\t\t// the function to process the children\n\t\t\t\tfunction process(element, index, depth)\n\t\t\t\t{\n\t\t\t\t\ttrace (indent(depth) + '/' + element.name);\n\t\t\t\t}\n\n\t\t\t// the function to identify the children\n\t\t\t\tfunction getContents(element)\n\t\t\t\t{\n\t\t\t\t\treturn element instanceof Folder ? element.contents : null;\n\t\t\t\t}\n\n\t\t\t// start processing\n\t\t\t\tvar folder = new Folder('{user}');\n\t\t\t\tUtils.walk (folder, process, getContents)\n\t\t}", "function traverse(node, func) {\n\tfunc(node);//1\n\tfor (var key in node) { //2\n\t\tif (node.hasOwnProperty(key)) { //3\n\t\t\tvar child = node[key];\n\t\t\tif (typeof child === 'object' && child !== null) { //4\n\n\t\t\t\tif (Array.isArray(child)) {\n\t\t\t\t\tchild.forEach(function (node) { //5\n\t\t\t\t\t\ttraverse(node, func);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\ttraverse(child, func); //6\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "function walkImpl(root, traversalStrategy, beforeFunc, afterFunc, context, collectResults) {\n return (function _walk(stack, value, key, parent) {\n if (isObject(value) && stack.indexOf(value) >= 0)\n throw new TypeError('A cycle was detected at ' + value);\n\n if (beforeFunc) {\n var result = beforeFunc.call(context, value, key, parent);\n if (result === stopWalk) return stopWalk;\n if (result === stopRecursion) return; // eslint-disable-line consistent-return\n }\n\n var subResults;\n var target = traversalStrategy(value);\n\n if (isObject(target) && Object.keys(target).length > 0) {\n // Collect results from subtrees in the same shape as the target.\n if (collectResults) subResults = Array.isArray(target) ? [] : {};\n\n var ok = each(target, function(obj, key) {\n var result = _walk(copyAndPush(stack, value), obj, key, value);\n if (result === stopWalk) return false;\n if (subResults) subResults[key] = result;\n });\n if (!ok) return stopWalk;\n }\n if (afterFunc) return afterFunc.call(context, value, key, parent, subResults);\n })([], root);\n}", "function iterDeps(method, obj, depKey, seen, meta) {\n\n var guid = guidFor(obj);\n if (!seen[guid]) seen[guid] = {};\n if (seen[guid][depKey]) return;\n seen[guid][depKey] = true;\n\n var deps = meta.deps;\n deps = deps && deps[depKey];\n if (deps) {\n for(var key in deps) {\n if (DEP_SKIP[key]) continue;\n method(obj, key);\n }\n }\n}", "traverseDown (callback, object, property, parent) {\n\t\t\tif (Array.isArray(object)) {\n\t\t\t\tobject.forEach((item, i) => _.traverse(callback, item, i, object));\n\t\t\t}\n\t\t\telse if (Mavo.isPlainObject(object)) {\n\t\t\t\tfor (var prop in object) {\n\t\t\t\t\t_.traverse(callback, object[prop], prop, object);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function traverse(val){_traverse(val,seenObjects);seenObjects.clear();}", "function traverse(val){_traverse(val,seenObjects);seenObjects.clear();}", "visit(node) {\n node.state = 1 /* IN_PROGRESS */;\n for (const edge of Object.values(node.dependencies)) {\n const target = this.nodes[edge.to];\n switch (target.state) {\n case 2 /* VISITED */: break; // Do nothing, since node was already visited\n case 1 /* IN_PROGRESS */:\n this.visitOpenNode(node, target, edge);\n break;\n case 0 /* NOT_VISITED */: this.visit(target);\n }\n }\n if (node.state !== 2 /* VISITED */) {\n node.state = 2 /* VISITED */;\n this.sortedNodeList.push(node.hash);\n }\n }", "async function walk (oid) {\n visited.add(oid);\n let { type, object } = await GitObjectManager.read({ fs, gitdir, oid });\n if (type === 'commit') {\n let commit = GitCommit.from(object);\n let tree = commit.headers().tree;\n await walk(tree);\n } else if (type === 'tree') {\n let tree = GitTree.from(object);\n for (let entry of tree) {\n visited.add(entry.oid);\n // only recurse for trees\n if (entry.type === 'tree') {\n await walk(entry.oid);\n }\n }\n }\n }", "function visit(node, visitFunction, parentsList) {\n\t\tvar parents = (typeof parentsList === 'undefined') ? [] : parentsList;\n\t\n\t\tvisitFunction = visitFunction || false;\n\t\tif (visitFunction && visitFunction(node,parentsList) == false) {\n\t\t\treturn;\n\t\t}\n\t\tfor (key in node) {\n\t\t\tif (node.hasOwnProperty(key)) {\n\t\t\t\tchild = node[key];\n\t\t\t\tpath = [ node ];\n\t\t\t\tpath.push(parents);\n\t\t\t\tif (typeof child === 'object' && child !== null) {\n\t\t\t\t\tvisit(child, visitFunction, path);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function visitNodes(node, action, context)\r\n {\r\n for (var fieldname in node)\r\n {\r\n var childNode = node[fieldname];\r\n if (childNode == undefined)\r\n continue;\r\n\r\n action(node, fieldname, context);\r\n if (typeof(childNode) != 'object')\r\n continue;\r\n\r\n if (childNode instanceof Array)\r\n {\r\n for (var i = 0; i < childNode.length; i++)\r\n {\r\n if (typeof(childNode[i]) == 'object')\r\n visitNodes(childNode[i], action, context);\r\n }\r\n }\r\n else\r\n {\r\n visitNodes(childNode, action, context);\r\n }\r\n }\r\n }", "function inOrderTraversal(node) {}", "function traverse (obj, callback, trail) {\n trail = trail || [];\n\n Object.keys(obj).forEach(function (key) {\n let value = obj[key]\n , undef = typeof value === \"undefined\" || value === null\n ;\n\n if (!undef && Object.getPrototypeOf(value) === Object.prototype)\n traverse(value, callback, trail.concat(key));\n else\n callback.call(obj, key, value, trail);\n });\n}", "static _coalesceConvert_doRecurse (obj, fn) {\n\t\tif (typeof obj !== \"object\") throw new TypeError(`Non-object ${obj} passed to object handler!`);\n\n\t\tif (obj instanceof Array) {\n\t\t\tfn(obj);\n\n\t\t\tobj.forEach(it => {\n\t\t\t\tif (typeof it !== \"object\") return;\n\t\t\t\tthis._coalesceConvert_doRecurse(it, fn)\n\t\t\t});\n\t\t} else {\n\t\t\tif (obj.type) {\n\t\t\t\tconst childMeta = Renderer.ENTRIES_WITH_CHILDREN.find(it => it.type === obj.type && obj[it.key]);\n\t\t\t\tif (childMeta) {\n\t\t\t\t\tthis._coalesceConvert_doRecurse(obj[childMeta.key], fn);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "traverse(fn, skipSelf = false) {\n const me = this;\n\n if (!skipSelf) {\n fn.call(me, me);\n }\n if (me.isLoaded) me.children.forEach((child) => child.traverse(fn));\n }", "function iterateOverChildren(obj)\n\t\t{\n\t\t\tfor(var key in obj)\n\t\t\t{\n\t\t\t\tvar value = obj[key];\n\n\t\t\t\tif(value instanceof Object)\n\t\t\t\t{\n\t\t\t\t\titerateOverChildren(value);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttranslationList.push({\n\t\t\t\t\t\tobject: obj,\n\t\t\t\t\t\tproperty: key\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function traverse(obj) {\n _lodash2.default.each(obj, function (val, indexOrProp) {\n // Move deeper into the object\n var next = obj[indexOrProp];\n\n // If we can go no further, then quit\n if (MongoObject.isBasicObject(next)) {\n traverse(next);\n } else if (Array.isArray(next)) {\n obj[indexOrProp] = _lodash2.default.without(next, REMOVED_MARKER);\n traverse(obj[indexOrProp]);\n }\n });\n }", "function collectTransitiveDependencies(collected, depGraph, fromName) {\n\t var immediateDeps = depGraph[fromName];\n\t if (immediateDeps) {\n\t Object.keys(immediateDeps).forEach(function (toName) {\n\t if (!collected[toName]) {\n\t collected[toName] = true;\n\t collectTransitiveDependencies(collected, depGraph, toName);\n\t }\n\t });\n\t }\n\t}", "function traverseObject(someObj) {\r\n \r\n console.log(someObj);\r\n}", "function traverseDependencyGraph(graph, package, affectedPackages) {\n // Terminate early if the package has been visited.\n if (affectedPackages.has(package)) {\n return;\n }\n\n const consumingPackages = graph[package];\n\n if (!consumingPackages) {\n return;\n }\n\n consumingPackages.forEach(consumingPackage => {\n traverseDependencyGraph(graph, consumingPackage, affectedPackages);\n affectedPackages.add(consumingPackage);\n });\n}", "function traverse(val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n }", "function walk(obj) {\n Object.getOwnPropertyNames(obj).forEach(function (name) {\n if (!whitelisted[name]) {\n if (!clobber(obj, name)) {\n // FIXME: this is lame\n failed.push('could not clobber \"' + name + '\": ' + e.message);\n }\n }\n });\n\n for (var name in blacklisted) {\n if (obj.hasOwnProperty(name) && !clobber(obj, name)) {\n // FIXME: this is lame\n failed.push('could not clobber \"' + name + '\": ' + e.message);\n }\n }\n\n var prototype = obj.constructor.prototype;\n if (prototype && prototype !== obj) {\n walk(prototype);\n }\n\n var proto = Object.getPrototypeOf(obj);\n if (proto && proto !== obj) {\n walk(proto);\n }\n }", "function collectTransitiveDependencies(collected, depGraph, fromName) {\n var immediateDeps = depGraph[fromName];\n if (immediateDeps) {\n Object.keys(immediateDeps).forEach(function (toName) {\n if (!collected[toName]) {\n collected[toName] = true;\n collectTransitiveDependencies(collected, depGraph, toName);\n }\n });\n }\n}", "function collectTransitiveDependencies(collected, depGraph, fromName) {\n var immediateDeps = depGraph[fromName];\n if (immediateDeps) {\n Object.keys(immediateDeps).forEach(function (toName) {\n if (!collected[toName]) {\n collected[toName] = true;\n collectTransitiveDependencies(collected, depGraph, toName);\n }\n });\n }\n}", "function walkDeps(childs, path, tree) {\n for (var i = 0, size = childs.length; i < size; i++) {\n var cur = childs[i];\n // check if the path contains the child (a circular dependency)\n if (path.indexOf(cur) > -1) {\n path.push(cur);\n return true;\n }\n // walk the children of this child\n var curChilds = tree[cur];\n if (curChilds != null) {\n // push and pop the child before and after the sub-walk\n path.push(cur);\n // recursively walk children\n var res = walkDeps(curChilds, path, tree);\n if (res)\n return res;\n path.pop();\n }\n }\n return false;\n }", "function object_traverse(callback, obj) {\n\n\t// If the callback returns false, return.\n\tvar cret = callback(obj);\n\tif (cret !== undefined) {\n\t\treturn cret;\n\t}\n\n\t// Traverse properties\n\t// TODO: Handle non-enumerable properties, etc\n\tvar p;\n\tfor (p in obj) {\n\t\tif (typeof obj[p] === 'object') {\n\t\t\tvar ret = object_traverse(callback, obj[p]);\n\t\t\tif (ret !== undefined) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Explicitly return nothing\n\treturn undefined;\n}", "function traverse(val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n }", "function traverse(val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n }", "function scan(obj, parent) {\r\n var k;\r\n if (obj instanceof Object) {\r\n for (k in obj) {\r\n if (obj.hasOwnProperty(k)) {\r\n //recursive call to scan property\r\n scan(obj[k], parent + \"['\" + k + \"']\");\r\n }\r\n }\r\n } else {\r\n\r\n };\r\n arr.push({\r\n parent: parent,\r\n obj: obj\r\n });\r\n }", "traverse(fn, skipSelf = false) {\n const {\n children\n } = this;\n\n if (!skipSelf) {\n fn.call(this, this);\n } // Simply testing whether there is non-zero children length\n // is 10x faster than using this.isLoaded\n\n for (let i = 0, l = children && children.length; i < l; i++) {\n children[i].traverse(fn);\n }\n }", "function re_dependency(re){var i,l,r\n switch(re[0]){\n case 0:\n case 1:\n case 8:\n return\n case 2:\n case 3:\n for(i=0,l=re[1].length;i<l;i++)\n if(r=re_dependency(re[1][i]))return r\n return\n case 4:\n return re_dependency(re[3])\n case 5:\n return re[1]\n case 6:\n case 7:\n return re_dependency(re[1])\n default:\n throw Error('re_dependency: unknown re type: '+re[0])}}", "inorderTraversal() {\n\n }", "function collectTransitiveDependencies(collected, depGraph, fromName) {\n var immediateDeps = depGraph[fromName];\n\n if (immediateDeps) {\n var _arr3 = Object.keys(immediateDeps);\n\n for (var _i3 = 0; _i3 < _arr3.length; _i3++) {\n var toName = _arr3[_i3];\n\n if (!collected[toName]) {\n collected[toName] = true;\n collectTransitiveDependencies(collected, depGraph, toName);\n }\n }\n }\n}", "function traverse(val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse(val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse(val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse(val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse(val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse(val) {\n _traverse(val, seenObjects);\n\n seenObjects.clear();\n }", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n }", "function setDepth(obj) {\n if (obj.children) {\n obj.children.forEach(function (d) {\n depthTemp++;\n setDepth(d);\n if (depthTemp > depth) {\n depth = depthTemp;\n }\n depthTemp = 0;\n });\n }\n depthTemp++;\n }", "function detectCycles (rows) {\n var cyclicalModules = new Set()\n var checked = new Set()\n rows.forEach(function (module) {\n var visited = []\n\n check(module)\n\n function check (row) {\n var i = visited.indexOf(row)\n if (i !== -1) {\n checked.add(row)\n for (; i < visited.length; i++) {\n cyclicalModules.add(visited[i])\n }\n return\n }\n if (checked.has(row)) return\n visited.push(row)\n Object.keys(row.deps).forEach(function (k) {\n var dep = row.deps[k]\n var other = rows.byId[dep]\n if (other) check(other, visited)\n })\n visited.pop()\n }\n })\n\n // mark cyclical dependencies\n for (var i = 0; i < rows.length; i++) {\n rows[i][kEvaluateOnDemand] = cyclicalModules.has(rows[i])\n }\n return cyclicalModules.size > 0\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n }", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n }", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n }", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n }", "function traverse (val) {\r\n _traverse(val, seenObjects);\r\n seenObjects.clear();\r\n}", "function collectTransitiveDependencies(collected, depGraph, fromName) {\n var immediateDeps = depGraph[fromName];\n\n if (immediateDeps) {\n for (var _i4 = 0, _Object$keys2 = Object.keys(immediateDeps); _i4 < _Object$keys2.length; _i4++) {\n var toName = _Object$keys2[_i4];\n\n if (!collected[toName]) {\n collected[toName] = true;\n collectTransitiveDependencies(collected, depGraph, toName);\n }\n }\n }\n}", "function collectTransitiveDependencies(collected, depGraph, fromName) {\n var immediateDeps = depGraph[fromName];\n\n if (immediateDeps) {\n for (var _i4 = 0, _Object$keys2 = Object.keys(immediateDeps); _i4 < _Object$keys2.length; _i4++) {\n var toName = _Object$keys2[_i4];\n\n if (!collected[toName]) {\n collected[toName] = true;\n collectTransitiveDependencies(collected, depGraph, toName);\n }\n }\n }\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}", "function traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}" ]
[ "0.67661756", "0.650305", "0.65017045", "0.6474099", "0.64717424", "0.6372098", "0.6370522", "0.6334102", "0.6309952", "0.6289112", "0.6213317", "0.6195653", "0.61104006", "0.6004782", "0.60006046", "0.5977171", "0.5937908", "0.5914214", "0.5798761", "0.5770098", "0.576878", "0.5751224", "0.57433236", "0.5741472", "0.57220197", "0.57054675", "0.5697442", "0.56966084", "0.5679637", "0.56645936", "0.56300557", "0.56109697", "0.56109697", "0.5595631", "0.5593021", "0.5587069", "0.5582583", "0.55743647", "0.55523497", "0.5551709", "0.5545765", "0.55144817", "0.54919946", "0.5483582", "0.54705244", "0.54689294", "0.54470325", "0.5445011", "0.54282916", "0.54282916", "0.54240906", "0.53969663", "0.53837526", "0.53837526", "0.5380925", "0.5373061", "0.53720933", "0.5365315", "0.53640026", "0.5354974", "0.5354974", "0.5354974", "0.5354974", "0.5354974", "0.5342796", "0.53409874", "0.5340351", "0.5340284", "0.5340218", "0.5340218", "0.5340218", "0.5340218", "0.5332873", "0.531553", "0.531553", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613", "0.53129613" ]
0.0
-1
Creates a `Ref` whose value is updated in an effect, ensuring the most recent value is the one rendered with. Generally only required for Concurrent mode usage where previous work in `render()` may be discarded befor being used. This is safe to access in an event handler.
function useCommittedRef(value) { var ref = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(value); Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () { ref.current = value; }, [value]); return ref; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function useLiveRef(value) {\n var ref = React.useRef(value);\n useIsomorphicEffect.useIsomorphicEffect(function () {\n ref.current = value;\n });\n return ref;\n}", "function useCommittedRef(value) {\n var ref = React.useRef(value);\n React.useEffect(function () {\n ref.current = value;\n }, [value]);\n return ref;\n }", "function useCommittedRef(value) {\n var ref = react.useRef(value);\n react.useEffect(function () {\n ref.current = value;\n }, [value]);\n return ref;\n}", "function createRef() {\n var refObject = (function (element) {\n refObject.current = element;\n });\n // This getter is here to support the deprecated value prop on the refObject.\n Object.defineProperty(refObject, 'value', {\n get: function () {\n return refObject.current;\n }\n });\n refObject.current = null;\n return refObject;\n}", "function useCommittedRef(value) {\n var ref = (0, _react.useRef)(value);\n (0, _react.useEffect)(function () {\n ref.current = value;\n }, [value]);\n return ref;\n}", "function useCommittedRef(value) {\n var ref = (0, _react.useRef)(value);\n (0, _react.useEffect)(function () {\n ref.current = value;\n }, [value]);\n return ref;\n}", "function useLatestRef(value) {\n var ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(value);\n ref.current = value;\n return ref;\n}", "function useCommittedRef(value) {\n var ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(value);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n ref.current = value;\n }, [value]);\n return ref;\n}", "function useCommittedRef(value) {\n var ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(value);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n ref.current = value;\n }, [value]);\n return ref;\n}", "function useCommittedRef(value) {\n var ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(value);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n ref.current = value;\n }, [value]);\n return ref;\n}", "function useCommittedRef(value) {\n var ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(value);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n ref.current = value;\n }, [value]);\n return ref;\n}", "function useUpdatedRef(value) {\n var valueRef = (0, _react.useRef)(value);\n valueRef.current = value;\n return valueRef;\n}", "function useUpdatedRef(value) {\n var valueRef = react.useRef(value);\n valueRef.current = value;\n return valueRef;\n}", "function useRef(initialValue) {\n return useRefLike('useRef', initialValue);\n}", "function useRef(initialValue) {\n return useRefLike('useRef', initialValue);\n}", "function useUpdatedRef(value) {\n var valueRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(value);\n valueRef.current = value;\n return valueRef;\n}", "function useUpdatedRef(value) {\n var valueRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(value);\n valueRef.current = value;\n return valueRef;\n}", "function useUpdatedRef(value) {\n var valueRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(value);\n valueRef.current = value;\n return valueRef;\n}", "function useUpdatedRef(value) {\n var valueRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(value);\n valueRef.current = value;\n return valueRef;\n}", "function useUpdatedRef(value) {\n var valueRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(value);\n valueRef.current = value;\n return valueRef;\n}", "function useUpdatedRef(value) {\n var valueRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(value);\n valueRef.current = value;\n return valueRef;\n}", "function useUpdatedRef(value) {\n var valueRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(value);\n valueRef.current = value;\n return valueRef;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n Object.seal(refObject);\n return refObject;\n }", "function createRef(){var refObject={current:null};{Object.seal(refObject);}return refObject;}", "function createRef(){var refObject={current:null};{Object.seal(refObject);}return refObject;}", "function createRef() {\n var refObject = {\n current: null,\n };\n\n {\n Object.seal(refObject);\n }\n\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}" ]
[ "0.67974037", "0.6466358", "0.6451719", "0.6444151", "0.637012", "0.637012", "0.63682795", "0.633751", "0.633751", "0.633751", "0.633751", "0.6208342", "0.6153886", "0.6145445", "0.6145445", "0.60857815", "0.60857815", "0.60857815", "0.60857815", "0.60857815", "0.60857815", "0.6072825", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60726696", "0.60673237", "0.6062184", "0.6062184", "0.6051297", "0.6005628", "0.6005628", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711", "0.5984711" ]
0.64727104
9
Returns a controller object for setting a timeout that is properly cleaned up once the component unmounts. New timeouts cancel and replace existing ones.
function useTimeout() { var isMounted = Object(_useMounted__WEBPACK_IMPORTED_MODULE_1__["default"])(); // types are confused between node and web here IDK var handleRef = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(); Object(_useWillUnmount__WEBPACK_IMPORTED_MODULE_2__["default"])(function () { return clearTimeout(handleRef.current); }); return Object(react__WEBPACK_IMPORTED_MODULE_0__["useMemo"])(function () { var clear = function clear() { return clearTimeout(handleRef.current); }; function set(fn, delayMs) { if (delayMs === void 0) { delayMs = 0; } if (!isMounted()) return; clear(); if (delayMs <= MAX_DELAY_MS) { // For simplicity, if the timeout is short, just set a normal timeout. handleRef.current = setTimeout(fn, delayMs); } else { setChainedTimeout(handleRef, fn, Date.now() + delayMs); } } return { set: set, clear: clear }; }, []); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function useTimeout () {\n let timer = null;\n const vm = vue.getCurrentInstance();\n\n function removeTimeout () {\n if (timer !== null) {\n clearTimeout(timer);\n timer = null;\n }\n }\n\n vue.onDeactivated(removeTimeout);\n vue.onBeforeUnmount(removeTimeout);\n\n return {\n removeTimeout,\n\n registerTimeout (fn, delay) {\n removeTimeout();\n\n if (vmIsDestroyed(vm) === false) {\n timer = setTimeout(fn, delay);\n }\n }\n }\n }", "function useTimeout() {\n var isMounted = Object(_useMounted__WEBPACK_IMPORTED_MODULE_2__[\"default\"])();\n var handle = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])();\n\n var clear = function clear() {\n return clearTimeout(handle.current);\n };\n\n Object(_useWillUnmount__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(clear);\n return {\n set: function set(fn, ms) {\n if (!isMounted()) return;\n clear();\n handle.current = setTimeout(fn, ms);\n },\n clear: clear\n };\n}", "cancel() {\n clearTimeout(this.timeoutID);\n delete this.timeoutID;\n }", "constructor(timeout) {\n this.initialTimeout = timeout\n this.reset()\n }", "constructor(timeout_in_secs) {\n this.initial_timeout_in_secs = timeout_in_secs\n this.reset()\n }", "function timerController() {\n this.model = new timerModel();\n this.view = new timerView();\n}", "@action.bound\n setTimeoutVerification() {\n this.clearTimeoutVerification();\n this.timeout_verification_button = setTimeout(() => {\n this.clearVerification();\n }, 3600000);\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 }", "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 }", "timeout(ms) {\n this._timeout = ms;\n return this;\n }", "function Timer(timeout) {\n this.timeout = timeout || 0;\n\n this.reset();\n }", "stop() {\n const privateProps = internal(this);\n clearTimeout(privateProps.timeoutId);\n privateProps.timeoutId = null;\n }", "setHideTimeout() {\n this.hide_timeout = setInterval(() => {\n this.props.setModalRootComponent(undefined)\n this.props.setModalVisibility(false)\n }, 2 * 10 * 1000)\n }", "_killMyself() {\n this.state.timeout = null;\n this.close({ notification: this.state.notification, by: 'timeout' });\n }", "timeoutInvalidationRequestFromPlayer() {\n clearTimeout(this.claimTimeout);\n this.claimTimeout = false;\n }", "function openTimeoutModal($scope, $modal) {\n closeModals($scope);\n $scope.timedout = $modal.open({\n templateUrl: 'views/timedout-dialog.html',\n windowClass: 'modal-danger'\n });\n}", "setTimeout(s) {\r\n this.timeout = s;\r\n return this;\r\n }", "function timeout(time) {\n return trait(function () {\n if (arguments.length === 1) {\n const target = arguments[0];\n target[timeoutSymbol] = time;\n }\n else if (arguments.length === 2 && typeof arguments[1] === \"string\" || typeof arguments[1] === \"symbol\") {\n const target = arguments[0];\n const property = arguments[1];\n target[property][timeoutSymbol] = time;\n }\n else if (arguments.length === 2) {\n const context = arguments[0];\n const ctor = arguments[1];\n context.timeout(time);\n }\n else if (arguments.length === 3) {\n if (typeof arguments[2] === \"function\") {\n const context = arguments[0];\n const instance = arguments[1];\n const method = arguments[2];\n context.timeout(time);\n }\n else if (typeof arguments[1] === \"string\" || typeof arguments[1] === \"symbol\") {\n const proto = arguments[0];\n const prop = arguments[1];\n const descriptor = arguments[2];\n proto[prop][timeoutSymbol] = time;\n }\n }\n });\n}", "function t(e) {\n return {\n setTimeout: function setTimeout(t, o) {\n var r = e.setTimeout(t, o);\n return {\n remove: function remove() {\n return e.clearTimeout(r);\n }\n };\n }\n };\n }", "function cancellableTimeout(f, milliseconds) {\n\tvar timerId = 0;\n\n\tif (Number(milliseconds) === NaN || milliseconds <= 0) throw new Error('time:' + milliseconds + ' must be a number greater than zero.');\n\tif (typeof f !== 'function') throw new Error('action is not a function');\n\n\treturn {\n\t\tpromise: function promise(arg) {\n\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\ttimerId = setTimeout(function () {\n\t\t\t\t\ttimerId = 0;\n\t\t\t\t\tresolve(f.call(undefined, arg));\n\t\t\t\t}, Number(milliseconds));\n\t\t\t});\n\t\t},\n\t\tcancel: function cancel() {\n\t\t\tif (timerId > 0) {\n\t\t\t\tclearTimeout(timerId);\n\t\t\t}\n\t\t}\n\t};\n}", "set timeout(milliseconds) {\n this._timeout = milliseconds;\n }", "_dismissAfter(duration) {\n // Note that we need to cap the duration to the maximum value for setTimeout, because\n // it'll revert to 1 if somebody passes in something greater (e.g. `Infinity`). See #17234.\n this._durationTimeoutId = setTimeout(() => this.dismiss(), Math.min(duration, MAX_TIMEOUT));\n }", "static timeout(t) {\n if ( !(typeof t === 'undefined' ))\n _timeout = t;\n else\n return _timeout;\n }", "function cleanUpTimeout(inv) {\n if (!inv) return;\n delete timeouts[inv.timerKey];\n delete inv.timerKey;\n inv.release(); // return to pool \n}", "function setTimeout(timeout) {\n options.requestTimeout = Number(timeout);\n instance.defaults.timeout = options.requestTimeout;\n }", "setTimeout(timeout) {\n if (this.global.jasmine) {\n // eslint-disable-next-line no-underscore-dangle\n this.global.jasmine.DEFAULT_TIMEOUT_INTERVAL = timeout;\n } else {\n this.global[Symbol.for('TEST_TIMEOUT_SYMBOL')] = timeout;\n }\n }", "cancel() {\n if (this.timeoutId) {\n clearTimeout(this.timeoutId);\n }\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n this.timeoutId = undefined;\n this.intervalId = undefined;\n this.sequence = 0;\n this.isActive = false;\n this.times = [];\n if (this.rejectCallback) {\n this.rejectCallback(new Error('cancel'));\n }\n this.rejectCallback = undefined;\n }", "setAutoHideTimer () {\n const autoHideDuration = this.props.autoHideDuration\n\n if (autoHideDuration > 0) {\n clearTimeout(this.timerAutoHideId)\n this.timerAutoHideId = setTimeout(() => {\n if (this.props.open !== null && this.props.onRequestClose) {\n this.props.onRequestClose(Snackbar.reasons.TIMEOUT)\n } else {\n this.setState({ open: false })\n }\n }, autoHideDuration)\n }\n }", "unmountActions() {\n clearInterval(this.interval);\n clearInterval(this.timerInterval);\n clearTimeout(this.pauseBetweenClicksTimeout);\n clearInterval(this.countdownInterval);\n clearTimeout(this.getTraitorPosTimeout);\n }", "function cancellableTimeout(f, milliseconds) { \n\tlet timerId = 0\n\t\n\tif (Number(milliseconds) === NaN || milliseconds <= 0) throw new Error('time:' + milliseconds + ' must be a number greater than zero.')\n\tif (typeof f !== 'function') throw new Error('action is not a function')\n\n\treturn {\n\t\tpromise: (arg) => new Promise((resolve, reject) => {\n\t\t\ttimerId = setTimeout(() => {\n\t\t\t\t\ttimerId = 0 \t\t\t\t\t \n\t\t\t\t\tresolve(f.call(undefined, arg))\n\t\t\t\t}, Number(milliseconds))\n\t\t}),\n\t\tcancel: () => {\n\t\t\tif (timerId > 0) {\n\t\t\t\tclearTimeout(timerId)\n\t\t\t}\n\t\t}\n\t}\n}", "function instantiateController() {\n return new PaneController(\n mockScope,\n mockAgentService,\n mockWindow,\n mockLocation,\n mockAttrs\n );\n }", "setTimeoutSeconds(timeoutSeconds) {\n if (timeoutSeconds) {\n const integerValue = parseInt(String(timeoutSeconds));\n this.timeoutSeconds = Math.max(0, integerValue);\n }\n return this;\n }", "function _clearDelayTimeouts() {\n var _ref = this._(key),\n showTimeout = _ref.showTimeout,\n hideTimeout = _ref.hideTimeout;\n\n clearTimeout(showTimeout);\n clearTimeout(hideTimeout);\n }", "clearWakeTimeout() {\n if (this.private._timeout) {\n clearTimeout(this.private._timeout);\n }\n return this;\n }", "function resetCtrl() {\n if (_animationController) {\n _animationController.remove();\n _animationController = undefined;\n _animationControllerResize = undefined;\n }\n }", "function resetCtrl() {\n if (_animationController) {\n _animationController.remove();\n _animationController = undefined;\n _animationControllerResize = undefined;\n }\n }", "cancel() {\n if (this._timerId !== undefined) {\n clearTimeout(this._timerId);\n }\n\n this._lastArgs = this._lastCallTime = this._lastThis = this._timerId = undefined;\n }", "@autobind\n clearTimeouts() {\n for(var i=0; i<this.timeouts.length; i++){\n clearTimeout(this.timeouts[i]);\n }\n this.timeouts = [];\n }", "set timeout(timeout) {\n this._.root.current.timeout = Math.floor(Math.max(+timeout, 0))\n }", "cancel() {\r\n if (this.isScheduled()) {\r\n clearTimeout(this.timeoutToken);\r\n this.timeoutToken = -1;\r\n }\r\n }", "function timeout(d) {\n return self => timeout_(self, d);\n}", "destroy() {\n if (cycles.has(this)) {\n clearTimeout(cycles.get(this))\n }\n }", "clearTimeout() {\n\t\tif (this.timeoutId) {\n\t\t\tclearTimeout(this.timeoutId);\n\t\t}\n\t}", "function createTimeout(timeout, fun) {\n var tid;\n return function() {\n if (tid != null)\n clearTimeout(tid);\n tid = setTimeout(fun, timeout);\n }\n }", "_cancelIdleTimeout() {\n if (this._idleTimeoutID) {\n clearTimeout(this._idleTimeoutID);\n this._idleTimeoutID = undefined;\n }\n }", "onMouseEnter() {\n const { controller } = this.props;\n controller.cancelTimer();\n }", "function clear(){timeoutID=undefined;}", "function clear(){timeoutID=undefined;}", "componentWillUnmount() {\n clearTimeout(this.timeout);\n }", "componentWillUnmount() {\n clearTimeout(this.timeout);\n }", "componentDidUnmount() {\n\t\tclearInterval(this.timeout);\n\t}", "cancelTickTimeout() {\n if (this.tickHandle !== undefined) {\n window.clearTimeout(this.tickHandle);\n this.tickHandle = undefined;\n }\n }", "function TimeController(timeService) {\n var self = this;\n\n /**\n * Init controller with sane defaults.\n */\n self.$onInit = function() {\n self.valueMS = self.valueMS || self.options.default || timeService.milliseconds(timeService.now());\n self.valueSTR = timeService.str(timeService.fromMilliseconds(self.valueMS))\n\n self.required = self.options.required || true;\n self.help_text = self.options.help_text || \"Please select a time.\";\n self.label = self.options.label || \"Time\";\n self.name = self.options.name || \"time\";\n self.prevValue = null;\n self.change();\n };\n\n self.$doCheck = function() {\n if (!angular.equals(self.prevValue, self.value)) {\n self.prevValue = self.value;\n self.change();\n }\n }\n\n /**\n * Trigger the on change method.\n */\n self.change = function() {\n var m = timeService.fromstr(self.valueSTR);\n self.valueMS = timeService.milliseconds(m);\n self.onChange({\n change: {\n name: self.name,\n value: self.valueMS\n }\n });\n };\n\n}", "stop() {\n if(!(this.timeoutVariable == null)) {\n clearTimeout(this.timeoutVariable);\n }\n }", "function cancelTimer() {\n\t\t\thoverTimer = clearTimeout(hoverTimer);\n\t\t\tsession.delayInProgress = false;\n\t\t}", "function shakeModel($timeout) {\n return {\n restrict:'A',\n scope:{},\n bindToController:{\n shakeModel:'=?', shakeForMs:'=?', shakeType:'=?', shakeController:'=?'\n },\n controller:shakeOn,\n controllerAs:'shakeModelController',\n link: function($scope, element, attrs) {\n $scope.shakeModelController.shakeForMs = $scope.shakeModelController.shakeForMs || 2000\n $scope.shakeModelController.shakeType = $scope.shakeModelController.shakeType || 'shake-slow'\n\n function onTrue(){\n element.addClass('shake-constant')\n element.addClass($scope.shakeModelController.shakeType)\n\n $timeout(function() {\n $scope.shakeModelController.shakeModel = false\n element.removeClass('shake-constant')\n element.removeClass($scope.shakeModelController.shakeType)\n $scope.$apply()\n }, $scope.shakeModelController.shakeForMs);\n }\n\n function onChange(value) {\n if(value) {\n onTrue()\n }else{\n element.removeClass('shake-constant')\n element.removeClass($scope.shakeModelController.shakeType)\n }\n }\n\n function watch(){\n return $scope.shakeModelController.shakeModel\n }\n\n $scope.$watch(watch, onChange);\n }\n };\n}", "_cancelIdleTimeout() {\n if (this._idleTimeoutID) {\n clearTimeout(this._idleTimeoutID);\n this._idleTimeoutID = undefined;\n }\n }", "static clearTimeout() {\n window.clearTimeout(Setup.timeout);\n Setup.timeout = -1;\n }", "createMaxWaitTimer(waitTime) {\n this.cancelMaxWaitTimer();\n \n this.retryMaxTimer = this.service.$setTimer(() => {\n let continueRetry;\n if (this.retryMaxTimeCallback && typeof (this.retryMaxTimeCallback) === \"function\") {\n let result = this.retryMaxTimeCallback();\n continueRetry = result && result === true;\n }\n \n if (!continueRetry) {\n this.cancel('Max time reached');\n this.service.logMessage(`Max wait time reached caller opted to cancel retry. Operation ${this.name} cancelled.`);\n } else {\n this.service.logMessage(`Max wait time reached caller opted to continue retry. Operation ${this.name} continuing`);\n }\n }, waitTime);\n }", "cancelDelayedSwitch_() {\n if (this.dragNavTimeout_) {\n window.clearTimeout(this.dragNavTimeout_);\n this.dragNavTimeout_ = null;\n }\n }", "getTimeout() {\n return this._timeout;\n }", "clearDelay() {\n clearTimeout(this.openTimeout);\n clearTimeout(this.closeTimeout);\n }", "clearDelay() {\n clearTimeout(this.openTimeout);\n clearTimeout(this.closeTimeout);\n }", "clearDelay() {\n clearTimeout(this.openTimeout);\n clearTimeout(this.closeTimeout);\n }", "clearDelay() {\n clearTimeout(this.openTimeout);\n clearTimeout(this.closeTimeout);\n }", "clearDelay() {\n clearTimeout(this.openTimeout);\n clearTimeout(this.closeTimeout);\n }", "chronoStop(){\n clearTimeout(this.timerID);\n }", "_clearTriggerTimeout() {\n clearTimeout(this._timeoutTrigger);\n this._timeoutTrigger = null;\n }", "function deleteTimer() {\n\tclearTimeout(timeOut);\n}", "get timeout() {\n return Common.getTimeout(this._.root.current)\n }", "disconnect() {\n this.runInZone(() => {\n // Return if there is no componentRef or the component is already scheduled for destruction\n if (this.componentRef === null || this.scheduledDestroyFn !== null) {\n return;\n }\n // Schedule the component to be destroyed after a small timeout in case it is being\n // moved elsewhere in the DOM\n this.scheduledDestroyFn = scheduler.schedule(() => {\n if (this.componentRef !== null) {\n this.componentRef.destroy();\n this.componentRef = null;\n this.viewChangeDetectorRef = null;\n }\n }, DESTROY_DELAY);\n });\n }", "resetTimer_() {\n clearTimeout(this.timer);\n this.timer = 0;\n }", "componentWillUnmount () {\n clearTimeout(this.timeout);\n }", "setTransitionTimer () {\n this.timerTransitionId = setTimeout(() => {\n this.timerTransitionId = undefined\n }, 400)\n }", "cancel() {\n if (this._abortController != null) {\n this._abortController.abort();\n\n this._abortController = null;\n }\n }", "set timeout(milliseconds) {\n this._timeout = milliseconds;\n }", "set timeout(milliseconds) {\n this._timeout = milliseconds;\n }", "function timeoutTimer() {\n\tTIMEOUT_COUNTER--;\n\tif(TIMEOUT_COUNTER < 0) {\n\t\tclearInterval(TIMEOUT_TIMER);\n\t\tdisableButtons(false);\n\t\tshowFouls(true);\n\n\t\treturn;\n\t}\n\n\tsetTimeoutTimer(TIMEOUT_COUNTER);\n}", "function setTimeController(controller) {\n _timeController = controller;\n }", "resetPingTimeout() {\n this.clearTimeoutFn(this.pingTimeoutTimer);\n this.pingTimeoutTimer = this.setTimeoutFn(() => {\n this.onClose(\"ping timeout\");\n }, this.pingInterval + this.pingTimeout);\n if (this.opts.autoUnref) {\n this.pingTimeoutTimer.unref();\n }\n }", "resetPingTimeout() {\n this.clearTimeoutFn(this.pingTimeoutTimer);\n this.pingTimeoutTimer = this.setTimeoutFn(() => {\n this.onClose(\"ping timeout\");\n }, this.pingInterval + this.pingTimeout);\n if (this.opts.autoUnref) {\n this.pingTimeoutTimer.unref();\n }\n }", "get componentControllerClass(){\n if(this.getComponentController()){\n return this.getComponentController().constructor;\n }else {\n return this._componentControllerClass;\n }\n }", "function setupTimeoutTimer() {\n updateTimeoutInfo(undefined);\n }", "queueClose () {\n // Cancel any current close timer.\n this.cancelClose();\n this.set({\n '_timer': setTimeout(() => this.close(true), (isNaN(this.get().delay) ? 0 : this.get().delay))\n });\n return this;\n }", "get toastController() {\n return getOrCreateController('ion-toast-controller')\n }", "resetPingTimeout() {\n clearTimeout(this.pingTimeoutTimer);\n this.pingTimeoutTimer = setTimeout(() => {\n this.onClose(\"ping timeout\");\n }, this.pingInterval + this.pingTimeout);\n\n if (this.opts.autoUnref) {\n this.pingTimeoutTimer.unref();\n }\n }", "__stopInternalTimer() {\n this.fireEvent(\"release\");\n\n this.__timer.stop();\n\n this.removeState(\"abandoned\");\n this.removeState(\"pressed\");\n }", "function closeTimeout(card) {\n closingTimeout = setTimeout(closeCards, 1500, card)\n setTimeout(resetOpenedCards, 1500)\n}", "setRequestTimeout(newTimeout) {\n this.options.timeout = newTimeout;\n }", "_cancelIdleTimeout() {\n\t if (this._idleTimeoutID) {\n\t clearTimeout(this._idleTimeoutID);\n\t this._idleTimeoutID = undefined;\n\t }\n\t }", "willDestroyElement() {\n this._tearDownEventListeners();\n let timer = get(this, '_calloutTimer');\n if (timer) {\n Ember.run.cancel(timer);\n }\n }", "stopUpdate() {\n let timer = this.get('_timer');\n if (timer) {\n run.cancel(timer);\n }\n }", "function updateTimeout()\n {\n clearTimeout(timeout);\n timeout = setTimeout(function()\n {\n self.refresh();\n// }, 30*1000)\n }, 60 * 60 * 1000);\n }", "_clearTimeout () {\n if (this._pendingTimeoutId !== null) {\n clearTimeout(this._pendingTimeoutId);\n this._pendingTimeoutId = null;\n }\n }", "function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec", "function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec", "function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec" ]
[ "0.596109", "0.57444125", "0.5604639", "0.55776453", "0.5489882", "0.5364564", "0.5273213", "0.51571137", "0.5132006", "0.5114074", "0.5092859", "0.5088637", "0.502055", "0.50077134", "0.49874976", "0.4986683", "0.4975233", "0.49454844", "0.49365404", "0.49332735", "0.49183986", "0.49167636", "0.48873824", "0.48815918", "0.48734698", "0.48722395", "0.48696247", "0.48602867", "0.4838776", "0.48371455", "0.48287088", "0.48123294", "0.48084736", "0.47939456", "0.47931382", "0.47931382", "0.47819483", "0.4778803", "0.4762899", "0.47602478", "0.4752822", "0.47366616", "0.47343278", "0.47223583", "0.471805", "0.47172835", "0.4696815", "0.4696815", "0.46804175", "0.46804175", "0.4678837", "0.46732903", "0.4670795", "0.46669883", "0.46403083", "0.4631797", "0.46298906", "0.46219656", "0.4617796", "0.46118164", "0.46047467", "0.46032625", "0.46032625", "0.46032625", "0.46032625", "0.46032625", "0.45994782", "0.45971334", "0.45846447", "0.4584568", "0.45750883", "0.45707208", "0.45627496", "0.4559951", "0.45542905", "0.45531422", "0.45531422", "0.45525974", "0.45494336", "0.45345187", "0.45345187", "0.45290977", "0.45284244", "0.4525663", "0.45141795", "0.4508543", "0.4501506", "0.44983813", "0.44949448", "0.44929668", "0.44926915", "0.4487588", "0.44871047", "0.44868645", "0.44816908", "0.44816908", "0.44816908" ]
0.53817475
8
Returns a ref that is immediately updated with the new value
function useUpdatedRef(value) { var valueRef = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(value); valueRef.current = value; return valueRef; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Fay$$writeRef(ref,x){\n ref.value = x;\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n }", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function createRef() {\n var refObject = (function (element) {\n refObject.current = element;\n });\n // This getter is here to support the deprecated value prop on the refObject.\n Object.defineProperty(refObject, 'value', {\n get: function () {\n return refObject.current;\n }\n });\n refObject.current = null;\n return refObject;\n}", "function useUpdatedRef(value) {\n var valueRef = react.useRef(value);\n valueRef.current = value;\n return valueRef;\n}", "function useUpdatedRef(value) {\n var valueRef = (0, _react.useRef)(value);\n valueRef.current = value;\n return valueRef;\n}", "makeRef(){\n let newRef = this.ref + 1\n if(newRef === this.ref){ this.ref = 0 } else { this.ref = newRef }\n\n return this.ref.toString()\n }", "function assignRef(ref, value) {\n if (ref == null) return;\n if (typeof ref === \"function\") {\n ref(value);\n } else {\n try {\n ref.current = value;\n } catch (error) {\n throw new Error(`Cannot assign value \"${value}\" to ref \"${ref}\"`);\n }\n }\n}", "function assignRef(ref, value) {\n if (ref == null) return;\n\n if (isFunction(ref)) {\n ref(value);\n } else {\n try {\n ref.current = value;\n } catch (error) {\n throw new Error(\"Cannot assign value \\\"\" + value + \"\\\" to ref \\\"\" + ref + \"\\\"\");\n }\n }\n}", "function createRef(){var refObject={current:null};{Object.seal(refObject);}return refObject;}", "function createRef(){var refObject={current:null};{Object.seal(refObject);}return refObject;}", "function useUpdatedRef(value) {\n var valueRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(value);\n valueRef.current = value;\n return valueRef;\n}", "function useCommittedRef(value) {\n var ref = React.useRef(value);\n React.useEffect(function () {\n ref.current = value;\n }, [value]);\n return ref;\n }", "function createRef() {\n var refObject = {\n current: null,\n };\n\n {\n Object.seal(refObject);\n }\n\n return refObject;\n }", "s(_value) {\n this.value = _value;\n this.refresh();\n }", "s(_value) {\n this.value = _value;\n this.refresh();\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function useLiveRef(value) {\n var ref = React.useRef(value);\n useIsomorphicEffect.useIsomorphicEffect(function () {\n ref.current = value;\n });\n return ref;\n}", "function MakeRef() {\n return { value: false };\n}", "function MakeRef() {\n return { value: false };\n}", "function MakeRef() {\n return { value: false };\n}", "function MakeRef() {\n return { value: false };\n}", "function createRef() {\n var refObject = {\n current: null\n };\n Object.seal(refObject);\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function useCommittedRef(value) {\n var ref = react.useRef(value);\n react.useEffect(function () {\n ref.current = value;\n }, [value]);\n return ref;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n }", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}", "function createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}" ]
[ "0.7064152", "0.69760835", "0.68480206", "0.68480206", "0.68480206", "0.68480206", "0.68480206", "0.68480206", "0.68480206", "0.68480206", "0.68480206", "0.68480206", "0.68480206", "0.68480206", "0.68480206", "0.68480206", "0.68480206", "0.68480206", "0.68480206", "0.68480206", "0.67065144", "0.663785", "0.6575303", "0.65160996", "0.6492349", "0.64726835", "0.6442784", "0.6442784", "0.6441751", "0.6289727", "0.62367964", "0.6226959", "0.6226959", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.6196693", "0.61874455", "0.61868536", "0.61868536", "0.61868536", "0.61868536", "0.61643416", "0.61625385", "0.61625385", "0.6145822", "0.6128848", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061", "0.6126061" ]
0.6431853
34
Attach a callback that fires when a component unmounts
function useWillUnmount(fn) { var onUnmount = Object(_useUpdatedRef__WEBPACK_IMPORTED_MODULE_0__["default"])(fn); Object(react__WEBPACK_IMPORTED_MODULE_1__["useEffect"])(function () { return function () { return onUnmount.current(); }; }, []); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentWillUnmount() {\n Object.keys(this.eventCallbacks).forEach((key) => {\n const eventName = key.substring(2).toLowerCase();\n const handler = this.eventCallbacks[key];\n\n this.pathNavigator.off(eventName, handler);\n });\n\n this.pathNavigator.destroy();\n this.pathNavigator = null;\n }", "detachedCallback() {\n\t\t// update attached status\n\t\tthis._componentAttached = false;\n\t\t// will unmount\n\t\tthis.componentWillUnmount();\n\t\t// wait next frame\n\t\tthis.mutate(() => {\n\t\t\t// unmount only if the component is mounted\n\t\t\tif ( ! this._componentMounted) return;\n\t\t\t// unmount\n\t\t\tthis.componentUnmount();\n\t\t\t// did unmount\n\t\t\tthis.componentDidUnmount();\n\t\t});\n\t}", "componentWillUnmount() {\n if (this.ref) {\n this.ref.off('value', this.handleUpdates);\n }\n }", "componentWillUnmount() {\n //Remove the database listener\n if (this.state.firebaseListener != undefined) {\n this.state.firebaseListener.off('value', this.state.firebaseCallback);\n } }", "componentWillUnmount() {\n this.listener();\n }", "componentWillUnmount() {\n this.listener && this.listener.remove();\n }", "componentWillUnmount() {\n this.off();\n this.listeners.forEach(function(listener) {\n listener.off();\n });\n }", "componentWillUnmount() {\n this.listener();\n }", "componentWillUnmount() {\n this.listener();\n }", "componentWillUnmount() {\n if (this.unregister) { //if have a function to unregister with\n this.unregister(); //call that function!\n }\n }", "componentWillUnmount() {\n // console.log('Unmounted');\n base.removeBinding(this.ref);\n }", "unmounted(el, binding) {\n const masonryId = binding.value || defaultId\n emitter.emit(`${EVENT_DESTROY}__${masonryId}`)\n }", "componentWillUnmount() {\n // Ex: remove event listener\n // (In general, teardown or cleanup your code before your component disapears)\n }", "unmounted(el, binding) {\n const masonryId = binding.value || defaultId\n emitter.emit(`${EVENT_REMOVE}__${masonryId}`, {\n 'element': el\n })\n }", "componentWillUnmount() {\n window.removeEventListener('resize', this.setRefs, false);\n }", "componentWillUnmount() {\n this.removeListeners();\n }", "componentWillUnmount() {\n this.mapRef.current.leafletElement.off(\n 'locationfound',\n this.onLocationFound\n );\n this.mapRef.current.leafletElement.off(\n 'locationerror',\n this.onLocationError\n );\n }", "componentWillUnmount() {\n window.removeEventListener('keyup', this.handleKeyUp, false);\n window.removeEventListener('click', this.handleOutsideClick, false);\n}", "componentWillUnmount() {\n window.removeEventListener('keyup', this.handleKeyUp, false);\n window.removeEventListener('click', this.handleOutsideClick, false);\n}", "componentWillUnmount() {\n window.removeEventListener('keyup', this.handleKeyUp, false);\n document.removeEventListener('click', this.handleOutsideClick, false);\n }", "componentWillUnmount() {\n\t\tthis.notificationListener();\n\t\tthis.notificationOpenedListener();\n\t}", "function safelyCallComponentWillUnmount(current$$1,instance){{invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current$$1,instance);if(hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current$$1,unmountError);}}}", "function safelyCallComponentWillUnmount(current$$1,instance){{invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current$$1,instance);if(hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current$$1,unmountError);}}}", "function safelyCallComponentWillUnmount(current$$1,instance){{invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current$$1,instance);if(hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current$$1,unmountError);}}}", "componentWillUnmount() {\n console.log(\"Component will unmount\");\n base.removeBinding(this.ref);\n }", "componentWillUnmount(){\n base.removeBinding(this.ref);\n }", "componentWillUnmount() {\n base.removeBinding(this.ref);\n }", "componentWillUnmount() {\n Fire.shared.off();\n }", "componentWillUnmount() {\n Fire.shared.off();\n }", "componentWillUnmount() {\n window.removeEventListener('click', this.handleOnClickOut);\n }", "function tryOnUnmounted(fn) {\n if (getCurrentInstance()) onUnmounted(fn);\n}", "componentWillUnmount() {\n base.removeBinding(this.ref);\n }", "componentWillUnmount() {\n this.notificationListener\n this.notificationOpenedListener\n }", "componentWillUnmount() {\n\t\tif (this.stopListeningOnStory) {\n\t\t\tthis.stopListeningOnStory();\n\t\t}\n\n\t\tthis.unmounted = true;\n\t\tconst { channel } = this.props;\n\t\tchannel.removeListener('storybook/notes/add_notes', this.onAddCode);\n\t}", "componentWillUnmount() {\n if (this._localEventListeners) {\n forEachAccumulated(this._localEventListeners, remove);\n }\n }", "componentDidUnmount(){\n // console.log('Back From the Bink')\n }", "componentWillUnmount() {\n this.notificationListener();\n this.notificationOpenedListener();\n}", "componentWillUnmount() {\n DeviceEventEmitter.removeListener('event.ready', this.app_ready);\n DeviceEventEmitter.removeListener(\n 'event.is_search_empty',\n this.is_search_empty,\n );\n }", "function viewWillUnmount() {\n // stub\n }", "unMount() {\n this.removeListeners();\n SimpleBar.instances.delete(this.el);\n }", "unload (text) {\n console.log('Component was unmounted from the DOM')\n }", "componentWillUnMount() {\n window.removeEventListener('scroll', this.handleScroll);\n }", "componentWillUnmount() {\n BackHandler.removeEventListener(\"hardwareBackPress\", this.onBackPress);\n Linking.removeEventListener('url', this.handleOpenURL);\n AppState.removeEventListener('change', this.handleAppStateChange);\n }", "componentWillUnmount() {\n this.dialog.removeEventListener('transitionend', this.handleTransitionEnd);\n }", "componentWillUnmount() {\n const { name, window } = this.props;\n\n window[`unmount${name}`](`${name}-container`);\n }", "componentWillUnmount() {\n FooterStore.unlisten(this.onChange);\n }", "componentWillUnmount() {\n this.notificationListener();\n this.notificationOpenedListener();\n }", "unMount() {\n this.removeListeners();\n SimpleBar.instances.delete(this.el);\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);}}}", "componentWillUnmount() {\n OneSignal.removeEventListener('received', this.onReceived);\n OneSignal.removeEventListener('opened', this.onOpened);\n OneSignal.removeEventListener('ids', this.onIds);\n }", "componentWillUnmount() {\n this.props.onRef(undefined)\n this.unregisterAuthObserver();\n }", "componentWillUnmount() {\n\t base.removeBinding(this.ref);\n }", "componentWillUnmount() {\n console.log('component is being removed')\n }", "componentWillUnmount() {\n\t\tdocument.removeEventListener('scroll', this.onScroll, false);\n\t\twindow.removeEventListener(\"resize\", this.onWindowResize, false);\n\t\twindow.removeEventListener(\"load\", this.onWindowLoad, false);\n\t}", "componentWillUnmount() {\n window.removeEventListener(\"scroll\", this.onScrollHandler);\n }", "componentWillUnmount() {\n this._manageGlobalEventHandlers({}, true);\n }", "componentWillUnmount(){\n console.log('componentWillUnmount()');\n // Este metodo aparece al eliminar el componente y aqui se deben eliminar todas las suscripciones del evento eliminado\n window.removeEventListener(\n 'resize',\n this.changeWith\n )\n }", "componentWillUnmount() {\n window.removeEventListener(this.props.trigger, this.goTo)\n }", "componentWillUnmount(){\n if(this.handlerPlay) {\n clearInterval(this.handlerPlay);\n }\n this.refDom.removeEventListener('resize', this.updateWindowDimensions);\n \n }", "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 this.listingRef.off('value');\n this.listingRef = null;\n }", "componentWillUnmount(){\n console.log('component unmounted')\n }", "componentWillUnmount() {\r\n base.removeBinding(this.ref);\r\n base.removeBinding(this.ref2);\r\n }", "componentWillUnmount() {\n console.log('my component will get unmounted');\n }", "componentWillUnmount() {\n const audioElement = ReactDOM.findDOMNode(this.refs.audio);\n\n audioElement.removeEventListener('play', this.handleAudioPlayed, false);\n audioElement.removeEventListener('pause', this.handleAudioPaused, false);\n audioElement.removeEventListener('timeupdate', this.handleAudioTimeUpdate, false);\n audioElement.removeEventListener('seeked', this.handleSeeked, false);\n audioElement.removeEventListener('volumechange', this.handleVolumeUpdated, false);\n audioElement.removeEventListener('ended', this.handleAudioEnded, false);\n }", "componentWillUnmount() {\n // console.log(\"component will unmount\");\n // // Remove BackgroundGeolocation listeners\n // BackgroundGeolocation.un('location', this.onLocation);\n // BackgroundGeolocation.un('error', this.onError);\n // BackgroundGeolocation.un('motionchange', this.onMotionChange);\n // BackgroundGeolocation.un('activitychange', this.onActivityChange);\n // BackgroundGeolocation.un('providerchange', this.onProviderChange);\n }", "componentWillUnmount() {\n\t\tthis.props.isDropdownOpenCallback( false );\n\t}", "componentWillUnmount() {\n window.removeEventListener(\"mousemove\", this.listeners.mousemove);\n window.removeEventListener(\"mouseup\", this.listeners.mouseup);\n this.canvas.removeEventListener(\"mousedown\", this.listeners.mousedown);\n\n window.removeEventListener(\"touchmove\", this.listeners.mousemove, false);\n window.removeEventListener(\"touchend\", this.listeners.mouseup, false);\n this.canvas.removeEventListener(\"touchstart\", this.listeners.mousedown, false);\n }", "componentWillUnmount() {\n window.removeEventListener('angleChangedTemp', this.updateTemp);\n window.removeEventListener('angleChangedColour', this.updateColour);\n window.removeEventListener('angleChangedKnob', this.updateKnob);\n window.removeEventListener('wheel', this.handleWheel);\n this.service.stop();\n }", "detachedCallback() {\n this.querySelector('ul').removeEventListener('click', this);\n }", "componentWillUnmount() {\n if (!this.props.config.yotpoAppKey) {\n return;\n }\n this.htmlContainer.current.removeEventListener('click', this.handleTap, true);\n }", "componentWillUnmount() {\n window.removeEventListener('wheel', this.scrollExperience);\n window.removeEventListener(\"resize\", this.updateDimensions);\n }", "componentWillUnmount() {\n ListStore.removeChangeListener(this._onChange.bind(this));\n }", "componentWillUnmount() {\n\tbase.removeBinding(this.ref);\n\tbase.removeBinding(this.ref2);\n\tbase.removeBinding(this.ref3);\n\tbase.removeBinding(this.ref4);\n}", "componentWillUnmount() {\n UIEvents.off(SEARCH_CLOSED, this.onClose);\n }", "componentWillUnmount () {\n window.removeEventListener('scroll', this.listenScroll, false);\n }", "componentWillUnmount() {}", "componentWillUnmount() {}", "componentWillUnmount() {}", "componentWillUnmount() {}", "componentWillUnmount() {}", "componentWillUnmount() {}", "componentWillUnmount() {}", "componentWillUnmount() {}", "componentWillUnmount() {\n document.removeEventListener(\"wheel\", this._handleScroll);\n window.removeEventListener(\"resize\", this._resize);\n }", "function onunmount () {\n removeNativeElement()\n currentElement = null\n }", "componentWillUnmount(){\n this.unsubscribe()\n}", "componentWillUnmount() {\n if(this.stopListeningOnStory) {\n this.stopListeningOnStory();\n }\n\n this.unmounted = true;\n const { channel, api } = this.props;\n //channel.removeListener('kadira/notes/add_notes', this.onAddNotes);\n }", "componentWillUnmount() {\n window.removeEventListener('scroll', this.handleScroll, {\n passive: true,\n });\n }", "componentWillUnmount() {\n clearTimeout(this.runningTimeout);\n event.removeCallback(EVENT_ADD_TO_CART_MISSING_VARIANT, this.handleMissingVariant);\n }", "componentWillUnmount() {\n alert(\"**************User is into Component Will Unmount***************\");\n this.unsubscribeFromAuth();\n\n }", "detachedCallback () {\n this.querySelector('ul').removeEventListener('click', this);\n }", "componentWillUnmount() {\n console.log('Component WILL UNMOUNT!')\n }", "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);}}}" ]
[ "0.7068645", "0.698156", "0.6972224", "0.69700706", "0.6899089", "0.6889604", "0.6862923", "0.6822245", "0.6822245", "0.6779256", "0.6756549", "0.6749718", "0.67334867", "0.6694612", "0.6587781", "0.65849453", "0.6564476", "0.6563503", "0.6563503", "0.6562787", "0.65611184", "0.65562814", "0.65562814", "0.65562814", "0.65562135", "0.65419614", "0.6536833", "0.6532473", "0.6532473", "0.65280217", "0.652798", "0.6512227", "0.65113187", "0.6482262", "0.64791185", "0.64755833", "0.6471994", "0.6470359", "0.64681125", "0.6461407", "0.64597595", "0.6453669", "0.6445951", "0.6423205", "0.6422833", "0.6416662", "0.64128494", "0.640166", "0.6397181", "0.6397181", "0.6397181", "0.6397181", "0.6397181", "0.6395029", "0.6387957", "0.6387244", "0.6380036", "0.63783205", "0.6376604", "0.63748336", "0.6365466", "0.63608193", "0.635957", "0.6350053", "0.6350053", "0.6350053", "0.634603", "0.63420975", "0.63354564", "0.63240445", "0.6322661", "0.62890315", "0.6286579", "0.62826866", "0.6281222", "0.6278166", "0.6276304", "0.6275538", "0.6275338", "0.6265108", "0.6260711", "0.6259155", "0.625405", "0.625405", "0.625405", "0.625405", "0.625405", "0.625405", "0.625405", "0.625405", "0.6250375", "0.62492836", "0.6248234", "0.6246101", "0.6244842", "0.62433124", "0.6242214", "0.62383425", "0.62353665", "0.623191", "0.623191" ]
0.0
-1
Throws a `Cancel` if cancellation has been requested.
function throwIfCancellationRequested(config) { if (config.cancelToken) { config.cancelToken.throwIfRequested(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async cancel() {\n throw new Error(this.cancelMessage);\n }", "cancel() {\n throw new Error(\"Not implemented.\")\n }", "isCanceled(cancelled) {\n if (cancelled) {\n throw new Error(\"Cancelled request\");\n }\n }", "function throwIfCancellationRequested(config) {\n if (config.cancelToken) config.cancelToken.throwIfRequested();\n if (config.signal && config.signal.aborted) throw new Cancel('canceled');\n}", "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new Cancel('canceled');\n }\n}", "function throwIfCancellationRequested(config){if(config.cancelToken){config.cancelToken.throwIfRequested();}}", "function throwIfCancellationRequested(config){if(config.cancelToken){config.cancelToken.throwIfRequested();}}", "function throwIfCancellationRequested(config){if(config.cancelToken){config.cancelToken.throwIfRequested();}}", "function throwIfCancellationRequested(config){if(config.cancelToken){config.cancelToken.throwIfRequested();}}", "function throwIfCancellationRequested(config){if(config.cancelToken){config.cancelToken.throwIfRequested();}}", "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n }", "function throwIfCancellationRequested(config){\nif(config.cancelToken){\nconfig.cancelToken.throwIfRequested();\n}\n}", "function cancel () {\n const e = new Error('Coroutine canceled.');\n e.cause = 'canceled';\n this.resume(e);\n}", "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n }", "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n }", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n }", "actionCancel() {\n this.source && this.source.cancel('Operation canceled by the user.');\n }", "cancel() {\n cancel();\n }", "function throwIfCancellationRequested(config) {\r\n if (config.cancelToken) {\r\n config.cancelToken.throwIfRequested();\r\n }\r\n}", "cancel() {\n if (this.isCloseable_) {\n this.userActed('cancel');\n }\n }", "cancel() {}" ]
[ "0.79471016", "0.7735734", "0.75341254", "0.74463314", "0.7423634", "0.73854464", "0.73854464", "0.73854464", "0.73854464", "0.73854464", "0.7205521", "0.71672016", "0.71622115", "0.7161273", "0.71419287", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.7078898", "0.7067617", "0.7047267", "0.7023319", "0.7011276", "0.7002713" ]
0.0
-1
Determine if we're running in a standard browser environment This allows axios to run in a web worker, and reactnative. Both environments support XMLHttpRequest, but not fully standard globals. web workers: typeof window > undefined typeof document > undefined reactnative: navigator.product > 'ReactNative' nativescript navigator.product > 'NativeScript' or 'NS'
function isStandardBrowserEnv() { if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || navigator.product === 'NativeScript' || navigator.product === 'NS')) { return false; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n }", "function isStandardBrowserEnv() {\n if (\n typeof navigator !== 'undefined' &&\n (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')\n ) {\n return false;\n }\n return typeof window !== 'undefined' && typeof document !== 'undefined';\n }", "function isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n }", "function isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (typeof window !== 'undefined' &&\n typeof document !== 'undefined');\n}", "function isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined');\n\n}", "function isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined');\n\n}", "function isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}", "function isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n }" ]
[ "0.8075931", "0.8071856", "0.80613434", "0.80405647", "0.80330795", "0.80330795", "0.80309546", "0.80201286" ]
0.0
-1
Return the actively focused element safely.
function activeElement(doc) { if (doc === void 0) { doc = Object(_ownerDocument__WEBPACK_IMPORTED_MODULE_0__["default"])(); } // Support: IE 9 only // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe> try { var active = doc.activeElement; // IE11 returns a seemingly empty object in some cases when accessing // document.activeElement from an <iframe> if (!active || !active.nodeName) return null; return active; } catch (e) { /* ie throws if no active element */ return doc.body; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function safeActiveElement(){try{return document.activeElement;}catch(err){}}", "function safeActiveElement(){try{return document.activeElement;}catch(err){}}", "function safeActiveElement(){try{return document.activeElement;}catch(err){}}", "function safeActiveElement(){try{return document.activeElement;}catch(err){}}", "function safeActiveElement(){try{return document.activeElement;}catch(err){}}", "function safeActiveElement(){try{return document.activeElement;}catch(err){}}", "function safeActiveElement(){try{return document.activeElement;}catch(err){}}", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch ( err ) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) { }\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {\n }\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {\n }\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {\n }\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {\n }\n }", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch (err) {}\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch (err) {}\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch (err) {}\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch (err) {}\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch (err) {}\n\t}", "function getActiveElement() {\r\n try {\r\n return document.activeElement;\r\n } catch (err) {}\r\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch ( err ) { }\n }", "function safeActiveElement() {\r\n\t\ttry {\r\n\t\t\treturn document.activeElement;\r\n\t\t} catch (err) { }\r\n\t}", "function getActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function getActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function getActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function safeActiveElement() {\n try {\n return document.activeElement;\n } catch ( err ) { }\n }", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\t\ttry {\n\t\t\treturn document.activeElement;\n\t\t} catch ( err ) { }\n\t}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}", "function safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}" ]
[ "0.82683074", "0.82683074", "0.82683074", "0.82683074", "0.82683074", "0.82683074", "0.82683074", "0.81972605", "0.8183395", "0.8183395", "0.8183395", "0.8183395", "0.8183395", "0.8183395", "0.8183395", "0.8183395", "0.8159494", "0.8159494", "0.8159494", "0.8159494", "0.8159494", "0.8132416", "0.81078684", "0.8102763", "0.80972594", "0.80972594", "0.80951285", "0.8089475", "0.8089475", "0.8089475", "0.8089475", "0.8089475", "0.8069022", "0.805053", "0.80435413", "0.80430645", "0.80430645", "0.80430645", "0.80425894", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.8002756", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226", "0.799226" ]
0.0
-1
An `addEventListener` ponyfill, supports the `once` option
function addEventListener(node, eventName, handler, options) { if (options && typeof options !== 'boolean' && !onceSupported) { var once = options.once, capture = options.capture; var wrappedHandler = handler; if (!onceSupported && once) { wrappedHandler = handler.__once || function onceHandler(event) { this.removeEventListener(eventName, onceHandler, capture); handler.call(this, event); }; handler.__once = wrappedHandler; } node.addEventListener(eventName, wrappedHandler, optionsSupported ? options : capture); } node.addEventListener(eventName, handler, options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "registerOnce(event, listener){\n this._emiter.once(event, listener);\n }", "function _once (event, listener) {\n _on(event, function fn () {\n _removeListener(event, fn);\n listener.apply(this, arguments);\n });\n }", "function _once(event) {\n return function (listener) {\n var thisArgs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var disposables = arguments.length > 2 ? arguments[2] : undefined;\n // we need this, in case the event fires during the listener call\n var didFire = false;\n var result;\n result = event(function (e) {\n if (didFire) {\n return;\n } else if (result) {\n result.dispose();\n } else {\n didFire = true;\n }\n\n return listener.call(thisArgs, e);\n }, null, disposables);\n\n if (didFire) {\n result.dispose();\n }\n\n return result;\n };\n}", "function once(event) {\n return (listener, thisArgs = null, disposables) => {\n // we need this, in case the event fires during the listener call\n let didFire = false;\n let result = undefined;\n result = event(e => {\n if (didFire) {\n return;\n }\n else if (result) {\n result.dispose();\n }\n else {\n didFire = true;\n }\n return listener.call(thisArgs, e);\n }, null, disposables);\n if (didFire) {\n result.dispose();\n }\n return result;\n };\n }", "once(eventName, fn) {\n this.listeners[eventName] = this.listeners[eventName] || [];\n const onceWrapper = () => {\n fn();\n this.off(eventName, onceWrapper);\n };\n this.listeners[eventName].push(onceWrapper);\n return this;\n }", "function onceHandler(event) {\n alert('outer, once');\n}", "function content_listenEventOnce(type, listener, capture) {\n capture = !!capture;\n\n let onReceive = (event) => {\n removeEventListener(type, onReceive, capture);\n\n content_fixupListener(listener)(event);\n };\n\n addEventListener(type, onReceive, capture);\n }", "function addEventListener(node, eventName, handler, options) {\n if (options && typeof options !== 'boolean' && !onceSupported) {\n var once = options.once,\n capture = options.capture;\n var wrappedHandler = handler;\n\n if (!onceSupported && once) {\n wrappedHandler = handler.__once || function onceHandler(event) {\n this.removeEventListener(eventName, onceHandler, capture);\n handler.call(this, event);\n };\n\n handler.__once = wrappedHandler;\n }\n\n node.addEventListener(eventName, wrappedHandler, optionsSupported ? options : capture);\n }\n\n node.addEventListener(eventName, handler, options);\n }", "once(event, handler) {\n const onceHandler = (eventData) => {\n handler(eventData);\n this.off(event, onceHandler);\n };\n return this.on(event, onceHandler);\n }", "once(event, handler) {\n const onceHandler = (eventData) => {\n handler(eventData);\n this.off(event, onceHandler);\n };\n return this.on(event, onceHandler);\n }", "once(test, handler) {\n if (test == null) {\n throw TypeError('test must be provided');\n }\n\n if (!(test instanceof RegExp) &&\n typeof test != 'string' &&\n typeof test != 'function') {\n throw TypeError('test must be a regular expression, a string or a function');\n }\n\n if (handler == null) {\n throw TypeError('handler must be provided');\n }\n\n if (typeof handler != 'function') {\n throw TypeError('handler must be a function');\n }\n\n const wrappedHandler = (...args) => {\n this.off(test, handler);\n handler(...args);\n };\n\n let handlers = this._events.get(test);\n\n if (handlers == null) {\n handlers = new Map();\n this._events.set(test, handlers);\n }\n\n handlers.set(handler, wrappedHandler);\n }", "once(event, cb = () => {\n }) {\n this._event.once(event, cb);\n }", "once(event, callback) {\n const deregister = this.on(event, (event, data) => {\n callback(event, data);\n deregister();\n });\n return deregister;\n }", "once(event, callback) {\n const deregister = this.on(event, (event, data) => {\n callback(event, data);\n deregister();\n });\n return deregister;\n }", "defer(cb) {\n this.event.once(\"*\", cb);\n }", "once(ev, listener) {\n super.once(ev, listener);\n return this;\n }", "addListener(listener) {\n if (!activeListeners.includes(listener)) {\n activeListeners.push(listener);\n }\n }", "function listenEventOnce(target, type, listener, capture) {\n if (!target || !type || !listener) {\n throw Error('Missing required parameter.');\n }\n\n capture = !!capture;\n\n let onReceive = (event) => {\n target.removeEventListener(type, onReceive, capture);\n\n fixupListener(listener)(event);\n };\n\n target.addEventListener(type, onReceive, capture);\n }", "function startGame() {\n //Frage stellen bei Live-call bezüglich addeventlistener bubbling capturing\n cellElements.forEach(cell => {\n cell.classList.remove(X_CLASS);\n cell.classList.remove(CIRCLE_CLASS);\n cell.removeEventListener('click', handleClick);\n cell.addEventListener('click', handleClick, { once: true }) // Hier frgae bezüglich {once: true }???;\n });\n setBoardHoverClass();\n winningMessageElement.classList.remove('show');\n}", "function content_listenMessageOnce(name, listener) {\n let onReceive = (message) => {\n removeMessageListener(name, onReceive);\n\n content_fixupListener(listener)(message);\n };\n\n addMessageListener(name, onReceive);\n }", "function listenPageEventOnce(type, listener) {\n switch (type) {\n case 'pageready': {\n let browser;\n\n if (listener.browser) {\n browser = listener.browser;\n }\n\n promisePageReady(browser).then((result) => {\n let {persisted} = result;\n\n let pseudoEvent = {\n type,\n persisted\n };\n\n fixupListener(listener)(pseudoEvent);\n }).\n catch(Cu.reportError);\n\n break;\n }\n\n default: {\n throw Error('Unknown type:' + type);\n }\n }\n }", "function OnOfListener(e) {\n\tconst swBody = e.currentTarget,\n\t\tisOn = swBody.classList.contains(\"swTrackOpen\");\n\tswBody.removeEventListener(\"click\", OnOfListener); //Removing the listener to prevent spam\n\tswBody.classList.toggle(\"swTrackOpen\", !isOn);\n\n\t//* Cache setting\n\tif (swBody.id == \"darkMode\") {\n\t\textCache.darkMode = !isOn;\n\t\tsetCache(\"extCache\");\n\t\tif (extCache.darkMode) {\n\t\t\t$(\"body\").removeClass(\"whiteMode\").addClass(\"darkMode\");\n\t\t\tsetImgPaths(true);\n\t\t} else {\n\t\t\t$(\"body\").removeClass(\"darkMode\").addClass(\"whiteMode\");\n\t\t\tsetImgPaths(false);\n\t\t}\n\t\tsetImages(extCache.darkMode);\n\t\tremoveImgListeners();\n\t} else if (swBody.id == \"kIndexes\") {\n\t\tuserCache.kIndexes = !isOn;\n\t\tsetCache(hostname);\n\t\tkeepIndexes();\n\t} else if (swBody.id == \"autoClose\") {\n\t\textCache.autoClose = !isOn;\n\t\tsetCache(\"extCache\");\n\t}\n\tswBody.addEventListener(\"transitionend\", () => swBody.addEventListener(\"click\", OnOfListener));\n}", "once(e, s) {\n const t = this.subscribe(e, (() => {\n t[0](), Array.isArray(s) ? s.forEach((e => e())) : s();\n }));\n }", "function initEventListener() {\n \n }", "function once(name, handler) {\n return on(name, function handleEvent() {\n var result = handler.apply(this, arguments);\n bus.off(name, handleEvent);\n\n return result;\n });\n }", "once(event, listener) {\n\t\tthis.eventemitter.once(event, listener);\n\t\treturn this;\n\t}", "function initEventListener() { }", "addListener(listener) {\n listeners.push(listener);\n }", "once(event, callback) {\n const boundCallback = (...args) => {\n // invoke the callback\n callback(...args);\n // remove the event\n this.off(event, boundCallback);\n };\n this.on(event, boundCallback);\n return this;\n }", "function listenMessageOnce(name, listener) {\n if (!name || !listener) {\n throw Error('Missing required parameter.');\n }\n\n // A message manager for all browsers.\n let mm = window.messageManager;\n\n let onReceive = (message) => {\n mm.removeMessageListener(name, onReceive);\n\n fixupListener(listener)(message);\n };\n\n mm.addMessageListener(name, onReceive);\n }", "function eventHandlersOnce() {\n\tif (globalDebug) {console.group(\"Event Handlers Once\");}\n\n\tmenuTrigger();\n\n\tif (globalDebug) {console.groupEnd();}\n}", "once(event, cb) {\n this._eventList.push({\n event,\n cb,\n \"usages\": 1\n });\n return this;\n }", "static addListener(listener) {\n listeners.push(listener);\n }", "once(eventName, callback) {\n let deferred;\n const promise = new Promise((resolve, reject) => {\n this._addDeferred(p(this).deferred.once, eventName, {resolve, reject});\n });\n\n // Map the deferred to the promise, to remove the deferred in case the\n // promise is provided in the 'off' method.\n p(this).promises.set(promise, deferred);\n\n if (callback) this._addCallback(p(this).callbacks.once, eventName, callback);\n\n return promise;\n }", "function listenerCreated() {\n listenerCnt += 1;\n if (listenerCnt === 1) {\n window.addEventListener('touchmove', onWindowTouchMove, { passive: false });\n }\n }", "static addEventListener(type, handler) {\n handler = type || handler;\n Linking.unlisten = history.listenBefore(handler);\n }", "once(eventName, k) {\n this._inputEventsOn[eventName] = {};\n this.sendMessageToCallMachine({\n action: DAILY_METHOD_REGISTER_INPUT_HANDLER,\n on: eventName,\n });\n return EventEmitter.prototype.once.call(this, eventName, k);\n }", "once(eventName, k) {\n this._inputEventsOn[eventName] = {};\n this.sendMessageToCallMachine({\n action: DAILY_METHOD_REGISTER_INPUT_HANDLER,\n on: eventName,\n });\n return EventEmitter.prototype.once.call(this, eventName, k);\n }", "on(handler) {\n this.addEventListener(handler);\n }", "onTouchDown(callback, isOnce = false) {\n this._touchDownCallbacks.push([\n callback,\n isOnce\n ]);\n }", "_addEventListener(eventName, callback, uuid) {\n\t\tif (uuid) {\n\t\t\teventName = eventName + '.' + uuid;\n\t\t}\n\n\t\t$(document).on(eventName, callback);\n\t}", "function setupListener() {\r\n container.addEventListener('click', clickHandler);\r\n}", "function main() {\n addEventListeners();\n}", "function addEventListeners() {\n\n}", "onPointerDown(callback, isOnce = false) {\n this._pointerDownCallbacks.push([\n callback,\n isOnce\n ]);\n }", "function T(e,t,n){Q.reference.addEventListener(e,t),n.push({eventType:e,handler:t})}", "function nextEvent(target, name) {\n return new Promise(resolve => {\n target.addEventListener(name, resolve, { once: true });\n });\n}", "on(event: string, listener: Function): void {\n if (typeof this.__events[event] !== 'object') {\n this.__events[event] = [];\n }\n\n this.__events[event].push(listener);\n }", "function dumbListener2(event) {}", "function dumbListener2(event) {}", "once(eventName, handler) {\r\n return this._bus.once(eventName, handler);\r\n }", "function listenerCreated() {\n if (!(listenerCnt++)) {\n window.addEventListener('touchmove', onWindowTouchMove, { passive: false });\n }\n}", "function once(f) {\n return function() {\n var _f = f;\n f = null;\n return _f.apply(this, arguments);\n };\n}", "listener() {}", "function addEventListener(dom, type, listener, options) {\n //@todo proper type check for options: EventListenerOptions | boolean (TS for some reason gives error on passive parameter)\n //console.log(type, dom);\n dom.addEventListener(type, listener, options || false);\n return new _Disposer__WEBPACK_IMPORTED_MODULE_1__[\"Disposer\"](function () {\n dom.removeEventListener(type, listener, options || false);\n });\n}", "_addEventListener() {\n this._wave.waveElement.addEventListener('click', () =>\n this._addBubbles(this._config.app.bubblesAddedOnClick.count, 2, 1, false)\n );\n }", "addListener(listener) {\n this.listeners.push(listener);\n }", "addListener(listener) {\n this.listeners.push(listener);\n }", "function g(){X.removeEventListener(\"DOMContentLoaded\",g),a.removeEventListener(\"load\",g),fa.ready()}", "function onReadyListener(event) {\n element.removeEventListener(\"DOMContentLoaded\", onReadyListener, false);\n if (event.target == element.contentDocument) {\n for (let handler in frame.onReady)\n errors.catchAndLog(function () handler.call(frame))();\n }\n }", "function _on (event, listener) {\n if (typeof _events[event] !== 'object') {\n _events[event] = [];\n }\n\n _events[event].push(listener);\n }", "function onStart(){\n document.addEventListener('click', (event) => {\n injectArray();\n })\n}", "function once(fn){var called=false;return function(){var args=[],len=arguments.length;while(len--){args[len]=arguments[len];}if(called){return;}called=true;return fn.apply(this,args);};}", "onTemp (eventName, listener) {\n\t\t(this._tempListeners[eventName] = this._tempListeners[eventName] || []).push(listener);\n\t\tthis.on(eventName, listener);\n\t}", "_addEventListener(args) {\n !!(window.SVGSVGElement) ? bcdui._migPjs._$(args.element).on(args.type, args.listener) : args.element.attachEvent(args.type, args.listener);\n }", "function oncePromise(emitter, ...events) {\n return new Promise(resolve => {\n const handler = (...args) => {\n events.map(event => emitter.removeEventListener(event, handler));\n resolve(...args);\n };\n events.map(event => emitter.addEventListener(event, handler));\n });\n}", "function addListener(listener) {\n listeners.push(listener);\n\n if(!watchId) {\n startWatching();\n }\n else if(cachedGeo) {\n setTimeout(function() {\n handleEvent(cachedGeo);\n }, 0);\n }\n }", "addEventListener (f) {\n this.eventListeners.push(f)\n }", "function Listener() {}", "function Listener() {}", "whenUpdate(eventClass) {\n this.listenersEvents[0] = eventClass\n window.addEventListener(\"load\", () => this.listenersEvents[0], false)\n }", "addListener(eventName, handler) {\r\n if (eventName in this.events === false) this.events[eventName] = [];\r\n\r\n this.events[eventName].push(handler);\r\n }", "_handleEvent() {\n const listeners = this._opts.on || {}\n const onceListeners = this._opts.once || {}\n // Add listeners to player\n for(const evt in listeners) {\n if(VIDEO_EVENT_LIST.includes(evt) || USER_EVENT_LIST.includes(evt)) {\n this.player.on(evt, listeners[evt], {\n isPlugin: true,\n plugin: this\n })\n }\n }\n // Once listener\n for(const evt in onceListeners) {\n if(VIDEO_EVENT_LIST.includes(evt)) {\n this.player.once(evt, onceListeners[evt])\n }\n }\n }", "listener() {\n console.warn(\"no update listener set!\");\n }", "function loadEventListeners() {\n // Check! Button\n checkButton.addEventListener('click', checkBtn);\n // Again button \n againButton.addEventListener('click', againBtn);\n //Score Tracker\n\n}", "function listenerCreated() {\n if (!(listenerCnt++)) {\n window.addEventListener('touchmove', onWindowTouchMove, { passive: false });\n }\n }", "function listenerCreated() {\n if (!(listenerCnt++)) {\n window.addEventListener('touchmove', onWindowTouchMove, { passive: false });\n }\n }", "function addOnEvent(eventListener) {\n eventQueue.push(eventListener);\n }", "function addListener(el, eventName, handler) {\n if(typeof(el) == \"string\"){\n el = document.querySelectorAll(el);\n if(el.length == 1){\n el = el[0]; // if only one set it properly\n }\n }\n\n if (el == null || typeof(el) == 'undefined') return;\n\n if(el.length !== undefined && el.length > 1 && el != window){ // it's a NodeListCollection\n for (var i = 0; i < el.length; ++i) {\n attachListener(el[i], eventName, handler);\n }\n }else { // it's a single node\n // console.log(el);\n attachListener(el, eventName, handler);\n }\n }", "addOnRemove (listener) {\n this.listeners.push(listener)\n }", "function listenAgain() {\n debug(\"listenAgain\");\n cards().filter(function(card) {\n return card.className !== \"card mismatch\";\n }).forEach(function(item) {\n item.addEventListener('click', cardMagic);\n })\n }", "function noCheat(){\n console.log(\"already clicked!\");\n }", "onTouchUp(callback, isOnce = false) {\n this._touchUpCallbacks.push([\n callback,\n isOnce\n ]);\n }", "function p() {\n ne.removeEventListener(\"DOMContentLoaded\", p), e.removeEventListener(\"load\", p), \n he.ready();\n }", "function C(){F.forEach(function(e){var t=e.eventType,n=e.handler;Q.reference.removeEventListener(t,n)})}", "function handler() {\n fired = true;\n }", "addEventListener(event, callback, useCapture) {\n\t\tthis.$pwMain.subscribe({event: event, fn: callback, useCapture: useCapture});\n\t}", "addEventListener(event, callback, useCapture) {\n\t\tthis.$pwMain.subscribe({event: event, fn: callback, useCapture: useCapture});\n\t}" ]
[ "0.7667989", "0.7317466", "0.71819603", "0.70380247", "0.68628764", "0.6858734", "0.67149496", "0.6625332", "0.65739715", "0.65739715", "0.6571784", "0.6569037", "0.6553543", "0.6553543", "0.6436535", "0.63431466", "0.63421875", "0.6338894", "0.6230122", "0.6202916", "0.6157225", "0.61357045", "0.61263007", "0.60862076", "0.60768926", "0.60617435", "0.6006384", "0.6006355", "0.5976001", "0.5957863", "0.5902622", "0.5827158", "0.5797273", "0.5790681", "0.57853997", "0.57768834", "0.5768299", "0.5768299", "0.5766402", "0.57660335", "0.57623494", "0.575037", "0.57488173", "0.57349133", "0.57332796", "0.5708772", "0.5708344", "0.56982416", "0.56930834", "0.56930834", "0.56798416", "0.5666689", "0.56556165", "0.56535274", "0.5625227", "0.56109816", "0.5603438", "0.5603438", "0.55993503", "0.5591592", "0.5580731", "0.557398", "0.5573232", "0.5568506", "0.5549025", "0.55466145", "0.5544091", "0.5531239", "0.5524997", "0.5524997", "0.55146796", "0.551387", "0.5511566", "0.5509941", "0.5502683", "0.5501729", "0.5501729", "0.5496312", "0.5489697", "0.5488186", "0.54691625", "0.54665136", "0.54620284", "0.54608727", "0.54586947", "0.5457126", "0.54560435", "0.54560435" ]
0.6540209
24
eslintdisable nobitwise, nocondassign HTML DOM and SVG DOM may have different support levels, so we need to check on context instead of a document root element.
function contains(context, node) { if (context.contains) return context.contains(node); if (context.compareDocumentPosition) return context === node || !!(context.compareDocumentPosition(node) & 16); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function contains(context, node) {\n // HTML DOM and SVG DOM may have different support levels,\n // so we need to check on context instead of a document root element.\n if (context.contains) return context.contains(node);\n if (context.compareDocumentPosition) return context === node || !!(context.compareDocumentPosition(node) & 16);\n}", "function documentElementCheck () {\n const docNode = document.documentElement.nodeName;\n if (docNode) {\n return docNode.toLowerCase() === 'html';\n }\n return true;\n}", "function jsHasCtx2D(elem) {return !!elem.getContext;}", "function jsHasCtx2D(elem) {return !!elem.getContext;}", "function jsHasCtx2D(elem) {return !!elem.getContext;}", "get SUPPORT_SVG_DRAWING() {\n 'use strict';\n\n var value = testSVG(document);\n Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });\n return value;\n }", "get SUPPORT_SVG_DRAWING() {\n 'use strict';\n\n var value = testSVG(document);\n Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });\n return value;\n }", "get SUPPORT_SVG_DRAWING() {\n 'use strict';\n\n var value = testSVG(document);\n Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });\n return value;\n }", "function isElement(obj) {\n return obj instanceof d3.selection || typeof HTMLElement === 'object'\n ? obj instanceof HTMLElement // DOM2\n : obj && typeof obj === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string';\n}", "function isSVGElement(nodeName) {\n \treturn nodeName === 'svg' || nodeName === 'clipPath' || nodeName === 'circle' || nodeName === 'defs' || nodeName === 'desc' || nodeName === 'ellipse' || nodeName === 'filter' || nodeName === 'g' || nodeName === 'line' || nodeName === 'linearGradient' || nodeName === 'mask' || nodeName === 'marker' || nodeName === 'metadata' || nodeName === 'mpath' || nodeName === 'path' || nodeName === 'pattern' || nodeName === 'polygon' || nodeName === 'polyline' || nodeName === 'pattern' || nodeName === 'radialGradient' || nodeName === 'rect' || nodeName === 'set' || nodeName === 'stop' || nodeName === 'symbol' || nodeName === 'switch' || nodeName === 'text' || nodeName === 'tspan' || nodeName === 'use' || nodeName === 'view';\n }", "function N(t){return t.ownerSVGElement||(\"svg\"===(t.tagName+\"\").toLowerCase()?t:null)}", "function excludeNode(node, context) {\n if (context.config.analyzeLibDom) {\n return undefined;\n }\n return isLibDom(node);\n}", "function canUseDOM() {\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n}", "function supportsSvg() {\n\t\treturn !! document.createElementNS &&\n\t\t\t!! document.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\").createSVGRect;\n\t}", "function svgTest() {\n var div = document.createElement('div');\n var ns = 'http://www.w3.org/2000/svg';\n \n div.innerHTML = '<svg/>';\n return (div.firstChild && div.firstChild.namespaceURI) == ns;\n}", "function isElement(obj) {\n return obj instanceof selection || typeof HTMLElement === 'object'\n ? obj instanceof HTMLElement // DOM2\n : obj && typeof obj === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string';\n }", "function SVGElement() {}", "function SVGElement() {}", "function SVGElement() {}", "function SVGElement() {}", "function SVGElement() {}", "function SVGElement() {}", "function No() {\n // `document` is not always available, e.g. in ReactNative and WebWorkers.\n // eslint-disable-next-line no-restricted-globals\n return \"undefined\" != typeof document ? document : null;\n}", "function isDomNode(x) {\n return (x.nodeType != undefined);\n }", "function isDocumentElement(el) {\n return [document.documentElement, document.body, window].indexOf(el) > -1;\n}", "function isDocumentElement(el) {\n return [document.documentElement, document.body, window].indexOf(el) > -1;\n}", "function isDocumentElement(el) {\n return [document.documentElement, document.body, window].indexOf(el) > -1;\n}", "function isDocumentElement(el) {\n return [document.documentElement, document.body, window].indexOf(el) > -1;\n}", "function isDocumentElement(el) {\n return [document.documentElement, document.body, window].indexOf(el) > -1;\n}", "function isDocumentElement(el) {\n return [document.documentElement, document.body, window].indexOf(el) > -1;\n}", "function isDOMRequired() {\r\n return false;\r\n}", "function So() {\n // `document` is not always available, e.g. in ReactNative and WebWorkers.\n // eslint-disable-next-line no-restricted-globals\n return \"undefined\" != typeof document ? document : null;\n}", "function isRegSVG ( el ) {\n const inner = el.innerHTML\n if ( inner.includes( '<use' ) ) {\n addSrcType( el, 'useTag' )\n return el\n } else {\n addSrcType( el, 'svgTag' )\n return el\n }\n}", "function or() {\n // `document` is not always available, e.g. in ReactNative and WebWorkers.\n // eslint-disable-next-line no-restricted-globals\n return \"undefined\" != typeof document ? document : null;\n}", "_isSVGElem(_elem) {\n try {\n return _elem instanceof SVGElement;\n }\n catch (e) {\n // not all browsers have SVGElement:\n return false;\n }\n }", "_isSVGElem(_elem) {\n try {\n return _elem instanceof SVGElement;\n }\n catch (e) {\n // not all browsers have SVGElement:\n return false;\n }\n }", "function n(e){var n=e?e.ownerDocument||e:document,t=n.defaultView||window;return!(!e||!(\"function\"==typeof t.Node?e instanceof t.Node:\"object\"==typeof e&&\"number\"==typeof e.nodeType&&\"string\"==typeof e.nodeName))}", "function hasSVG(){ \n if(typeof bSvgUsed == \"undefined\"){\n\t\tvar SVG_NS = 'http://www.w3.org/2000/svg'; \n\t\tbSvgUsed = !!document.createElementNS && !!document.createElementNS(SVG_NS, 'svg').createSVGRect;\n return bSvgUsed;\n\t}else{\n\t\treturn bSvgUsed;\n\t}\n}", "function isElement(obj) {\n return !!((typeof HTMLElement === 'undefined' ? 'undefined' : _typeof(HTMLElement)) === 'object' ? obj instanceof HTMLElement : obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string');\n }", "function isDOMRequired()\n{\n\treturn true;\n}", "function isHTMLElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isHTMLElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}", "function isDOMRequired() { \n\treturn true;\n}", "function isElement(obj) {\n return !!((typeof HTMLElement === 'undefined' ? 'undefined' : _typeof(HTMLElement)) === 'object' ? obj instanceof HTMLElement : obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string');\n }", "get ownerSVGElement() {\n return null;\n }", "function isDocumentElement(el) {\n\t return [document.documentElement, document.body, window].includes(el);\n\t}", "function browserContext() {\n if (typeof window === 'undefined') return false;\n return true;\n}", "function d7_documentElement(node){\n return node && (node.ownerDocument || node || node.document).documentElement; \n}", "function isElement(o) {\n return typeof HTMLElement === 'object'\n ? o instanceof HTMLElement //DOM2\n : o &&\n typeof o === 'object' &&\n o !== null &&\n o.nodeType === 1 &&\n typeof o.nodeName === 'string';\n}", "function Co() {\n // `document` is not always available, e.g. in ReactNative and WebWorkers.\n // eslint-disable-next-line no-restricted-globals\n return \"undefined\" != typeof document ? document : null;\n}", "function isElement(o){\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\"\n );\n }", "function is_dom_element(obj) {\n return !!(obj && obj.nodeType === 1);\n}", "function normalizeContext (context) {\n if (typeof context === strType) {\n return getNodesBySelectorString(context);\n }\n\n if (context.isDollar) {\n return context.get();\n }\n\n // dom elements are nodeType 1, the document is nodeType 9\n if (context.nodeType === 1 || context.nodeType === 9) {\n return [context];\n }\n\n if (Array.isArray(context)) {\n return context;\n }\n\n return [docElement]; // default to the docElement, nodeType 1\n}", "_isAttachedToDOM() {\n const element = this._elementRef.nativeElement;\n if (element.getRootNode) {\n const rootNode = element.getRootNode();\n // If the element is inside the DOM the root node will be either the document\n // or the closest shadow root, otherwise it'll be the element itself.\n return rootNode && rootNode !== element;\n }\n // Otherwise fall back to checking if it's in the document. This doesn't account for\n // shadow DOM, however browser that support shadow DOM should support `getRootNode` as well.\n return document.documentElement.contains(element);\n }", "function isElement(o){\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\"\n);\n}", "function checkSVG(element) {\n \"use strict\";\n\n var el = element.find('.active .qode_slide-svg-holder');\n var drawing_enabled = el.data('svg-drawing');\n\n if (drawing_enabled === 'yes') {\n drawSVG(el);\n }\n}", "function supportsInlineSVG() {\n\t\tvar div = document.createElement( 'div' );\n\t\tdiv.innerHTML = '<svg/>';\n\t\treturn 'http://www.w3.org/2000/svg' === ( 'undefined' !== typeof SVGRect && div.firstChild && div.firstChild.namespaceURI );\n\t}", "function contains(context, node) {\n if (context.contains) return context.contains(node);\n if (context.compareDocumentPosition) return context === node || !!(context.compareDocumentPosition(node) & 16);\n }", "function uunodehas(node, // @param Node: child node\r\n context) { // @param Node: context(parent) node\r\n // @return Boolean:\r\n for (var c = node; c && c !== context;) {\r\n c = c.parentNode;\r\n }\r\n return node !== context && c === context;\r\n}", "function hasDocument() {\n return typeof document !== \"undefined\";\n}", "function hasDocument() {\n return typeof document !== \"undefined\";\n}", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n }", "function isInsideJsxElementOrAttribute(sourceFile, position) {\n var token = getTokenAtPosition(sourceFile, position);\n if (!token) {\n return false;\n }\n if (token.kind === 244 /* JsxText */) {\n return true;\n }\n // <div>Hello |</div>\n if (token.kind === 25 /* LessThanToken */ && token.parent.kind === 244 /* JsxText */) {\n return true;\n }\n // <div> { | </div> or <div a={| </div>\n if (token.kind === 25 /* LessThanToken */ && token.parent.kind === 248 /* JsxExpression */) {\n return true;\n }\n // <div> {\n // |\n // } < /div>\n if (token && token.kind === 16 /* CloseBraceToken */ && token.parent.kind === 248 /* JsxExpression */) {\n return true;\n }\n // <div>|</div>\n if (token.kind === 25 /* LessThanToken */ && token.parent.kind === 245 /* JsxClosingElement */) {\n return true;\n }\n return false;\n }", "_isValidContext() {\n const isNode = (typeof process !== 'undefined')\n && (typeof process.release !== 'undefined')\n && (process.release.name === 'node');\n return isNode;\n }", "function isElement(o){\n return (\n typeof HTMLElement === 'object' ? o instanceof HTMLElement : // DOM2\n o && typeof o === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName==='string'\n )\n}", "function isElement(o) {\n return o && (typeof o === 'undefined' ? 'undefined' : _typeof(o)) === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName === 'string';\n}", "function isElement(o){\n return (\n typeof HTMLElement === \"function\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\"\n );\n }", "function isElement(o) {\n return (typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName === \"string\");\n }", "function isElement(o) {\n return (\n typeof HTMLElement === 'object' ? o instanceof HTMLElement : //DOM2\n o && typeof o === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName === 'string'\n );\n }", "function ngxChartsPolyfills() {\r\n // IE11 fix\r\n // Ref: https://github.com/swimlane/ngx-charts/issues/386\r\n if (typeof (SVGElement) !== 'undefined' && typeof SVGElement.prototype.contains === 'undefined') {\r\n SVGElement.prototype.contains = HTMLDivElement.prototype.contains;\r\n }\r\n}", "function ngxChartsPolyfills() {\r\n // IE11 fix\r\n // Ref: https://github.com/swimlane/ngx-charts/issues/386\r\n if (typeof (SVGElement) !== 'undefined' && typeof SVGElement.prototype.contains === 'undefined') {\r\n SVGElement.prototype.contains = HTMLDivElement.prototype.contains;\r\n }\r\n}", "function isElement(obj) {\n return !!((typeof HTMLElement === 'undefined' ? 'undefined' : _typeof(HTMLElement)) === 'object' ? obj instanceof HTMLElement : obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string');\n}", "function isDomNode(thing) {\n\t return thing instanceof Node;\n\t}", "function isElement(o){\n\t\t\treturn (typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n\t\t\t\to && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\")\n\t\t}", "function checkElementIdShadowing(value) {\n return value && value.nodeType === undefined ? value : undefined;\n }", "function checkElementIdShadowing(value) {\n return value && value.nodeType === undefined ? value : undefined;\n }", "function checkElementIdShadowing(value) {\n return value && value.nodeType === undefined ? value : undefined;\n }", "function checkElementIdShadowing(value) {\n return value && value.nodeType === undefined ? value : undefined;\n }", "function checkElementIdShadowing(value) {\n return value && value.nodeType === undefined ? value : undefined;\n }", "function isElement(o) {\n return !!o && o.nodeType === 1;\n}" ]
[ "0.6394065", "0.61764586", "0.61672187", "0.61672187", "0.61672187", "0.60401005", "0.60401005", "0.60401005", "0.6004046", "0.5974265", "0.5952056", "0.59448713", "0.59185284", "0.58944297", "0.5856123", "0.5784176", "0.57125485", "0.57125485", "0.57125485", "0.57125485", "0.57125485", "0.57125485", "0.5707602", "0.5679827", "0.5657751", "0.5657751", "0.5657751", "0.5657751", "0.5657751", "0.5657751", "0.5626074", "0.562397", "0.561981", "0.56144446", "0.55977106", "0.55977106", "0.55944234", "0.5567563", "0.5537535", "0.55271316", "0.5514006", "0.5514006", "0.5514006", "0.5514006", "0.5514006", "0.5502377", "0.54990315", "0.5493793", "0.5493046", "0.54763436", "0.5461413", "0.54497635", "0.54325366", "0.5425893", "0.54244155", "0.5417351", "0.5405296", "0.53908527", "0.53783685", "0.53725755", "0.53677535", "0.53654647", "0.5361796", "0.5361796", "0.53520864", "0.53520864", "0.53520864", "0.53520864", "0.53520864", "0.53520864", "0.53520864", "0.53520864", "0.53520864", "0.53354335", "0.533522", "0.53350586", "0.53301525", "0.532566", "0.53186136", "0.5289022", "0.5288943", "0.5288943", "0.5283319", "0.5272437", "0.5270108", "0.5267952", "0.5267952", "0.5267952", "0.5267952", "0.5267952", "0.52674776" ]
0.5355999
73
This needs to be done on mousedown and touchstart instead of click so that it precedes the focus event.
function checkPointerDown(e) { if (container.contains(e.target)) return; if (config.clickOutsideDeactivates) { deactivate({ returnFocus: !tabbable.isFocusable(e.target) }); } else { e.preventDefault(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onFocus() {\r\n // Stub\r\n }", "focus() {}", "focus() {}", "function focus(){}", "focus() { }", "focus() {\n this.setFocus(0, 1);\n }", "doFocus() {\n this.__focusOnLast();\n }", "onFocusIn() {\n this.updateFocused(true);\n }", "afterOp() {\n if ( focusedNode && focusedNode.focusable ) {\n focusedNode.focus();\n }\n BrowserEvents.blockFocusCallbacks = false;\n }", "_drawFocus()\n\t{\n\t\t\n\t}", "componentDidReceiveFocus() {}", "_focusHandler(event) {\n const that = this;\n\n if (that.disabled) {\n return;\n }\n\n if (event.target === that) {\n that.$.input.focus();\n that._edgeSelect = false;\n return;\n }\n\n that.setAttribute('focus', '');\n\n if (that.selectAllOnFocus) {\n if (navigator.userAgent.match(/Edge/)) {\n const scrollTop = that.$.input.scrollTop;\n\n if (that._edgeSelect) {\n that._edgeSelect = false;\n return;\n }\n\n setTimeout(function () {\n that._edgeSelect = true;\n that.$.input.select();\n that.$.input.scrollTop = scrollTop;\n }, 5);\n }\n else {\n that.$.input.select();\n }\n }\n }", "_onFocus() {\n this.__hasFocus = true;\n }", "function mousedown(event) {\r\n\t\t\t\tactiveElement = event.target;\r\n\t\t\t}", "activateFocus() {\n this.isFocused_ = true;\n this.styleFocused_(this.isFocused_);\n this.adapter_.activateLineRipple();\n this.notchOutline(this.shouldFloat);\n if (this.adapter_.hasLabel()) {\n this.adapter_.shakeLabel(this.shouldShake);\n this.adapter_.floatLabel(this.shouldFloat);\n }\n if (this.helperText_) {\n this.helperText_.showToScreenReader();\n }\n }", "activateFocus() {\n this.isFocused_ = true;\n this.styleFocused_(this.isFocused_);\n this.adapter_.activateLineRipple();\n this.notchOutline(this.shouldFloat);\n if (this.adapter_.hasLabel()) {\n this.adapter_.shakeLabel(this.shouldShake);\n this.adapter_.floatLabel(this.shouldFloat);\n }\n if (this.helperText_) {\n this.helperText_.showToScreenReader();\n }\n }", "focus() {\n if (this.isFocusable) {\n DomHelper.focusWithoutScrolling(this.focusElement);\n }\n }", "focus() {\n if (this.isFocusable) {\n DomHelper.focusWithoutScrolling(this.focusElement);\n }\n }", "focus() {\r\n this.native.focus();\r\n }", "handleFocus(event) {\n event.target.select();\n }", "handleA11yFocus(event) {\n if (!this.dragging) {\n this.props.a11yFocus(event.type === 'focus');\n this.asFocus = event.type === 'focus';\n }\n }", "_onFocus() {\n if (!this.state.focus) {\n this.setState({\n focus: true,\n });\n }\n }", "beforeOp() {\n focusedNode = FocusManager.pdomFocusedNode;\n BrowserEvents.blockFocusCallbacks = true;\n }", "onFocus(e) {\n if (this.$isFocused)\n return;\n this.$isFocused = true;\n this.renderer.showCursor();\n this.renderer.visualizeFocus();\n this._emit(\"focus\", e);\n }", "focus() {\n if (!this.focusElement || this.disabled) {\n return;\n }\n\n this.focusElement.focus();\n\n this._setFocused(true);\n }", "activeFocus() {\n var $_this = this;\n this.$originalSelect.on('focus', function () {\n $_this.$selectableUl.focus();\n });\n }", "focus() {\r\n this.isFocussed = true;\r\n this.showLimits = false;\r\n }", "focus() {\n this.observer.ignore(() => {\n focusPreventScroll(this.contentDOM);\n this.docView.updateSelection();\n });\n }", "handleFocus() {\n this.adapter_.addClass(cssClasses.FOCUSED);\n this.adapter_.floatLabel(true);\n this.notchOutline(true);\n this.adapter_.activateBottomLine();\n if (this.helperText_) {\n this.helperText_.showToScreenReader();\n }\n }", "function focusHandler(){\n isWindowFocused = true;\n }", "function focusHandler(){\n isWindowFocused = true;\n }", "function focusHandler(){\r\n isWindowFocused = true;\r\n }", "setFocus(){\n this.getInputEle().focus();\n }", "setFocus() {\n\t\tsetTimeout(() => {\n\t\t\tif (this.state.focus) {\n\t\t\t\tthis.refs[this.state.focus].focus();\n\t\t\t\tthis.state.focus = null;\n\t\t\t}\n\t\t}, 0);\n\t}", "setFocus() {\n\t\tsetTimeout(() => {\n\t\t\tif (this.state.focus) {\n\t\t\t\tthis.refs[this.state.focus].focus();\n\t\t\t\tthis.state.focus = null;\n\t\t\t}\n\t\t}, 0);\n\t}", "_onFocus() {\n this.setState({ focused: this._containsDOMElement(document.activeElement) })\n }", "_focusEventHandler() {\n this.setAttribute('focus', '');\n }", "function focus() {\n overlay.setFocus( true );\n}", "function gainFocus () {\n\t//log (\"gainFocus ()\");\n\t\n\t// Register the focus\n\twidgetFocused\t= true;\n\t\n\t// Show the tray button\n\tfadeButtonsStart ();\n}", "addFocusEventListener() {\n this.input.addEventListener('focus', () => this.input.select());\n }", "focus() {\n var self = this;\n if (self.isDisabled) return;\n self.ignoreFocus = true;\n self.control_input.focus();\n setTimeout(() => {\n self.ignoreFocus = false;\n self.onFocus();\n }, 0);\n }", "_recaptureFocus() {\n if (!this._containsFocus()) {\n const focusContainer = !this._config.autoFocus || !this._focusTrap.focusInitialElement();\n if (focusContainer) {\n this._elementRef.nativeElement.focus();\n }\n }\n }", "activateFocus() {\n this.isFocused_ = true;\n this.styleFocused_(this.isFocused_);\n if (this.bottomLine_) {\n this.bottomLine_.activate();\n }\n if (this.outline_) {\n this.updateOutline();\n }\n if (this.label_) {\n this.label_.styleShake(this.isValid(), this.isFocused_);\n this.label_.styleFloat(\n this.getValue(), this.isFocused_, this.isBadInput_());\n }\n if (this.helperText_) {\n this.helperText_.showToScreenReader();\n }\n }", "function onPointerDown(e) {\n if (hadKeyboardEvent === true) {\n removeAllFocusVisibleAttributes();\n }\n\n hadKeyboardEvent = false;\n }", "function focus_on_click() {\n\n $('.focus-on-click').on('click', function(event) {\n\n var target = $($(this).data('focus-element'));\n\n if (!$(this).hasClass('scroll-on-click') && (target.length)) {\n\n target.focus();\n\n }\n\n });\n\n }", "function forceFocus() {\n\tinput.trigger(\"click\").focus();\n}", "_onFocus(event) {\n this.focused = true;\n this.forceUpdate();\n\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n }", "function inputMethodFocus() {\n\t\t\tif (!editor.settings.content_editable) {\n\t\t\t\t// Case 1 IME doesn't initialize if you focus the document\n\t\t\t\tdom.bind(editor.getDoc(), 'focusin', function() {\n\t\t\t\t\tselection.setRng(selection.getRng());\n\t\t\t\t});\n\n\t\t\t\t// Case 2 IME doesn't initialize if you click the documentElement it also doesn't properly fire the focusin event\n\t\t\t\t// Needs to be both down/up due to weird rendering bug on Chrome Windows\n\t\t\t\tdom.bind(editor.getDoc(), 'mousedown mouseup', function(e) {\n\t\t\t\t\tif (e.target == editor.getDoc().documentElement) {\n\t\t\t\t\t\teditor.getBody().focus();\n\n\t\t\t\t\t\tif (e.type == 'mousedown') {\n\t\t\t\t\t\t\t// Edge case for mousedown, drag select and mousedown again within selection on Chrome Windows to render caret\n\t\t\t\t\t\t\tselection.placeCaretAt(e.clientX, e.clientY);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselection.setRng(selection.getRng());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}", "_evtFocus(event) {\n const target = event.target;\n if (!this.node.contains(target)) {\n event.stopPropagation();\n this._buttonNodes[this._defaultButton].focus();\n }\n }", "function inputMethodFocus() {\n\t\t\tif (!editor.settings.content_editable) {\n\t\t\t\t// Case 1 IME doesn't initialize if you focus the document\n\t\t\t\t// Disabled since it was interferring with the cE=false logic\n\t\t\t\t// Also coultn't reproduce the issue on Safari 9\n\t\t\t\t/*dom.bind(editor.getDoc(), 'focusin', function() {\n\t\t\t\t\tselection.setRng(selection.getRng());\n\t\t\t\t});*/\n\n\t\t\t\t// Case 2 IME doesn't initialize if you click the documentElement it also doesn't properly fire the focusin event\n\t\t\t\t// Needs to be both down/up due to weird rendering bug on Chrome Windows\n\t\t\t\tdom.bind(editor.getDoc(), 'mousedown mouseup', function(e) {\n\t\t\t\t\tvar rng;\n\n\t\t\t\t\tif (e.target == editor.getDoc().documentElement) {\n\t\t\t\t\t\trng = selection.getRng();\n\t\t\t\t\t\teditor.getBody().focus();\n\n\t\t\t\t\t\tif (e.type == 'mousedown') {\n\t\t\t\t\t\t\tif (CaretContainer.isCaretContainer(rng.startContainer)) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Edge case for mousedown, drag select and mousedown again within selection on Chrome Windows to render caret\n\t\t\t\t\t\t\tselection.placeCaretAt(e.clientX, e.clientY);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselection.setRng(rng);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}", "function inputMethodFocus() {\n\t\t\tif (!editor.settings.content_editable) {\n\t\t\t\t// Case 1 IME doesn't initialize if you focus the document\n\t\t\t\t// Disabled since it was interferring with the cE=false logic\n\t\t\t\t// Also coultn't reproduce the issue on Safari 9\n\t\t\t\t/*dom.bind(editor.getDoc(), 'focusin', function() {\n\t\t\t\t\tselection.setRng(selection.getRng());\n\t\t\t\t});*/\n\n\t\t\t\t// Case 2 IME doesn't initialize if you click the documentElement it also doesn't properly fire the focusin event\n\t\t\t\t// Needs to be both down/up due to weird rendering bug on Chrome Windows\n\t\t\t\tdom.bind(editor.getDoc(), 'mousedown mouseup', function(e) {\n\t\t\t\t\tvar rng;\n\n\t\t\t\t\tif (e.target == editor.getDoc().documentElement) {\n\t\t\t\t\t\trng = selection.getRng();\n\t\t\t\t\t\teditor.getBody().focus();\n\n\t\t\t\t\t\tif (e.type == 'mousedown') {\n\t\t\t\t\t\t\tif (CaretContainer.isCaretContainer(rng.startContainer)) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Edge case for mousedown, drag select and mousedown again within selection on Chrome Windows to render caret\n\t\t\t\t\t\t\tselection.placeCaretAt(e.clientX, e.clientY);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselection.setRng(rng);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}", "onContainerClick() {\n if (!this.focused && !this.disabled) {\n if (!this._model || !this._model.selection.start) {\n this._startInput.focus();\n }\n else {\n this._endInput.focus();\n }\n }\n }", "onContainerClick() {\n if (!this.focused && !this.disabled) {\n if (!this._model || !this._model.selection.start) {\n this._startInput.focus();\n }\n else {\n this._endInput.focus();\n }\n }\n }", "focus() {\n if (this.disabled || this.matches(':focus-within')) {\n // Don't shift focus from an element within the text field, like an icon\n // button, to the input when focus is requested.\n return;\n }\n super.focus();\n }", "externalTouchDown() {\n this._strikeTouchDown();\n }", "function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); }", "function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); }", "function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); }", "function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); }", "function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); }", "onFocusEnter() { }", "_focusHandler() {\n const that = this;\n\n if (that.disabled || that._items.length === 0) {\n return;\n }\n\n if (that._itemIsFocussed) {\n that._selectedItem.focused = false;\n }\n else {\n that._items[0].focused = false;\n }\n }", "function onFocus(e) {\n if (e.target instanceof Node && rootElement.contains(e.target)) {\n isFocused = true;\n }\n }", "activateFocus() {\n const {FOCUSED, LABEL_FLOAT_ABOVE, LABEL_SHAKE} = MDCTextFieldFoundation.cssClasses;\n this.adapter_.addClass(FOCUSED);\n if (this.bottomLine_) {\n this.bottomLine_.activate();\n }\n this.adapter_.addClassToLabel(LABEL_FLOAT_ABOVE);\n this.adapter_.removeClassFromLabel(LABEL_SHAKE);\n if (this.helperText_) {\n this.helperText_.showToScreenReader();\n }\n this.isFocused_ = true;\n }", "function bodyOnFocus() {}", "function focused() {\n\t\t\tsettings.userActivity = time();\n\n\t\t\t// Resume if suspended\n\t\t\tsettings.suspend = false;\n\n\t\t\tif ( ! settings.hasFocus ) {\n\t\t\t\tsettings.hasFocus = true;\n\t\t\t\tscheduleNextTick();\n\t\t\t}\n\t\t}", "handleFocus (event) {\n this.setState({ focus: true }, () => {\n super.handleFocus(event)\n })\n }", "focus() {\n super.focus();\n if (this._activeFrame) {\n this._activeFrame.focus();\n }\n }", "focus () {\n\t\tthis.manager.focusLayer(this);\n\t}", "_focus(event) {\n // Depending on support for input[type=range],\n // the event.target could be either the handle or its child input.\n // Use closest() to locate the actual handle.\n event.target.closest(`.${CLASSNAME_HANDLE}`).classList.add('is-focused');\n\n events.on('touchstart.Slider', this._onInteraction);\n events.on('mousedown.Slider', this._onInteraction);\n }", "onFocusGesture(event) {\n if (\n event.target === this.ownerCmp.contentElement ||\n (event.target.closest(this.itemSelector) && this.ownerCmp.itemsFocusable === false)\n ) {\n event.preventDefault();\n }\n }", "unfocus() {}", "_allowFocusEscape() {\n this._tabIndex = -1;\n setTimeout(() => {\n this._tabIndex = 0;\n this._changeDetector.markForCheck();\n });\n }", "_allowFocusEscape() {\n this._tabIndex = -1;\n setTimeout(() => {\n this._tabIndex = 0;\n this._changeDetector.markForCheck();\n });\n }", "function handleAndroidFocus() {\n\tvar container = page.getViewById(\"container\");\n\tif (container.android) {\n\t\tcontainer.android.setFocusableInTouchMode(true);\n\t\tcontainer.android.setFocusable(true);\n\t\tusername.android.clearFocus();\n\t}\n}", "setFocus(){\n\t\tthis.$.content.focus();\n\t\tthis.domHost.playSound(\"moveCursor\", \"\", \"\");\n\t}", "focus() {\n this.toggleMenuList();\n this.input.focus();\n }", "function focusEvents() {\n setSuggestionBoxPosition();\n active = true;\n if ($(this).val()) {\n showSuggestions(jsonData);\n }\n }", "function onElementFocus() {\r\n\r\n this.blur();\r\n\r\n }", "focus() {\n\t\tthis.children.first.focus();\n\t}", "_focusEventHandler() {\n const that = this;\n\n if (that.$.dropDownButton) {\n that.setAttribute('focus', '');\n that.$.dropDownButton.setAttribute('focus', '');\n }\n\n if (that.$.actionButton) {\n that.setAttribute('focus', '');\n that.$.actionButton.setAttribute('focus', '');\n }\n\n that.removeAttribute('drop-down-button-focus');\n that.removeAttribute('action-button-focus');\n }", "_focusEventHandler() {\n const that = this;\n\n if (that.$.dropDownButton) {\n that.setAttribute('focus', '');\n that.$.dropDownButton.setAttribute('focus', '');\n }\n\n if (that.$.actionButton) {\n that.setAttribute('focus', '');\n that.$.actionButton.setAttribute('focus', '');\n }\n\n that.removeAttribute('drop-down-button-focus');\n that.removeAttribute('action-button-focus');\n }", "setFocus() {\n $(this).parent().addClass(\"input-focus\");\n }", "handleFocus() {\n if (!this.state.hasFocus) {\n this.setState({ hasFocus: true });\n }\n }", "focusFirstElement() {\n this.trapFocus();\n }", "mousedownHandler(e) {\n this.shouldSkipFocus = !this.contains(document.activeElement);\n return true;\n }", "focus() {\n this.$.input._focusableElement.focus();\n }", "function setFocus () {\n if (isBrowser && window.__puxActiveElement === true) {\n if (window.__puxActiveElement !== document.activeElement) {\n var el = window.__puxActiveElement = document.querySelector('[data-focused]')\n if (el !== null && document.activeElement !== el) {\n el.focus();\n }\n }\n }\n }", "setInputFocus(){\n this.textInput.removeAttribute('disabled');//Remove disabled attrib so input is interactible again\n this.textInput.focus();\n this.textInput.select();\n }", "componentDidUpdate() {\n this.focused = false;\n this.mouseDownOnButton = false;\n }", "onElementMouseDown(event) {\n const me = this,\n cellData = me.getCellDataFromEvent(event);\n me.skipFocusSelection = true;\n me.triggerCellMouseEvent('mousedown', event); // Browser event unification fires a mousedown on touch tap prior to focus.\n\n if (cellData && !event.defaultPrevented) {\n me.onFocusGesture(cellData, event);\n }\n }", "onFocusGesture(event) {\n if (event.target === this.ownerCmp.contentElement || event.target.closest(this.itemSelector) && this.ownerCmp.itemsFocusable === false) {\n event.preventDefault();\n }\n }", "onFocusOut() {\n this.updateFocused(false);\n }", "_focusHandler() {\n const i = this.shadowRoot.querySelector('anypoint-input');\n if (!i) {\n return;\n }\n i.inputElement.focus();\n }", "function onMouseup(){elements.input.focus();}", "function handleFocusToOpenEvent( event ) { // 4761\n // 4762\n // Stop the event from propagating to the doc. // 4763\n event.stopPropagation() // 4764\n // 4765\n // If it’s a focus event, add the “focused” class to the root. // 4766\n if ( event.type == 'focus' ) { // 4767\n P.$root.addClass( CLASSES.focused ) // 4768\n } // 4769\n // 4770\n // And then finally open the picker. // 4771\n P.open() // 4772\n } // 4773", "focus ( target ) {\n Editor.UI.focus(target);\n\n // DELME\n // if ( target.setFocus ) {\n // target.setFocus();\n // return;\n // }\n // Polymer.Base.fire.call(target, 'focus');\n }", "_focusHandler() {\n const i = document.querySelector('paper-input');\n if (!i) {\n return;\n }\n i.inputElement.focus();\n }", "function onMouseup () {\n elements.input.focus();\n }", "function onMouseup () {\n elements.input.focus();\n }", "function onMouseup () {\n elements.input.focus();\n }" ]
[ "0.7445436", "0.73821896", "0.73821896", "0.73257065", "0.72273356", "0.71740615", "0.716548", "0.7134499", "0.70795846", "0.7069849", "0.7037213", "0.7002982", "0.70009285", "0.6994331", "0.6958366", "0.6958366", "0.69429827", "0.69429827", "0.6937126", "0.69316477", "0.6887016", "0.6881131", "0.68745005", "0.6860365", "0.68443954", "0.68375975", "0.678583", "0.6785518", "0.67738897", "0.67585546", "0.67585546", "0.675672", "0.67508864", "0.67440695", "0.67440695", "0.67408496", "0.6728991", "0.6715086", "0.6704694", "0.6680534", "0.6680346", "0.6671037", "0.66672546", "0.6667253", "0.6664928", "0.6660177", "0.6650731", "0.6648669", "0.6642621", "0.663822", "0.663822", "0.6634753", "0.6634753", "0.6630099", "0.6619191", "0.6604268", "0.6604268", "0.6604268", "0.6604268", "0.6604268", "0.6583322", "0.6573671", "0.65731686", "0.65678", "0.6565118", "0.6562915", "0.6559972", "0.65594935", "0.6556053", "0.6518481", "0.6506968", "0.65038484", "0.6498785", "0.6498785", "0.6492782", "0.64910865", "0.6489788", "0.64897454", "0.6486837", "0.64822775", "0.64811957", "0.64811957", "0.6478574", "0.64759725", "0.647239", "0.64721894", "0.6465987", "0.64627016", "0.64599764", "0.64539677", "0.64527214", "0.6449796", "0.64478254", "0.6446431", "0.64419806", "0.6440721", "0.64363456", "0.6436207", "0.64347416", "0.64347416", "0.64347416" ]
0.0
-1
In case focus escapes the trap for some strange reason, pull it back in.
function checkFocusIn(e) { // In Firefox when you Tab out of an iframe the Document is briefly focused. if (container.contains(e.target) || e.target instanceof Document) { return; } e.stopImmediatePropagation(); tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FocusTrapInertStrategy() { }", "_trapFocus(focusTrap, event) {\n const target = event.target;\n const focusTrapRoot = focusTrap._element;\n // Don't refocus if target was in an overlay, because the overlay might be associated\n // with an element inside the FocusTrap, ex. mat-select.\n if (!focusTrapRoot.contains(target) && closest(target, 'div.cdk-overlay-pane') === null) {\n // Some legacy FocusTrap usages have logic that focuses some element on the page\n // just before FocusTrap is destroyed. For backwards compatibility, wait\n // to be sure FocusTrap is still enabled before refocusing.\n setTimeout(() => {\n // Check whether focus wasn't put back into the focus trap while the timeout was pending.\n if (focusTrap.enabled && !focusTrapRoot.contains(focusTrap._document.activeElement)) {\n focusTrap.focusFirstTabbableElement();\n }\n });\n }\n }", "_trapFocus(focusTrap, event) {\n const target = event.target;\n const focusTrapRoot = focusTrap._element;\n // Don't refocus if target was in an overlay, because the overlay might be associated\n // with an element inside the FocusTrap, ex. mat-select.\n if (!focusTrapRoot.contains(target) && closest(target, 'div.cdk-overlay-pane') === null) {\n // Some legacy FocusTrap usages have logic that focuses some element on the page\n // just before FocusTrap is destroyed. For backwards compatibility, wait\n // to be sure FocusTrap is still enabled before refocusing.\n setTimeout(() => {\n // Check whether focus wasn't put back into the focus trap while the timeout was pending.\n if (focusTrap.enabled && !focusTrapRoot.contains(focusTrap._document.activeElement)) {\n focusTrap.focusFirstTabbableElement();\n }\n });\n }\n }", "_trapFocus(focusTrap, event) {\n const target = event.target;\n const focusTrapRoot = focusTrap._element;\n // Don't refocus if target was in an overlay, because the overlay might be associated\n // with an element inside the FocusTrap, ex. mat-select.\n if (!focusTrapRoot.contains(target) && closest(target, 'div.cdk-overlay-pane') === null) {\n // Some legacy FocusTrap usages have logic that focuses some element on the page\n // just before FocusTrap is destroyed. For backwards compatibility, wait\n // to be sure FocusTrap is still enabled before refocusing.\n setTimeout(() => {\n // Check whether focus wasn't put back into the focus trap while the timeout was pending.\n if (focusTrap.enabled && !focusTrapRoot.contains(focusTrap._document.activeElement)) {\n focusTrap.focusFirstTabbableElement();\n }\n });\n }\n }", "function FocusTrapInertStrategy() {}", "_trapFocus(focusTrap, event) {\n var _a;\n\n const target = event.target;\n const focusTrapRoot = focusTrap._element; // Don't refocus if target was in an overlay, because the overlay might be associated\n // with an element inside the FocusTrap, ex. mat-select.\n\n if (target && !focusTrapRoot.contains(target) && !((_a = target.closest) === null || _a === void 0 ? void 0 : _a.call(target, 'div.cdk-overlay-pane'))) {\n // Some legacy FocusTrap usages have logic that focuses some element on the page\n // just before FocusTrap is destroyed. For backwards compatibility, wait\n // to be sure FocusTrap is still enabled before refocusing.\n setTimeout(() => {\n // Check whether focus wasn't put back into the focus trap while the timeout was pending.\n if (focusTrap.enabled && !focusTrapRoot.contains(focusTrap._document.activeElement)) {\n focusTrap.focusFirstTabbableElement();\n }\n });\n }\n }", "_allowFocusEscape() {\n this._tabIndex = -1;\n setTimeout(() => {\n this._tabIndex = 0;\n this._changeDetector.markForCheck();\n });\n }", "_allowFocusEscape() {\n this._tabIndex = -1;\n setTimeout(() => {\n this._tabIndex = 0;\n this._changeDetector.markForCheck();\n });\n }", "_allowFocusEscape() {\n const previousTabIndex = this.tabIndex;\n if (this.tabIndex !== -1) {\n this.tabIndex = -1;\n setTimeout(() => {\n this.tabIndex = previousTabIndex;\n this._changeDetectorRef.markForCheck();\n });\n }\n }", "_allowFocusEscape() {\n const previousTabIndex = this.tabIndex;\n if (this.tabIndex !== -1) {\n this.tabIndex = -1;\n setTimeout(() => {\n this.tabIndex = previousTabIndex;\n this._changeDetectorRef.markForCheck();\n });\n }\n }", "preventFocus(focusTrap) {\n // Ensure there's only one listener per document\n if (this._listener) {\n focusTrap._document.removeEventListener('focus', this._listener, true);\n }\n\n this._listener = e => this._trapFocus(focusTrap, e);\n\n focusTrap._ngZone.runOutsideAngular(() => {\n focusTrap._document.addEventListener('focus', this._listener, true);\n });\n }", "_allowFocusEscape() {\n if (this._chipInput.focused) {\n return;\n }\n const previousTabIndex = this.tabIndex;\n if (this.tabIndex !== -1) {\n this.tabIndex = -1;\n setTimeout(() => {\n this.tabIndex = previousTabIndex;\n this._changeDetectorRef.markForCheck();\n });\n }\n }", "unfocus() {}", "function removeTrapFocus() {\n document.removeEventListener('focusin', trapFocusHandlers.focusin);\n document.removeEventListener('focusout', trapFocusHandlers.focusout);\n document.removeEventListener('keydown', trapFocusHandlers.keydown);\n}", "function removeTrapFocus() {\n document.removeEventListener('focusin', trapFocusHandlers.focusin);\n document.removeEventListener('focusout', trapFocusHandlers.focusout);\n document.removeEventListener('keydown', trapFocusHandlers.keydown);\n}", "deregister(focusTrap) {\n focusTrap._disable();\n\n const stack = this._focusTrapStack;\n const i = stack.indexOf(focusTrap);\n\n if (i !== -1) {\n stack.splice(i, 1);\n\n if (stack.length) {\n stack[stack.length - 1]._enable();\n }\n }\n }", "preventFocus(focusTrap) {\n // Ensure there's only one listener per document\n if (this._listener) {\n focusTrap._document.removeEventListener('focus', this._listener, true);\n }\n this._listener = (e) => this._trapFocus(focusTrap, e);\n focusTrap._ngZone.runOutsideAngular(() => {\n focusTrap._document.addEventListener('focus', this._listener, true);\n });\n }", "preventFocus(focusTrap) {\n // Ensure there's only one listener per document\n if (this._listener) {\n focusTrap._document.removeEventListener('focus', this._listener, true);\n }\n this._listener = (e) => this._trapFocus(focusTrap, e);\n focusTrap._ngZone.runOutsideAngular(() => {\n focusTrap._document.addEventListener('focus', this._listener, true);\n });\n }", "preventFocus(focusTrap) {\n // Ensure there's only one listener per document\n if (this._listener) {\n focusTrap._document.removeEventListener('focus', this._listener, true);\n }\n this._listener = (e) => this._trapFocus(focusTrap, e);\n focusTrap._ngZone.runOutsideAngular(() => {\n focusTrap._document.addEventListener('focus', this._listener, true);\n });\n }", "revertFocus() {\n // TODO: look for fallback focus targets if the target is no longer focusable (disabled/hidden etc)\n if (\n this.focusInEvent &&\n this.focusInEvent.relatedTarget &&\n this.focusInEvent.relatedTarget.nodeType === 1 &&\n this.element.contains(document.activeElement)\n ) {\n DomHelper.focusWithoutScrolling(this.focusInEvent.relatedTarget);\n }\n }", "_handleEscPress(e) {\n if (this.noCloseOnEsc) {\n e.preventDefault();\n }\n }", "_handleEscPress(e) {\n if (this.noCloseOnEsc) {\n e.preventDefault();\n }\n }", "register(focusTrap) {\n // Dedupe focusTraps that register multiple times.\n this._focusTrapStack = this._focusTrapStack.filter(ft => ft !== focusTrap);\n let stack = this._focusTrapStack;\n\n if (stack.length) {\n stack[stack.length - 1]._disable();\n }\n\n stack.push(focusTrap);\n\n focusTrap._enable();\n }", "function stealFocus() {\n content.document.activeElement[\"blur\"]();\n}", "function ckeFocusEvent(event) {\n\tvar editor = event.editor;\n\tvar $textarea = $(editor.element.$);\n\t$textarea.trigger('pw-focus');\n}", "function onKeyEsc() {\n ctrl.blur();\n }", "function catchTab (item,e) {\n\t\t\tvar c;\n\t\t\tvar cDom=e.target;\n\n\t\t\tif (navigator.userAgent.match(\"Gecko\")) {\n\t\t\t\tc = e.which;\n\t\t\t} else {\n\t\t\t\tc = e.keyCode;\n\t\t\t}\n\n\t\t\tif (c===9) {\n replaceSelection(cDom,String.fromCharCode(9));\n\t\t\t\tsetTimeout(function(){cDom.focus();},0);\n\t\t\t\t// prevent the focus lose\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function unfocus(tar){ if(tar.blur); tar.blur();}", "function exitFocus(e) {\n if (e.code === 'Enter') {\n let element = e.target\n element.blur() \n }\n}", "deregister(focusTrap) {\n focusTrap._disable();\n const stack = this._focusTrapStack;\n const i = stack.indexOf(focusTrap);\n if (i !== -1) {\n stack.splice(i, 1);\n if (stack.length) {\n stack[stack.length - 1]._enable();\n }\n }\n }", "deregister(focusTrap) {\n focusTrap._disable();\n const stack = this._focusTrapStack;\n const i = stack.indexOf(focusTrap);\n if (i !== -1) {\n stack.splice(i, 1);\n if (stack.length) {\n stack[stack.length - 1]._enable();\n }\n }\n }", "deregister(focusTrap) {\n focusTrap._disable();\n const stack = this._focusTrapStack;\n const i = stack.indexOf(focusTrap);\n if (i !== -1) {\n stack.splice(i, 1);\n if (stack.length) {\n stack[stack.length - 1]._enable();\n }\n }\n }", "trapEscape(ev) {\n\t\tif(ev.keyCode === 27) {\n\t\t\tthis.props.close();\n\t\t}\n\t}", "function Browser_OnFocusLoss()\n{\n\t//remove on window down\n\twindow.__BROWSER_WINDOW_DOWN = false;\n\t//was shift down?\n\tif (__BROWSER_SHIFT_DOWN)\n\t{\n\t\t//release it\n\t\twindow.__BROWSER_SHIFT_DOWN = false;\n\t\t//and trigger the shift up mini event\n\t\t__SIMULATOR.NotifyMiniAction(__MINIACTION_EVENT_SHIFT_UP);\n\t}\n\t//was ctrl down?\n\tif (window.__BROWSER_CTRL_DOWN)\n\t{\n\t\t//release it\n\t\twindow.__BROWSER_CTRL_DOWN = false;\n\t\t//and trigger the ctrl up mini event\n\t\t__SIMULATOR.NotifyMiniAction(__MINIACTION_EVENT_CTRL_UP);\n\t}\n\t//was alt down?\n\tif (window.__BROWSER_ALT_DOWN)\n\t{\n\t\t//release it\n\t\twindow.__BROWSER_ALT_DOWN = false;\n\t\t//and trigger the alt up mini event\n\t\t__SIMULATOR.NotifyMiniAction(__MINIACTION_EVENT_ALT_UP);\n\t}\n}", "_evtKeydown(event) {\n // Check for escape key\n switch (event.keyCode) {\n case 27: // Escape.\n event.stopPropagation();\n event.preventDefault();\n this.reject();\n break;\n case 9: {\n // Tab.\n // Handle a tab on the last button.\n const node = this._buttonNodes[this._buttons.length - 1];\n if (document.activeElement === node && !event.shiftKey) {\n event.stopPropagation();\n event.preventDefault();\n this._first.focus();\n }\n break;\n }\n default:\n break;\n }\n }", "_setupFocusTrap() {\n this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);\n }", "register(focusTrap) {\n // Dedupe focusTraps that register multiple times.\n this._focusTrapStack = this._focusTrapStack.filter((ft) => ft !== focusTrap);\n let stack = this._focusTrapStack;\n if (stack.length) {\n stack[stack.length - 1]._disable();\n }\n stack.push(focusTrap);\n focusTrap._enable();\n }", "register(focusTrap) {\n // Dedupe focusTraps that register multiple times.\n this._focusTrapStack = this._focusTrapStack.filter((ft) => ft !== focusTrap);\n let stack = this._focusTrapStack;\n if (stack.length) {\n stack[stack.length - 1]._disable();\n }\n stack.push(focusTrap);\n focusTrap._enable();\n }", "register(focusTrap) {\n // Dedupe focusTraps that register multiple times.\n this._focusTrapStack = this._focusTrapStack.filter((ft) => ft !== focusTrap);\n let stack = this._focusTrapStack;\n if (stack.length) {\n stack[stack.length - 1]._disable();\n }\n stack.push(focusTrap);\n focusTrap._enable();\n }", "_handleEscPress(e) {\n if (this.state.noCloseOnEsc) {\n e.preventDefault();\n }\n }", "saveFocus(){\n\t\tthis.previouslyFocussedElement = document.activeElement || null;\n\t}", "function endTextEntry () {\n if (state.textInput) {\n state.textInput.abort()\n state.textInput = null\n resumeCapture()\n }\n}", "function preventBackspaceHandler(e) {\n e = e || window.event;\n if (e.keyCode == 8) {\n if(whiteboard.canvas_selected)\n {\n $(\"#drawing_board\").focus();\n return false;\n }\n return true;\n }\n }", "allowFocus(focusTrap) {\n if (!this._listener) {\n return;\n }\n\n focusTrap._document.removeEventListener('focus', this._listener, true);\n\n this._listener = null;\n }", "function Unstable_TrapFocus(props) {\n var children = props.children, _props$disableAutoFoc = props.disableAutoFocus, disableAutoFocus = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc, _props$disableEnforce = props.disableEnforceFocus, disableEnforceFocus = _props$disableEnforce === void 0 ? false : _props$disableEnforce, _props$disableRestore = props.disableRestoreFocus, disableRestoreFocus = _props$disableRestore === void 0 ? false : _props$disableRestore, getDoc = props.getDoc, isEnabled = props.isEnabled, open = props.open;\n var ignoreNextEnforceFocus = _react.useRef();\n var sentinelStart = _react.useRef(null);\n var sentinelEnd = _react.useRef(null);\n var nodeToRestore = _react.useRef();\n var rootRef = _react.useRef(null); // can be removed once we drop support for non ref forwarding class components\n var handleOwnRef = _react.useCallback(function(instance) {\n // #StrictMode ready\n rootRef.current = _reactDom.findDOMNode(instance);\n }, []);\n var handleRef = _useForkRefDefault.default(children.ref, handleOwnRef);\n var prevOpenRef = _react.useRef();\n _react.useEffect(function() {\n prevOpenRef.current = open;\n }, [\n open\n ]);\n if (!prevOpenRef.current && open && typeof window !== 'undefined') // WARNING: Potentially unsafe in concurrent mode.\n // The way the read on `nodeToRestore` is setup could make this actually safe.\n // Say we render `open={false}` -> `open={true}` but never commit.\n // We have now written a state that wasn't committed. But no committed effect\n // will read this wrong value. We only read from `nodeToRestore` in effects\n // that were committed on `open={true}`\n // WARNING: Prevents the instance from being garbage collected. Should only\n // hold a weak ref.\n nodeToRestore.current = getDoc().activeElement;\n _react.useEffect(function() {\n if (!open) return;\n var doc = _ownerDocumentDefault.default(rootRef.current); // We might render an empty child.\n if (!disableAutoFocus && rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n console.error([\n 'Material-UI: The modal content node does not accept focus.',\n \"For the benefit of assistive technologies, the tabIndex of the node is being set to \\\"-1\\\".\"\n ].join('\\n'));\n rootRef.current.setAttribute('tabIndex', -1);\n }\n rootRef.current.focus();\n }\n var contain = function contain1() {\n var rootElement = rootRef.current; // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n if (rootElement === null) return;\n if (!doc.hasFocus() || disableEnforceFocus || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n if (rootRef.current && !rootRef.current.contains(doc.activeElement)) rootRef.current.focus();\n };\n var loopFocus = function loopFocus1(event) {\n // 9 = Tab\n if (disableEnforceFocus || !isEnabled() || event.keyCode !== 9) return;\n // Make sure the next tab starts from the right place.\n if (doc.activeElement === rootRef.current) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n if (event.shiftKey) sentinelEnd.current.focus();\n else sentinelStart.current.focus();\n }\n };\n doc.addEventListener('focus', contain, true);\n doc.addEventListener('keydown', loopFocus, true); // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n var interval = setInterval(function() {\n contain();\n }, 50);\n return function() {\n clearInterval(interval);\n doc.removeEventListener('focus', contain, true);\n doc.removeEventListener('keydown', loopFocus, true); // restoreLastFocus()\n if (!disableRestoreFocus) {\n // In IE 11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE 11 have a focus method.\n // Once IE 11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) nodeToRestore.current.focus();\n nodeToRestore.current = null;\n }\n };\n }, [\n disableAutoFocus,\n disableEnforceFocus,\n disableRestoreFocus,\n isEnabled,\n open\n ]);\n return(/*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelStart,\n \"data-test\": \"sentinelStart\"\n }), /*#__PURE__*/ _react.cloneElement(children, {\n ref: handleRef\n }), /*#__PURE__*/ _react.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelEnd,\n \"data-test\": \"sentinelEnd\"\n })));\n}", "function accessTrap () {\n\n navLast.addEventListener('blur', function(e) {\n if(hasClass(primaryNavWrapper, cfg.navActiveClass)){\n primaryNavTrigger.focus();\n }\n });\n }", "function Unstable_TrapFocus(props) {\n var children = props.children,\n _props$disableAutoFoc = props.disableAutoFocus,\n disableAutoFocus = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc,\n _props$disableEnforce = props.disableEnforceFocus,\n disableEnforceFocus = _props$disableEnforce === void 0 ? false : _props$disableEnforce,\n _props$disableRestore = props.disableRestoreFocus,\n disableRestoreFocus = _props$disableRestore === void 0 ? false : _props$disableRestore,\n getDoc = props.getDoc,\n isEnabled = props.isEnabled,\n open = props.open;\n var ignoreNextEnforceFocus = React.useRef();\n var sentinelStart = React.useRef(null);\n var sentinelEnd = React.useRef(null);\n var nodeToRestore = React.useRef();\n var rootRef = React.useRef(null); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = React.useCallback(function (instance) {\n // #StrictMode ready\n rootRef.current = ReactDOM.findDOMNode(instance);\n }, []);\n var handleRef = (0, _useForkRef.default)(children.ref, handleOwnRef);\n var prevOpenRef = React.useRef();\n React.useEffect(function () {\n prevOpenRef.current = open;\n }, [open]);\n\n if (!prevOpenRef.current && open && typeof window !== 'undefined') {\n // WARNING: Potentially unsafe in concurrent mode.\n // The way the read on `nodeToRestore` is setup could make this actually safe.\n // Say we render `open={false}` -> `open={true}` but never commit.\n // We have now written a state that wasn't committed. But no committed effect\n // will read this wrong value. We only read from `nodeToRestore` in effects\n // that were committed on `open={true}`\n // WARNING: Prevents the instance from being garbage collected. Should only\n // hold a weak ref.\n nodeToRestore.current = getDoc().activeElement;\n }\n\n React.useEffect(function () {\n if (!open) {\n return;\n }\n\n var doc = (0, _ownerDocument.default)(rootRef.current); // We might render an empty child.\n\n if (!disableAutoFocus && rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n if (\"development\" !== 'production') {\n console.error(['Material-UI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to \"-1\".'].join('\\n'));\n }\n\n rootRef.current.setAttribute('tabIndex', -1);\n }\n\n rootRef.current.focus();\n }\n\n var contain = function contain() {\n var rootElement = rootRef.current; // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n\n if (rootElement === null) {\n return;\n }\n\n if (!doc.hasFocus() || disableEnforceFocus || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n if (rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n rootRef.current.focus();\n }\n };\n\n var loopFocus = function loopFocus(event) {\n // 9 = Tab\n if (disableEnforceFocus || !isEnabled() || event.keyCode !== 9) {\n return;\n } // Make sure the next tab starts from the right place.\n\n\n if (doc.activeElement === rootRef.current) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n\n if (event.shiftKey) {\n sentinelEnd.current.focus();\n } else {\n sentinelStart.current.focus();\n }\n }\n };\n\n doc.addEventListener('focus', contain, true);\n doc.addEventListener('keydown', loopFocus, true); // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n\n var interval = setInterval(function () {\n contain();\n }, 50);\n return function () {\n clearInterval(interval);\n doc.removeEventListener('focus', contain, true);\n doc.removeEventListener('keydown', loopFocus, true); // restoreLastFocus()\n\n if (!disableRestoreFocus) {\n // In IE 11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE 11 have a focus method.\n // Once IE 11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n nodeToRestore.current.focus();\n }\n\n nodeToRestore.current = null;\n }\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelStart,\n \"data-test\": \"sentinelStart\"\n }), /*#__PURE__*/React.cloneElement(children, {\n ref: handleRef\n }), /*#__PURE__*/React.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelEnd,\n \"data-test\": \"sentinelEnd\"\n }));\n}", "function checkForEscape() {\n key = event.key\n if (key === \"Escape\" || key=== \"q\") {\n console.log(\"Escape was pressed\")\n clearAllTimeouts()\n cinderellaImgIdx = 0\n cinderellaRecordingHasStarted = false\n openNav()\n nav.hidden = false\n // unloadJS(exp.name)\n clearScreen()\n rec.stopRec()\n }\n}", "function handleKeyPress(event) {\n switch(event.key) {\n case 'Enter': \n document.activeElement.blur();\n break;\n default: break;\n }\n }", "tabTrapping(e) {\n if ( e.keyCode === 9 && e.shiftKey ) {\n if (document.activeElement === this.focusableFirst) {\n this.focusableLast.focus();\n e.preventDefault();\n }\n } else if (e.keyCode === 9) {\n if (document.activeElement === this.focusableLast) {\n this.focusableFirst.focus();\n e.preventDefault();\n }\n }\n\n if (e.keyCode === 27) {\n this.toggleVisibility();\n }\n }", "function Unstable_TrapFocus(props) {\n var children = props.children,\n _props$disableAutoFoc = props.disableAutoFocus,\n disableAutoFocus = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc,\n _props$disableEnforce = props.disableEnforceFocus,\n disableEnforceFocus = _props$disableEnforce === void 0 ? false : _props$disableEnforce,\n _props$disableRestore = props.disableRestoreFocus,\n disableRestoreFocus = _props$disableRestore === void 0 ? false : _props$disableRestore,\n getDoc = props.getDoc,\n isEnabled = props.isEnabled,\n open = props.open;\n var ignoreNextEnforceFocus = react.exports.useRef();\n var sentinelStart = react.exports.useRef(null);\n var sentinelEnd = react.exports.useRef(null);\n var nodeToRestore = react.exports.useRef();\n var rootRef = react.exports.useRef(null); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react.exports.useCallback(function (instance) {\n // #StrictMode ready\n rootRef.current = reactDom.exports.findDOMNode(instance);\n }, []);\n var handleRef = useForkRef(children.ref, handleOwnRef);\n var prevOpenRef = react.exports.useRef();\n react.exports.useEffect(function () {\n prevOpenRef.current = open;\n }, [open]);\n\n if (!prevOpenRef.current && open && typeof window !== 'undefined') {\n // WARNING: Potentially unsafe in concurrent mode.\n // The way the read on `nodeToRestore` is setup could make this actually safe.\n // Say we render `open={false}` -> `open={true}` but never commit.\n // We have now written a state that wasn't committed. But no committed effect\n // will read this wrong value. We only read from `nodeToRestore` in effects\n // that were committed on `open={true}`\n // WARNING: Prevents the instance from being garbage collected. Should only\n // hold a weak ref.\n nodeToRestore.current = getDoc().activeElement;\n }\n\n react.exports.useEffect(function () {\n if (!open) {\n return;\n }\n\n var doc = ownerDocument(rootRef.current); // We might render an empty child.\n\n if (!disableAutoFocus && rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(['Material-UI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to \"-1\".'].join('\\n'));\n }\n\n rootRef.current.setAttribute('tabIndex', -1);\n }\n\n rootRef.current.focus();\n }\n\n var contain = function contain() {\n var rootElement = rootRef.current; // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n\n if (rootElement === null) {\n return;\n }\n\n if (!doc.hasFocus() || disableEnforceFocus || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n if (rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n rootRef.current.focus();\n }\n };\n\n var loopFocus = function loopFocus(event) {\n // 9 = Tab\n if (disableEnforceFocus || !isEnabled() || event.keyCode !== 9) {\n return;\n } // Make sure the next tab starts from the right place.\n\n\n if (doc.activeElement === rootRef.current) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n\n if (event.shiftKey) {\n sentinelEnd.current.focus();\n } else {\n sentinelStart.current.focus();\n }\n }\n };\n\n doc.addEventListener('focus', contain, true);\n doc.addEventListener('keydown', loopFocus, true); // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n\n var interval = setInterval(function () {\n contain();\n }, 50);\n return function () {\n clearInterval(interval);\n doc.removeEventListener('focus', contain, true);\n doc.removeEventListener('keydown', loopFocus, true); // restoreLastFocus()\n\n if (!disableRestoreFocus) {\n // In IE 11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE 11 have a focus method.\n // Once IE 11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n nodeToRestore.current.focus();\n }\n\n nodeToRestore.current = null;\n }\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open]);\n return /*#__PURE__*/react.exports.createElement(react.exports.Fragment, null, /*#__PURE__*/react.exports.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelStart,\n \"data-test\": \"sentinelStart\"\n }), /*#__PURE__*/react.exports.cloneElement(children, {\n ref: handleRef\n }), /*#__PURE__*/react.exports.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelEnd,\n \"data-test\": \"sentinelEnd\"\n }));\n}", "function trapTabKey(obj, event){\n\tif (event.which == 9) {\n\t\tlet o = obj.find('*');\n\t\tlet focusableItems;\n\t\tfocusableItems = o.filter(focusableElementsString).filter(':visible');\n\t\tlet focusedItem;\n\t\tfocusedItem = $(':focus');\n\t\tlet numberOfFocusableItems;\n\t\tnumberOfFocusableItems = focusableItems.length;\n\t\tlet focusedItemIndex;\n\t\tfocusedItemIndex = focusableItems.index(focusedItem);\n\t\tif(event.shiftKey){\n\t\t\tif(focusedItemIndex == 0) {\n\t\t\t\tfocusableItems.get(numberOfFocusableItems -1).focus();\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif(focusedItemIndex == numberOfFocusableItems -1) {\n\t\t\t\tfocusableItems.get(0).focus();\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n}", "function p(){try{return X.activeElement}catch(a){}}", "function enter_detector(e) {\r\n\t// if enter key is pressed lose focus\r\n\tif(e.which==13||e.keyCode==13){\r\n\t$(this).blur();\r\n\t}\r\n\t}", "function Unstable_TrapFocus(props) {\n var children = props.children,\n _props$disableAutoFoc = props.disableAutoFocus,\n disableAutoFocus = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc,\n _props$disableEnforce = props.disableEnforceFocus,\n disableEnforceFocus = _props$disableEnforce === void 0 ? false : _props$disableEnforce,\n _props$disableRestore = props.disableRestoreFocus,\n disableRestoreFocus = _props$disableRestore === void 0 ? false : _props$disableRestore,\n getDoc = props.getDoc,\n isEnabled = props.isEnabled,\n open = props.open;\n var ignoreNextEnforceFocus = react.useRef();\n var sentinelStart = react.useRef(null);\n var sentinelEnd = react.useRef(null);\n var nodeToRestore = react.useRef();\n var rootRef = react.useRef(null); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react.useCallback(function (instance) {\n // #StrictMode ready\n rootRef.current = reactDom.findDOMNode(instance);\n }, []);\n var handleRef = useForkRef(children.ref, handleOwnRef);\n var prevOpenRef = react.useRef();\n react.useEffect(function () {\n prevOpenRef.current = open;\n }, [open]);\n\n if (!prevOpenRef.current && open && typeof window !== 'undefined') {\n // WARNING: Potentially unsafe in concurrent mode.\n // The way the read on `nodeToRestore` is setup could make this actually safe.\n // Say we render `open={false}` -> `open={true}` but never commit.\n // We have now written a state that wasn't committed. But no committed effect\n // will read this wrong value. We only read from `nodeToRestore` in effects\n // that were committed on `open={true}`\n // WARNING: Prevents the instance from being garbage collected. Should only\n // hold a weak ref.\n nodeToRestore.current = getDoc().activeElement;\n }\n\n react.useEffect(function () {\n if (!open) {\n return;\n }\n\n var doc = ownerDocument(rootRef.current); // We might render an empty child.\n\n if (!disableAutoFocus && rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n\n rootRef.current.setAttribute('tabIndex', -1);\n }\n\n rootRef.current.focus();\n }\n\n var contain = function contain() {\n if (!doc.hasFocus() || disableEnforceFocus || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n if (rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n rootRef.current.focus();\n }\n };\n\n var loopFocus = function loopFocus(event) {\n // 9 = Tab\n if (disableEnforceFocus || !isEnabled() || event.keyCode !== 9) {\n return;\n } // Make sure the next tab starts from the right place.\n\n\n if (doc.activeElement === rootRef.current) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n\n if (event.shiftKey) {\n sentinelEnd.current.focus();\n } else {\n sentinelStart.current.focus();\n }\n }\n };\n\n doc.addEventListener('focus', contain, true);\n doc.addEventListener('keydown', loopFocus, true); // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n\n var interval = setInterval(function () {\n contain();\n }, 50);\n return function () {\n clearInterval(interval);\n doc.removeEventListener('focus', contain, true);\n doc.removeEventListener('keydown', loopFocus, true); // restoreLastFocus()\n\n if (!disableRestoreFocus) {\n // In IE 11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE 11 have a focus method.\n // Once IE 11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n nodeToRestore.current.focus();\n }\n\n nodeToRestore.current = null;\n }\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open]);\n return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelStart,\n \"data-test\": \"sentinelStart\"\n }), react.cloneElement(children, {\n ref: handleRef\n }), /*#__PURE__*/react.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelEnd,\n \"data-test\": \"sentinelEnd\"\n }));\n }", "handleKeyDown(e) {\n\t\tif (e.key === 'Escape') {\n\t\t\tdocument.removeEventListener('mousedown', this.handleOuterClick);\n\t\t\tdocument.removeEventListener('keydown', this.handleKeyDown);\n\t\t\t\n\t\t\tthis.toggleForm();\n\t\t\t}\n\t\t}", "allowFocus(focusTrap) {\n if (!this._listener) {\n return;\n }\n focusTrap._document.removeEventListener('focus', this._listener, true);\n this._listener = null;\n }", "allowFocus(focusTrap) {\n if (!this._listener) {\n return;\n }\n focusTrap._document.removeEventListener('focus', this._listener, true);\n this._listener = null;\n }", "allowFocus(focusTrap) {\n if (!this._listener) {\n return;\n }\n focusTrap._document.removeEventListener('focus', this._listener, true);\n this._listener = null;\n }", "onFocusExit() { }", "_capturePreviouslyFocusedElement() {\n if (this._document) {\n this._elementFocusedBeforeDialogWasOpened = this._document.activeElement;\n }\n }", "function shiftFocus(el, isVTBE)\n{\n if ( el )\n {\n if ( isVTBE && editors && editors[el.name] && typeof(editors[el.name].focusEditor) == 'function' )\n {\n editors[el.name].focusEditor();\n }\n else if ( !el.disabled && !el.readOnly && el.type != \"hidden\" )\n {\n safeFocus( el );\n }\n }\n return;\n}", "function trapClickAndEnd(event) {\n\n var untrap;\n\n // trap the click in case we are part of an active\n // drag operation. This will effectively prevent\n // the ghost click that cannot be canceled otherwise.\n if (context.active) {\n untrap = ClickTrap.install();\n setTimeout(untrap, 400);\n }\n\n end(event);\n }", "function loseFocus () {\n\t//log (\"loseFocus ()\");\n\t\n\t// Register the lost focus\n\twidgetFocused\t= false;\n\t\n\t// Hide the tray button\n\tfadeButtonsStart ();\n}", "onEditorFocusOut(event) {\n const me = this,\n { grid } = me;\n\n // If the editor is not losing focus as a result of its tidying up process\n // And focus is moving to outside of the grid, or back to the initiating cell\n // (which indicates a click on empty space below rows), then explicitly terminate.\n if (\n me.editorContext &&\n !me.editor.isFinishing &&\n me.editor.inputField.owns(event.target) &&\n (event.toWidget !== grid || grid.isLocationEqual(me.grid.focusedCell, me.editorContext.selector))\n ) {\n if (me.blurAction === 'cancel') {\n me.cancelEditing();\n } else {\n me.finishEditing();\n }\n }\n }", "function blurHandler() {\n isWindowFocused = false;\n controlPressed = false;\n }", "function catchTab(item, e) {\r\n if (navigator.userAgent.match(\"Gecko\")) {\r\n c = e.which;\r\n } else {\r\n c = e.keyCode;\r\n }\r\n if (c == 9) {\r\n var scrollCurrent = item.scrollTop;\r\n replaceSelection(item, String.fromCharCode(9));\r\n stopEvent(e);\r\n item.scrollTop = scrollCurrent;\r\n return false;\r\n }\r\n}", "_tryBlurHandler() {\n setTimeout(() => {\n const {value} = this;\n if (!this.focused && value) {\n this._processAddInput(value);\n }\n });\n }", "function checkFocusIn(e) {\n // In Firefox when you Tab out of an iframe the Document is briefly focused.\n if (container.contains(e.target) || e.target instanceof Document) {\n return;\n }\n e.stopImmediatePropagation();\n tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());\n }", "onEditorFocusOut(event) {\n const me = this,\n {\n grid\n } = me; // If the editor is not losing focus as a result of its tidying up process\n // And focus is moving to outside of the grid, or back to the initiating cell\n // (which indicates a click on empty space below rows), then explicitly terminate.\n\n if (me.editorContext && !me.editor.isFinishing && me.editor.inputField.owns(event.target) && (event.toWidget !== grid || grid.isLocationEqual(me.grid.focusedCell, me.editorContext.selector))) {\n if (me.blurAction === 'cancel') {\n me.cancelEditing();\n } else {\n me.finishEditing();\n }\n }\n }", "function blurHandler(){\n isWindowFocused = false;\n controlPressed = false;\n }", "function blurHandler(){\n isWindowFocused = false;\n controlPressed = false;\n }", "function blurHandler(){\n isWindowFocused = false;\n controlPressed = false;\n }", "function blurHandler(){\n isWindowFocused = false;\n controlPressed = false;\n }", "function blurHandler(){\n isWindowFocused = false;\n controlPressed = false;\n }", "function blurHandler(){\n isWindowFocused = false;\n controlPressed = false;\n }", "function blurHandler(){\n isWindowFocused = false;\n controlPressed = false;\n }", "_trapFocus() {\n // If we were to attempt to focus immediately, then the content of the dialog would not yet be\n // ready in instances where change detection has to run first. To deal with this, we simply\n // wait for the microtask queue to be empty.\n if (this._config.autoFocus) {\n this._focusTrap.focusInitialElementWhenReady();\n }\n else if (!this._containsFocus()) {\n // Otherwise ensure that focus is on the dialog container. It's possible that a different\n // component tried to move focus while the open animation was running. See:\n // https://github.com/angular/components/issues/16215. Note that we only want to do this\n // if the focus isn't inside the dialog already, because it's possible that the consumer\n // turned off `autoFocus` in order to move focus themselves.\n this._elementRef.nativeElement.focus();\n }\n }", "function restoreFocusOnKeyDown() {\n\t\t\tif (!editor.inline) {\n\t\t\t\teditor.on('keydown', function() {\n\t\t\t\t\tif (document.activeElement == document.body) {\n\t\t\t\t\t\teditor.getWin().focus();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}", "function restoreFocusOnKeyDown() {\n\t\t\tif (!editor.inline) {\n\t\t\t\teditor.on('keydown', function() {\n\t\t\t\t\tif (document.activeElement == document.body) {\n\t\t\t\t\t\teditor.getWin().focus();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}", "function restoreFocusOnKeyDown() {\n\t\t\tif (!editor.inline) {\n\t\t\t\teditor.on('keydown', function() {\n\t\t\t\t\tif (document.activeElement == document.body) {\n\t\t\t\t\t\teditor.getWin().focus();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}", "onKeyDown(event) {\n if (event.key === 'Escape') this.abort();\n }", "onKeyDown(event) {\n if (event.key === 'Escape') this.abort();\n }", "focus() {}", "focus() {}", "function trapClickAndEnd(event) {\n var untrap; // trap the click in case we are part of an active\n // drag operation. This will effectively prevent\n // the ghost click that cannot be canceled otherwise.\n\n if (context.active) {\n untrap = install(eventBus); // remove trap after minimal delay\n\n setTimeout(untrap, 400); // prevent default action (click)\n\n preventDefault(event);\n }\n\n end(event);\n }", "_updateFocusTrapState() {\n if (this._focusTrap) {\n // The focus trap is only enabled when the drawer is open in any mode other than side.\n this._focusTrap.enabled = this.opened && this.mode !== 'side';\n }\n }", "function remove_focus() {\n editor.display.input.blur();\n }", "afterOp() {\n if ( focusedNode && focusedNode.focusable ) {\n focusedNode.focus();\n }\n BrowserEvents.blockFocusCallbacks = false;\n }", "get restoreFocus() { return this._restoreFocus; }", "mousedownHandler(e) {\n this.shouldSkipFocus = !this.contains(document.activeElement);\n return true;\n }", "function blurHandler(){\r\n isWindowFocused = false;\r\n controlPressed = false;\r\n }", "function blurHandler(){\r\n isWindowFocused = false;\r\n controlPressed = false;\r\n }", "function blurHandler(){\r\n isWindowFocused = false;\r\n controlPressed = false;\r\n }", "function blurHandler(){\r\n isWindowFocused = false;\r\n controlPressed = false;\r\n }", "function blurHandler(){\r\n isWindowFocused = false;\r\n controlPressed = false;\r\n }" ]
[ "0.6933518", "0.6797391", "0.6797391", "0.6797391", "0.677122", "0.67646724", "0.64911526", "0.64911526", "0.6395061", "0.6395061", "0.6191497", "0.618375", "0.61421394", "0.6076689", "0.6076689", "0.605026", "0.604297", "0.604297", "0.604297", "0.59816426", "0.5965978", "0.5965978", "0.59285945", "0.59262466", "0.59200853", "0.59178424", "0.5914741", "0.5901446", "0.58988655", "0.58877474", "0.58877474", "0.58877474", "0.58507913", "0.58366", "0.5832611", "0.58084387", "0.58053124", "0.58053124", "0.58053124", "0.58043444", "0.5802696", "0.58009976", "0.5793619", "0.57855004", "0.5778659", "0.5760278", "0.57556313", "0.5749233", "0.57382107", "0.5734391", "0.57195026", "0.57163185", "0.56923246", "0.5682055", "0.5681481", "0.5669606", "0.56544614", "0.56544614", "0.56544614", "0.5650407", "0.5647713", "0.5632498", "0.56190723", "0.5611622", "0.5607334", "0.5603945", "0.560381", "0.5599432", "0.5596738", "0.55876327", "0.5578319", "0.5578319", "0.5578319", "0.5578319", "0.5578319", "0.5578319", "0.5578319", "0.55708027", "0.55677414", "0.55677414", "0.55677414", "0.5559849", "0.5559849", "0.55584574", "0.55584574", "0.55566096", "0.5556541", "0.5555094", "0.5552206", "0.5543448", "0.55423534", "0.55370736", "0.55370736", "0.55370736", "0.55370736", "0.55370736" ]
0.56125623
67
Hijack Tab events on the first and last focusable nodes of the trap, in order to prevent focus from escaping. If it escapes for even a moment it can end up scrolling the page and causing confusion so we kind of need to capture the action at the keydown phase.
function checkTab(e) { updateTabbableNodes(); if (e.shiftKey && e.target === state.firstTabbableNode) { e.preventDefault(); tryFocus(state.lastTabbableNode); return; } if (!e.shiftKey && e.target === state.lastTabbableNode) { e.preventDefault(); tryFocus(state.firstTabbableNode); return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function trapTabKey(obj, event){\n\tif (event.which == 9) {\n\t\tlet o = obj.find('*');\n\t\tlet focusableItems;\n\t\tfocusableItems = o.filter(focusableElementsString).filter(':visible');\n\t\tlet focusedItem;\n\t\tfocusedItem = $(':focus');\n\t\tlet numberOfFocusableItems;\n\t\tnumberOfFocusableItems = focusableItems.length;\n\t\tlet focusedItemIndex;\n\t\tfocusedItemIndex = focusableItems.index(focusedItem);\n\t\tif(event.shiftKey){\n\t\t\tif(focusedItemIndex == 0) {\n\t\t\t\tfocusableItems.get(numberOfFocusableItems -1).focus();\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif(focusedItemIndex == numberOfFocusableItems -1) {\n\t\t\t\tfocusableItems.get(0).focus();\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n}", "tabTrapping(e) {\n if ( e.keyCode === 9 && e.shiftKey ) {\n if (document.activeElement === this.focusableFirst) {\n this.focusableLast.focus();\n e.preventDefault();\n }\n } else if (e.keyCode === 9) {\n if (document.activeElement === this.focusableLast) {\n this.focusableFirst.focus();\n e.preventDefault();\n }\n }\n\n if (e.keyCode === 27) {\n this.toggleVisibility();\n }\n }", "function handleKeyPressOnTab(e) {\n\tif (e.keyCode === 39 || e.keyCode === 37) {\n\t\t// keystroke was left arrow or right arrow\n\t\ttabs[tabFocus].setAttribute(\"tabindex\", -1);\n\t\tif (e.keyCode === 39) {\n\t\t\t// Move right\n\t\t\ttabFocus++;\n\t\t\t// If we're at the end, go to the start\n\t\t\tif (tabFocus >= tabs.length) {\n\t\t\t\ttabFocus = 0;\n\t\t\t}\n\t\t} else if (e.keyCode === 37) {\n\t\t\t// Move left\n\t\t\ttabFocus--;\n\t\t\t// If we're at the start, move to the end\n\t\t\tif (tabFocus < 0) {\n\t\t\t\ttabFocus = tabs.length - 1;\n\t\t\t}\n\t\t}\n\t\ttabs[tabFocus].setAttribute(\"tabindex\", 0);\n\t\ttabs[tabFocus].focus();\n\t\tchangeTabs(e);\n\t}\n}", "function handleFirstTab(e) {\n if (e.keyCode === 9) {\n document.body.classList.add('user-is-tabbing');\n window.removeEventListener('keydown', handleFirstTab);\n window.addEventListener('mousedown', handleMouseDownOnce);\n }\n}", "function checkTab(e) {\n updateTabbableNodes();\n if (e.shiftKey && e.target === state.firstTabbableNode) {\n e.preventDefault();\n tryFocus(state.lastTabbableNode);\n return;\n }\n if (!e.shiftKey && e.target === state.lastTabbableNode) {\n e.preventDefault();\n tryFocus(state.firstTabbableNode);\n return;\n }\n }", "function catchTab (item,e) {\n\t\t\tvar c;\n\t\t\tvar cDom=e.target;\n\n\t\t\tif (navigator.userAgent.match(\"Gecko\")) {\n\t\t\t\tc = e.which;\n\t\t\t} else {\n\t\t\t\tc = e.keyCode;\n\t\t\t}\n\n\t\t\tif (c===9) {\n replaceSelection(cDom,String.fromCharCode(9));\n\t\t\t\tsetTimeout(function(){cDom.focus();},0);\n\t\t\t\t// prevent the focus lose\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function handleFirstTab(e) {\n if (e.keyCode === 9) {\n \n document.body.classList.add('user-is-tabbing');\n \n window.removeEventListener('keydown', handleFirstTab);\n window.addEventListener('mousedown', handleMouseDownOnce);\n\n }\n\n }", "function handleTabbables() {\n\t\tvar $firstAndLast;\n\t\t// Get all the tabbable elements.\n\t\t$tabbables = $( ':tabbable', $iframeBody );\n\t\t// Our first tabbable element is always the \"Close\" button.\n\t\t$firstTabbable = tbWindow.find( '#TB_closeWindowButton' );\n\t\t// Get the last tabbable element.\n\t\t$lastTabbable = $tabbables.last();\n\t\t// Make a jQuery collection.\n\t\t$firstAndLast = $firstTabbable.add( $lastTabbable );\n\t\t// Detach any previously attached keydown event.\n\t\t$firstAndLast.off( 'keydown.wp-plugin-details' );\n\t\t// Attach again the keydown event on the first and last focusable elements.\n\t\t$firstAndLast.on( 'keydown.wp-plugin-details', function( event ) {\n\t\t\tconstrainTabbing( event );\n\t\t});\n\t}", "switchTabOnArrowPress(event) {\n var pressed = event.keyCode;\n\n for (let x = 0; x < this.tabs.length; x++) {\n this.currentFocusEventHandler = (ev) => this.focusEventHandler(ev);\n this.tabs[x].addEventListener('focus', this.currentFocusEventHandler);\n };\n\n if (this.direction[pressed]) {\n var target = event.target;\n if (target.index !== undefined) {\n if (this.tabs[target.index + this.direction[pressed]]) {\n this.tabs[target.index + this.direction[pressed]].focus();\n }\n else if (pressed === this.keys.left || pressed === this.keys.up) {\n this.focusLastTab();\n }\n else if (pressed === this.keys.right || pressed == this.keys.down) {\n this.focusFirstTab();\n };\n };\n };\n }", "keepFocus () {\n let element = this.activeElement;\n let allTabbableElements = [];\n\n // Don't keep the focus if the browser is unable to support\n // CSS3 selectors\n try {\n allTabbableElements = element.querySelectorAll(this.tabbableElements.join(','));\n } catch (ex) {\n return;\n }\n\n let firstTabbableElement = this.getFirstElementVisible(allTabbableElements);\n let lastTabbableElement = this.getLastElementVisible(allTabbableElements);\n\n let focusHandler = (event) => {\n var keyCode = event.which || event.keyCode;\n\n // TAB pressed\n if (keyCode !== 9) {\n return;\n }\n\n // Polyfill to prevent the default behavior of events\n event.preventDefault = event.preventDefault || function () {\n event.returnValue = false;\n };\n\n // Move focus to first element that can be tabbed if Shift isn't used\n if (event.target === lastTabbableElement && !event.shiftKey) {\n event.preventDefault();\n firstTabbableElement.focus();\n\n // Move focus to last element that can be tabbed if Shift is used\n } else if (event.target === firstTabbableElement && event.shiftKey) {\n event.preventDefault();\n lastTabbableElement.focus();\n }\n };\n\n this.Helpers.on('keydown', element, focusHandler);\n }", "function catchTab(item, e) {\r\n if (navigator.userAgent.match(\"Gecko\")) {\r\n c = e.which;\r\n } else {\r\n c = e.keyCode;\r\n }\r\n if (c == 9) {\r\n var scrollCurrent = item.scrollTop;\r\n replaceSelection(item, String.fromCharCode(9));\r\n stopEvent(e);\r\n item.scrollTop = scrollCurrent;\r\n return false;\r\n }\r\n}", "function handleTabKeyDown(e) {\n let key = e.which || e.keyCode\n if (key == 9) {\n // tab. replace with [ or ]\n key = e.shiftKey ? 219 : 221\n if (handleKeyUpInner(key)) {\n // Tab input got used already.\n e.preventDefault()\n }\n }\n}", "_tab(event){\n event.preventDefault(); // always?\n\n // get list of all children elements:\n const o = Array.from(this.querySelectorAll('*'));\n\n // get list of focusable items\n const focusableItems = o.filter((e)=>UIDialog._isVisibleElement(e));\n\n // get currently focused item\n const focusedItem = document.activeElement;\n\n // get the number of focusable items\n const numberOfFocusableItems = focusableItems.length;\n\n if (numberOfFocusableItems === 0) return;\n\n // get the index of the currently focused item\n const focusedItemIndex = focusedItem ? focusableItems.indexOf(focusedItem) : -1;\n\n if (event.shiftKey) {\n // back tab\n // if focused on first item and user preses back-tab, go to the last focusable item\n if (focusedItemIndex === 0) {\n focusableItems[numberOfFocusableItems - 1].focus();\n //event.preventDefault();\n }\n } else {\n // forward tab\n // if focused on the last item and user preses tab, go to the first focusable item\n if (focusedItemIndex === numberOfFocusableItems - 1) {\n focusableItems[0].focus();\n //event.preventDefault();\n }\n }\n }", "_addKeyHandler() {\n var _this = this;\n\n this.$tabTitles.off('keydown.zf.tabs').on('keydown.zf.tabs', function(e){\n if (e.which === 9) return;\n\n\n var $element = $(this),\n $elements = $element.parent('ul').children('li'),\n $prevElement,\n $nextElement;\n\n $elements.each(function(i) {\n if ($(this).is($element)) {\n if (_this.options.wrapOnKeys) {\n $prevElement = i === 0 ? $elements.last() : $elements.eq(i-1);\n $nextElement = i === $elements.length -1 ? $elements.first() : $elements.eq(i+1);\n } else {\n $prevElement = $elements.eq(Math.max(0, i-1));\n $nextElement = $elements.eq(Math.min(i+1, $elements.length-1));\n }\n return;\n }\n });\n\n // handle keyboard event with keyboard util\n Foundation.Keyboard.handleKey(e, 'Tabs', {\n open: function() {\n $element.find('[role=\"tab\"]').focus();\n _this._handleTabChange($element);\n },\n previous: function() {\n $prevElement.find('[role=\"tab\"]').focus();\n _this._handleTabChange($prevElement);\n },\n next: function() {\n $nextElement.find('[role=\"tab\"]').focus();\n _this._handleTabChange($nextElement);\n },\n handled: function() {\n e.stopPropagation();\n e.preventDefault();\n }\n });\n });\n }", "function onTab(e) {\n var isShiftPressed = e.shiftKey;\n var activeElement = document.activeElement;\n var focusableElements = getFocusables(getSlideOrSection($(SECTION_ACTIVE_SEL)[0]));\n\n function preventAndFocusFirst(e) {\n preventDefault(e);\n return focusableElements[0] ? focusableElements[0].focus() : null;\n } //outside any section or slide? Let's not hijack the tab!\n\n\n if (isFocusOutside(e)) {\n return;\n } //is there an element with focus?\n\n\n if (activeElement) {\n if (closest(activeElement, SECTION_ACTIVE_SEL + ',' + SECTION_ACTIVE_SEL + ' ' + SLIDE_ACTIVE_SEL) == null) {\n activeElement = preventAndFocusFirst(e);\n }\n } //no element if focused? Let's focus the first one of the section/slide\n else {\n preventAndFocusFirst(e);\n } //when reached the first or last focusable element of the section/slide\n //we prevent the tab action to keep it in the last focusable element\n\n\n if (!isShiftPressed && activeElement == focusableElements[focusableElements.length - 1] || isShiftPressed && activeElement == focusableElements[0]) {\n preventDefault(e);\n }\n }", "function handleFirstTab(e) {\n if (e.keyCode === 9) { // the \"I am a keyboard user\" key\n document.body.classList.add('user-is-tabbing');\n window.removeEventListener('keydown', handleFirstTab);\n }\n}", "function constrainTabbing( event ) {\n\t\tif ( 9 !== event.which ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $lastTabbable[0] === event.target && ! event.shiftKey ) {\n\t\t\tevent.preventDefault();\n\t\t\t$firstTabbable.focus();\n\t\t} else if ( $firstTabbable[0] === event.target && event.shiftKey ) {\n\t\t\tevent.preventDefault();\n\t\t\t$lastTabbable.focus();\n\t\t}\n\t}", "function FocusTrapInertStrategy() { }", "function onTab(e){\n var isShiftPressed = e.shiftKey;\n var activeElement = document.activeElement;\n var focusableElements = getFocusables(getSlideOrSection($(SECTION_ACTIVE_SEL)[0]));\n\n function preventAndFocusFirst(e){\n preventDefault(e);\n return focusableElements[0] ? focusableElements[0].focus() : null;\n }\n\n //outside any section or slide? Let's not hijack the tab!\n if(isFocusOutside(e)){\n return;\n }\n\n //is there an element with focus?\n if(activeElement){\n if(closest(activeElement, SECTION_ACTIVE_SEL + ',' + SECTION_ACTIVE_SEL + ' ' + SLIDE_ACTIVE_SEL) == null){\n activeElement = preventAndFocusFirst(e);\n }\n }\n\n //no element if focused? Let's focus the first one of the section/slide\n else{\n preventAndFocusFirst(e);\n }\n\n //when reached the first or last focusable element of the section/slide\n //we prevent the tab action to keep it in the last focusable element\n if(!isShiftPressed && activeElement == focusableElements[focusableElements.length - 1] ||\n isShiftPressed && activeElement == focusableElements[0]\n ){\n preventDefault(e);\n }\n }", "function onTab(e){\n var isShiftPressed = e.shiftKey;\n var activeElement = document.activeElement;\n var focusableElements = getFocusables(getSlideOrSection($(SECTION_ACTIVE_SEL)[0]));\n\n function preventAndFocusFirst(e){\n preventDefault(e);\n return focusableElements[0] ? focusableElements[0].focus() : null;\n }\n\n //outside any section or slide? Let's not hijack the tab!\n if(isFocusOutside(e)){\n return;\n }\n\n //is there an element with focus?\n if(activeElement){\n if(closest(activeElement, SECTION_ACTIVE_SEL + ',' + SECTION_ACTIVE_SEL + ' ' + SLIDE_ACTIVE_SEL) == null){\n activeElement = preventAndFocusFirst(e);\n }\n }\n\n //no element if focused? Let's focus the first one of the section/slide\n else{\n preventAndFocusFirst(e);\n }\n\n //when reached the first or last focusable element of the section/slide\n //we prevent the tab action to keep it in the last focusable element\n if(!isShiftPressed && activeElement == focusableElements[focusableElements.length - 1] ||\n isShiftPressed && activeElement == focusableElements[0]\n ){\n preventDefault(e);\n }\n }", "function onTab(e){\n var isShiftPressed = e.shiftKey;\n var activeElement = document.activeElement;\n var focusableElements = getFocusables(getSlideOrSection($(SECTION_ACTIVE_SEL)[0]));\n\n function preventAndFocusFirst(e){\n preventDefault(e);\n return focusableElements[0] ? focusableElements[0].focus() : null;\n }\n\n //outside any section or slide? Let's not hijack the tab!\n if(isFocusOutside(e)){\n return;\n }\n\n //is there an element with focus?\n if(activeElement){\n if(closest(activeElement, SECTION_ACTIVE_SEL + ',' + SECTION_ACTIVE_SEL + ' ' + SLIDE_ACTIVE_SEL) == null){\n activeElement = preventAndFocusFirst(e);\n }\n }\n\n //no element if focused? Let's focus the first one of the section/slide\n else{\n preventAndFocusFirst(e);\n }\n\n //when reached the first or last focusable element of the section/slide\n //we prevent the tab action to keep it in the last focusable element\n if(!isShiftPressed && activeElement == focusableElements[focusableElements.length - 1] ||\n isShiftPressed && activeElement == focusableElements[0]\n ){\n preventDefault(e);\n }\n }", "switchTabOnArrowPress(event) {\n var pressed = event.keyCode;\n\n for (let button of this.buttons) {\n button.addEventListener('focus', this.focusEventHandler.bind(this));\n };\n\n if (this.direction[pressed]) {\n var target = event.target;\n if (target.index !== undefined) {\n if (this.buttons[target.index + this.direction[pressed]]) {\n this.buttons[target.index + this.direction[pressed]].focus();\n }\n else if (pressed === this.keys.left || pressed === this.keys.up) {\n this.focusLastTab();\n }\n else if (pressed === this.keys.right || pressed == this.keys.down) {\n this.focusFirstTab();\n }\n }\n }\n }", "function onTab(e){\r\n var isShiftPressed = e.shiftKey;\r\n var activeElement = document.activeElement;\r\n var focusableElements = getFocusables(getSlideOrSection($(SECTION_ACTIVE_SEL)[0]));\r\n\r\n function preventAndFocusFirst(e){\r\n preventDefault(e);\r\n return focusableElements[0] ? focusableElements[0].focus() : null;\r\n }\r\n\r\n //outside any section or slide? Let's not hijack the tab!\r\n if(isFocusOutside(e)){\r\n return;\r\n }\r\n\r\n //is there an element with focus?\r\n if(activeElement){\r\n if(closest(activeElement, SECTION_ACTIVE_SEL + ',' + SECTION_ACTIVE_SEL + ' ' + SLIDE_ACTIVE_SEL) == null){\r\n activeElement = preventAndFocusFirst(e);\r\n }\r\n }\r\n\r\n //no element if focused? Let's focus the first one of the section/slide\r\n else{\r\n preventAndFocusFirst(e);\r\n }\r\n\r\n //when reached the first or last focusable element of the section/slide\r\n //we prevent the tab action to keep it in the last focusable element\r\n if(!isShiftPressed && activeElement == focusableElements[focusableElements.length - 1] ||\r\n isShiftPressed && activeElement == focusableElements[0]\r\n ){\r\n preventDefault(e);\r\n }\r\n }", "function handleFirstTab(e) {\n if (e.keyCode === 9) { // the tab key\n document.body.classList.add('user-is-tabbing');\n window.removeEventListener('keydown', handleFirstTab);\n }\n}", "function FocusTrapInertStrategy() {}", "function handleFirstTab(e) {\n if (e.keyCode === 9) {\n document.body.classList.add('tab-used');\n window.removeEventListener('keydown', handleFirstTab);\n }\n}", "function containTabKey(e) {\n // If the tab key is pressed\n if(e.keyCode == 9) {\n var modal = getById(openModalId + '-holder');\n var canTakeFocus = [];\n var focusableNodes = modal.querySelectorAll(focusableElementsString);\n for(var i = focusableNodes.length; i--; canTakeFocus.unshift(focusableNodes[i]));\n var currentFocus = canTakeFocus.indexOf(document.activeElement);\n \n // If the shift key is pressed with tab\n if(e.shiftKey) {\n // If the first tabable item in the modal has focus, cycle round to the last item\n if(currentFocus == 0) {\n canTakeFocus[canTakeFocus.length - 1].focus();\n }\n // Otherwise, go to the previous item\n else {\n canTakeFocus[currentFocus - 1].focus();\n }\n } else {\n // If the last tabable item in the modal has focus, cycle round to the first item\n if(currentFocus == canTakeFocus.length - 1 ) {\n canTakeFocus[0].focus();\n }\n // Otherwise, go to the next item\n else {\n canTakeFocus[currentFocus + 1].focus();\n }\n }\n // We have dealt with the tab function, so do nothing more\n e.preventDefault();\n }\n}", "function tabFocusRestrictor(firstItem,lastItem){\n $(firstItem).on('keydown', function(e) {\n if (e.which === 9 && e.shiftKey) {\n e.preventDefault();\n $(lastItem).focus();\n }\n });\n $(lastItem).on('keydown', function(e){\n if (e.which === 9 && !e.shiftKey) {\n e.preventDefault();\n $(firstItem).focus();\n }\n });\n}", "handleKeyDown(event) {\n const { selectionStart, selectionEnd } = event.target;\n // Tab is pressed (first loop)\n if (\n event.key === \"Tab\" &&\n !event.shiftKey &&\n selectionStart < this.props.limitLength &&\n this.state.tabbedOut === false\n ) {\n event.preventDefault();\n const diff = this.findDelta(event);\n this.setState((prevState) => ({\n inputVal:\n prevState.inputVal.substring(0, selectionStart) +\n \"\\t\".repeat(diff) +\n prevState.inputVal.substring(selectionEnd),\n }));\n }\n // Tab is pressed after looping\n else if (\n event.key === \"Tab\" &&\n !event.shiftKey &&\n selectionStart < this.props.limitLength &&\n this.state.tabbedOut === true\n ) {\n event.preventDefault();\n const diff = this.findDelta(event);\n event.target.selectionStart = event.target.selectionEnd =\n selectionStart + diff;\n }\n // Tab is pressed at very end of input\n else if (\n event.key === \"Tab\" &&\n !event.shiftKey &&\n selectionStart >= this.props.limitLength\n ) {\n event.preventDefault();\n event.target.selectionStart = event.target.selectionEnd = 0;\n this.setState({ tabbedOut: true });\n }\n /* still working on this, not sure if required */\n // Shift + Tab is pressed\n else if (\n event.key === \"Tab\" &&\n event.shiftKey &&\n selectionStart <= this.props.problem.length &&\n selectionStart > 0\n ) {\n event.preventDefault();\n /*let diff = this.findDeltaReverse(event);\n if (diff === 0) {\n event.target.selectionStart = event.target.selectionEnd = 0;\n } else {\n event.target.selectionStart = event.target.selectionEnd =\n selectionStart - diff;\n }*/\n }\n // Shift + Tab at 0 and with no content\n else if (\n event.key === \"Tab\" &&\n event.shiftKey &&\n selectionStart === 0 &&\n this.state.tabbedOut === false\n ) {\n event.preventDefault();\n }\n // Shift + Tab at 0 with previous content\n else if (\n event.key === \"Tab\" &&\n event.shiftKey &&\n selectionStart === 0 &&\n this.state.tabbedOut === true\n ) {\n event.preventDefault();\n event.target.selectionStart = event.target.selectionEnd = this.props.limitLength;\n }\n }", "keyDownHandler(event) {\n this.handleMoveOnKeyPress(event);\n // activate tab content on enter and tab if tab has focus\n if ((event.keyCode === 13 || event.keyCode === 32) && this.focusedControl) {\n this.focusedControl.click();\n }\n }", "_tabsFocusHandler(event) {\n const that = this;\n\n if (event.type === 'focus') {\n that.bringToFront();\n that.setAttribute('focus', '');\n }\n else {\n that.removeAttribute('focus');\n }\n }", "function onKeyDown(e) {\n if (e.key !== 'Tab' && (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)) {\n return;\n }\n\n if (isValidFocusTarget(document.activeElement)) {\n addFocusVisibleAttribute(document.activeElement);\n }\n\n hadKeyboardEvent = true;\n }", "_trapFocus(focusTrap, event) {\n const target = event.target;\n const focusTrapRoot = focusTrap._element;\n // Don't refocus if target was in an overlay, because the overlay might be associated\n // with an element inside the FocusTrap, ex. mat-select.\n if (!focusTrapRoot.contains(target) && closest(target, 'div.cdk-overlay-pane') === null) {\n // Some legacy FocusTrap usages have logic that focuses some element on the page\n // just before FocusTrap is destroyed. For backwards compatibility, wait\n // to be sure FocusTrap is still enabled before refocusing.\n setTimeout(() => {\n // Check whether focus wasn't put back into the focus trap while the timeout was pending.\n if (focusTrap.enabled && !focusTrapRoot.contains(focusTrap._document.activeElement)) {\n focusTrap.focusFirstTabbableElement();\n }\n });\n }\n }", "_trapFocus(focusTrap, event) {\n const target = event.target;\n const focusTrapRoot = focusTrap._element;\n // Don't refocus if target was in an overlay, because the overlay might be associated\n // with an element inside the FocusTrap, ex. mat-select.\n if (!focusTrapRoot.contains(target) && closest(target, 'div.cdk-overlay-pane') === null) {\n // Some legacy FocusTrap usages have logic that focuses some element on the page\n // just before FocusTrap is destroyed. For backwards compatibility, wait\n // to be sure FocusTrap is still enabled before refocusing.\n setTimeout(() => {\n // Check whether focus wasn't put back into the focus trap while the timeout was pending.\n if (focusTrap.enabled && !focusTrapRoot.contains(focusTrap._document.activeElement)) {\n focusTrap.focusFirstTabbableElement();\n }\n });\n }\n }", "_trapFocus(focusTrap, event) {\n const target = event.target;\n const focusTrapRoot = focusTrap._element;\n // Don't refocus if target was in an overlay, because the overlay might be associated\n // with an element inside the FocusTrap, ex. mat-select.\n if (!focusTrapRoot.contains(target) && closest(target, 'div.cdk-overlay-pane') === null) {\n // Some legacy FocusTrap usages have logic that focuses some element on the page\n // just before FocusTrap is destroyed. For backwards compatibility, wait\n // to be sure FocusTrap is still enabled before refocusing.\n setTimeout(() => {\n // Check whether focus wasn't put back into the focus trap while the timeout was pending.\n if (focusTrap.enabled && !focusTrapRoot.contains(focusTrap._document.activeElement)) {\n focusTrap.focusFirstTabbableElement();\n }\n });\n }\n }", "_trapFocus(focusTrap, event) {\n var _a;\n\n const target = event.target;\n const focusTrapRoot = focusTrap._element; // Don't refocus if target was in an overlay, because the overlay might be associated\n // with an element inside the FocusTrap, ex. mat-select.\n\n if (target && !focusTrapRoot.contains(target) && !((_a = target.closest) === null || _a === void 0 ? void 0 : _a.call(target, 'div.cdk-overlay-pane'))) {\n // Some legacy FocusTrap usages have logic that focuses some element on the page\n // just before FocusTrap is destroyed. For backwards compatibility, wait\n // to be sure FocusTrap is still enabled before refocusing.\n setTimeout(() => {\n // Check whether focus wasn't put back into the focus trap while the timeout was pending.\n if (focusTrap.enabled && !focusTrapRoot.contains(focusTrap._document.activeElement)) {\n focusTrap.focusFirstTabbableElement();\n }\n });\n }\n }", "_evtKeydown(event) {\n // Check for escape key\n switch (event.keyCode) {\n case 27: // Escape.\n event.stopPropagation();\n event.preventDefault();\n this.reject();\n break;\n case 9: {\n // Tab.\n // Handle a tab on the last button.\n const node = this._buttonNodes[this._buttons.length - 1];\n if (document.activeElement === node && !event.shiftKey) {\n event.stopPropagation();\n event.preventDefault();\n this._first.focus();\n }\n break;\n }\n default:\n break;\n }\n }", "function keydown(e) {\n var key = e.keyCode\n , M = e.metaKey, A = e.altKey, C = e.ctrlKey, S = e.shiftKey\n , now = $('#tabs > li').index($('#tabs > li.selected'))\n , tot = $('#tabs > li').length\n , tab = key === 192 ? 0\n : key < 49 || key > 57 ? null : key - 48;\n if ((tab === null) || !M || A || C || S) return;\n window.$('#tabs > li:nth('+ tab +') a:nth(0)').click();\n}", "function jsf_def_InputAutoTab(event) {\n var keyCode = event.which;\n var ignoreKeyCodes = ',9,16,17,18,19,20,27,33,34,35,36,37,38,39,40,45,46,144,145,';\n\n if (ignoreKeyCodes.indexOf(',' + keyCode + ',') > -1) { return; }\n if (keyCode == 8 && event.type == 'keydown') { return; }\n\n var $this = $j(this);\n var currentLength = $this.val().length;\n var maximumLength = $this.attr('maxlength');\n\n var autotab = $this.attr('autotab');\n var autotabmax = $this.attr('autotabmax');\n var autotabgroup = $this.attr('autotabgroup');\n\n if (keyCode == 8 && currentLength == 0) {\n var prevObj = null;\n\n if (--autotab >= 1)\n prevObj = $j(\"input[autotabgroup=\" + autotabgroup + \"][autotab=\" + autotab + \"]\");\n\n if (prevObj != null && prevObj.length > 0) {\n prevObj.focus();\n var prevObjLength = prevObj.val().length;\n if (prevObjLength > 0) prevObj.caret(prevObjLength, prevObjLength);\n }\n }\n\n else if (currentLength == maximumLength) {\n var nextObj = null;\n\n if (++autotab <= autotabmax)\n nextObj = $j(\"input[autotabgroup=\" + autotabgroup + \"][autotab=\" + autotab + \"]\");\n\n if (nextObj != null && nextObj.length > 0) {\n nextObj.focus();\n }\n }\n}", "function onTab(e){\r\n var isShiftPressed = e.shiftKey;\r\n var activeElement = $(':focus');\r\n var activeSection = $(SECTION_ACTIVE_SEL);\r\n var activeSlide = activeSection.find(SLIDE_ACTIVE_SEL);\r\n var focusableWrapper = activeSlide.length ? activeSlide : activeSection;\r\n var focusableElements = focusableWrapper.find(focusableElementsString);\r\n\r\n function preventAndFocusFirst(e){\r\n e.preventDefault();\r\n return focusableElements.first().focus();\r\n }\r\n\r\n //is there an element with focus?\r\n if(activeElement.length){\r\n if(!activeElement.closest(SECTION_ACTIVE_SEL, SLIDE_ACTIVE_SEL).length){\r\n activeElement = preventAndFocusFirst(e);\r\n }\r\n }\r\n\r\n //no element if focused? Let's focus the first one of the section/slide\r\n else{\r\n preventAndFocusFirst(e);\r\n }\r\n\r\n //when reached the first or last focusable element of the section/slide\r\n //we prevent the tab action to keep it in the last focusable element\r\n if(!isShiftPressed && activeElement.is(focusableElements.last()) ||\r\n isShiftPressed && activeElement.is(focusableElements.first())\r\n ){\r\n e.preventDefault();\r\n }\r\n }", "function onTab(e) {\n var isShiftPressed = e.shiftKey;\n var activeElement = $(':focus');\n var activeSection = $(SECTION_ACTIVE_SEL);\n var activeSlide = activeSection.find(SLIDE_ACTIVE_SEL);\n var focusableWrapper = activeSlide.length ? activeSlide : activeSection;\n var focusableElements = focusableWrapper.find(focusableElementsString);\n\n function preventAndFocusFirst(e) {\n e.preventDefault();\n return focusableElements.first().focus();\n }\n\n //is there an element with focus?\n if (activeElement.length) {\n if (!activeElement.closest(SECTION_ACTIVE_SEL, SLIDE_ACTIVE_SEL).length) {\n activeElement = preventAndFocusFirst(e);\n }\n }\n\n //no element if focused? Let's focus the first one of the section/slide\n else {\n preventAndFocusFirst(e);\n }\n\n //when reached the first or last focusable element of the section/slide\n //we prevent the tab action to keep it in the last focusable element\n if (!isShiftPressed && activeElement.is(focusableElements.last()) ||\n isShiftPressed && activeElement.is(focusableElements.first())\n ) {\n e.preventDefault();\n }\n }", "function appxSetTabIndexes() {\r\n try {\r\n\r\n if (appx_session.tablist) {\r\n var tablist = [];\r\n\r\n var pushTabElement = function pushTabElement($tag, tabGrp) {\r\n /*If tag is set to display:none then we do not assign a tab index to\r\n **it, otherwise the tabbing will stop if the index is set and the\r\n **element has been set not to display*/\r\n if ($tag.css(\"display\") !== \"none\") {\r\n tablist.push($tag);\r\n $tag.attr(\"tabindex\", (tabGrp + (tablist.length - 1)));\r\n $tag.on(\"keydown\", function $_onKeydown(ke) {\r\n var self = this;\r\n if (ke.which == appx_session.getProp(\"mapTabKey\")) { //tab\r\n appxSetTabFocus($(self), ke.shiftKey);\r\n }\r\n else if (ke.which == 13 && $(self).is(\"button\")) { //enter\r\n $(self).trigger(\"click\");\r\n }\r\n else { //cancel input when communicating (e.g. key pause)\r\n if (!appxIsLocked()) return true;\r\n }\r\n ke.preventDefault();\r\n ke.stopPropagation();\r\n return false;\r\n });\r\n if (!$tag.is(\"button\")) {\r\n // Implements Auto Tab-Out\r\n // modifier and non-printing keys such as Shift, Esc, Del\r\n // trigger keydown events and not keypress events\r\n // using keyup however, because keypress sometimes doesn't\r\n // overwrite chars after a select\r\n $tag.on(\"keyup\", function $_onKeyup(ke) {\r\n try {\r\n\r\n if (!ke.altKey && !ke.ctrlKey && !ke.metaKey) {\r\n var k = ke.which;\r\n //http://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes\r\n //skip nonprintable keycodes\r\n if (k > 46 && (k < 91 || k > 93) && (k < 112 || k > 125)) {\r\n /*Input fields should use selectionstart to check\r\n **for cursor position and not tab when at last\r\n **position in a field. But only certain fields\r\n **use the selectionstart property, so we need to\r\n **check and make sure it has property before\r\n **trying to use it for the autotab option*/\r\n var max = $(this).attr(\"maxlength\");\r\n var autoTab = appx_session.getProp(\"autoTabOut\");\r\n var thisTag = getInputElement(this);\r\n\r\n /*If field doesn't have max length to check or if\r\n **autotab is false then there is no reason to\r\n **check*/\r\n if (max && autoTab) {\r\n var tab = false;\r\n var cursorPosition = getCursorPosition($(thisTag));\r\n if (cursorPosition > -1) {\r\n if (max <= cursorPosition) {\r\n tab = true;\r\n }\r\n } else {\r\n if( $(thisTag).hasClass('appxdatevalue') ) {\r\n if (max <= $(thisTag).val().replace(/_/g,' ').trim().length) {\r\n tab = true;\r\n }\r\n }\r\n else {\r\n if (max <= $(thisTag).val().trim().length) {\r\n tab = true;\r\n }\r\n }\r\n }\r\n if (tab) {\r\n //select next item\r\n appxSetTabFocus($(this), false, true);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (ex) {\r\n alert(appx_session.language.alerts.keypressError + ex);\r\n console.log(ex.stack);\r\n }\r\n return true; //bubble\r\n });\r\n }\r\n }\r\n }; //pushTabElement\r\n\r\n var sortTabElements = function sortTabElements(objA, objB) {\r\n\r\n var posA = objA.tag.position();\r\n var posB = objB.tag.position();\r\n posA.top = parseInt(objA.tag.css(\"top\"));\r\n posA.left = parseInt(objA.tag.css(\"left\"));\r\n posB.top = parseInt(objB.tag.css(\"top\"));\r\n posB.left = parseInt(objB.tag.css(\"left\"));\r\n\r\n if (posA.top < posB.top) {\r\n return -1; // lower 'row', put before\r\n }\r\n else if (posA.top > posB.top) {\r\n return 1; // higher 'row', put after\r\n }\r\n if (posA.left < posB.left) { //same top, check left\r\n return -1;\r\n }\r\n else if (posA.left > posB.left) {\r\n return 1;\r\n }\r\n return 0; //same top and left\r\n };\r\n\r\n var tab = appx_session.tablist;\r\n var tabGroup = [];\r\n var tabGroupNumList = [];\r\n for (var lvl = 0; lvl < tab.length; lvl++) {\r\n var grpCnt = 0;\r\n if (tab[lvl]) {\r\n for (var keys in tab[lvl]) {\r\n tab[lvl][keys].sort(function tab_sortArrayOverride(objA, objB) {\r\n // items go in front of buttons inside a tab level\r\n // tab groups don't care about element types\r\n if (!objA.tag.is(\"button\") && objB.tag.is(\"button\")) {\r\n return 1;\r\n }\r\n if (objA.tag.is(\"button\") && !objB.tag.is(\"button\")) {\r\n return -1;\r\n }\r\n // both element types are equal, check positions\r\n return sortTabElements(objA, objB);\r\n });\r\n\r\n tab[lvl][keys].sort(sortTabElements);\r\n tabGroup[grpCnt++] = tab[lvl][keys][0];\r\n }\r\n /*Split groups into separate groups if another group is supposed\r\n **to be in the middle of that group*/\r\n for (var keys in tab[lvl]) {\r\n for (var KEYS in tab[lvl]) {\r\n if (keys !== KEYS && KEYS !== \"grp-dfltButtons\") {\r\n// Bug #4445, Input Tab sequencing not reacting the same (as Java client)\r\n// Previously: split if 1. the first of this group is after the first of the parent group, AND\r\n// 2. the last of this group is before the last of the parent group\r\n// if ((sortTabElements(tab[lvl][keys][0], tab[lvl][KEYS][0]) > 0) &&\r\n// (sortTabElements(tab[lvl][keys][(tab[lvl][keys].length - 1)], tab[lvl][KEYS][(tab[lvl][KEYS].length - 1)]) < 0)) {\r\n// Now, split if 1. the first of this group is after the first of the parent group, AND\r\n// 2. the parent group is either default group (0) or some split thereof, AND\r\n// 3. the first of this group is before the last of the parent group\r\n// *. the interrupting tab group cannot be the grp-dfltButtons group\r\n if ((sortTabElements(tab[lvl][keys][0], tab[lvl][KEYS][0]) > 0) &&\r\n ( KEYS == 'grp-0' || KEYS.includes( 'split' ) ) &&\r\n ( keys !== 'grp-dfltButtons' ) &&\r\n (sortTabElements(tab[lvl][keys][0], tab[lvl][KEYS][(tab[lvl][KEYS].length - 1)]) < 0)) {\r\n\r\n var arrayLength = tab[lvl][KEYS].length;\r\n var arrayCount = 0;\r\n var splitKey = KEYS + \"-split\"\r\n// We know we're going to split the parent - where in the parent group are we interrupting?\r\n for (var i = 0; i < tab[lvl][KEYS].length; i++) {\r\n if ((sortTabElements(tab[lvl][keys][0], tab[lvl][KEYS][i]) < 0)) {\r\n arrayCount = i;\r\n break;\r\n }\r\n }\r\n// Create new sub-group 'splitKey', populate with all KEYS widgets from point of interception forward, with same widgets removed from original group\r\n tab[lvl][splitKey] = tab[lvl][KEYS].splice(arrayCount, (arrayLength - arrayCount));\r\n for (var i = 0; i < tab[lvl][splitKey].length; i++) {\r\n tab[lvl][splitKey][i].grp = splitKey;\r\n }\r\n// add this new split sub-group to table of tab groups\r\n tabGroup[tabGroup.length] = tab[lvl][splitKey][0];\r\n }\r\n }\r\n }\r\n }\r\n\r\n tabGroup.sort(sortTabElements);\r\n /*Modify tab objects with a tab group order, default buttons\r\n **are always last*/\r\n for (var keys in tab[lvl]) {\r\n var dfltButtonsAfter = [];\r\n var dfltButtonsBefore = [];\r\n if ((keys === \"grp-dfltButtons\") && (tabGroup.length > 1)) {\r\n var comparison = tabGroup[0];\r\n if (comparison.grp === \"grp-dfltButtons\") {\r\n comparison = tabGroup[1];\r\n }\r\n for (var i = 0; i < tab[lvl][keys].length; i++) {\r\n if ((sortTabElements(comparison, tab[lvl][keys][i])) < 1) {\r\n dfltButtonsAfter.push(tab[lvl][keys][i]);\r\n } else {\r\n dfltButtonsBefore.push(tab[lvl][keys][i]);\r\n }\r\n }\r\n\r\n tab[lvl][keys] = dfltButtonsAfter.concat(dfltButtonsBefore);\r\n tab[lvl][keys].tabGrp = 2000;\r\n tabGroupNumList.push(tab[lvl][keys].tabGrp);\r\n\r\n } else {\r\n\r\n for (var i = 0; i < tabGroup.length; i++) {\r\n if (tabGroup[i] == tab[lvl][keys][0]) {\r\n tab[lvl][keys].tabGrp = (i * 100);\r\n tabGroupNumList.push(tab[lvl][keys].tabGrp);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /*Push the tab elements based on our tab group ordering*/\r\n tabGroupNumList.sort(numberSort);\r\n for (var i = 0; i < tabGroupNumList.length; i++) {\r\n for (var keys in tab[lvl]) {\r\n if (tab[lvl][keys].tabGrp === tabGroupNumList[i]) {\r\n for (var j = 0; j < tab[lvl][keys].length; j++) {\r\n pushTabElement(tab[lvl][keys][j].tag, tab[lvl][keys].tabGrp);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // apply list filled through pushTabElement and used by appxSetTabFocus\r\n appx_session.tablist = tablist;\r\n }\r\n\r\n }\r\n catch (ex) {\r\n console.log(\"appxSetTabIndexes: \" + ex);\r\n console.log(ex.stack);\r\n }\r\n}", "function handleMouseDownOnce() {\n document.body.classList.remove('user-is-tabbing');\n window.removeEventListener('mousedown', handleMouseDownOnce);\n window.addEventListener('keydown', handleFirstTab);\n}", "function onTab(e){\r\n var isShiftPressed = e.shiftKey;\r\n var activeElement = document.activeElement;\r\n var activeSection = $(SECTION_ACTIVE_SEL)[0];\r\n var activeSlide = $(SLIDE_ACTIVE_SEL, activeSection)[0];\r\n var focusableWrapper = activeSlide ? activeSlide : activeSection;\r\n var focusableElements = $(focusableElementsString + ':not([tabindex=\"-1\"])', focusableWrapper);\r\n\r\n function preventAndFocusFirst(e){\r\n preventDefault(e);\r\n return focusableElements[0].focus();\r\n }\r\n\r\n //is there an element with focus?\r\n if(activeElement){\r\n if(closest(activeElement, SECTION_ACTIVE_SEL + ',' + SLIDE_ACTIVE_SEL) == null){\r\n activeElement = preventAndFocusFirst(e);\r\n }\r\n }\r\n\r\n //no element if focused? Let's focus the first one of the section/slide\r\n else{\r\n preventAndFocusFirst(e);\r\n }\r\n\r\n //when reached the first or last focusable element of the section/slide\r\n //we prevent the tab action to keep it in the last focusable element\r\n if(!isShiftPressed && activeElement == focusableElements[focusableElements.length - 1] ||\r\n isShiftPressed && activeElement == focusableElements[0]\r\n ){\r\n preventDefault(e);\r\n }\r\n }", "_allowFocusEscape() {\n this._tabIndex = -1;\n setTimeout(() => {\n this._tabIndex = 0;\n this._changeDetector.markForCheck();\n });\n }", "_allowFocusEscape() {\n this._tabIndex = -1;\n setTimeout(() => {\n this._tabIndex = 0;\n this._changeDetector.markForCheck();\n });\n }", "_keydown(event) {\n const target = event.target;\n const keyCode = event.keyCode;\n const manager = this._keyManager;\n if (keyCode === TAB && target.id !== this._chipInput.id) {\n this._allowFocusEscape();\n }\n else if (this._originatesFromEditingChip(event)) {\n // No-op, let the editing chip handle all keyboard events except for Tab.\n }\n else if (this._originatesFromChip(event)) {\n manager.onKeydown(event);\n }\n this.stateChanges.next();\n }", "function autoTab(currentPos,NextPos)\r\n{\r\n\t//alert (window.event.keyCode);\r\n\t// KeyCode 9 = Tab Key\r\n\t// Keycode 16 = Shift Key\r\n\tif (currentPos.value.length == currentPos.getAttribute(\"maxlength\") && window.event.keyCode != 9 && window.event.keyCode != 16)\r\n\t{\r\n\t\tNextPos.focus();\r\n\t\tNextPos.select();\r\n\t}\r\n}", "handleMoveOnKeyPress(event) {\n const target = (event.target && event.target) ? event.target.activeElement : event.target;\n const keycode = event.keyCode;\n if (!target || !keycode) {\n return false;\n }\n if (!this.verticalAlign) {\n // handle move left\n if (target.classList.contains(this.selectorTabTitle) && (keycode === 37)) {\n this.setFocusTabControl(target, -1);\n }\n // handle move right\n if (target.classList.contains(this.selectorTabTitle) && (keycode === 39)) {\n this.setFocusTabControl(target, 1);\n }\n }\n if (this.verticalAlign) {\n // handle move up\n if (target.classList.contains(this.selectorTabTitle) && (keycode === 38)) {\n this.setFocusTabControl(target, -1);\n }\n // handle move down\n if (target.classList.contains(this.selectorTabTitle) && (keycode === 40)) {\n this.setFocusTabControl(target, 1);\n }\n }\n }", "_allowFocusEscape() {\n const previousTabIndex = this.tabIndex;\n if (this.tabIndex !== -1) {\n this.tabIndex = -1;\n setTimeout(() => {\n this.tabIndex = previousTabIndex;\n this._changeDetectorRef.markForCheck();\n });\n }\n }", "_allowFocusEscape() {\n const previousTabIndex = this.tabIndex;\n if (this.tabIndex !== -1) {\n this.tabIndex = -1;\n setTimeout(() => {\n this.tabIndex = previousTabIndex;\n this._changeDetectorRef.markForCheck();\n });\n }\n }", "function tabfix(keywords, key,object)\n{\n if(key.keyCode == '9') {\n navigate(key.keyCode,object);\n return false;\n }\n else return true;\n}", "function bindEvents() {\n var tabs = that._elements[\"tab\"];\n if (tabs) {\n for (var i = 0; i < tabs.length; i++) {\n (function(index) {\n tabs[i].addEventListener(\"click\", function(event) {\n navigateAndFocusTab(index);\n });\n tabs[i].addEventListener(\"keydown\", function(event) {\n onKeyDown(event);\n });\n })(i);\n }\n }\n }", "function bindEvents() {\n var tabs = that._elements[\"tab\"];\n if (tabs) {\n for (var i = 0; i < tabs.length; i++) {\n (function(index) {\n tabs[i].addEventListener(\"click\", function(event) {\n navigateAndFocusTab(index);\n });\n tabs[i].addEventListener(\"keydown\", function(event) {\n onKeyDown(event);\n });\n })(i);\n }\n }\n }", "function initConvertEnterToTab() {\n $('body').on('keydown', 'input, select', function(e) {\n //console.log('init convert enter to tab');\n if( $(this).hasClass('submit-on-enter-field') ) {\n //console.log('submit-on-enter-field !');\n return;\n }\n //console.log('continue convert enter to tab');\n\n var self = $(this)\n , form = self.parents('form:eq(0)')\n , focusable\n , next\n ;\n if( e.keyCode == 13 ) {\n //focusable = form.find('input,a,select,button,textarea').filter(':visible');\n focusable = form.find('input,select').filter(':visible').not(\"[readonly]\").not(\"[disabled]\");\n next = focusable.eq(focusable.index(this)+1);\n //console.log('next.length='+next.length);\n if( next.length ) {\n //printF(next,'go next:');\n next.focus();\n } else {\n //form.submit();\n }\n return false;\n }\n });\n}", "function keydownHandler(e) {\r\n clearTimeout(keydownId);\r\n\r\n var activeElement = $(':focus');\r\n var keyCode = e.which;\r\n\r\n //tab?\r\n if(keyCode === 9){\r\n onTab(e);\r\n }\r\n\r\n else if(!activeElement.is('textarea') && !activeElement.is('input') && !activeElement.is('select') &&\r\n activeElement.attr('contentEditable') !== \"true\" && activeElement.attr('contentEditable') !== '' &&\r\n options.keyboardScrolling && options.autoScrolling){\r\n\r\n //preventing the scroll with arrow keys & spacebar & Page Up & Down keys\r\n var keyControls = [40, 38, 32, 33, 34];\r\n if($.inArray(keyCode, keyControls) > -1){\r\n e.preventDefault();\r\n }\r\n\r\n controlPressed = e.ctrlKey;\r\n\r\n keydownId = setTimeout(function(){\r\n onkeydown(e);\r\n },150);\r\n }\r\n }", "function handler(e) {\n // allow tab navigation (conditionally)\n if (e.keyCode && e.keyCode == 9) {\n if (pageBlock && e.data.constrainTabKey) {\n var els = pageBlockEls;\n var fwd = !e.shiftKey && e.target == els[els.length-1];\n var back = e.shiftKey && e.target == els[0];\n if (fwd || back) {\n setTimeout(function(){focus(back)},10);\n return false;\n }\n }\n }\n // allow events within the message content\n if ($(e.target).parents('div.blockMsg').length > 0)\n return true;\n\n // allow events for content that is not being blocked\n return $(e.target).parents().children().filter('div.blockUI').length == 0;\n}", "checkTabFocus(target) {\n const focused = document.activeElement;\n\n if (target === focused) {\n this.activateTab(target, false);\n };\n }", "function tabFocus() {\n startTime = new Date();\n // console.log('Focusing back on ' + host + ' at ' + startTime);\n}", "handleSessionFocus(ev){}", "checkTabFocus(target) {\n let focused = document.activeElement;\n\n if (target === focused) {\n this.activateTab(target, false);\n }\n }", "function TabControl_TabButton_MouseDown(event)\n{\n\t//block the event\n\tBrowser_BlockEvent(event);\n\t//get the tabbutton\n\tvar tabButton = Browser_GetEventSourceElement(event);\n\t//search for the valid component\n\twhile (tabButton && !tabButton.InterpreterObject)\n\t{\n\t\ttabButton = tabButton.parentNode;\n\t}\n\t//forward the event\n\tTabControl_TabButton_MouseDownForwarded(tabButton);\n}", "function eventInputManagerKeyControlHandleFocus(inputmanager, element, event)\n{\n\tinputmanager.keyStrokes = new Array();\n}", "function keydownHandler(e) {\n clearTimeout(keydownId);\n\n var activeElement = $(':focus');\n var keyCode = e.which;\n\n //tab?\n if (keyCode === 9) {\n onTab(e);\n } else if (!activeElement.is('textarea') && !activeElement.is('input') && !activeElement.is('select') &&\n activeElement.attr('contentEditable') !== \"true\" && activeElement.attr('contentEditable') !== '' &&\n options.keyboardScrolling && options.autoScrolling) {\n\n //preventing the scroll with arrow keys & spacebar & Page Up & Down keys\n var keyControls = [40, 38, 32, 33, 34];\n if ($.inArray(keyCode, keyControls) > -1) {\n e.preventDefault();\n }\n\n controlPressed = e.ctrlKey;\n\n keydownId = setTimeout(function() {\n onkeydown(e);\n }, 150);\n }\n }", "function openTabKeyBoard(event){\n if (event.which === 32 || event.which === 13) {\n \n //prevent default browser behaviour which in this case is to scroll down the page\n event.preventDefault();\n \n //get currently focused element\n var activeTab = $(document.activeElement).attr('href');\n \n //perform click event on focused element\n $(document.activeElement).click();\n \n //find first link and add focus to to\n $(activeTab).find('a').first().focus();\n \n }\n }", "function registerTabUndo(browserWindow) {\n\tlet window = viewFor(browserWindow)\n\tlet tabs = getTabContainer(window)\n\t\n\tlet handler = makeHandler(window)\n\t\n\tlistenerMap.set(window, handler)\n\ttabs.addEventListener('click', handler, true)\n}", "function UnbTextKeydownHandler(where)\r\n{\r\n\tif (!window.event) return true;\r\n\tvar keycode = window.event.keyCode;\r\n\r\n\tif (keycode == 9)\r\n\t{\r\n\t\tif (document.selection.createRange().duplicate().text.length)\r\n\t\t{\r\n\t\t\tif (!window.event.shiftKey)\r\n\t\t\t{\r\n\t\t\t\tdocument.selection.createRange().duplicate().text =\r\n\t\t\t\t\t\"\\t\" +\r\n\t\t\t\t\tdocument.selection.createRange().duplicate().text.replace(/\\n/g, \"\\n\\t\") +\r\n\t\t\t\t\t\"\\n\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tdocument.selection.createRange().duplicate().text =\r\n\t\t\t\t\tdocument.selection.createRange().duplicate().text.replace(/\\n\\t/g, \"\\n\");\r\n\t\t\t\tdocument.selection.createRange().duplicate().text =\r\n\t\t\t\t\tdocument.selection.createRange().duplicate().text.replace(/^\\t/g, \"\") +\r\n\t\t\t\t\t\"\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (!window.event.shiftKey)\r\n\t\t\t{\r\n\t\t\t\tUnbInsertText(\"\\t\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n}", "function keyDown(ev) {\n\t if (!isKeyInputEnabled && ev.keyCode === key_1.Key.TAB) {\n\t isKeyInputEnabled = true;\n\t enableKeyInput();\n\t }\n\t }", "function onTab(cb) {\n\tvar innerPage = $('.inner-page');\n\tinnerPage.keydown(function(e){\n\t\tif (e.keyCode == 9) {\n\t\t\te.preventDefault();\n\t\t\tcb();\n\t\t}\n\t}) ;\n}", "function appxSetTabFocus($tagSrc, bBack, mAutoTab) {\r\n try {\r\n var ti = (parseInt($tagSrc.attr(\"tabindex\")) % 100);\r\n var tl = appx_session.tablist;\r\n\r\n var el = tl[ti];\r\n if (el.hasClass(\"appxdatefield\") && el.find(\".appxdatevalue\"))\r\n el = el.find(\".appxdatevalue\");\r\n\r\n if (bBack)\r\n el.blur();\r\n\r\n ti = (bBack ? --ti : ++ti);\r\n\r\n if (ti < 0)\r\n ti = tl.length - 1;\r\n else if (ti >= tl.length)\r\n ti = 0;\r\n\r\n el = tl[ti];\r\n\r\n /*If we got here because of autotab and are tabbing to a button,\r\n **then we need to autotab to the default button instead of the next\r\n **button on screen.*/\r\n if (el.is(\"button\") && mAutoTab && ($(\"button.default\").length > 0)) {\r\n el = $(\"button.default\");\r\n } else if (el.is(\"button\") && mAutoTab) {\r\n return;\r\n }\r\n setInputFocus(el);\r\n\r\n }\r\n catch (ex) {\r\n console.log(\"appxSetTabFocus: \" + ex);\r\n console.log(ex.stack);\r\n }\r\n}", "function switchTabOnArrowPress (event) {\n var pressed = event.keyCode;\n if (direction[ pressed ]) {\n let target = event.target;\n let tabs = getAllTabsInList(target);\n let index = getIndexOfElementInList(target, tabs);\n if (index !== -1) {\n if (tabs[ index + direction[ pressed ] ]) {\n tabs[ index + direction[ pressed ] ].focus();\n }\n else if (pressed === keys.left || pressed === keys.up) {\n focusLastTab(target);\n }\n else if (pressed === keys.right || pressed == keys.down) {\n focusFirstTab(target);\n }\n }\n }\n}", "function keydownHandler(e) {\r\n clearTimeout(keydownId);\r\n\r\n var activeElement = document.activeElement;\r\n var keyCode = e.keyCode;\r\n\r\n //tab?\r\n if(keyCode === 9){\r\n onTab(e);\r\n }\r\n\r\n else if(!matches(activeElement, 'textarea') && !matches(activeElement, 'input') && !matches(activeElement, 'select') &&\r\n activeElement.getAttribute('contentEditable') !== \"true\" && activeElement.getAttribute('contentEditable') !== '' &&\r\n options.keyboardScrolling && options.autoScrolling){\r\n\r\n //preventing the scroll with arrow keys & spacebar & Page Up & Down keys\r\n var keyControls = [40, 38, 32, 33, 34];\r\n if(keyControls.indexOf(keyCode) > -1){\r\n preventDefault(e);\r\n }\r\n\r\n controlPressed = e.ctrlKey;\r\n\r\n keydownId = setTimeout(function(){\r\n onkeydown(e);\r\n },150);\r\n }\r\n }", "function keydownHandler(e) {\r\n clearTimeout(keydownId);\r\n\r\n var activeElement = document.activeElement;\r\n var keyCode = e.keyCode;\r\n\r\n //tab?\r\n if(keyCode === 9){\r\n onTab(e);\r\n }\r\n\r\n else if(!matches(activeElement, 'textarea') && !matches(activeElement, 'input') && !matches(activeElement, 'select') &&\r\n activeElement.getAttribute('contentEditable') !== \"true\" && activeElement.getAttribute('contentEditable') !== '' &&\r\n options.keyboardScrolling && options.autoScrolling){\r\n\r\n //preventing the scroll with arrow keys & spacebar & Page Up & Down keys\r\n var keyControls = [40, 38, 32, 33, 34];\r\n if(keyControls.indexOf(keyCode) > -1){\r\n preventDefault(e);\r\n }\r\n\r\n controlPressed = e.ctrlKey;\r\n\r\n keydownId = setTimeout(function(){\r\n onkeydown(e);\r\n },150);\r\n }\r\n }", "function keyup(e) {\n var key = e.keyCode\n , M = e.metaKey, A = e.altKey, C = e.ctrlKey, S = e.shiftKey\n , now = $('#tabs > li').index($('#tabs > li.selected'))\n , tot = $('#tabs > li').length\n , tab = key === 9 && C ? (tot + now + (S ? -1 : 1)) % tot : null;\n if (tab !== null && (M || A)) return;\n window.$('#tabs > li:nth('+ tab +') a:nth(0)').click();\n}", "onDownArrowKeypress() {\n var e;\n this.activeTabId && ((e = document.getElementById(this.activeTabId)) == null || e.focus());\n }", "function handleFocusIndexChange(newIndex,oldIndex){if(newIndex===oldIndex)return;if(!getElements().tabs[newIndex])return;adjustOffset();redirectFocus();}", "function onTabLinkKeydown(event) {\n\t\tvar link = event.currentTarget;\n\t\tif (link.tabIndex === '-1') {\n\t\t\treturn;\n\t\t}\n\t\tswitch (event.which) {\n\t\t\tcase Keys.Down:\n\t\t\t\t// For screen readers, down arrow should move from the tabbed control to the currently active contents\n\t\t\t\tevent.preventDefault();\n\t\t\t\tdocument\n\t\t\t\t\t.querySelector(\n\t\t\t\t\t\t'.' + Class.Section.Tabbed + ':not(.' + Class.Section.Hidden + ')'\n\t\t\t\t\t)\n\t\t\t\t\t.focus();\n\t\t\t\tbreak;\n\t\t\tcase Keys.Right:\n\t\t\t\t// If there is another tab link to the right, move to it\n\t\t\t\tvar nextTab = link.parentNode.nextSibling;\n\t\t\t\tif (nextTab) {\n\t\t\t\t\tvar nextLink = nextTab.children[0];\n\t\t\t\t\tnextLink.click();\n\t\t\t\t\tnextLink.focus();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase Keys.Left:\n\t\t\t\t// If there is another tab link to the left, move to it\n\t\t\t\tvar previousTab = link.parentNode.previousSibling;\n\t\t\t\tif (previousTab) {\n\t\t\t\t\tvar previousLink = previousTab.children[0];\n\t\t\t\t\tpreviousLink.click();\n\t\t\t\t\tpreviousLink.focus();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "function keyHandler(e){\n var code = e.keyCode;\n //console.log(e.key);\n if (code === 9) \n { // tab key\n e.preventDefault(); // this will prevent us from tabbing out of the editor\n\n var sel = window.getSelection();\n // now insert four non-breaking spaces for the tab key\n var range = sel.getRangeAt(0);\n\n var tabNode = document.createTextNode(\"\\u00a0\\u00a0\\u00a0\\u00a0\");\n range.insertNode(tabNode);\n\n range.setStartAfter(tabNode);\n range.setEndAfter(tabNode);\n\n\n\n sel.removeAllRanges();\n sel.addRange(range);\n\n savedSelection = saveSelection(input);\n\n objUpdate();\n\n onSubtreeModified();\n\n return false;\n }else if((code > 36 && code < 41) || (code >7 && code < 21))\n {\n //DO NOTHING\n addLineBox(stringtools.findNewLineCount(input.innerText));\n }\n else{\n e.preventDefault(); // this will prevent us from tabbing out of the editor\n \n var sel = window.getSelection();\n \n var range = sel.getRangeAt(0);\n var textNode = document.createTextNode(e.key);\n range.insertNode(textNode);\n\n range.setStartAfter(textNode);\n range.setEndAfter(textNode);\n\n\n //restoreSelection(input, savedSelection);\n sel.removeAllRanges();\n sel.addRange(range);\n\n savedSelection = saveSelection(input);\n\n objUpdate();\n\n onSubtreeModified();\n return false;\n }\n\n }", "function OnKey()\r\n{\r\n\t//Get outermost window\r\n\tvar oDefault = window;\r\n\twhile (oDefault != oDefault.parent)\r\n\t\toDefault = oDefault.parent;\r\n\r\n\tvar bPreviousTab = false;\r\n\r\n\tif (event.keyCode != 0)\r\n\t{\r\n\t\tif (!event.repeat)\r\n\t\t{\r\n\t\t\tswitch(event.keyCode)\r\n\t\t\t{\r\n\t\t\t\t// Enter key for <SELECT>, other controls handled in OnPress()\r\n\t\t\t\tcase 13:\r\n\t\t\t\t\tif (event.srcElement.type && event.srcElement.type.substr(0,6) == \"select\")\r\n\t\t\t\t\t\toDefault.FinishBtn.click();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t// Escape key for <SELECT>, other controls handled in OnPress()\r\n\t\t\t\tcase 27:\r\n\t\t\t\t\tif (event.srcElement.type && event.srcElement.type.substr(0,6) == \"select\")\r\n\t\t\t\t\t\toDefault.CancelBtn.click();\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t//F1\r\n\t\t\t\tcase 112:\r\n\t\t\t\t\toDefault.HelpBtn.click();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 65:\r\n\t\t\t\tcase 70:\r\n\t\t\t\tcase 78:\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (event.ctrlKey)\r\n\t\t\t\t\t\t\tevent.returnValue = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t//Case for 33,9,34 have to be in this order\r\n\t\t\t\t//Page Up\r\n\t\t\t\tcase 33:\r\n\t\t\t\t\tbPreviousTab = true;\r\n\t\t\t\t\t\r\n\t\t\t\t//Tab\r\n\t\t\t\tcase 9:\r\n\t\t\t\t\tif (event.shiftKey)\r\n\t\t\t\t\t\tbPreviousTab = true;\r\n\t\t\t\t\t\t\r\n\t\t\t\t//Page Down\r\n\t\t\t\tcase 34:\r\n\t\t\t\t\tif (event.ctrlKey && oDefault.tab_array != null && oDefault.tab_array.length > 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor (i = 0; i < oDefault.tab_array.length; i++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif ((oDefault.tab_array[i].className.toLowerCase() == \"activelink\") || (oDefault.tab_array[i].className.toLowerCase() == \"inactivelink\"))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tvar j = 0;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif (bPreviousTab)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tj = i - 1;\r\n\t\t\t\t\t\t\t\t\twhile (j != i)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tif (j < 0)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tj = oDefault.tab_array.length - 1;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif ((oDefault.tab_array[j].className.toLowerCase() == \"activelink\") || (oDefault.tab_array[j].className.toLowerCase() == \"inactivelink\"))\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tj--;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\twhile ((oDefault.tab_array[j].className.toLowerCase() == \"\") || (oDefault.tab_array[j].className.toLowerCase() == \"inactivelink\"))\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tif (j == 0)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (oDefault.tab_array[j - 1].className.toLowerCase() == \"inactivelink\")\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tj--;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif (j == 0)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tj = oDefault.tab_array.length - 1;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tj = j - 1;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tj = i + 1;\r\n\t\t\t\t\t\t\t\t\twhile (j != i)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tif (j >= oDefault.tab_array.length)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tj = 0;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif ((oDefault.tab_array[j].className.toLowerCase() == \"activelink\") || (oDefault.tab_array[j].className.toLowerCase() == \"inactivelink\"))\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\twhile ((oDefault.tab_array[j].className.toLowerCase() == \"\") || (oDefault.tab_array[j].className.toLowerCase() == \"inactivelink\"))\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tif (j == oDefault.tab_array.length - 1)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (oDefault.tab_array[j + 1].className.toLowerCase() == \"inactivelink\")\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif (j == oDefault.tab_array.length - 1)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tj = 0;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tj = j + 1;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t//Prevent double notification when we pop up an error\r\n\t\t\t\t\t\t\t\tevent.cancelBubble = true;\r\n\t\t\t\t\t\t\t\toDefault.tab_array[j].click();\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t//Alt-Left arrow\r\n\t\t\t\tcase 37:\r\n\t\t\t\t\tif (event.altKey)\r\n\t\t\t\t\t\tevent.returnValue = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t//Alt-Right arrow\r\n\t\t\t\tcase 39:\t\t\t\t\t\r\n\t\t\t\t\tif (event.altKey)\r\n\t\t\t\t\t\tevent.returnValue = false;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "function restoreElementTabState(el) {\n // Only modify elements we've already handled, in case anything was dynamically added since we saved state.\n if (el.hasAttribute(TAB_DATA_HANDLED)) {\n if (el.hasAttribute(TAB_DATA)) {\n el.setAttribute('tabindex', el.getAttribute(TAB_DATA));\n el.removeAttribute(TAB_DATA);\n } else {\n el.removeAttribute('tabindex');\n }\n el.removeAttribute(TAB_DATA_HANDLED);\n }\n}", "function restoreElementTabState(el) {\n // Only modify elements we've already handled, in case anything was dynamically added since we saved state.\n if (el.hasAttribute(TAB_DATA_HANDLED)) {\n if (el.hasAttribute(TAB_DATA)) {\n el.setAttribute('tabindex', el.getAttribute(TAB_DATA));\n el.removeAttribute(TAB_DATA);\n } else {\n el.removeAttribute('tabindex');\n }\n el.removeAttribute(TAB_DATA_HANDLED);\n }\n}", "function restoreElementTabState(el) {\n // Only modify elements we've already handled, in case anything was dynamically added since we saved state.\n if (el.hasAttribute(TAB_DATA_HANDLED)) {\n if (el.hasAttribute(TAB_DATA)) {\n el.setAttribute('tabindex', el.getAttribute(TAB_DATA));\n el.removeAttribute(TAB_DATA);\n } else {\n el.removeAttribute('tabindex');\n }\n el.removeAttribute(TAB_DATA_HANDLED);\n }\n}", "function restoreElementTabState(el) {\n // Only modify elements we've already handled, in case anything was dynamically added since we saved state.\n if (el.hasAttribute(TAB_DATA_HANDLED)) {\n if (el.hasAttribute(TAB_DATA)) {\n el.setAttribute('tabindex', el.getAttribute(TAB_DATA));\n el.removeAttribute(TAB_DATA);\n } else {\n el.removeAttribute('tabindex');\n }\n el.removeAttribute(TAB_DATA_HANDLED);\n }\n}", "function restoreElementTabState(el) {\n // Only modify elements we've already handled, in case anything was dynamically added since we saved state.\n if (el.hasAttribute(TAB_DATA_HANDLED)) {\n if (el.hasAttribute(TAB_DATA)) {\n el.setAttribute('tabindex', el.getAttribute(TAB_DATA));\n el.removeAttribute(TAB_DATA);\n } else {\n el.removeAttribute('tabindex');\n }\n el.removeAttribute(TAB_DATA_HANDLED);\n }\n}", "function tabSwitchHandler(e) {\n actTab = (\"\"+e.target).replace(/.*#/, \"\");\n prevTab = (\"\"+e.relatedTarget).replace(/.*#/, \"\");\n if(bounceProtect != prevTab + actTab) {\n bounceProtect = prevTab + actTab;\n if('' != prevTab) {\n searchStates[prevTab].saveContent();\n }\n searchStates[actTab].restoreContent();\n }\n }", "function removeTrapFocus() {\n document.removeEventListener('focusin', trapFocusHandlers.focusin);\n document.removeEventListener('focusout', trapFocusHandlers.focusout);\n document.removeEventListener('keydown', trapFocusHandlers.keydown);\n}", "function removeTrapFocus() {\n document.removeEventListener('focusin', trapFocusHandlers.focusin);\n document.removeEventListener('focusout', trapFocusHandlers.focusout);\n document.removeEventListener('keydown', trapFocusHandlers.keydown);\n}", "function insertTab(event, obj) {\r\n var tabKeyCode = 9;\r\n if (event.which) // mozilla\r\n var keycode = event.which;\r\n else // ie\r\n var keycode = event.keyCode;\r\n if (keycode == tabKeyCode) {\r\n if (event.type == \"keydown\") {\r\n if (obj.setSelectionRange) {\r\n // mozilla\r\n var s = obj.selectionStart;\r\n var e = obj.selectionEnd;\r\n obj.value = obj.value.substring(0, s) +\r\n \"\\t\" + obj.value.substr(e);\r\n obj.setSelectionRange(s + 1, s + 1);\r\n obj.focus();\r\n } else if (obj.createTextRange) {\r\n // ie\r\n document.selection.createRange().text = \"\\t\"\r\n obj.onblur = function () { this.focus(); this.onblur = null; };\r\n } else {\r\n // unsupported browsers\r\n }\r\n }\r\n if (event.returnValue) // ie ?\r\n event.returnValue = false;\r\n if (event.preventDefault) // dom\r\n event.preventDefault();\r\n return false; // should work in all browsers\r\n }\r\n return true;\r\n}", "function setTabAccessibility()\r\n{\r\n $(\"a, input, select, textarea\").each(function()\r\n {\r\n var element = $(this);\r\n if (element.hasClass(\"tabInaccessible\"))\r\n {\r\n element.attr(\"tabIndex\", \"2\");\r\n }\r\n else\r\n {\r\n element.attr(\"tabIndex\", \"1\");\r\n }\r\n });\r\n}", "function keydownHandler(e) {\n clearTimeout(keydownId);\n\n var activeElement = document.activeElement;\n var keyCode = e.keyCode;\n\n //tab?\n if(keyCode === 9){\n onTab(e);\n }\n\n else if(!matches(activeElement, 'textarea') && !matches(activeElement, 'input') && !matches(activeElement, 'select') &&\n activeElement.getAttribute('contentEditable') !== \"true\" && activeElement.getAttribute('contentEditable') !== '' &&\n options.keyboardScrolling && options.autoScrolling){\n\n //preventing the scroll with arrow keys & spacebar & Page Up & Down keys\n var keyControls = [40, 38, 32, 33, 34];\n if(keyControls.indexOf(keyCode) > -1){\n preventDefault(e);\n }\n\n controlPressed = e.ctrlKey;\n\n keydownId = setTimeout(function(){\n onkeydown(e);\n },150);\n }\n }", "function keydownHandler(e) {\n clearTimeout(keydownId);\n\n var activeElement = document.activeElement;\n var keyCode = e.keyCode;\n\n //tab?\n if(keyCode === 9){\n onTab(e);\n }\n\n else if(!matches(activeElement, 'textarea') && !matches(activeElement, 'input') && !matches(activeElement, 'select') &&\n activeElement.getAttribute('contentEditable') !== \"true\" && activeElement.getAttribute('contentEditable') !== '' &&\n options.keyboardScrolling && options.autoScrolling){\n\n //preventing the scroll with arrow keys & spacebar & Page Up & Down keys\n var keyControls = [40, 38, 32, 33, 34];\n if(keyControls.indexOf(keyCode) > -1){\n preventDefault(e);\n }\n\n controlPressed = e.ctrlKey;\n\n keydownId = setTimeout(function(){\n onkeydown(e);\n },150);\n }\n }", "function keydownHandler(e) {\n clearTimeout(keydownId);\n\n var activeElement = document.activeElement;\n var keyCode = e.keyCode;\n\n //tab?\n if(keyCode === 9){\n onTab(e);\n }\n\n else if(!matches(activeElement, 'textarea') && !matches(activeElement, 'input') && !matches(activeElement, 'select') &&\n activeElement.getAttribute('contentEditable') !== \"true\" && activeElement.getAttribute('contentEditable') !== '' &&\n options.keyboardScrolling && options.autoScrolling){\n\n //preventing the scroll with arrow keys & spacebar & Page Up & Down keys\n var keyControls = [40, 38, 32, 33, 34];\n if(keyControls.indexOf(keyCode) > -1){\n preventDefault(e);\n }\n\n controlPressed = e.ctrlKey;\n\n keydownId = setTimeout(function(){\n onkeydown(e);\n },150);\n }\n }", "_handleKeyDown (event) {\n if(event.target.type === 'textarea' || event.target.type === 'input'){\n return;\n }\n switch( event.keyCode ) {\n case 37:\n this.back();\n event.preventDefault();\n break;\n case 38:\n this.unstep();\n event.preventDefault();\n break;\n case 39:\n this.forward();\n event.preventDefault();\n break;\n case 40:\n this.step();\n event.preventDefault();\n break;\n default: \n break;\n }\n }", "function restoreElementTabState(el) {\n // Only modify elements we've already handled, in case anything was dynamically added since we saved state.\n if (el.hasAttribute(TAB_DATA_HANDLED)) {\n if (el.hasAttribute(TAB_DATA)) {\n el.setAttribute(\"tabindex\", el.getAttribute(TAB_DATA));\n el.removeAttribute(TAB_DATA);\n }\n else {\n el.removeAttribute(\"tabindex\");\n }\n el.removeAttribute(TAB_DATA_HANDLED);\n }\n}", "function pageFocusElementHandler(){\r\n\r\n // find all focusable elements\r\n focusableElements = document.body.querySelectorAll(focusableElementsString);\r\n // convert NodeList to Array\r\n focusableElements= Array.prototype.slice.call(focusableElements);\r\n\r\n let firstElement = focusableElements[0];\r\n let lastElement = focusableElements[focusableElements.length-1];\r\n\r\n firstElement.focus();\r\n document.addEventListener(\"keydown\", keydownHandler);\r\n}", "register(focusTrap) {\n // Dedupe focusTraps that register multiple times.\n this._focusTrapStack = this._focusTrapStack.filter(ft => ft !== focusTrap);\n let stack = this._focusTrapStack;\n\n if (stack.length) {\n stack[stack.length - 1]._disable();\n }\n\n stack.push(focusTrap);\n\n focusTrap._enable();\n }" ]
[ "0.70259047", "0.6983775", "0.6779201", "0.6731606", "0.6729657", "0.6697942", "0.66869223", "0.66326076", "0.6534568", "0.6490828", "0.6467861", "0.6437364", "0.6418009", "0.637409", "0.6359752", "0.63358855", "0.6317459", "0.6299809", "0.62643164", "0.62643164", "0.62643164", "0.6261508", "0.6253133", "0.62479985", "0.6235265", "0.6221237", "0.614373", "0.6126211", "0.60536414", "0.6047047", "0.60207224", "0.6012309", "0.60110366", "0.60110366", "0.60110366", "0.6001937", "0.59619695", "0.59231526", "0.5915719", "0.58783865", "0.586605", "0.5824496", "0.58200186", "0.5817477", "0.5796215", "0.5796215", "0.5773846", "0.57727605", "0.57526404", "0.5746765", "0.5746765", "0.57401794", "0.5740118", "0.5740118", "0.5718475", "0.56949836", "0.568009", "0.56760466", "0.56544155", "0.5637816", "0.5636838", "0.56158847", "0.56130916", "0.5594025", "0.5588213", "0.55790454", "0.5577456", "0.5562118", "0.5556168", "0.55556", "0.5540385", "0.5537184", "0.5537184", "0.5493347", "0.5492059", "0.54862493", "0.5484614", "0.5455863", "0.5455455", "0.5449973", "0.5449973", "0.5449973", "0.5449973", "0.5449973", "0.5440179", "0.5421698", "0.5421698", "0.5402306", "0.53998834", "0.5399277", "0.5399277", "0.5399277", "0.5398986", "0.5398677", "0.539564", "0.5392011" ]
0.67445916
6
Returns true if the HTML5 history API is supported. Taken from Modernizr. changed to avoid false negatives for Windows Phones:
function supportsHistory() { var ua = window.navigator.userAgent; if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false; return window.history && 'pushState' in window.history; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function supportsHistory() { // 60\n var ua = navigator.userAgent; // 61\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n return false; // 63\n } // 64\n return window.history && 'pushState' in window.history; // 65\n} // 66", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\n\t var ua = navigator.userAgent;\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n\t return false;\n\t }\n\t return window.history && 'pushState' in window.history;\n\t}", "function supportsHistory() {\r\n\t var ua = navigator.userAgent;\r\n\t if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\r\n\t return false;\r\n\t }\r\n\t return window.history && 'pushState' in window.history;\r\n\t}", "function supportsHistory() {\n var ua = navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n return false;\n }\n return window.history && 'pushState' in window.history;\n }", "function supportsHistory() {\n var ua = window.navigator.userAgent;\n if (\n (ua.indexOf('Android 2.') !== -1 ||\n ua.indexOf('Android 4.0') !== -1) &&\n ua.indexOf('Mobile Safari') !== -1 &&\n ua.indexOf('Chrome') === -1 &&\n ua.indexOf('Windows Phone') === -1\n )\n return false;\n return window.history && 'pushState' in window.history;\n }", "function supportsHistory() {\n var ua = navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n return false;\n }\n return window.history && 'pushState' in window.history;\n}", "function supportsHistory() {\n var ua = navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n return false;\n }\n return window.history && 'pushState' in window.history;\n}", "function supportsHistory() {\n var ua = navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n return false;\n }\n return window.history && 'pushState' in window.history;\n}", "function supportsHistory() {\n var ua = navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n return false;\n }\n return window.history && 'pushState' in window.history;\n}", "function supportsHistory() {\n var ua = navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n return false;\n }\n return window.history && 'pushState' in window.history;\n}", "function supportsHistory() {\n var ua = navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n return false;\n }\n return window.history && 'pushState' in window.history;\n}", "function supportsHistory() {\n var ua = navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n return false;\n }\n return window.history && 'pushState' in window.history;\n}", "function supportsHistory() {\n var ua = navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n return false;\n }\n return window.history && 'pushState' in window.history;\n}", "function supportsHistory() {\n var ua = navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n return false;\n }\n return window.history && 'pushState' in window.history;\n}", "function supportsHistory() {\n var ua = navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n return false;\n }\n return window.history && 'pushState' in window.history;\n}", "function supportsHistory() {\n var ua = navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n return false;\n }\n return window.history && 'pushState' in window.history;\n}", "function supportsHistory() {\n var ua = navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n return false;\n }\n return window.history && 'pushState' in window.history;\n}", "function supportsHistory() {\n var ua = navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {\n return false;\n }\n return window.history && 'pushState' in window.history;\n}" ]
[ "0.8457442", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.8437014", "0.84353054", "0.84091485", "0.83679307", "0.8360791", "0.8360791", "0.8360791", "0.8360791", "0.8360791", "0.8360791", "0.8360791", "0.8360791", "0.8360791", "0.8360791", "0.8360791", "0.8360791", "0.8360791" ]
0.8341028
98
Returns true if browser fires popstate on hash change. IE10 and IE11 do not.
function supportsPopStateOnHashChange() { return window.navigator.userAgent.indexOf('Trident') === -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function supportsPopStateOnHashChange(){return window.navigator.userAgent.indexOf('Trident')===-1;}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n }", "function supportsHashChange(documentMode, global) {\n return 'onhashchange' in global && (documentMode === undefined || documentMode > 7);\n }", "function supportsHashChange(documentMode, global) {\n return 'onhashchange' in global && (documentMode === undefined || documentMode > 7);\n }", "function supportsHashChange(documentMode, global) {\n return 'onhashchange' in global && (documentMode === undefined || documentMode > 7);\n }", "function supportsHashChange(documentMode, global) {\n return 'onhashchange' in global && (documentMode === undefined || documentMode > 7);\n }", "function checkHash() {\r\n if (location.hash && $this.find(location.hash).length) {\r\n toggleState(true);\r\n return true;\r\n }\r\n }", "changed()\n {\n if (window.location.hash !== this.lastHash)\n {\n this.lastHash = window.location.hash;\n return true;\n }\n else\n {\n return false;\n }\n }", "function locationHashChanged() {\n if (location.hash === \"\") {\n closePage();\n }\n}", "function firePopState() { // 630\n var o = document.createEvent ? document.createEvent('Event') : document.createEventObject(); // 631\n if (o.initEvent) { // 632\n o.initEvent('popstate', false, false); // 633\n } else { // 634\n o.type = 'popstate'; // 635\n } // 636\n o.state = historyObject.state; // 637\n // send a newly created events to be processed // 638\n dispatchEvent(o); // 639\n } // 640", "function poll() {\n var hash = get_fragment(),\n history_hash = history_get( last_hash );\n \n if ( hash !== last_hash ) {\n history_set( last_hash = hash, history_hash );\n \n $(window).trigger( str_hashchange );\n \n } else if ( history_hash !== last_hash ) {\n location.href = location.href.replace( /#.*/, '' ) + history_hash;\n }\n \n timeout_id = setTimeout( poll, $.fn[ str_hashchange ].delay );\n }", "function poll() {\n var hash = get_fragment(),\n history_hash = history_get( last_hash );\n \n if ( hash !== last_hash ) {\n history_set( last_hash = hash, history_hash );\n \n $(window).trigger( str_hashchange );\n \n } else if ( history_hash !== last_hash ) {\n location.href = location.href.replace( /#.*/, '' ) + history_hash;\n }\n \n timeout_id = setTimeout( poll, $.fn[ str_hashchange ].delay );\n }", "function poll() {\n var hash = get_fragment(),\n history_hash = history_get( last_hash );\n \n if ( hash !== last_hash ) {\n history_set( last_hash = hash, history_hash );\n \n $(window).trigger( str_hashchange );\n \n } else if ( history_hash !== last_hash ) {\n location.href = location.href.replace( /#.*/, '' ) + history_hash;\n }\n \n timeout_id = setTimeout( poll, $.fn[ str_hashchange ].delay );\n }", "function isExtraneousPopstateEvent(event){event.state===undefined&&navigator.userAgent.indexOf('CriOS')===-1;}", "function poll() {\n var hash = get_fragment(),\n history_hash = history_get( last_hash );\n \n if ( hash !== last_hash ) {\n history_set( last_hash = hash, history_hash );\n \n $(window).trigger( str_hashchange );\n \n } else if ( history_hash !== last_hash ) {\n location.href = location.href.replace( /#.*/, '' ) + history_hash;\n }\n \n timeout_id = window.setTimeout( poll, $.fn[ str_hashchange ].delay );\n}", "function hashChanged(e){\n\t\trespondToState();\n\t}", "function DETECT_history() {\n return window.history && typeof window.history.pushState !== 'undefined';\n }", "function supportsGoWithoutReloadUsingHash(){return window.navigator.userAgent.indexOf('Firefox')===-1;}", "function poll() {\n var hash = get_fragment(),\n history_hash = history_get(last_hash);\n\n if (hash !== last_hash) {\n history_set(last_hash = hash, history_hash);\n\n $(window).trigger(str_hashchange);\n\n } else if (history_hash !== last_hash) {\n location.href = location.href.replace(/#.*/, '') + history_hash;\n }\n\n timeout_id = setTimeout(poll, $.fn[str_hashchange].delay);\n }", "function poll() {\n var hash = get_fragment(),\n history_hash = history_get(last_hash);\n\n if (hash !== last_hash) {\n history_set(last_hash = hash, history_hash);\n\n $(window).trigger(str_hashchange);\n\n } else if (history_hash !== last_hash) {\n location.href = location.href.replace(/#.*/, '') + history_hash;\n }\n\n timeout_id = setTimeout(poll, $.fn[str_hashchange].delay);\n }", "function supportsGoWithoutReloadUsingHash(){var ua=navigator.userAgent;return ua.indexOf('Firefox')===-1;}", "function supportsGoWithoutReloadUsingHash(){var ua=navigator.userAgent;return ua.indexOf('Firefox')===-1;}", "function supportsGoWithoutReloadUsingHash(){var ua=navigator.userAgent;return ua.indexOf('Firefox')===-1;}", "function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n }", "function checkUrlHash() {\n var hash = window.location.hash;\n\n // Allow deep linking to recover password form\n if (hash === '#recover') {\n toggleRecoverPasswordForm();\n }\n }", "function firePopState() {\n var o = document.createEvent ? document.createEvent('Event') : document.createEventObject();\n if (o.initEvent) {\n o.initEvent('popstate', false, false);\n } else {\n o.type = 'popstate';\n }\n o.state = historyObject.state;\n // send a newly created events to be processed\n dispatchEvent(o);\n }", "listenForHashChanges() {\n //get url on page load.\n finsembleWindow.updateOptions({ url: window.top.location.href }, () => {\n });\n var self = this;\n //There's no pushState event in the browser. This is a monkey patched solution that allows us to catch hash changes. onhashchange doesn't fire when a site is loaded with a hash (e.g., salesforce).\n (function (history) {\n var pushState = history.pushState;\n history.pushState = function (state) {\n if (typeof history.onpushstate === \"function\") {\n history.onpushstate({ state: state });\n }\n pushState.apply(history, arguments);\n finsembleWindow.updateOptions({ url: window.top.location.href }, () => {\n });\n return;\n };\n var replaceState = history.replaceState;\n history.replaceState = function (state) {\n if (typeof history.onreplacestate === \"function\") {\n history.onreplacestate({ state: state });\n }\n replaceState.apply(history, arguments);\n finsembleWindow.updateOptions({ url: window.top.location.toString() });\n // DH 3/6/2019 - This should be handled by the WindowStorageManager.\n storageClient_1.default.save({ topic: constants_1.WORKSPACE.CACHE_STORAGE_TOPIC, key: self.windowHash, value: finsembleWindow.windowOptions });\n return;\n };\n })(window.history);\n window.addEventListener(\"hashchange\", () => {\n finsembleWindow.updateOptions({ url: window.top.location.toString() }, () => {\n });\n });\n }", "function supportsGoWithoutReloadUsingHash() {\r\n\t var ua = navigator.userAgent;\r\n\t return ua.indexOf('Firefox') === -1;\r\n\t}", "function checkHash() {\r\n if (location.hash != \"\") {\r\n let hash = location.hash.match(/^#(.*)$/)[1];\r\n switch (hash) {\r\n case \"refreshed\":\r\n dom.connectWithStrava.click();\r\n break;\r\n }\r\n location.hash = \"\";\r\n }\r\n}", "function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}", "function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}", "function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}", "function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}", "function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}", "function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}", "function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}", "function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}", "function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}", "function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}", "function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}", "function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}" ]
[ "0.85098773", "0.8429124", "0.7344682", "0.7344682", "0.7344682", "0.7344682", "0.732546", "0.7243496", "0.7106196", "0.6864233", "0.6818202", "0.6818202", "0.6818202", "0.68038857", "0.67743653", "0.67629844", "0.67335546", "0.6707158", "0.66608274", "0.66576296", "0.65675783", "0.65675783", "0.65675783", "0.65492964", "0.653028", "0.6508757", "0.6485098", "0.6480429", "0.6467461", "0.6445549", "0.6445549", "0.6445549", "0.6445549", "0.6445549", "0.6445549", "0.6445549", "0.6445549", "0.6445549", "0.6445549", "0.6445549", "0.6445549" ]
0.82997197
58
Returns false if using go(n) with hash history causes a full page reload.
function supportsGoWithoutReloadUsingHash() { return window.navigator.userAgent.indexOf('Firefox') === -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "changed()\n {\n if (window.location.hash !== this.lastHash)\n {\n this.lastHash = window.location.hash;\n return true;\n }\n else\n {\n return false;\n }\n }", "function checkHash() {\r\n if (location.hash && $this.find(location.hash).length) {\r\n toggleState(true);\r\n return true;\r\n }\r\n }", "function checkURLAgain()\r\n {\r\n url = new String(window.location.href);\r\n if(count++ < 20)\r\n {\r\n if((AreSameStrings(url, lastURL,false) || url.indexOf(\"#\") < 0))\r\n {\r\n if(debug) GM_log(\"checking URL again \" + count);\r\n setTimeout(checkURLAgain, 100);\r\n }\r\n else\r\n {\r\n if(debug)\r\n GM_log('calling again');\r\n DoTestAgain();\r\n }\r\n }\r\n }", "function checkURL(hash)\n{\n if(!hash) hash = window.location.hash;\t//if no parameter is provided, use the hash value from the current address\n if(hash != lasturl)\t// if the hash value has changed\n {\n lasturl = hash;\t//update the current hash\n loadPage(hash);\t// and load the new page\n }\n}", "function supportsGoWithoutReloadUsingHash() { // 72\n var ua = navigator.userAgent; // 73\n return ua.indexOf('Firefox') === -1; // 74\n}", "function checkHash() {\r\n if (location.hash != \"\") {\r\n let hash = location.hash.match(/^#(.*)$/)[1];\r\n switch (hash) {\r\n case \"refreshed\":\r\n dom.connectWithStrava.click();\r\n break;\r\n }\r\n location.hash = \"\";\r\n }\r\n}", "function getPageRefreshed() {\n try {\n if (performance && performance.navigation) {\n return performance.navigation.type === performance.navigation.TYPE_RELOAD;\n }\n } catch (e) { }\n return false;\n}", "function checkURL(hash)\n{\n if(!hash) hash=window.location.hash;\t//if no parameter is provided, use the hash value from the current address\n if(hash != lasturl)\t// if the hash value has changed\n {\n lasturl=hash;\t//update the current hash\n loadPage(hash);\t// and load the new page\n }\n}", "function isLoop() {\n var last = history[history.length - 1];\n for (var i = 0; i < history.length - 1; i++) {\n if (history[i] === last) {\n return true;\n }\n }\n return false;\n }", "function hashChange(entry, url) {\n if (!entry) return false;\n const [aBase, aHash] = url.split('#');\n const [bBase, bHash] = entry.url.split('#');\n return aBase === bBase && aHash !== bHash;\n}", "function supportsGoWithoutReloadUsingHash(){return window.navigator.userAgent.indexOf('Firefox')===-1;}", "function checkUrlHash() {\n var hash = window.location.hash;\n\n // Allow deep linking to recover password form\n if (hash === '#recover') {\n toggleRecoverPasswordForm();\n }\n }", "function supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n }", "function supportsGoWithoutReloadUsingHash() {\r\n\t var ua = navigator.userAgent;\r\n\t return ua.indexOf('Firefox') === -1;\r\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}", "function supportsGoWithoutReloadUsingHash() {\n\t var ua = navigator.userAgent;\n\t return ua.indexOf('Firefox') === -1;\n\t}" ]
[ "0.68522537", "0.6624795", "0.6168934", "0.6121144", "0.61205816", "0.6108571", "0.6105173", "0.6104327", "0.60937566", "0.6088778", "0.6069899", "0.6030687", "0.6027372", "0.6025207", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675", "0.59982675" ]
0.5997922
98
Returns true if a given popstate event is an extraneous WebKit event. Accounts for the fact that Chrome on iOS fires real popstate events containing undefined state when pressing the back button.
function isExtraneousPopstateEvent(event) { return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isExtraneousPopstateEvent(event){event.state===undefined&&navigator.userAgent.indexOf('CriOS')===-1;}", "function isExtraneousPopstateEvent(event) {\n event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}", "function isExtraneousPopstateEvent(event) {\n event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}", "function isExtraneousPopstateEvent(event) {\n event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}", "function isExtraneousPopstateEvent(event) {\n event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}", "function isExtraneousPopstateEvent(event) {\n event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}", "function isExtraneousPopstateEvent(event) {\n event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}", "function isExtraneousPopstateEvent(event) {\n event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}", "function isExtraneousPopstateEvent(event) {\n event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}", "function isExtraneousPopstateEvent(event) {\n event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}", "function isExtraneousPopstateEvent(event) {\n event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}", "function isExtraneousPopstateEvent(event) {\n event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}", "function isExtraneousPopstateEvent(event) {\n return (\n event.state === undefined &&\n navigator.userAgent.indexOf('CriOS') === -1\n );\n }", "function ignorablePopstateEvent(event) {\r\n return (event.state === undefined && navigator.userAgent.indexOf(\"CriOS\") === -1);\r\n}", "function supportsPopStateOnHashChange(){return window.navigator.userAgent.indexOf('Trident')===-1;}", "function isUnattempted (e) {\n return !e.stateChange\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}", "function supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}" ]
[ "0.8189633", "0.8106464", "0.8106464", "0.8106464", "0.8106464", "0.8106464", "0.8106464", "0.8106464", "0.8106464", "0.8106464", "0.8106464", "0.8106464", "0.8076116", "0.7768142", "0.65637994", "0.65342957", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496", "0.65262496" ]
0.8111777
47
Creates a history object that uses the HTML5 history API including pushState, replaceState, and the popstate event.
function createBrowserHistory(props) { if (props === void 0) { props = {}; } !canUseDOM ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_4__["default"])(false, 'Browser history needs a DOM') : undefined : void 0; var globalHistory = window.history; var canUseHistory = supportsHistory(); var needsHashChangeListener = !supportsPopStateOnHashChange(); var _props = props, _props$forceRefresh = _props.forceRefresh, forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh, _props$getUserConfirm = _props.getUserConfirmation, getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm, _props$keyLength = _props.keyLength, keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength; var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : ''; function getDOMLocation(historyState) { var _ref = historyState || {}, key = _ref.key, state = _ref.state; var _window$location = window.location, pathname = _window$location.pathname, search = _window$location.search, hash = _window$location.hash; var path = pathname + search + hash; true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__["default"])(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".') : undefined; if (basename) path = stripBasename(path, basename); return createLocation(path, state, key); } function createKey() { return Math.random().toString(36).substr(2, keyLength); } var transitionManager = createTransitionManager(); function setState(nextState) { Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])(history, nextState); history.length = globalHistory.length; transitionManager.notifyListeners(history.location, history.action); } function handlePopState(event) { // Ignore extraneous popstate events in WebKit. if (isExtraneousPopstateEvent(event)) return; handlePop(getDOMLocation(event.state)); } function handleHashChange() { handlePop(getDOMLocation(getHistoryState())); } var forceNextPop = false; function handlePop(location) { if (forceNextPop) { forceNextPop = false; setState(); } else { var action = 'POP'; transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (ok) { setState({ action: action, location: location }); } else { revertPop(location); } }); } } function revertPop(fromLocation) { var toLocation = history.location; // TODO: We could probably make this more reliable by // keeping a list of keys we've seen in sessionStorage. // Instead, we just default to 0 for keys we don't know. var toIndex = allKeys.indexOf(toLocation.key); if (toIndex === -1) toIndex = 0; var fromIndex = allKeys.indexOf(fromLocation.key); if (fromIndex === -1) fromIndex = 0; var delta = toIndex - fromIndex; if (delta) { forceNextPop = true; go(delta); } } var initialLocation = getDOMLocation(getHistoryState()); var allKeys = [initialLocation.key]; // Public interface function createHref(location) { return basename + createPath(location); } function push(path, state) { true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__["default"])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : undefined; var action = 'PUSH'; var location = createLocation(path, state, createKey(), history.location); transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (!ok) return; var href = createHref(location); var key = location.key, state = location.state; if (canUseHistory) { globalHistory.pushState({ key: key, state: state }, null, href); if (forceRefresh) { window.location.href = href; } else { var prevIndex = allKeys.indexOf(history.location.key); var nextKeys = allKeys.slice(0, prevIndex + 1); nextKeys.push(location.key); allKeys = nextKeys; setState({ action: action, location: location }); } } else { true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__["default"])(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : undefined; window.location.href = href; } }); } function replace(path, state) { true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__["default"])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : undefined; var action = 'REPLACE'; var location = createLocation(path, state, createKey(), history.location); transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (!ok) return; var href = createHref(location); var key = location.key, state = location.state; if (canUseHistory) { globalHistory.replaceState({ key: key, state: state }, null, href); if (forceRefresh) { window.location.replace(href); } else { var prevIndex = allKeys.indexOf(history.location.key); if (prevIndex !== -1) allKeys[prevIndex] = location.key; setState({ action: action, location: location }); } } else { true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__["default"])(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : undefined; window.location.replace(href); } }); } function go(n) { globalHistory.go(n); } function goBack() { go(-1); } function goForward() { go(1); } var listenerCount = 0; function checkDOMListeners(delta) { listenerCount += delta; if (listenerCount === 1 && delta === 1) { window.addEventListener(PopStateEvent, handlePopState); if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange); } else if (listenerCount === 0) { window.removeEventListener(PopStateEvent, handlePopState); if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange); } } var isBlocked = false; function block(prompt) { if (prompt === void 0) { prompt = false; } var unblock = transitionManager.setPrompt(prompt); if (!isBlocked) { checkDOMListeners(1); isBlocked = true; } return function () { if (isBlocked) { isBlocked = false; checkDOMListeners(-1); } return unblock(); }; } function listen(listener) { var unlisten = transitionManager.appendListener(listener); checkDOMListeners(1); return function () { checkDOMListeners(-1); unlisten(); }; } var history = { length: globalHistory.length, action: 'POP', location: initialLocation, createHref: createHref, push: push, replace: replace, go: go, goBack: goBack, goForward: goForward, block: block, listen: listen }; return history; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createBrowserHistory() {\r\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\r\n\t\r\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\r\n\t\r\n\t var forceRefresh = options.forceRefresh;\r\n\t\r\n\t var isSupported = _DOMUtils.supportsHistory();\r\n\t var useRefresh = !isSupported || forceRefresh;\r\n\t\r\n\t function getCurrentLocation(historyState) {\r\n\t try {\r\n\t historyState = historyState || window.history.state || {};\r\n\t } catch (e) {\r\n\t historyState = {};\r\n\t }\r\n\t\r\n\t var path = _DOMUtils.getWindowPath();\r\n\t var _historyState = historyState;\r\n\t var key = _historyState.key;\r\n\t\r\n\t var state = undefined;\r\n\t if (key) {\r\n\t state = _DOMStateStorage.readState(key);\r\n\t } else {\r\n\t state = null;\r\n\t key = history.createKey();\r\n\t\r\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\r\n\t }\r\n\t\r\n\t var location = _PathUtils.parsePath(path);\r\n\t\r\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\r\n\t }\r\n\t\r\n\t function startPopStateListener(_ref) {\r\n\t var transitionTo = _ref.transitionTo;\r\n\t\r\n\t function popStateListener(event) {\r\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\r\n\t\r\n\t transitionTo(getCurrentLocation(event.state));\r\n\t }\r\n\t\r\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\r\n\t\r\n\t return function () {\r\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\r\n\t };\r\n\t }\r\n\t\r\n\t function finishTransition(location) {\r\n\t var basename = location.basename;\r\n\t var pathname = location.pathname;\r\n\t var search = location.search;\r\n\t var hash = location.hash;\r\n\t var state = location.state;\r\n\t var action = location.action;\r\n\t var key = location.key;\r\n\t\r\n\t if (action === _Actions.POP) return; // Nothing to do.\r\n\t\r\n\t _DOMStateStorage.saveState(key, state);\r\n\t\r\n\t var path = (basename || '') + pathname + search + hash;\r\n\t var historyState = {\r\n\t key: key\r\n\t };\r\n\t\r\n\t if (action === _Actions.PUSH) {\r\n\t if (useRefresh) {\r\n\t window.location.href = path;\r\n\t return false; // Prevent location update.\r\n\t } else {\r\n\t window.history.pushState(historyState, null, path);\r\n\t }\r\n\t } else {\r\n\t // REPLACE\r\n\t if (useRefresh) {\r\n\t window.location.replace(path);\r\n\t return false; // Prevent location update.\r\n\t } else {\r\n\t window.history.replaceState(historyState, null, path);\r\n\t }\r\n\t }\r\n\t }\r\n\t\r\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\r\n\t getCurrentLocation: getCurrentLocation,\r\n\t finishTransition: finishTransition,\r\n\t saveState: _DOMStateStorage.saveState\r\n\t }));\r\n\t\r\n\t var listenerCount = 0,\r\n\t stopPopStateListener = undefined;\r\n\t\r\n\t function listenBefore(listener) {\r\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\r\n\t\r\n\t var unlisten = history.listenBefore(listener);\r\n\t\r\n\t return function () {\r\n\t unlisten();\r\n\t\r\n\t if (--listenerCount === 0) stopPopStateListener();\r\n\t };\r\n\t }\r\n\t\r\n\t function listen(listener) {\r\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\r\n\t\r\n\t var unlisten = history.listen(listener);\r\n\t\r\n\t return function () {\r\n\t unlisten();\r\n\t\r\n\t if (--listenerCount === 0) stopPopStateListener();\r\n\t };\r\n\t }\r\n\t\r\n\t // deprecated\r\n\t function registerTransitionHook(hook) {\r\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\r\n\t\r\n\t history.registerTransitionHook(hook);\r\n\t }\r\n\t\r\n\t // deprecated\r\n\t function unregisterTransitionHook(hook) {\r\n\t history.unregisterTransitionHook(hook);\r\n\t\r\n\t if (--listenerCount === 0) stopPopStateListener();\r\n\t }\r\n\t\r\n\t return _extends({}, history, {\r\n\t listenBefore: listenBefore,\r\n\t listen: listen,\r\n\t registerTransitionHook: registerTransitionHook,\r\n\t unregisterTransitionHook: unregisterTransitionHook\r\n\t });\r\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t !_ExecutionEnvironment.canUseDOM ? true ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\t\n\t var forceRefresh = options.forceRefresh;\n\t\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\t\n\t function getCurrentLocation(historyState) {\n\t historyState = historyState || window.history.state || {};\n\t\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\t\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\t\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path);\n\t }\n\t\n\t var location = _PathUtils.parsePath(path);\n\t\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\t\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\t\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\t\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\t\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\t\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\t\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\t\n\t if (action === _Actions.POP) return; // Nothing to do.\n\t\n\t _DOMStateStorage.saveState(key, state);\n\t\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\t\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\t\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\t\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\t\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listenBefore(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listen(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t history.registerTransitionHook(hook);\n\t }\n\t\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t !_ExecutionEnvironment.canUseDOM ? true ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\t\n\t var forceRefresh = options.forceRefresh;\n\t\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\t\n\t function getCurrentLocation(historyState) {\n\t historyState = historyState || window.history.state || {};\n\t\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\t\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\t\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path);\n\t }\n\t\n\t var location = _PathUtils.parsePath(path);\n\t\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\t\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\t\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\t\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\t\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\t\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\t\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\t\n\t if (action === _Actions.POP) return; // Nothing to do.\n\t\n\t _DOMStateStorage.saveState(key, state);\n\t\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\t\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\t\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\t\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\t\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listenBefore(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listen(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t history.registerTransitionHook(hook);\n\t }\n\t\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t !_ExecutionEnvironment.canUseDOM ? false ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\t\n\t var forceRefresh = options.forceRefresh;\n\t\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\t\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\t\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\t\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\t\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\t\n\t var location = _PathUtils.parsePath(path);\n\t\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\t\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\t\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\t\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\t\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\t\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\t\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\t\n\t if (action === _Actions.POP) return; // Nothing to do.\n\t\n\t _DOMStateStorage.saveState(key, state);\n\t\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\t\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\t\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\t\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\t\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listenBefore(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listen(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t history.registerTransitionHook(hook);\n\t }\n\t\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t !_ExecutionEnvironment.canUseDOM ? false ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\t\n\t var forceRefresh = options.forceRefresh;\n\t\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\t\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\t\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\t\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\t\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\t\n\t var location = _PathUtils.parsePath(path);\n\t\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\t\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\t\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\t\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\t\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\t\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\t\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\t\n\t if (action === _Actions.POP) return; // Nothing to do.\n\t\n\t _DOMStateStorage.saveState(key, state);\n\t\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\t\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\t\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\t\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\t\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listenBefore(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listen(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t history.registerTransitionHook(hook);\n\t }\n\t\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t !_ExecutionEnvironment.canUseDOM ? false ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\t\n\t var forceRefresh = options.forceRefresh;\n\t\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\t\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\t\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\t\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\t\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\t\n\t var location = _PathUtils.parsePath(path);\n\t\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\t\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\t\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\t\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\t\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\t\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\t\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\t\n\t if (action === _Actions.POP) return; // Nothing to do.\n\t\n\t _DOMStateStorage.saveState(key, state);\n\t\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\t\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\t\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\t\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\t\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listenBefore(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listen(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t history.registerTransitionHook(hook);\n\t }\n\t\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t !_ExecutionEnvironment.canUseDOM ? false ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\t\n\t var forceRefresh = options.forceRefresh;\n\t\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\t\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\t\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\t\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\t\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\t\n\t var location = _PathUtils.parsePath(path);\n\t\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\t\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\t\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\t\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\t\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\t\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\t\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\t\n\t if (action === _Actions.POP) return; // Nothing to do.\n\t\n\t _DOMStateStorage.saveState(key, state);\n\t\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\t\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\t\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\t\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\t\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listenBefore(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listen(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t history.registerTransitionHook(hook);\n\t }\n\t\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t !_ExecutionEnvironment.canUseDOM ? (undefined) !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\t\n\t var forceRefresh = options.forceRefresh;\n\t\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\t\n\t function getCurrentLocation(historyState) {\n\t historyState = historyState || window.history.state || {};\n\t\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\t\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\t\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path);\n\t }\n\t\n\t var location = _PathUtils.parsePath(path);\n\t\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\t\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\t\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\t\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\t\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\t\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\t\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\t\n\t if (action === _Actions.POP) return; // Nothing to do.\n\t\n\t _DOMStateStorage.saveState(key, state);\n\t\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\t\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\t\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\t\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\t\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listenBefore(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listen(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t history.registerTransitionHook(hook);\n\t }\n\t\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t !_ExecutionEnvironment.canUseDOM ? false ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n\t var forceRefresh = options.forceRefresh;\n\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\n\t function getCurrentLocation(historyState) {\n\t historyState = historyState || window.history.state || {};\n\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path);\n\t }\n\n\t var location = _PathUtils.parsePath(path);\n\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\n\t if (action === _Actions.POP) return; // Nothing to do.\n\n\t _DOMStateStorage.saveState(key, state);\n\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listenBefore(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listen(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t history.registerTransitionHook(hook);\n\t }\n\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t !_ExecutionEnvironment.canUseDOM ? false ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n\t var forceRefresh = options.forceRefresh;\n\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\n\t function getCurrentLocation(historyState) {\n\t historyState = historyState || window.history.state || {};\n\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path);\n\t }\n\n\t var location = _parsePath2['default'](path);\n\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\n\t if (action === _Actions.POP) return; // Nothing to do.\n\n\t _DOMStateStorage.saveState(key, state);\n\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listenBefore(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listen(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t history.registerTransitionHook(hook);\n\t }\n\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t !_ExecutionEnvironment.canUseDOM ? true ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\t\n\t var forceRefresh = options.forceRefresh;\n\t\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\t\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\t\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\t\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\t\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\t\n\t var location = _PathUtils.parsePath(path);\n\t\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\t\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\t\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\t\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\t\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\t\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\t\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\t\n\t if (action === _Actions.POP) return; // Nothing to do.\n\t\n\t _DOMStateStorage.saveState(key, state);\n\t\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\t\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\t\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\t\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\t\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listenBefore(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listen(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t history.registerTransitionHook(hook);\n\t }\n\t\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\t\n\t var forceRefresh = options.forceRefresh;\n\t\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\t\n\t function getCurrentLocation(historyState) {\n\t historyState = historyState || window.history.state || {};\n\t\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\t\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\t\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path);\n\t }\n\t\n\t var location = _PathUtils.parsePath(path);\n\t\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\t\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\t\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\t\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\t\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\t\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\t\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\t\n\t if (action === _Actions.POP) return; // Nothing to do.\n\t\n\t _DOMStateStorage.saveState(key, state);\n\t\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\t\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\t\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\t\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\t\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listenBefore(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listen(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t history.registerTransitionHook(hook);\n\t }\n\t\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t !_ExecutionEnvironment.canUseDOM ? false ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n\t var forceRefresh = options.forceRefresh;\n\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\n\t var location = _PathUtils.parsePath(path);\n\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\n\t if (action === _Actions.POP) return; // Nothing to do.\n\n\t _DOMStateStorage.saveState(key, state);\n\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listenBefore(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listen(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t history.registerTransitionHook(hook);\n\t }\n\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t !_ExecutionEnvironment.canUseDOM ? true ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n\t var forceRefresh = options.forceRefresh;\n\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\n\t function getCurrentLocation(historyState) {\n\t historyState = historyState || window.history.state || {};\n\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path);\n\t }\n\n\t var location = _parsePath2['default'](path);\n\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\n\t if (action === _Actions.POP) return; // Nothing to do.\n\n\t _DOMStateStorage.saveState(key, state);\n\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listenBefore(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listen(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t history.registerTransitionHook(hook);\n\t }\n\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\t\n\t var forceRefresh = options.forceRefresh;\n\t\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\t\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\t\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\t\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\t\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\t\n\t var location = _PathUtils.parsePath(path);\n\t\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\t\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\t\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\t\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\t\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\t\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\t\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\t\n\t if (action === _Actions.POP) return; // Nothing to do.\n\t\n\t _DOMStateStorage.saveState(key, state);\n\t\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\t\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\t\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\t\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\t\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listenBefore(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listen(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t history.registerTransitionHook(hook);\n\t }\n\t\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\t\n\t var forceRefresh = options.forceRefresh;\n\t\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\t\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\t\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\t\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\t\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\t\n\t var location = _PathUtils.parsePath(path);\n\t\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\t\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\t\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\t\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\t\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\t\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\t\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\t\n\t if (action === _Actions.POP) return; // Nothing to do.\n\t\n\t _DOMStateStorage.saveState(key, state);\n\t\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\t\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\t\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\t\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\t\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listenBefore(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listen(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t history.registerTransitionHook(hook);\n\t }\n\t\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\t\n\t var forceRefresh = options.forceRefresh;\n\t\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\t\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\t\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\t\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\t\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\t\n\t var location = _PathUtils.parsePath(path);\n\t\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\t\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\t\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\t\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\t\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\t\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\t\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\t\n\t if (action === _Actions.POP) return; // Nothing to do.\n\t\n\t _DOMStateStorage.saveState(key, state);\n\t\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\t\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\t\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\t\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\t\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listenBefore(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listen(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t history.registerTransitionHook(hook);\n\t }\n\t\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\t\n\t var forceRefresh = options.forceRefresh;\n\t\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\t\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\t\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\t\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\t\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\t\n\t var location = _PathUtils.parsePath(path);\n\t\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\t\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\t\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\t\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\t\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\t\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\t\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\t\n\t if (action === _Actions.POP) return; // Nothing to do.\n\t\n\t _DOMStateStorage.saveState(key, state);\n\t\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\t\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\t\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\t\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\t\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listenBefore(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listen(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t history.registerTransitionHook(hook);\n\t }\n\t\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\t\n\t var forceRefresh = options.forceRefresh;\n\t\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\t\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\t\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\t\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\t\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\t\n\t var location = _PathUtils.parsePath(path);\n\t\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\t\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\t\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\t\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\t\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\t\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\t\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\t\n\t if (action === _Actions.POP) return; // Nothing to do.\n\t\n\t _DOMStateStorage.saveState(key, state);\n\t\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\t\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\t\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\t\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\t\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listenBefore(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listen(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t history.registerTransitionHook(hook);\n\t }\n\t\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n\t var forceRefresh = options.forceRefresh;\n\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\n\t function getCurrentLocation(historyState) {\n\t historyState = historyState || window.history.state || {};\n\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path);\n\t }\n\n\t var location = _parsePath2['default'](path);\n\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\n\t if (action === _Actions.POP) return; // Nothing to do.\n\n\t _DOMStateStorage.saveState(key, state);\n\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listenBefore(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listen(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t history.registerTransitionHook(hook);\n\t }\n\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n\t var forceRefresh = options.forceRefresh;\n\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\n\t function getCurrentLocation(historyState) {\n\t historyState = historyState || window.history.state || {};\n\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path);\n\t }\n\n\t var location = _PathUtils.parsePath(path);\n\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\n\t if (action === _Actions.POP) return; // Nothing to do.\n\n\t _DOMStateStorage.saveState(key, state);\n\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listenBefore(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listen(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t history.registerTransitionHook(hook);\n\t }\n\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n\t var forceRefresh = options.forceRefresh;\n\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\n\t var location = _PathUtils.parsePath(path);\n\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\n\t if (action === _Actions.POP) return; // Nothing to do.\n\n\t _DOMStateStorage.saveState(key, state);\n\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listenBefore(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listen(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t history.registerTransitionHook(hook);\n\t }\n\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n\t var forceRefresh = options.forceRefresh;\n\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\n\t var location = _PathUtils.parsePath(path);\n\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\n\t if (action === _Actions.POP) return; // Nothing to do.\n\n\t _DOMStateStorage.saveState(key, state);\n\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listenBefore(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listen(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t history.registerTransitionHook(hook);\n\t }\n\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n\t var forceRefresh = options.forceRefresh;\n\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\n\t var location = _PathUtils.parsePath(path);\n\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\n\t if (action === _Actions.POP) return; // Nothing to do.\n\n\t _DOMStateStorage.saveState(key, state);\n\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listenBefore(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listen(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t history.registerTransitionHook(hook);\n\t }\n\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n\t var forceRefresh = options.forceRefresh;\n\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\n\t var location = _PathUtils.parsePath(path);\n\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\n\t if (action === _Actions.POP) return; // Nothing to do.\n\n\t _DOMStateStorage.saveState(key, state);\n\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listenBefore(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listen(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t history.registerTransitionHook(hook);\n\t }\n\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n\t var forceRefresh = options.forceRefresh;\n\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\n\t var location = _PathUtils.parsePath(path);\n\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\n\t if (action === _Actions.POP) return; // Nothing to do.\n\n\t _DOMStateStorage.saveState(key, state);\n\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listenBefore(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listen(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t history.registerTransitionHook(hook);\n\t }\n\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n\t var forceRefresh = options.forceRefresh;\n\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\n\t var location = _PathUtils.parsePath(path);\n\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\n\t if (action === _Actions.POP) return; // Nothing to do.\n\n\t _DOMStateStorage.saveState(key, state);\n\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listenBefore(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listen(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t history.registerTransitionHook(hook);\n\t }\n\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n\t var forceRefresh = options.forceRefresh;\n\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\n\t var location = _PathUtils.parsePath(path);\n\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\n\t if (action === _Actions.POP) return; // Nothing to do.\n\n\t _DOMStateStorage.saveState(key, state);\n\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listenBefore(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listen(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t history.registerTransitionHook(hook);\n\t }\n\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory(){var options=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];!_ExecutionEnvironment.canUseDOM?process.env.NODE_ENV!=='production'?_invariant2['default'](false,'Browser history needs a DOM'):_invariant2['default'](false):undefined;var forceRefresh=options.forceRefresh;var isSupported=_DOMUtils.supportsHistory();var useRefresh=!isSupported||forceRefresh;function getCurrentLocation(historyState){historyState=historyState||window.history.state||{};var path=_DOMUtils.getWindowPath();var _historyState=historyState;var key=_historyState.key;var state=undefined;if(key){state=_DOMStateStorage.readState(key);}else {state=null;key=history.createKey();if(isSupported)window.history.replaceState(_extends({},historyState,{key:key}),null);}var location=_PathUtils.parsePath(path);return history.createLocation(_extends({},location,{state:state}),undefined,key);}function startPopStateListener(_ref){var transitionTo=_ref.transitionTo;function popStateListener(event){if(event.state===undefined)return; // Ignore extraneous popstate events in WebKit.\n\ttransitionTo(getCurrentLocation(event.state));}_DOMUtils.addEventListener(window,'popstate',popStateListener);return function(){_DOMUtils.removeEventListener(window,'popstate',popStateListener);};}function finishTransition(location){var basename=location.basename;var pathname=location.pathname;var search=location.search;var hash=location.hash;var state=location.state;var action=location.action;var key=location.key;if(action===_Actions.POP)return; // Nothing to do.\n\t_DOMStateStorage.saveState(key,state);var path=(basename||'')+pathname+search+hash;var historyState={key:key};if(action===_Actions.PUSH){if(useRefresh){window.location.href=path;return false; // Prevent location update.\n\t}else {window.history.pushState(historyState,null,path);}}else { // REPLACE\n\tif(useRefresh){window.location.replace(path);return false; // Prevent location update.\n\t}else {window.history.replaceState(historyState,null,path);}}}var history=_createDOMHistory2['default'](_extends({},options,{getCurrentLocation:getCurrentLocation,finishTransition:finishTransition,saveState:_DOMStateStorage.saveState}));var listenerCount=0,stopPopStateListener=undefined;function listenBefore(listener){if(++listenerCount===1)stopPopStateListener=startPopStateListener(history);var unlisten=history.listenBefore(listener);return function(){unlisten();if(--listenerCount===0)stopPopStateListener();};}function listen(listener){if(++listenerCount===1)stopPopStateListener=startPopStateListener(history);var unlisten=history.listen(listener);return function(){unlisten();if(--listenerCount===0)stopPopStateListener();};} // deprecated\n\tfunction registerTransitionHook(hook){if(++listenerCount===1)stopPopStateListener=startPopStateListener(history);history.registerTransitionHook(hook);} // deprecated\n\tfunction unregisterTransitionHook(hook){history.unregisterTransitionHook(hook);if(--listenerCount===0)stopPopStateListener();}return _extends({},history,{listenBefore:listenBefore,listen:listen,registerTransitionHook:registerTransitionHook,unregisterTransitionHook:unregisterTransitionHook});}", "function createBrowserHistory(){var options=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];!_ExecutionEnvironment.canUseDOM?process.env.NODE_ENV!=='production'?_invariant2['default'](false,'Browser history needs a DOM'):_invariant2['default'](false):undefined;var forceRefresh=options.forceRefresh;var isSupported=_DOMUtils.supportsHistory();var useRefresh=!isSupported||forceRefresh;function getCurrentLocation(historyState){historyState=historyState||window.history.state||{};var path=_DOMUtils.getWindowPath();var _historyState=historyState;var key=_historyState.key;var state=undefined;if(key){state=_DOMStateStorage.readState(key);}else {state=null;key=history.createKey();if(isSupported)window.history.replaceState(_extends({},historyState,{key:key}),null);}var location=_PathUtils.parsePath(path);return history.createLocation(_extends({},location,{state:state}),undefined,key);}function startPopStateListener(_ref){var transitionTo=_ref.transitionTo;function popStateListener(event){if(event.state===undefined)return; // Ignore extraneous popstate events in WebKit.\n\ttransitionTo(getCurrentLocation(event.state));}_DOMUtils.addEventListener(window,'popstate',popStateListener);return function(){_DOMUtils.removeEventListener(window,'popstate',popStateListener);};}function finishTransition(location){var basename=location.basename;var pathname=location.pathname;var search=location.search;var hash=location.hash;var state=location.state;var action=location.action;var key=location.key;if(action===_Actions.POP)return; // Nothing to do.\n\t_DOMStateStorage.saveState(key,state);var path=(basename||'')+pathname+search+hash;var historyState={key:key};if(action===_Actions.PUSH){if(useRefresh){window.location.href=path;return false; // Prevent location update.\n\t}else {window.history.pushState(historyState,null,path);}}else { // REPLACE\n\tif(useRefresh){window.location.replace(path);return false; // Prevent location update.\n\t}else {window.history.replaceState(historyState,null,path);}}}var history=_createDOMHistory2['default'](_extends({},options,{getCurrentLocation:getCurrentLocation,finishTransition:finishTransition,saveState:_DOMStateStorage.saveState}));var listenerCount=0,stopPopStateListener=undefined;function listenBefore(listener){if(++listenerCount===1)stopPopStateListener=startPopStateListener(history);var unlisten=history.listenBefore(listener);return function(){unlisten();if(--listenerCount===0)stopPopStateListener();};}function listen(listener){if(++listenerCount===1)stopPopStateListener=startPopStateListener(history);var unlisten=history.listen(listener);return function(){unlisten();if(--listenerCount===0)stopPopStateListener();};} // deprecated\n\tfunction registerTransitionHook(hook){if(++listenerCount===1)stopPopStateListener=startPopStateListener(history);history.registerTransitionHook(hook);} // deprecated\n\tfunction unregisterTransitionHook(hook){history.unregisterTransitionHook(hook);if(--listenerCount===0)stopPopStateListener();}return _extends({},history,{listenBefore:listenBefore,listen:listen,registerTransitionHook:registerTransitionHook,unregisterTransitionHook:unregisterTransitionHook});}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n\t var forceRefresh = options.forceRefresh;\n\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\n\t function getCurrentLocation(historyState) {\n\t historyState = historyState || window.history.state || {};\n\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\n\t var location = _PathUtils.parsePath(path);\n\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\n\t if (action === _Actions.POP) return; // Nothing to do.\n\n\t _DOMStateStorage.saveState(key, state);\n\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listenBefore(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listen(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t history.registerTransitionHook(hook);\n\t }\n\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n\t var forceRefresh = options.forceRefresh;\n\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\n\t function getCurrentLocation(historyState) {\n\t historyState = historyState || window.history.state || {};\n\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\n\t var location = _PathUtils.parsePath(path);\n\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\n\t if (action === _Actions.POP) return; // Nothing to do.\n\n\t _DOMStateStorage.saveState(key, state);\n\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listenBefore(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t var unlisten = history.listen(listener);\n\n\t return function () {\n\t unlisten();\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n\t history.registerTransitionHook(hook);\n\t }\n\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory(){var options=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];!_ExecutionEnvironment.canUseDOM?process.env.NODE_ENV!=='production'?_invariant2['default'](false,'Browser history needs a DOM'):_invariant2['default'](false):undefined;var forceRefresh=options.forceRefresh;var isSupported=_DOMUtils.supportsHistory();var useRefresh=!isSupported||forceRefresh;function getCurrentLocation(historyState){try{historyState=historyState||window.history.state||{};}catch(e){historyState={};}var path=_DOMUtils.getWindowPath();var _historyState=historyState;var key=_historyState.key;var state=undefined;if(key){state=_DOMStateStorage.readState(key);}else {state=null;key=history.createKey();if(isSupported)window.history.replaceState(_extends({},historyState,{key:key}),null);}var location=_PathUtils.parsePath(path);return history.createLocation(_extends({},location,{state:state}),undefined,key);}function startPopStateListener(_ref){var transitionTo=_ref.transitionTo;function popStateListener(event){if(event.state===undefined)return; // Ignore extraneous popstate events in WebKit.\ntransitionTo(getCurrentLocation(event.state));}_DOMUtils.addEventListener(window,'popstate',popStateListener);return function(){_DOMUtils.removeEventListener(window,'popstate',popStateListener);};}function finishTransition(location){var basename=location.basename;var pathname=location.pathname;var search=location.search;var hash=location.hash;var state=location.state;var action=location.action;var key=location.key;if(action===_Actions.POP)return; // Nothing to do.\n_DOMStateStorage.saveState(key,state);var path=(basename||'')+pathname+search+hash;var historyState={key:key};if(action===_Actions.PUSH){if(useRefresh){window.location.href=path;return false; // Prevent location update.\n}else {window.history.pushState(historyState,null,path);}}else { // REPLACE\nif(useRefresh){window.location.replace(path);return false; // Prevent location update.\n}else {window.history.replaceState(historyState,null,path);}}}var history=_createDOMHistory2['default'](_extends({},options,{getCurrentLocation:getCurrentLocation,finishTransition:finishTransition,saveState:_DOMStateStorage.saveState}));var listenerCount=0,stopPopStateListener=undefined;function listenBefore(listener){if(++listenerCount===1)stopPopStateListener=startPopStateListener(history);var unlisten=history.listenBefore(listener);return function(){unlisten();if(--listenerCount===0)stopPopStateListener();};}function listen(listener){if(++listenerCount===1)stopPopStateListener=startPopStateListener(history);var unlisten=history.listen(listener);return function(){unlisten();if(--listenerCount===0)stopPopStateListener();};} // deprecated\nfunction registerTransitionHook(hook){if(++listenerCount===1)stopPopStateListener=startPopStateListener(history);history.registerTransitionHook(hook);} // deprecated\nfunction unregisterTransitionHook(hook){history.unregisterTransitionHook(hook);if(--listenerCount===0)stopPopStateListener();}return _extends({},history,{listenBefore:listenBefore,listen:listen,registerTransitionHook:registerTransitionHook,unregisterTransitionHook:unregisterTransitionHook});}", "function createBrowserHistory(props){if(props===void 0){props={};}!canUseDOM? true?Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(false,'Browser history needs a DOM'):undefined:void 0;var globalHistory=window.history;var canUseHistory=supportsHistory();var needsHashChangeListener=!supportsPopStateOnHashChange();var _props=props,_props$forceRefresh=_props.forceRefresh,forceRefresh=_props$forceRefresh===void 0?false:_props$forceRefresh,_props$getUserConfirm=_props.getUserConfirmation,getUserConfirmation=_props$getUserConfirm===void 0?getConfirmation:_props$getUserConfirm,_props$keyLength=_props.keyLength,keyLength=_props$keyLength===void 0?6:_props$keyLength;var basename=props.basename?stripTrailingSlash(addLeadingSlash(props.basename)):'';function getDOMLocation(historyState){var _ref=historyState||{},key=_ref.key,state=_ref.state;var _window$location=window.location,pathname=_window$location.pathname,search=_window$location.search,hash=_window$location.hash;var path=pathname+search+hash; true?Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!basename||hasBasename(path,basename),'You are attempting to use a basename on a page whose URL path does not begin '+'with the basename. Expected path \"'+path+'\" to begin with \"'+basename+'\".'):undefined;if(basename)path=stripBasename(path,basename);return createLocation(path,state,key);}function createKey(){return Math.random().toString(36).substr(2,keyLength);}var transitionManager=createTransitionManager();function setState(nextState){Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(history,nextState);history.length=globalHistory.length;transitionManager.notifyListeners(history.location,history.action);}function handlePopState(event){// Ignore extraneous popstate events in WebKit.\nif(isExtraneousPopstateEvent(event))return;handlePop(getDOMLocation(event.state));}function handleHashChange(){handlePop(getDOMLocation(getHistoryState()));}var forceNextPop=false;function handlePop(location){if(forceNextPop){forceNextPop=false;setState();}else{var action='POP';transitionManager.confirmTransitionTo(location,action,getUserConfirmation,function(ok){if(ok){setState({action:action,location:location});}else{revertPop(location);}});}}function revertPop(fromLocation){var toLocation=history.location;// TODO: We could probably make this more reliable by\n// keeping a list of keys we've seen in sessionStorage.\n// Instead, we just default to 0 for keys we don't know.\nvar toIndex=allKeys.indexOf(toLocation.key);if(toIndex===-1)toIndex=0;var fromIndex=allKeys.indexOf(fromLocation.key);if(fromIndex===-1)fromIndex=0;var delta=toIndex-fromIndex;if(delta){forceNextPop=true;go(delta);}}var initialLocation=getDOMLocation(getHistoryState());var allKeys=[initialLocation.key];// Public interface\nfunction createHref(location){return basename+createPath(location);}function push(path,state){ true?Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!(_typeof(path)==='object'&&path.state!==undefined&&state!==undefined),'You should avoid providing a 2nd state argument to push when the 1st '+'argument is a location-like object that already has state; it is ignored'):undefined;var action='PUSH';var location=createLocation(path,state,createKey(),history.location);transitionManager.confirmTransitionTo(location,action,getUserConfirmation,function(ok){if(!ok)return;var href=createHref(location);var key=location.key,state=location.state;if(canUseHistory){globalHistory.pushState({key:key,state:state},null,href);if(forceRefresh){window.location.href=href;}else{var prevIndex=allKeys.indexOf(history.location.key);var nextKeys=allKeys.slice(0,prevIndex===-1?0:prevIndex+1);nextKeys.push(location.key);allKeys=nextKeys;setState({action:action,location:location});}}else{ true?Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(state===undefined,'Browser history cannot push state in browsers that do not support HTML5 history'):undefined;window.location.href=href;}});}function replace(path,state){ true?Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!(_typeof(path)==='object'&&path.state!==undefined&&state!==undefined),'You should avoid providing a 2nd state argument to replace when the 1st '+'argument is a location-like object that already has state; it is ignored'):undefined;var action='REPLACE';var location=createLocation(path,state,createKey(),history.location);transitionManager.confirmTransitionTo(location,action,getUserConfirmation,function(ok){if(!ok)return;var href=createHref(location);var key=location.key,state=location.state;if(canUseHistory){globalHistory.replaceState({key:key,state:state},null,href);if(forceRefresh){window.location.replace(href);}else{var prevIndex=allKeys.indexOf(history.location.key);if(prevIndex!==-1)allKeys[prevIndex]=location.key;setState({action:action,location:location});}}else{ true?Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(state===undefined,'Browser history cannot replace state in browsers that do not support HTML5 history'):undefined;window.location.replace(href);}});}function go(n){globalHistory.go(n);}function goBack(){go(-1);}function goForward(){go(1);}var listenerCount=0;function checkDOMListeners(delta){listenerCount+=delta;if(listenerCount===1&&delta===1){window.addEventListener(PopStateEvent,handlePopState);if(needsHashChangeListener)window.addEventListener(HashChangeEvent,handleHashChange);}else if(listenerCount===0){window.removeEventListener(PopStateEvent,handlePopState);if(needsHashChangeListener)window.removeEventListener(HashChangeEvent,handleHashChange);}}var isBlocked=false;function block(prompt){if(prompt===void 0){prompt=false;}var unblock=transitionManager.setPrompt(prompt);if(!isBlocked){checkDOMListeners(1);isBlocked=true;}return function(){if(isBlocked){isBlocked=false;checkDOMListeners(-1);}return unblock();};}function listen(listener){var unlisten=transitionManager.appendListener(listener);checkDOMListeners(1);return function(){checkDOMListeners(-1);unlisten();};}var history={length:globalHistory.length,action:'POP',location:initialLocation,createHref:createHref,push:push,replace:replace,go:go,goBack:goBack,goForward:goForward,block:block,listen:listen};return history;}", "function createBrowserHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n var forceRefresh = options.forceRefresh;\n\n var isSupported = _DOMUtils.supportsHistory();\n var useRefresh = !isSupported || forceRefresh;\n\n function getCurrentLocation(historyState) {\n historyState = historyState || window.history.state || {};\n\n var path = _DOMUtils.getWindowPath();\n var _historyState = historyState;\n var key = _historyState.key;\n\n var state = undefined;\n if (key) {\n state = _DOMStateStorage.readState(key);\n } else {\n state = null;\n key = history.createKey();\n\n if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path);\n }\n\n var location = _PathUtils.parsePath(path);\n\n return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n }\n\n function startPopStateListener(_ref) {\n var transitionTo = _ref.transitionTo;\n\n function popStateListener(event) {\n if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n transitionTo(getCurrentLocation(event.state));\n }\n\n _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n return function () {\n _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n };\n }\n\n function finishTransition(location) {\n var basename = location.basename;\n var pathname = location.pathname;\n var search = location.search;\n var hash = location.hash;\n var state = location.state;\n var action = location.action;\n var key = location.key;\n\n if (action === _Actions.POP) return; // Nothing to do.\n\n _DOMStateStorage.saveState(key, state);\n\n var path = (basename || '') + pathname + search + hash;\n var historyState = {\n key: key\n };\n\n if (action === _Actions.PUSH) {\n if (useRefresh) {\n window.location.href = path;\n return false; // Prevent location update.\n } else {\n window.history.pushState(historyState, null, path);\n }\n } else {\n // REPLACE\n if (useRefresh) {\n window.location.replace(path);\n return false; // Prevent location update.\n } else {\n window.history.replaceState(historyState, null, path);\n }\n }\n }\n\n var history = _createDOMHistory2['default'](_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n finishTransition: finishTransition,\n saveState: _DOMStateStorage.saveState\n }));\n\n var listenerCount = 0,\n stopPopStateListener = undefined;\n\n function listenBefore(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listenBefore(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n function listen(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n // deprecated\n function registerTransitionHook(hook) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n history.registerTransitionHook(hook);\n }\n\n // deprecated\n function unregisterTransitionHook(hook) {\n history.unregisterTransitionHook(hook);\n\n if (--listenerCount === 0) stopPopStateListener();\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n registerTransitionHook: registerTransitionHook,\n unregisterTransitionHook: unregisterTransitionHook\n });\n}", "function createBrowserHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? undefined !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n var forceRefresh = options.forceRefresh;\n\n var isSupported = _DOMUtils.supportsHistory();\n var useRefresh = !isSupported || forceRefresh;\n\n function getCurrentLocation(historyState) {\n try {\n historyState = historyState || window.history.state || {};\n } catch (e) {\n historyState = {};\n }\n\n var path = _DOMUtils.getWindowPath();\n var _historyState = historyState;\n var key = _historyState.key;\n\n var state = undefined;\n if (key) {\n state = _DOMStateStorage.readState(key);\n } else {\n state = null;\n key = history.createKey();\n\n if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n }\n\n var location = _PathUtils.parsePath(path);\n\n return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n }\n\n function startPopStateListener(_ref) {\n var transitionTo = _ref.transitionTo;\n\n function popStateListener(event) {\n if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n transitionTo(getCurrentLocation(event.state));\n }\n\n _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n return function () {\n _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n };\n }\n\n function finishTransition(location) {\n var basename = location.basename;\n var pathname = location.pathname;\n var search = location.search;\n var hash = location.hash;\n var state = location.state;\n var action = location.action;\n var key = location.key;\n\n if (action === _Actions.POP) return; // Nothing to do.\n\n _DOMStateStorage.saveState(key, state);\n\n var path = (basename || '') + pathname + search + hash;\n var historyState = {\n key: key\n };\n\n if (action === _Actions.PUSH) {\n if (useRefresh) {\n window.location.href = path;\n return false; // Prevent location update.\n } else {\n window.history.pushState(historyState, null, path);\n }\n } else {\n // REPLACE\n if (useRefresh) {\n window.location.replace(path);\n return false; // Prevent location update.\n } else {\n window.history.replaceState(historyState, null, path);\n }\n }\n }\n\n var history = _createDOMHistory2['default'](_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n finishTransition: finishTransition,\n saveState: _DOMStateStorage.saveState\n }));\n\n var listenerCount = 0,\n stopPopStateListener = undefined;\n\n function listenBefore(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listenBefore(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n function listen(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n // deprecated\n function registerTransitionHook(hook) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n history.registerTransitionHook(hook);\n }\n\n // deprecated\n function unregisterTransitionHook(hook) {\n history.unregisterTransitionHook(hook);\n\n if (--listenerCount === 0) stopPopStateListener();\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n registerTransitionHook: registerTransitionHook,\n unregisterTransitionHook: unregisterTransitionHook\n });\n}", "function createBrowserHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n var forceRefresh = options.forceRefresh;\n\n var isSupported = _DOMUtils.supportsHistory();\n var useRefresh = !isSupported || forceRefresh;\n\n function getCurrentLocation(historyState) {\n historyState = historyState || window.history.state || {};\n\n var path = _DOMUtils.getWindowPath();\n var _historyState = historyState;\n var key = _historyState.key;\n\n var state = undefined;\n if (key) {\n state = _DOMStateStorage.readState(key);\n } else {\n state = null;\n key = history.createKey();\n\n if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path);\n }\n\n var location = _parsePath2['default'](path);\n\n return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n }\n\n function startPopStateListener(_ref) {\n var transitionTo = _ref.transitionTo;\n\n function popStateListener(event) {\n if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n transitionTo(getCurrentLocation(event.state));\n }\n\n _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n return function () {\n _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n };\n }\n\n function finishTransition(location) {\n var basename = location.basename;\n var pathname = location.pathname;\n var search = location.search;\n var hash = location.hash;\n var state = location.state;\n var action = location.action;\n var key = location.key;\n\n if (action === _Actions.POP) return; // Nothing to do.\n\n _DOMStateStorage.saveState(key, state);\n\n var path = (basename || '') + pathname + search + hash;\n var historyState = {\n key: key\n };\n\n if (action === _Actions.PUSH) {\n if (useRefresh) {\n window.location.href = path;\n return false; // Prevent location update.\n } else {\n window.history.pushState(historyState, null, path);\n }\n } else {\n // REPLACE\n if (useRefresh) {\n window.location.replace(path);\n return false; // Prevent location update.\n } else {\n window.history.replaceState(historyState, null, path);\n }\n }\n }\n\n var history = _createDOMHistory2['default'](_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n finishTransition: finishTransition,\n saveState: _DOMStateStorage.saveState\n }));\n\n var listenerCount = 0,\n stopPopStateListener = undefined;\n\n function listenBefore(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listenBefore(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n function listen(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n // deprecated\n function registerTransitionHook(hook) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n history.registerTransitionHook(hook);\n }\n\n // deprecated\n function unregisterTransitionHook(hook) {\n history.unregisterTransitionHook(hook);\n\n if (--listenerCount === 0) stopPopStateListener();\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n registerTransitionHook: registerTransitionHook,\n unregisterTransitionHook: unregisterTransitionHook\n });\n}", "function createBrowserHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n var forceRefresh = options.forceRefresh;\n\n var isSupported = _DOMUtils.supportsHistory();\n var useRefresh = !isSupported || forceRefresh;\n\n function getCurrentLocation(historyState) {\n historyState = historyState || window.history.state || {};\n\n var path = _DOMUtils.getWindowPath();\n var _historyState = historyState;\n var key = _historyState.key;\n\n var state = undefined;\n if (key) {\n state = _DOMStateStorage.readState(key);\n } else {\n state = null;\n key = history.createKey();\n\n if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path);\n }\n\n var location = _parsePath2['default'](path);\n\n return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n }\n\n function startPopStateListener(_ref) {\n var transitionTo = _ref.transitionTo;\n\n function popStateListener(event) {\n if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n transitionTo(getCurrentLocation(event.state));\n }\n\n _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n return function () {\n _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n };\n }\n\n function finishTransition(location) {\n var basename = location.basename;\n var pathname = location.pathname;\n var search = location.search;\n var hash = location.hash;\n var state = location.state;\n var action = location.action;\n var key = location.key;\n\n if (action === _Actions.POP) return; // Nothing to do.\n\n _DOMStateStorage.saveState(key, state);\n\n var path = (basename || '') + pathname + search + hash;\n var historyState = {\n key: key\n };\n\n if (action === _Actions.PUSH) {\n if (useRefresh) {\n window.location.href = path;\n return false; // Prevent location update.\n } else {\n window.history.pushState(historyState, null, path);\n }\n } else {\n // REPLACE\n if (useRefresh) {\n window.location.replace(path);\n return false; // Prevent location update.\n } else {\n window.history.replaceState(historyState, null, path);\n }\n }\n }\n\n var history = _createDOMHistory2['default'](_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n finishTransition: finishTransition,\n saveState: _DOMStateStorage.saveState\n }));\n\n var listenerCount = 0,\n stopPopStateListener = undefined;\n\n function listenBefore(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listenBefore(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n function listen(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n // deprecated\n function registerTransitionHook(hook) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n history.registerTransitionHook(hook);\n }\n\n // deprecated\n function unregisterTransitionHook(hook) {\n history.unregisterTransitionHook(hook);\n\n if (--listenerCount === 0) stopPopStateListener();\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n registerTransitionHook: registerTransitionHook,\n unregisterTransitionHook: unregisterTransitionHook\n });\n}", "function createBrowserHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n var forceRefresh = options.forceRefresh;\n\n var isSupported = _DOMUtils.supportsHistory();\n var useRefresh = !isSupported || forceRefresh;\n\n function getCurrentLocation(historyState) {\n historyState = historyState || window.history.state || {};\n\n var path = _DOMUtils.getWindowPath();\n var _historyState = historyState;\n var key = _historyState.key;\n\n var state = undefined;\n if (key) {\n state = _DOMStateStorage.readState(key);\n } else {\n state = null;\n key = history.createKey();\n\n if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path);\n }\n\n var location = _parsePath2['default'](path);\n\n return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n }\n\n function startPopStateListener(_ref) {\n var transitionTo = _ref.transitionTo;\n\n function popStateListener(event) {\n if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n transitionTo(getCurrentLocation(event.state));\n }\n\n _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n return function () {\n _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n };\n }\n\n function finishTransition(location) {\n var basename = location.basename;\n var pathname = location.pathname;\n var search = location.search;\n var hash = location.hash;\n var state = location.state;\n var action = location.action;\n var key = location.key;\n\n if (action === _Actions.POP) return; // Nothing to do.\n\n _DOMStateStorage.saveState(key, state);\n\n var path = (basename || '') + pathname + search + hash;\n var historyState = {\n key: key\n };\n\n if (action === _Actions.PUSH) {\n if (useRefresh) {\n window.location.href = path;\n return false; // Prevent location update.\n } else {\n window.history.pushState(historyState, null, path);\n }\n } else {\n // REPLACE\n if (useRefresh) {\n window.location.replace(path);\n return false; // Prevent location update.\n } else {\n window.history.replaceState(historyState, null, path);\n }\n }\n }\n\n var history = _createDOMHistory2['default'](_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n finishTransition: finishTransition,\n saveState: _DOMStateStorage.saveState\n }));\n\n var listenerCount = 0,\n stopPopStateListener = undefined;\n\n function listenBefore(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listenBefore(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n function listen(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n // deprecated\n function registerTransitionHook(hook) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n history.registerTransitionHook(hook);\n }\n\n // deprecated\n function unregisterTransitionHook(hook) {\n history.unregisterTransitionHook(hook);\n\n if (--listenerCount === 0) stopPopStateListener();\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n registerTransitionHook: registerTransitionHook,\n unregisterTransitionHook: unregisterTransitionHook\n });\n}", "function createBrowserHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n var forceRefresh = options.forceRefresh;\n\n var isSupported = _DOMUtils.supportsHistory();\n var useRefresh = !isSupported || forceRefresh;\n\n function getCurrentLocation(historyState) {\n historyState = historyState || window.history.state || {};\n\n var path = _DOMUtils.getWindowPath();\n var _historyState = historyState;\n var key = _historyState.key;\n\n var state = undefined;\n if (key) {\n state = _DOMStateStorage.readState(key);\n } else {\n state = null;\n key = history.createKey();\n\n if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path);\n }\n\n var location = _parsePath2['default'](path);\n\n return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n }\n\n function startPopStateListener(_ref) {\n var transitionTo = _ref.transitionTo;\n\n function popStateListener(event) {\n if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n transitionTo(getCurrentLocation(event.state));\n }\n\n _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n return function () {\n _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n };\n }\n\n function finishTransition(location) {\n var basename = location.basename;\n var pathname = location.pathname;\n var search = location.search;\n var hash = location.hash;\n var state = location.state;\n var action = location.action;\n var key = location.key;\n\n if (action === _Actions.POP) return; // Nothing to do.\n\n _DOMStateStorage.saveState(key, state);\n\n var path = (basename || '') + pathname + search + hash;\n var historyState = {\n key: key\n };\n\n if (action === _Actions.PUSH) {\n if (useRefresh) {\n window.location.href = path;\n return false; // Prevent location update.\n } else {\n window.history.pushState(historyState, null, path);\n }\n } else {\n // REPLACE\n if (useRefresh) {\n window.location.replace(path);\n return false; // Prevent location update.\n } else {\n window.history.replaceState(historyState, null, path);\n }\n }\n }\n\n var history = _createDOMHistory2['default'](_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n finishTransition: finishTransition,\n saveState: _DOMStateStorage.saveState\n }));\n\n var listenerCount = 0,\n stopPopStateListener = undefined;\n\n function listenBefore(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listenBefore(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n function listen(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n // deprecated\n function registerTransitionHook(hook) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n history.registerTransitionHook(hook);\n }\n\n // deprecated\n function unregisterTransitionHook(hook) {\n history.unregisterTransitionHook(hook);\n\n if (--listenerCount === 0) stopPopStateListener();\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n registerTransitionHook: registerTransitionHook,\n unregisterTransitionHook: unregisterTransitionHook\n });\n}", "function createBrowserHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? true ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n var forceRefresh = options.forceRefresh;\n\n var isSupported = _DOMUtils.supportsHistory();\n var useRefresh = !isSupported || forceRefresh;\n\n function getCurrentLocation(historyState) {\n try {\n historyState = historyState || window.history.state || {};\n } catch (e) {\n historyState = {};\n }\n\n var path = _DOMUtils.getWindowPath();\n var _historyState = historyState;\n var key = _historyState.key;\n\n var state = undefined;\n if (key) {\n state = _DOMStateStorage.readState(key);\n } else {\n state = null;\n key = history.createKey();\n\n if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n }\n\n var location = _PathUtils.parsePath(path);\n\n return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n }\n\n function startPopStateListener(_ref) {\n var transitionTo = _ref.transitionTo;\n\n function popStateListener(event) {\n if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n transitionTo(getCurrentLocation(event.state));\n }\n\n _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n return function () {\n _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n };\n }\n\n function finishTransition(location) {\n var basename = location.basename;\n var pathname = location.pathname;\n var search = location.search;\n var hash = location.hash;\n var state = location.state;\n var action = location.action;\n var key = location.key;\n\n if (action === _Actions.POP) return; // Nothing to do.\n\n _DOMStateStorage.saveState(key, state);\n\n var path = (basename || '') + pathname + search + hash;\n var historyState = {\n key: key\n };\n\n if (action === _Actions.PUSH) {\n if (useRefresh) {\n window.location.href = path;\n return false; // Prevent location update.\n } else {\n window.history.pushState(historyState, null, path);\n }\n } else {\n // REPLACE\n if (useRefresh) {\n window.location.replace(path);\n return false; // Prevent location update.\n } else {\n window.history.replaceState(historyState, null, path);\n }\n }\n }\n\n var history = _createDOMHistory2['default'](_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n finishTransition: finishTransition,\n saveState: _DOMStateStorage.saveState\n }));\n\n var listenerCount = 0,\n stopPopStateListener = undefined;\n\n function listenBefore(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listenBefore(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n function listen(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n // deprecated\n function registerTransitionHook(hook) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n history.registerTransitionHook(hook);\n }\n\n // deprecated\n function unregisterTransitionHook(hook) {\n history.unregisterTransitionHook(hook);\n\n if (--listenerCount === 0) stopPopStateListener();\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n registerTransitionHook: registerTransitionHook,\n unregisterTransitionHook: unregisterTransitionHook\n });\n}", "function createBrowserHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? true ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n var forceRefresh = options.forceRefresh;\n\n var isSupported = _DOMUtils.supportsHistory();\n var useRefresh = !isSupported || forceRefresh;\n\n function getCurrentLocation(historyState) {\n try {\n historyState = historyState || window.history.state || {};\n } catch (e) {\n historyState = {};\n }\n\n var path = _DOMUtils.getWindowPath();\n var _historyState = historyState;\n var key = _historyState.key;\n\n var state = undefined;\n if (key) {\n state = _DOMStateStorage.readState(key);\n } else {\n state = null;\n key = history.createKey();\n\n if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n }\n\n var location = _PathUtils.parsePath(path);\n\n return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n }\n\n function startPopStateListener(_ref) {\n var transitionTo = _ref.transitionTo;\n\n function popStateListener(event) {\n if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n transitionTo(getCurrentLocation(event.state));\n }\n\n _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n return function () {\n _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n };\n }\n\n function finishTransition(location) {\n var basename = location.basename;\n var pathname = location.pathname;\n var search = location.search;\n var hash = location.hash;\n var state = location.state;\n var action = location.action;\n var key = location.key;\n\n if (action === _Actions.POP) return; // Nothing to do.\n\n _DOMStateStorage.saveState(key, state);\n\n var path = (basename || '') + pathname + search + hash;\n var historyState = {\n key: key\n };\n\n if (action === _Actions.PUSH) {\n if (useRefresh) {\n window.location.href = path;\n return false; // Prevent location update.\n } else {\n window.history.pushState(historyState, null, path);\n }\n } else {\n // REPLACE\n if (useRefresh) {\n window.location.replace(path);\n return false; // Prevent location update.\n } else {\n window.history.replaceState(historyState, null, path);\n }\n }\n }\n\n var history = _createDOMHistory2['default'](_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n finishTransition: finishTransition,\n saveState: _DOMStateStorage.saveState\n }));\n\n var listenerCount = 0,\n stopPopStateListener = undefined;\n\n function listenBefore(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listenBefore(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n function listen(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n // deprecated\n function registerTransitionHook(hook) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n history.registerTransitionHook(hook);\n }\n\n // deprecated\n function unregisterTransitionHook(hook) {\n history.unregisterTransitionHook(hook);\n\n if (--listenerCount === 0) stopPopStateListener();\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n registerTransitionHook: registerTransitionHook,\n unregisterTransitionHook: unregisterTransitionHook\n });\n}", "function createBrowserHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n var forceRefresh = options.forceRefresh;\n\n var isSupported = _DOMUtils.supportsHistory();\n var useRefresh = !isSupported || forceRefresh;\n\n function getCurrentLocation(historyState) {\n historyState = historyState || window.history.state || {};\n\n var path = _DOMUtils.getWindowPath();\n var _historyState = historyState;\n var key = _historyState.key;\n\n var state = undefined;\n if (key) {\n state = _DOMStateStorage.readState(key);\n } else {\n state = null;\n key = history.createKey();\n\n if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n }\n\n var location = _PathUtils.parsePath(path);\n\n return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n }\n\n function startPopStateListener(_ref) {\n var transitionTo = _ref.transitionTo;\n\n function popStateListener(event) {\n if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n transitionTo(getCurrentLocation(event.state));\n }\n\n _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n return function () {\n _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n };\n }\n\n function finishTransition(location) {\n var basename = location.basename;\n var pathname = location.pathname;\n var search = location.search;\n var hash = location.hash;\n var state = location.state;\n var action = location.action;\n var key = location.key;\n\n if (action === _Actions.POP) return; // Nothing to do.\n\n _DOMStateStorage.saveState(key, state);\n\n var path = (basename || '') + pathname + search + hash;\n var historyState = {\n key: key\n };\n\n if (action === _Actions.PUSH) {\n if (useRefresh) {\n window.location.href = path;\n return false; // Prevent location update.\n } else {\n window.history.pushState(historyState, null, path);\n }\n } else {\n // REPLACE\n if (useRefresh) {\n window.location.replace(path);\n return false; // Prevent location update.\n } else {\n window.history.replaceState(historyState, null, path);\n }\n }\n }\n\n var history = _createDOMHistory2['default'](_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n finishTransition: finishTransition,\n saveState: _DOMStateStorage.saveState\n }));\n\n var listenerCount = 0,\n stopPopStateListener = undefined;\n\n function listenBefore(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listenBefore(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n function listen(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n // deprecated\n function registerTransitionHook(hook) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n history.registerTransitionHook(hook);\n }\n\n // deprecated\n function unregisterTransitionHook(hook) {\n history.unregisterTransitionHook(hook);\n\n if (--listenerCount === 0) stopPopStateListener();\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n registerTransitionHook: registerTransitionHook,\n unregisterTransitionHook: unregisterTransitionHook\n });\n}", "function createBrowserHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n var forceRefresh = options.forceRefresh;\n\n var isSupported = _DOMUtils.supportsHistory();\n var useRefresh = !isSupported || forceRefresh;\n\n function getCurrentLocation(historyState) {\n try {\n historyState = historyState || window.history.state || {};\n } catch (e) {\n historyState = {};\n }\n\n var path = _DOMUtils.getWindowPath();\n var _historyState = historyState;\n var key = _historyState.key;\n\n var state = undefined;\n if (key) {\n state = _DOMStateStorage.readState(key);\n } else {\n state = null;\n key = history.createKey();\n\n if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n }\n\n var location = _PathUtils.parsePath(path);\n\n return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n }\n\n function startPopStateListener(_ref) {\n var transitionTo = _ref.transitionTo;\n\n function popStateListener(event) {\n if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n transitionTo(getCurrentLocation(event.state));\n }\n\n _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n return function () {\n _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n };\n }\n\n function finishTransition(location) {\n var basename = location.basename;\n var pathname = location.pathname;\n var search = location.search;\n var hash = location.hash;\n var state = location.state;\n var action = location.action;\n var key = location.key;\n\n if (action === _Actions.POP) return; // Nothing to do.\n\n _DOMStateStorage.saveState(key, state);\n\n var path = (basename || '') + pathname + search + hash;\n var historyState = {\n key: key\n };\n\n if (action === _Actions.PUSH) {\n if (useRefresh) {\n window.location.href = path;\n return false; // Prevent location update.\n } else {\n window.history.pushState(historyState, null, path);\n }\n } else {\n // REPLACE\n if (useRefresh) {\n window.location.replace(path);\n return false; // Prevent location update.\n } else {\n window.history.replaceState(historyState, null, path);\n }\n }\n }\n\n var history = _createDOMHistory2['default'](_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n finishTransition: finishTransition,\n saveState: _DOMStateStorage.saveState\n }));\n\n var listenerCount = 0,\n stopPopStateListener = undefined;\n\n function listenBefore(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listenBefore(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n function listen(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n // deprecated\n function registerTransitionHook(hook) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n history.registerTransitionHook(hook);\n }\n\n // deprecated\n function unregisterTransitionHook(hook) {\n history.unregisterTransitionHook(hook);\n\n if (--listenerCount === 0) stopPopStateListener();\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n registerTransitionHook: registerTransitionHook,\n unregisterTransitionHook: unregisterTransitionHook\n });\n}", "function createBrowserHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n var forceRefresh = options.forceRefresh;\n\n var isSupported = _DOMUtils.supportsHistory();\n var useRefresh = !isSupported || forceRefresh;\n\n function getCurrentLocation(historyState) {\n try {\n historyState = historyState || window.history.state || {};\n } catch (e) {\n historyState = {};\n }\n\n var path = _DOMUtils.getWindowPath();\n var _historyState = historyState;\n var key = _historyState.key;\n\n var state = undefined;\n if (key) {\n state = _DOMStateStorage.readState(key);\n } else {\n state = null;\n key = history.createKey();\n\n if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n }\n\n var location = _PathUtils.parsePath(path);\n\n return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n }\n\n function startPopStateListener(_ref) {\n var transitionTo = _ref.transitionTo;\n\n function popStateListener(event) {\n if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n transitionTo(getCurrentLocation(event.state));\n }\n\n _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n return function () {\n _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n };\n }\n\n function finishTransition(location) {\n var basename = location.basename;\n var pathname = location.pathname;\n var search = location.search;\n var hash = location.hash;\n var state = location.state;\n var action = location.action;\n var key = location.key;\n\n if (action === _Actions.POP) return; // Nothing to do.\n\n _DOMStateStorage.saveState(key, state);\n\n var path = (basename || '') + pathname + search + hash;\n var historyState = {\n key: key\n };\n\n if (action === _Actions.PUSH) {\n if (useRefresh) {\n window.location.href = path;\n return false; // Prevent location update.\n } else {\n window.history.pushState(historyState, null, path);\n }\n } else {\n // REPLACE\n if (useRefresh) {\n window.location.replace(path);\n return false; // Prevent location update.\n } else {\n window.history.replaceState(historyState, null, path);\n }\n }\n }\n\n var history = _createDOMHistory2['default'](_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n finishTransition: finishTransition,\n saveState: _DOMStateStorage.saveState\n }));\n\n var listenerCount = 0,\n stopPopStateListener = undefined;\n\n function listenBefore(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listenBefore(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n function listen(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n // deprecated\n function registerTransitionHook(hook) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n history.registerTransitionHook(hook);\n }\n\n // deprecated\n function unregisterTransitionHook(hook) {\n history.unregisterTransitionHook(hook);\n\n if (--listenerCount === 0) stopPopStateListener();\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n registerTransitionHook: registerTransitionHook,\n unregisterTransitionHook: unregisterTransitionHook\n });\n}", "function createBrowserHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n var forceRefresh = options.forceRefresh;\n\n var isSupported = _DOMUtils.supportsHistory();\n var useRefresh = !isSupported || forceRefresh;\n\n function getCurrentLocation(historyState) {\n try {\n historyState = historyState || window.history.state || {};\n } catch (e) {\n historyState = {};\n }\n\n var path = _DOMUtils.getWindowPath();\n var _historyState = historyState;\n var key = _historyState.key;\n\n var state = undefined;\n if (key) {\n state = _DOMStateStorage.readState(key);\n } else {\n state = null;\n key = history.createKey();\n\n if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n }\n\n var location = _PathUtils.parsePath(path);\n\n return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n }\n\n function startPopStateListener(_ref) {\n var transitionTo = _ref.transitionTo;\n\n function popStateListener(event) {\n if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n transitionTo(getCurrentLocation(event.state));\n }\n\n _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n return function () {\n _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n };\n }\n\n function finishTransition(location) {\n var basename = location.basename;\n var pathname = location.pathname;\n var search = location.search;\n var hash = location.hash;\n var state = location.state;\n var action = location.action;\n var key = location.key;\n\n if (action === _Actions.POP) return; // Nothing to do.\n\n _DOMStateStorage.saveState(key, state);\n\n var path = (basename || '') + pathname + search + hash;\n var historyState = {\n key: key\n };\n\n if (action === _Actions.PUSH) {\n if (useRefresh) {\n window.location.href = path;\n return false; // Prevent location update.\n } else {\n window.history.pushState(historyState, null, path);\n }\n } else {\n // REPLACE\n if (useRefresh) {\n window.location.replace(path);\n return false; // Prevent location update.\n } else {\n window.history.replaceState(historyState, null, path);\n }\n }\n }\n\n var history = _createDOMHistory2['default'](_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n finishTransition: finishTransition,\n saveState: _DOMStateStorage.saveState\n }));\n\n var listenerCount = 0,\n stopPopStateListener = undefined;\n\n function listenBefore(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listenBefore(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n function listen(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n // deprecated\n function registerTransitionHook(hook) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n history.registerTransitionHook(hook);\n }\n\n // deprecated\n function unregisterTransitionHook(hook) {\n history.unregisterTransitionHook(hook);\n\n if (--listenerCount === 0) stopPopStateListener();\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n registerTransitionHook: registerTransitionHook,\n unregisterTransitionHook: unregisterTransitionHook\n });\n}", "function createBrowserHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n var forceRefresh = options.forceRefresh;\n\n var isSupported = _DOMUtils.supportsHistory();\n var useRefresh = !isSupported || forceRefresh;\n\n function getCurrentLocation(historyState) {\n try {\n historyState = historyState || window.history.state || {};\n } catch (e) {\n historyState = {};\n }\n\n var path = _DOMUtils.getWindowPath();\n var _historyState = historyState;\n var key = _historyState.key;\n\n var state = undefined;\n if (key) {\n state = _DOMStateStorage.readState(key);\n } else {\n state = null;\n key = history.createKey();\n\n if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n }\n\n var location = _PathUtils.parsePath(path);\n\n return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n }\n\n function startPopStateListener(_ref) {\n var transitionTo = _ref.transitionTo;\n\n function popStateListener(event) {\n if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n transitionTo(getCurrentLocation(event.state));\n }\n\n _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n return function () {\n _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n };\n }\n\n function finishTransition(location) {\n var basename = location.basename;\n var pathname = location.pathname;\n var search = location.search;\n var hash = location.hash;\n var state = location.state;\n var action = location.action;\n var key = location.key;\n\n if (action === _Actions.POP) return; // Nothing to do.\n\n _DOMStateStorage.saveState(key, state);\n\n var path = (basename || '') + pathname + search + hash;\n var historyState = {\n key: key\n };\n\n if (action === _Actions.PUSH) {\n if (useRefresh) {\n window.location.href = path;\n return false; // Prevent location update.\n } else {\n window.history.pushState(historyState, null, path);\n }\n } else {\n // REPLACE\n if (useRefresh) {\n window.location.replace(path);\n return false; // Prevent location update.\n } else {\n window.history.replaceState(historyState, null, path);\n }\n }\n }\n\n var history = _createDOMHistory2['default'](_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n finishTransition: finishTransition,\n saveState: _DOMStateStorage.saveState\n }));\n\n var listenerCount = 0,\n stopPopStateListener = undefined;\n\n function listenBefore(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listenBefore(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n function listen(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n // deprecated\n function registerTransitionHook(hook) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n history.registerTransitionHook(hook);\n }\n\n // deprecated\n function unregisterTransitionHook(hook) {\n history.unregisterTransitionHook(hook);\n\n if (--listenerCount === 0) stopPopStateListener();\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n registerTransitionHook: registerTransitionHook,\n unregisterTransitionHook: unregisterTransitionHook\n });\n}", "function createBrowserHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n var forceRefresh = options.forceRefresh;\n\n var isSupported = _DOMUtils.supportsHistory();\n var useRefresh = !isSupported || forceRefresh;\n\n function getCurrentLocation(historyState) {\n try {\n historyState = historyState || window.history.state || {};\n } catch (e) {\n historyState = {};\n }\n\n var path = _DOMUtils.getWindowPath();\n var _historyState = historyState;\n var key = _historyState.key;\n\n var state = undefined;\n if (key) {\n state = _DOMStateStorage.readState(key);\n } else {\n state = null;\n key = history.createKey();\n\n if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n }\n\n var location = _PathUtils.parsePath(path);\n\n return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n }\n\n function startPopStateListener(_ref) {\n var transitionTo = _ref.transitionTo;\n\n function popStateListener(event) {\n if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n transitionTo(getCurrentLocation(event.state));\n }\n\n _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n return function () {\n _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n };\n }\n\n function finishTransition(location) {\n var basename = location.basename;\n var pathname = location.pathname;\n var search = location.search;\n var hash = location.hash;\n var state = location.state;\n var action = location.action;\n var key = location.key;\n\n if (action === _Actions.POP) return; // Nothing to do.\n\n _DOMStateStorage.saveState(key, state);\n\n var path = (basename || '') + pathname + search + hash;\n var historyState = {\n key: key\n };\n\n if (action === _Actions.PUSH) {\n if (useRefresh) {\n window.location.href = path;\n return false; // Prevent location update.\n } else {\n window.history.pushState(historyState, null, path);\n }\n } else {\n // REPLACE\n if (useRefresh) {\n window.location.replace(path);\n return false; // Prevent location update.\n } else {\n window.history.replaceState(historyState, null, path);\n }\n }\n }\n\n var history = _createDOMHistory2['default'](_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n finishTransition: finishTransition,\n saveState: _DOMStateStorage.saveState\n }));\n\n var listenerCount = 0,\n stopPopStateListener = undefined;\n\n function listenBefore(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listenBefore(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n function listen(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n // deprecated\n function registerTransitionHook(hook) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n history.registerTransitionHook(hook);\n }\n\n // deprecated\n function unregisterTransitionHook(hook) {\n history.unregisterTransitionHook(hook);\n\n if (--listenerCount === 0) stopPopStateListener();\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n registerTransitionHook: registerTransitionHook,\n unregisterTransitionHook: unregisterTransitionHook\n });\n}", "function createBrowserHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n var forceRefresh = options.forceRefresh;\n\n var isSupported = _DOMUtils.supportsHistory();\n var useRefresh = !isSupported || forceRefresh;\n\n function getCurrentLocation(historyState) {\n try {\n historyState = historyState || window.history.state || {};\n } catch (e) {\n historyState = {};\n }\n\n var path = _DOMUtils.getWindowPath();\n var _historyState = historyState;\n var key = _historyState.key;\n\n var state = undefined;\n if (key) {\n state = _DOMStateStorage.readState(key);\n } else {\n state = null;\n key = history.createKey();\n\n if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n }\n\n var location = _PathUtils.parsePath(path);\n\n return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n }\n\n function startPopStateListener(_ref) {\n var transitionTo = _ref.transitionTo;\n\n function popStateListener(event) {\n if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n transitionTo(getCurrentLocation(event.state));\n }\n\n _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n return function () {\n _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n };\n }\n\n function finishTransition(location) {\n var basename = location.basename;\n var pathname = location.pathname;\n var search = location.search;\n var hash = location.hash;\n var state = location.state;\n var action = location.action;\n var key = location.key;\n\n if (action === _Actions.POP) return; // Nothing to do.\n\n _DOMStateStorage.saveState(key, state);\n\n var path = (basename || '') + pathname + search + hash;\n var historyState = {\n key: key\n };\n\n if (action === _Actions.PUSH) {\n if (useRefresh) {\n window.location.href = path;\n return false; // Prevent location update.\n } else {\n window.history.pushState(historyState, null, path);\n }\n } else {\n // REPLACE\n if (useRefresh) {\n window.location.replace(path);\n return false; // Prevent location update.\n } else {\n window.history.replaceState(historyState, null, path);\n }\n }\n }\n\n var history = _createDOMHistory2['default'](_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n finishTransition: finishTransition,\n saveState: _DOMStateStorage.saveState\n }));\n\n var listenerCount = 0,\n stopPopStateListener = undefined;\n\n function listenBefore(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listenBefore(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n function listen(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n // deprecated\n function registerTransitionHook(hook) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n history.registerTransitionHook(hook);\n }\n\n // deprecated\n function unregisterTransitionHook(hook) {\n history.unregisterTransitionHook(hook);\n\n if (--listenerCount === 0) stopPopStateListener();\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n registerTransitionHook: registerTransitionHook,\n unregisterTransitionHook: unregisterTransitionHook\n });\n}", "function createBrowserHistory() {\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\n var forceRefresh = options.forceRefresh;\n\n var isSupported = _DOMUtils.supportsHistory();\n var useRefresh = !isSupported || forceRefresh;\n\n function getCurrentLocation(historyState) {\n try {\n historyState = historyState || window.history.state || {};\n } catch (e) {\n historyState = {};\n }\n\n var path = _DOMUtils.getWindowPath();\n var _historyState = historyState;\n var key = _historyState.key;\n\n var state = undefined;\n if (key) {\n state = _DOMStateStorage.readState(key);\n } else {\n state = null;\n key = history.createKey();\n\n if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n }\n\n var location = _PathUtils.parsePath(path);\n\n return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n }\n\n function startPopStateListener(_ref) {\n var transitionTo = _ref.transitionTo;\n\n function popStateListener(event) {\n if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\n transitionTo(getCurrentLocation(event.state));\n }\n\n _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\n return function () {\n _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n };\n }\n\n function finishTransition(location) {\n var basename = location.basename;\n var pathname = location.pathname;\n var search = location.search;\n var hash = location.hash;\n var state = location.state;\n var action = location.action;\n var key = location.key;\n\n if (action === _Actions.POP) return; // Nothing to do.\n\n _DOMStateStorage.saveState(key, state);\n\n var path = (basename || '') + pathname + search + hash;\n var historyState = {\n key: key\n };\n\n if (action === _Actions.PUSH) {\n if (useRefresh) {\n window.location.href = path;\n return false; // Prevent location update.\n } else {\n window.history.pushState(historyState, null, path);\n }\n } else {\n // REPLACE\n if (useRefresh) {\n window.location.replace(path);\n return false; // Prevent location update.\n } else {\n window.history.replaceState(historyState, null, path);\n }\n }\n }\n\n var history = _createDOMHistory2['default'](_extends({}, options, {\n getCurrentLocation: getCurrentLocation,\n finishTransition: finishTransition,\n saveState: _DOMStateStorage.saveState\n }));\n\n var listenerCount = 0,\n stopPopStateListener = undefined;\n\n function listenBefore(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listenBefore(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n function listen(listener) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n var unlisten = history.listen(listener);\n\n return function () {\n unlisten();\n\n if (--listenerCount === 0) stopPopStateListener();\n };\n }\n\n // deprecated\n function registerTransitionHook(hook) {\n if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\n history.registerTransitionHook(hook);\n }\n\n // deprecated\n function unregisterTransitionHook(hook) {\n history.unregisterTransitionHook(hook);\n\n if (--listenerCount === 0) stopPopStateListener();\n }\n\n return _extends({}, history, {\n listenBefore: listenBefore,\n listen: listen,\n registerTransitionHook: registerTransitionHook,\n unregisterTransitionHook: unregisterTransitionHook\n });\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? false ? undefined : tiny_invariant_esm(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n false ? undefined : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(esm_extends[\"a\" /* default */])(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n false ? undefined : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? undefined : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n false ? undefined : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? undefined : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? false ? undefined : tiny_invariant_esm(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n false ? undefined : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n extends_extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n false ? undefined : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? undefined : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n false ? undefined : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? undefined : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? false ? 0 : tiny_invariant_esm(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n false ? 0 : void 0;\n if (basename) path = stripBasename(path, basename);\n return history_createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0,esm_extends/* default */.Z)(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n false ? 0 : void 0;\n var action = 'PUSH';\n var location = history_createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? 0 : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n false ? 0 : void 0;\n var action = 'REPLACE';\n var location = history_createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? 0 : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? false ? undefined : Object(tiny_invariant_esm[\"a\" /* default */])(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n false ? undefined : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(esm_extends[\"a\" /* default */])(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n false ? undefined : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? undefined : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n false ? undefined : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? undefined : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? false ? undefined : Object(tiny_invariant_esm[\"a\" /* default */])(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n false ? undefined : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(esm_extends[\"a\" /* default */])(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n false ? undefined : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? undefined : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n false ? undefined : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? undefined : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? false ? undefined : tiny_invariant_esm(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n false ? undefined : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n false ? undefined : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? undefined : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n false ? undefined : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? undefined : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? false ? undefined : tiny_invariant_esm(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n false ? undefined : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n false ? undefined : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? undefined : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n false ? undefined : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? undefined : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? false ? 0 : (0,tiny_invariant_esm/* default */.Z)(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n false ? 0 : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0,esm_extends/* default */.Z)(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n false ? 0 : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? 0 : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n false ? 0 : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? 0 : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n !canUseDOM ? false ? 0 : tiny_invariant_invariant(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n false ? 0 : void 0;\n if (basename) path = stripBasename(path, basename);\n return history_createLocation(path, state, key);\n }\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n var transitionManager = createTransitionManager();\n function setState(nextState) {\n (0,esm_extends/* default */.Z)(history, nextState);\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n var forceNextPop = false;\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n function push(path, state) {\n false ? 0 : void 0;\n var action = 'PUSH';\n var location = history_createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? 0 : void 0;\n window.location.href = href;\n }\n });\n }\n function replace(path, state) {\n false ? 0 : void 0;\n var action = 'REPLACE';\n var location = history_createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? 0 : void 0;\n window.location.replace(href);\n }\n });\n }\n function go(n) {\n globalHistory.go(n);\n }\n function goBack() {\n go(-1);\n }\n function goForward() {\n go(1);\n }\n var listenerCount = 0;\n function checkDOMListeners(delta) {\n listenerCount += delta;\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n var isBlocked = false;\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n var unblock = transitionManager.setPrompt(prompt);\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n return unblock();\n };\n }\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function history (cb) {\n assert.equal(typeof cb, 'function', 'sheet-router/history: cb must be a function')\n window.onpopstate = function () {\n cb({\n pathname: document.location.pathname,\n search: document.location.search,\n href: document.location.href,\n hash: document.location.hash\n })\n }\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? invariant(false, 'Browser history needs a DOM') : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".');\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(base = '') {\n let listeners = [];\n let queue = [START];\n let position = 0;\n function setLocation(location) {\n position++;\n if (position === queue.length) {\n // we are at the end, we can simply append a new entry\n queue.push(location);\n }\n else {\n // we are in the middle, we remove everything from here in the queue\n queue.splice(position);\n queue.push(location);\n }\n }\n function triggerListeners(to, from, { direction, delta }) {\n const info = {\n direction,\n delta,\n type: NavigationType.pop,\n };\n for (let callback of listeners) {\n callback(to, from, info);\n }\n }\n const routerHistory = {\n // rewritten by Object.defineProperty\n location: START,\n state: {},\n base,\n createHref: createHref.bind(null, base),\n replace(to) {\n // remove current entry and decrement position\n queue.splice(position--, 1);\n setLocation(to);\n },\n push(to, data) {\n setLocation(to);\n },\n listen(callback) {\n listeners.push(callback);\n return () => {\n const index = listeners.indexOf(callback);\n if (index > -1)\n listeners.splice(index, 1);\n };\n },\n destroy() {\n listeners = [];\n },\n go(delta, shouldTrigger = true) {\n const from = this.location;\n const direction = \n // we are considering delta === 0 going forward, but in abstract mode\n // using 0 for the delta doesn't make sense like it does in html5 where\n // it reloads the page\n delta < 0 ? NavigationDirection.back : NavigationDirection.forward;\n position = Math.max(0, Math.min(position + delta, queue.length - 1));\n if (shouldTrigger) {\n triggerListeners(this.location, from, {\n direction,\n delta,\n });\n }\n },\n };\n Object.defineProperty(routerHistory, 'location', {\n get: () => queue[position],\n });\n return routerHistory;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? \"development\" !== \"production\" ? (0, _tinyInvariant.default)(false, 'Browser history needs a DOM') : (0, _tinyInvariant.default)(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0, _extends2.default)(history, nextState);\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? \"development\" !== \"production\" ? (0, _tinyInvariant.default)(false, 'Browser history needs a DOM') : (0, _tinyInvariant.default)(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0, _extends2.default)(history, nextState);\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? \"development\" !== \"production\" ? (0, _tinyInvariant.default)(false, 'Browser history needs a DOM') : (0, _tinyInvariant.default)(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0, _extends2.default)(history, nextState);\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? \"development\" !== \"production\" ? (0, _tinyInvariant.default)(false, 'Browser history needs a DOM') : (0, _tinyInvariant.default)(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0, _extends2.default)(history, nextState);\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? \"development\" !== \"production\" ? (0, _tinyInvariant.default)(false, 'Browser history needs a DOM') : (0, _tinyInvariant.default)(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0, _extends2.default)(history, nextState);\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? \"development\" !== \"production\" ? (0, _tinyInvariant.default)(false, 'Browser history needs a DOM') : (0, _tinyInvariant.default)(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0, _extends2.default)(history, nextState);\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n false ? undefined : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n false ? undefined : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? undefined : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n false ? undefined : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? undefined : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n false ? undefined : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n false ? undefined : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? undefined : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n false ? undefined : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n false ? undefined : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(base = '') {\r\n let listeners = [];\r\n let queue = [START];\r\n let position = 0;\r\n function setLocation(location) {\r\n position++;\r\n if (position === queue.length) {\r\n // we are at the end, we can simply append a new entry\r\n queue.push(location);\r\n }\r\n else {\r\n // we are in the middle, we remove everything from here in the queue\r\n queue.splice(position);\r\n queue.push(location);\r\n }\r\n }\r\n function triggerListeners(to, from, { direction, delta }) {\r\n const info = {\r\n direction,\r\n delta,\r\n type: NavigationType.pop,\r\n };\r\n for (const callback of listeners) {\r\n callback(to, from, info);\r\n }\r\n }\r\n const routerHistory = {\r\n // rewritten by Object.defineProperty\r\n location: START,\r\n // TODO: should be kept in queue\r\n state: {},\r\n base,\r\n createHref: createHref.bind(null, base),\r\n replace(to) {\r\n // remove current entry and decrement position\r\n queue.splice(position--, 1);\r\n setLocation(to);\r\n },\r\n push(to, data) {\r\n setLocation(to);\r\n },\r\n listen(callback) {\r\n listeners.push(callback);\r\n return () => {\r\n const index = listeners.indexOf(callback);\r\n if (index > -1)\r\n listeners.splice(index, 1);\r\n };\r\n },\r\n destroy() {\r\n listeners = [];\r\n queue = [START];\r\n position = 0;\r\n },\r\n go(delta, shouldTrigger = true) {\r\n const from = this.location;\r\n const direction = \r\n // we are considering delta === 0 going forward, but in abstract mode\r\n // using 0 for the delta doesn't make sense like it does in html5 where\r\n // it reloads the page\r\n delta < 0 ? NavigationDirection.back : NavigationDirection.forward;\r\n position = Math.max(0, Math.min(position + delta, queue.length - 1));\r\n if (shouldTrigger) {\r\n triggerListeners(this.location, from, {\r\n direction,\r\n delta,\r\n });\r\n }\r\n },\r\n };\r\n Object.defineProperty(routerHistory, 'location', {\r\n enumerable: true,\r\n get: () => queue[position],\r\n });\r\n return routerHistory;\r\n}", "function createBrowserHistory() {\n\t var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t !_ExecutionEnvironment.canUseDOM ? ({\"AUTH0_CLIENT_ID\":\"vFL9QUjpiy8LmqgykJVXRhk7dYVvdEip\",\"AUTH0_DOMAIN\":\"edcheung.auth0.com\"}).NODE_ENV !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;\n\t\n\t var forceRefresh = options.forceRefresh;\n\t\n\t var isSupported = _DOMUtils.supportsHistory();\n\t var useRefresh = !isSupported || forceRefresh;\n\t\n\t function getCurrentLocation(historyState) {\n\t try {\n\t historyState = historyState || window.history.state || {};\n\t } catch (e) {\n\t historyState = {};\n\t }\n\t\n\t var path = _DOMUtils.getWindowPath();\n\t var _historyState = historyState;\n\t var key = _historyState.key;\n\t\n\t var state = undefined;\n\t if (key) {\n\t state = _DOMStateStorage.readState(key);\n\t } else {\n\t state = null;\n\t key = history.createKey();\n\t\n\t if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);\n\t }\n\t\n\t var location = _PathUtils.parsePath(path);\n\t\n\t return history.createLocation(_extends({}, location, { state: state }), undefined, key);\n\t }\n\t\n\t function startPopStateListener(_ref) {\n\t var transitionTo = _ref.transitionTo;\n\t\n\t function popStateListener(event) {\n\t if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.\n\t\n\t transitionTo(getCurrentLocation(event.state));\n\t }\n\t\n\t _DOMUtils.addEventListener(window, 'popstate', popStateListener);\n\t\n\t return function () {\n\t _DOMUtils.removeEventListener(window, 'popstate', popStateListener);\n\t };\n\t }\n\t\n\t function finishTransition(location) {\n\t var basename = location.basename;\n\t var pathname = location.pathname;\n\t var search = location.search;\n\t var hash = location.hash;\n\t var state = location.state;\n\t var action = location.action;\n\t var key = location.key;\n\t\n\t if (action === _Actions.POP) return; // Nothing to do.\n\t\n\t _DOMStateStorage.saveState(key, state);\n\t\n\t var path = (basename || '') + pathname + search + hash;\n\t var historyState = {\n\t key: key\n\t };\n\t\n\t if (action === _Actions.PUSH) {\n\t if (useRefresh) {\n\t window.location.href = path;\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.pushState(historyState, null, path);\n\t }\n\t } else {\n\t // REPLACE\n\t if (useRefresh) {\n\t window.location.replace(path);\n\t return false; // Prevent location update.\n\t } else {\n\t window.history.replaceState(historyState, null, path);\n\t }\n\t }\n\t }\n\t\n\t var history = _createDOMHistory2['default'](_extends({}, options, {\n\t getCurrentLocation: getCurrentLocation,\n\t finishTransition: finishTransition,\n\t saveState: _DOMStateStorage.saveState\n\t }));\n\t\n\t var listenerCount = 0,\n\t stopPopStateListener = undefined;\n\t\n\t function listenBefore(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listenBefore(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t function listen(listener) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t var unlisten = history.listen(listener);\n\t\n\t return function () {\n\t unlisten();\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t };\n\t }\n\t\n\t // deprecated\n\t function registerTransitionHook(hook) {\n\t if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);\n\t\n\t history.registerTransitionHook(hook);\n\t }\n\t\n\t // deprecated\n\t function unregisterTransitionHook(hook) {\n\t history.unregisterTransitionHook(hook);\n\t\n\t if (--listenerCount === 0) stopPopStateListener();\n\t }\n\t\n\t return _extends({}, history, {\n\t listenBefore: listenBefore,\n\t listen: listen,\n\t registerTransitionHook: registerTransitionHook,\n\t unregisterTransitionHook: unregisterTransitionHook\n\t });\n\t}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Browser history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(false, 'Browser history needs a DOM') : undefined : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : undefined;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : undefined;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : undefined;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : undefined;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : undefined;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(false, 'Browser history needs a DOM') : undefined : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : undefined;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : undefined;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : undefined;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : undefined;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : undefined;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(false, 'Browser history needs a DOM') : undefined : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : undefined;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : undefined;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : undefined;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : undefined;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : undefined;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(false, 'Browser history needs a DOM') : undefined : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : undefined;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : undefined;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : undefined;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : undefined;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : undefined;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(false, 'Browser history needs a DOM') : undefined : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : undefined;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : undefined;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : undefined;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : undefined;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : undefined;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}", "function createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(false, 'Browser history needs a DOM') : undefined : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : undefined;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : undefined;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : undefined;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : undefined;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : undefined;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}" ]
[ "0.7363717", "0.73296857", "0.73296857", "0.7308878", "0.7308878", "0.7308878", "0.7308878", "0.73070294", "0.73040956", "0.730119", "0.729325", "0.7287951", "0.72879344", "0.7282965", "0.72828287", "0.72828287", "0.72828287", "0.72828287", "0.72828287", "0.7254779", "0.7254171", "0.72469246", "0.72469246", "0.72469246", "0.72469246", "0.72469246", "0.72469246", "0.72469246", "0.72454584", "0.72454584", "0.72399354", "0.72399354", "0.7193224", "0.7192471", "0.7152735", "0.7149164", "0.7146954", "0.7146954", "0.7146954", "0.7146954", "0.714062", "0.714062", "0.7135259", "0.712104", "0.712104", "0.712104", "0.712104", "0.712104", "0.712104", "0.712104", "0.7115953", "0.7094626", "0.7078388", "0.70783085", "0.70783085", "0.707702", "0.707702", "0.7050784", "0.70080733", "0.6978266", "0.6955796", "0.6944937", "0.6904904", "0.6904904", "0.6904904", "0.6904904", "0.6904904", "0.6904904", "0.68963516", "0.68963516", "0.6876154", "0.6874297", "0.6833496", "0.6787952", "0.6787952", "0.6787952", "0.6787952", "0.6787952", "0.6787952" ]
0.6787952
100
Creates a history object that stores locations in memory.
function createMemoryHistory(props) { if (props === void 0) { props = {}; } var _props = props, getUserConfirmation = _props.getUserConfirmation, _props$initialEntries = _props.initialEntries, initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries, _props$initialIndex = _props.initialIndex, initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex, _props$keyLength = _props.keyLength, keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength; var transitionManager = createTransitionManager(); function setState(nextState) { Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])(history, nextState); history.length = history.entries.length; transitionManager.notifyListeners(history.location, history.action); } function createKey() { return Math.random().toString(36).substr(2, keyLength); } var index = clamp(initialIndex, 0, initialEntries.length - 1); var entries = initialEntries.map(function (entry) { return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey()); }); // Public interface var createHref = createPath; function push(path, state) { true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__["default"])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : undefined; var action = 'PUSH'; var location = createLocation(path, state, createKey(), history.location); transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (!ok) return; var prevIndex = history.index; var nextIndex = prevIndex + 1; var nextEntries = history.entries.slice(0); if (nextEntries.length > nextIndex) { nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location); } else { nextEntries.push(location); } setState({ action: action, location: location, index: nextIndex, entries: nextEntries }); }); } function replace(path, state) { true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__["default"])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : undefined; var action = 'REPLACE'; var location = createLocation(path, state, createKey(), history.location); transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (!ok) return; history.entries[history.index] = location; setState({ action: action, location: location }); }); } function go(n) { var nextIndex = clamp(history.index + n, 0, history.entries.length - 1); var action = 'POP'; var location = history.entries[nextIndex]; transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (ok) { setState({ action: action, location: location, index: nextIndex }); } else { // Mimic the behavior of DOM histories by // causing a render after a cancelled POP. setState(); } }); } function goBack() { go(-1); } function goForward() { go(1); } function canGo(n) { var nextIndex = history.index + n; return nextIndex >= 0 && nextIndex < history.entries.length; } function block(prompt) { if (prompt === void 0) { prompt = false; } return transitionManager.setPrompt(prompt); } function listen(listener) { return transitionManager.appendListener(listener); } var history = { length: entries.length, action: 'POP', location: entries[index], index: index, entries: entries, createHref: createHref, push: push, replace: replace, go: go, goBack: goBack, goForward: goForward, canGo: canGo, block: block, listen: listen }; return history; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createMemoryHistory(base = '') {\n let listeners = [];\n let queue = [START];\n let position = 0;\n function setLocation(location) {\n position++;\n if (position === queue.length) {\n // we are at the end, we can simply append a new entry\n queue.push(location);\n }\n else {\n // we are in the middle, we remove everything from here in the queue\n queue.splice(position);\n queue.push(location);\n }\n }\n function triggerListeners(to, from, { direction, delta }) {\n const info = {\n direction,\n delta,\n type: NavigationType.pop,\n };\n for (let callback of listeners) {\n callback(to, from, info);\n }\n }\n const routerHistory = {\n // rewritten by Object.defineProperty\n location: START,\n state: {},\n base,\n createHref: createHref.bind(null, base),\n replace(to) {\n // remove current entry and decrement position\n queue.splice(position--, 1);\n setLocation(to);\n },\n push(to, data) {\n setLocation(to);\n },\n listen(callback) {\n listeners.push(callback);\n return () => {\n const index = listeners.indexOf(callback);\n if (index > -1)\n listeners.splice(index, 1);\n };\n },\n destroy() {\n listeners = [];\n },\n go(delta, shouldTrigger = true) {\n const from = this.location;\n const direction = \n // we are considering delta === 0 going forward, but in abstract mode\n // using 0 for the delta doesn't make sense like it does in html5 where\n // it reloads the page\n delta < 0 ? NavigationDirection.back : NavigationDirection.forward;\n position = Math.max(0, Math.min(position + delta, queue.length - 1));\n if (shouldTrigger) {\n triggerListeners(this.location, from, {\n direction,\n delta,\n });\n }\n },\n };\n Object.defineProperty(routerHistory, 'location', {\n get: () => queue[position],\n });\n return routerHistory;\n}", "function createMemoryHistory(base = '') {\r\n let listeners = [];\r\n let queue = [START];\r\n let position = 0;\r\n function setLocation(location) {\r\n position++;\r\n if (position === queue.length) {\r\n // we are at the end, we can simply append a new entry\r\n queue.push(location);\r\n }\r\n else {\r\n // we are in the middle, we remove everything from here in the queue\r\n queue.splice(position);\r\n queue.push(location);\r\n }\r\n }\r\n function triggerListeners(to, from, { direction, delta }) {\r\n const info = {\r\n direction,\r\n delta,\r\n type: NavigationType.pop,\r\n };\r\n for (const callback of listeners) {\r\n callback(to, from, info);\r\n }\r\n }\r\n const routerHistory = {\r\n // rewritten by Object.defineProperty\r\n location: START,\r\n // TODO: should be kept in queue\r\n state: {},\r\n base,\r\n createHref: createHref.bind(null, base),\r\n replace(to) {\r\n // remove current entry and decrement position\r\n queue.splice(position--, 1);\r\n setLocation(to);\r\n },\r\n push(to, data) {\r\n setLocation(to);\r\n },\r\n listen(callback) {\r\n listeners.push(callback);\r\n return () => {\r\n const index = listeners.indexOf(callback);\r\n if (index > -1)\r\n listeners.splice(index, 1);\r\n };\r\n },\r\n destroy() {\r\n listeners = [];\r\n queue = [START];\r\n position = 0;\r\n },\r\n go(delta, shouldTrigger = true) {\r\n const from = this.location;\r\n const direction = \r\n // we are considering delta === 0 going forward, but in abstract mode\r\n // using 0 for the delta doesn't make sense like it does in html5 where\r\n // it reloads the page\r\n delta < 0 ? NavigationDirection.back : NavigationDirection.forward;\r\n position = Math.max(0, Math.min(position + delta, queue.length - 1));\r\n if (shouldTrigger) {\r\n triggerListeners(this.location, from, {\r\n direction,\r\n delta,\r\n });\r\n }\r\n },\r\n };\r\n Object.defineProperty(routerHistory, 'location', {\r\n enumerable: true,\r\n get: () => queue[position],\r\n });\r\n return routerHistory;\r\n}", "function createMemoryHistory(base = '') {\r\n let listeners = [];\r\n let queue = [START];\r\n let position = 0;\r\n base = normalizeBase(base);\r\n function setLocation(location) {\r\n position++;\r\n if (position === queue.length) {\r\n // we are at the end, we can simply append a new entry\r\n queue.push(location);\r\n }\r\n else {\r\n // we are in the middle, we remove everything from here in the queue\r\n queue.splice(position);\r\n queue.push(location);\r\n }\r\n }\r\n function triggerListeners(to, from, { direction, delta }) {\r\n const info = {\r\n direction,\r\n delta,\r\n type: NavigationType.pop,\r\n };\r\n for (const callback of listeners) {\r\n callback(to, from, info);\r\n }\r\n }\r\n const routerHistory = {\r\n // rewritten by Object.defineProperty\r\n location: START,\r\n // TODO: should be kept in queue\r\n state: {},\r\n base,\r\n createHref: createHref.bind(null, base),\r\n replace(to) {\r\n // remove current entry and decrement position\r\n queue.splice(position--, 1);\r\n setLocation(to);\r\n },\r\n push(to, data) {\r\n setLocation(to);\r\n },\r\n listen(callback) {\r\n listeners.push(callback);\r\n return () => {\r\n const index = listeners.indexOf(callback);\r\n if (index > -1)\r\n listeners.splice(index, 1);\r\n };\r\n },\r\n destroy() {\r\n listeners = [];\r\n queue = [START];\r\n position = 0;\r\n },\r\n go(delta, shouldTrigger = true) {\r\n const from = this.location;\r\n const direction = \r\n // we are considering delta === 0 going forward, but in abstract mode\r\n // using 0 for the delta doesn't make sense like it does in html5 where\r\n // it reloads the page\r\n delta < 0 ? NavigationDirection.back : NavigationDirection.forward;\r\n position = Math.max(0, Math.min(position + delta, queue.length - 1));\r\n if (shouldTrigger) {\r\n triggerListeners(this.location, from, {\r\n direction,\r\n delta,\r\n });\r\n }\r\n },\r\n };\r\n Object.defineProperty(routerHistory, 'location', {\r\n enumerable: true,\r\n get: () => queue[position],\r\n });\r\n return routerHistory;\r\n}", "function History(){\n\n var self = this;\n this.commands = loadHistory();\n var currIndex = this.commands.length;\n\n this.add = function(command) {\n if(command == _.last(this.commands)) {\n currIndex = this.commands.length;\n return;\n }\n this.commands.push(command);\n var maxHistory = parseInt(env.env('maxHistory')) || $.fn.cli.env.maxHistory;\n if(this.commands.length > maxHistory){\n this.commands = _.last(this.commands, maxHistory);\n }\n currIndex = this.commands.length;\n saveHistory();\n }\n\n this.getPrevious = function() {\n if(currIndex>=0) currIndex--;\n return (this.commands.length && currIndex > -1) ? this.commands[currIndex] : null;\n }\n\n this.getNext = function() {\n if(currIndex<(this.commands.length)) currIndex++;\n return (this.commands.length && currIndex < this.commands.length) ? this.commands[currIndex] : null;\n }\n\n function saveHistory () {\n localStorage.setItem(historyStorageKey, JSON.stringify(self.commands));\n }\n function loadHistory () {\n var history = localStorage.getItem(historyStorageKey);\n return history ? JSON.parse(history) : [];\n }\n }", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries =\n _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex =\n _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(\n _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\n 'default'\n ],\n )(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random()\n .toString(36)\n .substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function(entry) {\n return typeof entry === 'string'\n ? createLocation(entry, undefined, createKey())\n : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n true\n ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__['default'])(\n !(\n typeof path === 'object' &&\n path.state !== undefined &&\n state !== undefined\n ),\n 'You should avoid providing a 2nd state argument to push when the 1st ' +\n 'argument is a location-like object that already has state; it is ignored',\n )\n : undefined;\n var action = 'PUSH';\n var location = createLocation(\n path,\n state,\n createKey(),\n history.location,\n );\n transitionManager.confirmTransitionTo(\n location,\n action,\n getUserConfirmation,\n function(ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(\n nextIndex,\n nextEntries.length - nextIndex,\n location,\n );\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries,\n });\n },\n );\n }\n\n function replace(path, state) {\n true\n ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__['default'])(\n !(\n typeof path === 'object' &&\n path.state !== undefined &&\n state !== undefined\n ),\n 'You should avoid providing a 2nd state argument to replace when the 1st ' +\n 'argument is a location-like object that already has state; it is ignored',\n )\n : undefined;\n var action = 'REPLACE';\n var location = createLocation(\n path,\n state,\n createKey(),\n history.location,\n );\n transitionManager.confirmTransitionTo(\n location,\n action,\n getUserConfirmation,\n function(ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location,\n });\n },\n );\n }\n\n function go(n) {\n var nextIndex = clamp(\n history.index + n,\n 0,\n history.entries.length - 1,\n );\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(\n location,\n action,\n getUserConfirmation,\n function(ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex,\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n },\n );\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen,\n };\n return history;\n }", "function History() {\n // This is the actual buffer where previous commands are kept.\n // 'this._buffer[0]' should always be equal the empty string. This is so\n // that when you try to go in to the \"future\", you will just get an empty\n // command.\n this._buffer = [''];\n\n // This is an index in to the history buffer which points to where we\n // currently are in the history.\n this._current = 0;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n function setState(nextState) {\n (0,esm_extends/* default */.Z)(history, nextState);\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? history_createLocation(entry, undefined, createKey()) : history_createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n function push(path, state) {\n false ? 0 : void 0;\n var action = 'PUSH';\n var location = history_createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n function replace(path, state) {\n false ? 0 : void 0;\n var action = 'REPLACE';\n var location = history_createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n function goBack() {\n go(-1);\n }\n function goForward() {\n go(1);\n }\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n return transitionManager.setPrompt(prompt);\n }\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0,esm_extends/* default */.Z)(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? history_createLocation(entry, undefined, createKey()) : history_createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n false ? 0 : void 0;\n var action = 'PUSH';\n var location = history_createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n false ? 0 : void 0;\n var action = 'REPLACE';\n var location = history_createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0, _extends2.default)(history, nextState);\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0, _extends2.default)(history, nextState);\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0, _extends2.default)(history, nextState);\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0, _extends2.default)(history, nextState);\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0, _extends2.default)(history, nextState);\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0, _extends2.default)(history, nextState);\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n \"development\" !== \"production\" ? (0, _tinyWarning.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createHistory() {\n var history = {\n 'subject' : string[1],\n 'date' : new Date().toString()\n };\n saveHistory(history);\n }", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0,esm_extends/* default */.Z)(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n false ? 0 : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n false ? 0 : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(esm_extends[\"a\" /* default */])(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n false ? undefined : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n false ? undefined : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(esm_extends[\"a\" /* default */])(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n false ? undefined : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n false ? undefined : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(esm_extends[\"a\" /* default */])(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n false ? undefined : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n false ? undefined : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n extends_extends(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n false ? undefined : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n false ? undefined : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__[\"a\" /* default */])(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n false ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n false ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__[\"a\" /* default */])(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n false ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n false ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__[\"a\" /* default */])(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n false ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n false ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__[\"a\" /* default */])(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n false ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n false ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__[\"a\" /* default */])(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n false ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n false ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__[\"a\" /* default */])(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n false ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n false ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function History() {\n this.time = 0;\n this.done = []; this.undone = [];\n }", "function History() {\n this.time = 0;\n this.done = []; this.undone = [];\n }", "function History() {\n this.time = 0;\n this.done = []; this.undone = [];\n }", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n false ? undefined : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n false ? undefined : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n false ? undefined : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n false ? undefined : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n true ? (0,tiny_warning__WEBPACK_IMPORTED_MODULE_3__.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n true ? (0,tiny_warning__WEBPACK_IMPORTED_MODULE_3__.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n true ? (0,tiny_warning__WEBPACK_IMPORTED_MODULE_3__.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n true ? (0,tiny_warning__WEBPACK_IMPORTED_MODULE_3__.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n true ? (0,tiny_warning__WEBPACK_IMPORTED_MODULE_3__.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n true ? (0,tiny_warning__WEBPACK_IMPORTED_MODULE_3__.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n true ? (0,tiny_warning__WEBPACK_IMPORTED_MODULE_3__.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n true ? (0,tiny_warning__WEBPACK_IMPORTED_MODULE_3__.default)(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "_setupHistory() {\n if (!this.history) {\n try{ this.history = createHistory(); }\n catch(e) { \n this.history = this.options.history || createMemoryHistory();\n this._isPhantomHistory = true; \n }\n } \n }", "function HistoryEntry(variables) {\n this.timestamp = Date.now();\n this.variables = variables;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n false ? undefined : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n false ? undefined : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n false ? undefined : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n false ? undefined : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__[\"a\" /* default */])(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n Object({\"API_URL\":\"http://localhost:4000/\",\"TIMEOUT\":50000}).NODE_ENV !== \"production\" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__[\"a\" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n Object({\"API_URL\":\"http://localhost:4000/\",\"TIMEOUT\":50000}).NODE_ENV !== \"production\" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__[\"a\" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__[\"a\" /* default */])(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__[\"a\" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__[\"a\" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "function createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__[\"a\" /* default */])(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__[\"a\" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__[\"a\" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}", "saveInHistory(state) {\n let histName = state.currentHistoryName;\n\n if (histName === null) {\n // New history row\n histName = this.getNewHistoryName(state);\n state.currentHistoryName = histName;\n }\n\n state.history[histName] = {\n name: histName,\n lastModification: Date.now(),\n points: state.points,\n links: state.links,\n tooltips: state.tooltips,\n defaultPointColor: state.defaultPointColor,\n defaultLinkColor: state.defaultLinkColor,\n defaultTooltipColor: state.defaultTooltipColor,\n defaultTooltipFontColor: state.defaultTooltipFontColor\n };\n\n this.storeHistory(state.history);\n }", "function addToHistory(location) {\n var newQueries;\n var maxHistorySize=5;\n var exists=false; //Check if location already exist in history list\n newQueries = getHistory();\n for(var u=0;u<newQueries.queries.length;u++) {\n if(location===newQueries.queries[u]) {\n exists=true;\n }\n }\n if(!exists) { //Location does not exist\n if(newQueries.queries.length>=maxHistorySize) {\n newQueries.queries.shift();\n }\n newQueries.queries.push(location);\n localStorage.setItem(storageItem, JSON.stringify(newQueries));\n }\n }", "function storeHistory() {\n var f = ioFile.open(historyOutFile, \"w\");\n f.write(JSON.stringify(history));\n f.close();\n if (debug)\n console.log(\"Have stored history to \" + historyOutFile);\n }", "serializeHistory(state) {\r\n if (!state)\r\n return null;\r\n // Ensure sure that all entries have url\r\n var entries = state.entries.filter(e => e.url);\r\n if (!entries.length)\r\n return null;\r\n // Ensure the index is in bounds.\r\n var index = (state.index || entries.length) - 1;\r\n index = Math.min(index, entries.length - 1);\r\n index = Math.max(index, 0);\r\n var historyStart = this.enableSaveHistory ? 0 : index;\r\n var historyEnd = this.enableSaveHistory ? entries.length : index + 1;\r\n var history = [];\r\n\r\n var saveScroll = this.prefBranch.getBoolPref(\"save.scrollposition\");\r\n var currentScroll = saveScroll && state.scroll ? JSON.stringify(state.scroll) : \"0,0\";\r\n if (currentScroll != \"0,0\")\r\n entries[index].scroll = currentScroll;\r\n\r\n for (let j = historyStart; j < historyEnd; j++) {\r\n try {\r\n let historyEntry = entries[j];\r\n let entry = {\r\n url: historyEntry.url,\r\n title: historyEntry.title || \"\",\r\n scroll: saveScroll && historyEntry.scroll || \"0,0\",\r\n };\r\n if (historyEntry.triggeringPrincipal_base64) {\r\n entry.triggeringPrincipal_base64 = historyEntry.triggeringPrincipal_base64;\r\n }\r\n history.push(entry);\r\n } catch (ex) {\r\n Tabmix.assert(ex, \"serializeHistory error at index \" + j);\r\n }\r\n }\r\n return {\r\n history: encodeURI(JSON.stringify(history)),\r\n index,\r\n scroll: currentScroll\r\n };\r\n }", "function History() {\n this.time = 0;\n this.done = []; this.undone = [];\n this.compound = 0;\n this.closed = false;\n }", "function History() {\n this.time = 0;\n this.done = []; this.undone = [];\n this.compound = 0;\n this.closed = false;\n }", "function History() {\n this.time = 0;\n this.done = []; this.undone = [];\n this.compound = 0;\n this.closed = false;\n }", "constructor(id) {\n this.id = id;\n this.history = [];\n }", "function LocationLog() {\n this.location = [];\n this.currentId = 0;\n}", "function createLocalHistory(array, storage){\n\tfor (var i = 0; i < array.length; i++)\n\t\tstorage.setItem(array[i],\"0\");\n}", "function History(client) {\n if (!(this instanceof History)) {\n return new History(client);\n }\n this.client = client;\n this.uriPrefix = client.uriPrefix;\n}", "function generateHistoryObject() {\n\n let o = {}\n\n for (let i = 0; i < 28; i++) {\n o[i] = 0\n }\n\n return o\n\n}", "function _createHistoryFrame() {\n\t\t\tvar $historyFrameName = \"unFocusHistoryFrame\";\n\t\t\t_historyFrameObj = document.createElement(\"iframe\");\n\t\t\t_historyFrameObj.setAttribute(\"name\", $historyFrameName);\n\t\t\t_historyFrameObj.setAttribute(\"id\", $historyFrameName);\n\t\t\t// :NOTE: _Very_ experimental\n\t\t\t_historyFrameObj.setAttribute(\"src\", 'javascript:;');\n\t\t\t_historyFrameObj.style.position = \"absolute\";\n\t\t\t_historyFrameObj.style.top = \"-900px\";\n\t\t\tdocument.body.insertBefore(_historyFrameObj,document.body.firstChild);\n\t\t\t// get reference to the frame from frames array (needed for document.open)\n\t\t\t// :NOTE: there might be an issue with this according to quirksmode.org\n\t\t\t// http://www.quirksmode.org/js/iframe.html\n\t\t\t_historyFrameRef = frames[$historyFrameName];\n\t\t\t\n\t\t\t// add base history entry\n\t\t\t_createHistoryHTML(_currentHash, true);\n\t\t}", "function setHistory() {\n // clear undo history\n $('#undoHistoryList')\n .empty();\n\n // load new history list from server\n getHistoryFromServer(addHistList);\n}", "function History() {\n}", "function History(size) {\n if (!(GM_setValue && GM_getValue)) {\n alert('Please upgrade to the latest version of Greasemonkey.');\n return;\n }\n this.index=0;\n this.size=size;\n //oldest items are at the front of the array\n //newest added to end\n this.code_history=new Array();\n}", "function save_history () {\n\tvar ds = currHds();\n\tedit_history [edit_history_index] = JSON.stringify(ds.toJSON());\n}", "function createMemoryHistory(props){if(props===void 0){props={};}var _props=props,getUserConfirmation=_props.getUserConfirmation,_props$initialEntries=_props.initialEntries,initialEntries=_props$initialEntries===void 0?['/']:_props$initialEntries,_props$initialIndex=_props.initialIndex,initialIndex=_props$initialIndex===void 0?0:_props$initialIndex,_props$keyLength=_props.keyLength,keyLength=_props$keyLength===void 0?6:_props$keyLength;var transitionManager=createTransitionManager();function setState(nextState){Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(history,nextState);history.length=history.entries.length;transitionManager.notifyListeners(history.location,history.action);}function createKey(){return Math.random().toString(36).substr(2,keyLength);}var index=clamp(initialIndex,0,initialEntries.length-1);var entries=initialEntries.map(function(entry){return typeof entry==='string'?createLocation(entry,undefined,createKey()):createLocation(entry,undefined,entry.key||createKey());});// Public interface\nvar createHref=createPath;function push(path,state){ true?Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!(_typeof(path)==='object'&&path.state!==undefined&&state!==undefined),'You should avoid providing a 2nd state argument to push when the 1st '+'argument is a location-like object that already has state; it is ignored'):undefined;var action='PUSH';var location=createLocation(path,state,createKey(),history.location);transitionManager.confirmTransitionTo(location,action,getUserConfirmation,function(ok){if(!ok)return;var prevIndex=history.index;var nextIndex=prevIndex+1;var nextEntries=history.entries.slice(0);if(nextEntries.length>nextIndex){nextEntries.splice(nextIndex,nextEntries.length-nextIndex,location);}else{nextEntries.push(location);}setState({action:action,location:location,index:nextIndex,entries:nextEntries});});}function replace(path,state){ true?Object(tiny_warning__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(!(_typeof(path)==='object'&&path.state!==undefined&&state!==undefined),'You should avoid providing a 2nd state argument to replace when the 1st '+'argument is a location-like object that already has state; it is ignored'):undefined;var action='REPLACE';var location=createLocation(path,state,createKey(),history.location);transitionManager.confirmTransitionTo(location,action,getUserConfirmation,function(ok){if(!ok)return;history.entries[history.index]=location;setState({action:action,location:location});});}function go(n){var nextIndex=clamp(history.index+n,0,history.entries.length-1);var action='POP';var location=history.entries[nextIndex];transitionManager.confirmTransitionTo(location,action,getUserConfirmation,function(ok){if(ok){setState({action:action,location:location,index:nextIndex});}else{// Mimic the behavior of DOM histories by\n// causing a render after a cancelled POP.\nsetState();}});}function goBack(){go(-1);}function goForward(){go(1);}function canGo(n){var nextIndex=history.index+n;return nextIndex>=0&&nextIndex<history.entries.length;}function block(prompt){if(prompt===void 0){prompt=false;}return transitionManager.setPrompt(prompt);}function listen(listener){return transitionManager.appendListener(listener);}var history={length:entries.length,action:'POP',location:entries[index],index:index,entries:entries,createHref:createHref,push:push,replace:replace,go:go,goBack:goBack,goForward:goForward,canGo:canGo,block:block,listen:listen};return history;}", "function push_history() {\n\tedit_history_index++;\n\tsave_history();\n\tedit_history.length = edit_history_index+1;\n}", "function AddressHistory(args) {\n this.node = args.node;\n this.options = args.options;\n\n if(Array.isArray(args.addresses)) {\n this.addresses = args.addresses;\n } else {\n this.addresses = [args.addresses];\n }\n this.transactionInfo = [];\n this.combinedArray = [];\n this.detailedArray = [];\n}", "function retrieveHistory() {\n if (!localStorage.getItem('cities')) {\n localStorage.setItem('cities', JSON.stringify(searchHistory));\n } else {\n searchHistory = JSON.parse(localStorage.getItem('cities'));\n }\n}", "function History_History()\n{\n\t//call reset\n\tthis.Reset();\n}", "function gnc_getHistory() {\n var fakeHistory = {};\n for (property in history) {\n switch (property) {\n case 'length':\n Object.defineProperty(fakeHistory, property, {\n enumerable: true,\n get: function() { return gncHistoryLength; }\n });\n break;\n\n case 'go':\n fakeHistory[property] = function(delta) {\n if (!delta || delta === 0) {\n gnc_getLocation().reload();\n return;\n }\n\n window.parent.postMessage({ type: 'host-go', delta: delta }, '*');\n };\n break;\n\n case 'back':\n fakeHistory[property] = function() {\n window.parent.postMessage({ type: 'host-go', delta: -1 }, '*');\n };\n break;\n\n case 'forward':\n fakeHistory[property] = function() {\n window.parent.postMessage({ type: 'host-go', delta: 1 }, '*');\n };\n break;\n\n case 'pushState':\n fakeHistory[property] = function(state, title, url) {\n window.parent.postMessage({ type: 'host-pushstate',\n state: state,\n title: title,\n url: url }, '*');\n };\n break;\n\n case 'replaceState':\n fakeHistory[property] = function(state, title, url) {\n window.parent.postMessage({ type: 'host-replacestate',\n state: state,\n title: title,\n url: url }, '*');\n };\n break;\n\n default:\n fakeHistory[property] = history[property];\n }\n }\n\n return fakeHistory;\n}", "history(){\n this._history = true;\n return this;\n }", "getHistory() {\n return this.history;\n }", "getHistory() {\n return this.history;\n }", "function History(container, maxDepth, commitDelay, editor) {\n this.container = container;\n this.maxDepth = maxDepth; this.commitDelay = commitDelay;\n this.editor = editor; this.parent = editor.parent;\n // This line object represents the initial, empty editor.\n var initial = {text: \"\", from: null, to: null};\n // As the borders between lines are represented by BR elements, the\n // start of the first line and the end of the last one are\n // represented by null. Since you can not store any properties\n // (links to line objects) in null, these properties are used in\n // those cases.\n this.first = initial; this.last = initial;\n // Similarly, a 'historyTouched' property is added to the BR in\n // front of lines that have already been touched, and 'firstTouched'\n // is used for the first line.\n this.firstTouched = false;\n // History is the set of committed changes, touched is the set of\n // nodes touched since the last commit.\n this.history = []; this.redoHistory = []; this.touched = [];\n}", "function addHistory( data ) {\n\n if ( typeof(aio.history) != 'object' ) { aio.history = []; } // Change aio.history to array\n if ( typeof(aio.history) == 'object' && aio.history.length > 19 ) { aio.history.pop(); } // Delete oldest record if total exceeds 20\n\n // Add this new record\n aio.history.unshift( data );\n updateHistory();\n\n}", "function History(pn) {\n\t\tthis.queue = [];\n\t\tthis.parentname = pn;\n\t\tthis.currstate = clone(_GP[this.parentname]);\n\t\tthis.initialstate = clone(_GP[this.parentname]);\n\t\tthis.initialdate = new Date().getTime();\n\t}" ]
[ "0.67093724", "0.6660363", "0.66349125", "0.6514125", "0.6496346", "0.6491885", "0.6476713", "0.64495486", "0.6401474", "0.6383285", "0.6383285", "0.6383285", "0.6383285", "0.6383285", "0.6383285", "0.6377784", "0.63725656", "0.6372155", "0.63628995", "0.63628995", "0.63628995", "0.634001", "0.63310856", "0.63310856", "0.63310856", "0.63310856", "0.63310856", "0.63310856", "0.6329393", "0.6329393", "0.6329393", "0.63209414", "0.63209414", "0.62817514", "0.62817514", "0.62817514", "0.62817514", "0.62507075", "0.62264293", "0.62253153", "0.62253153", "0.6211507", "0.6207032", "0.6207032", "0.61745715", "0.6144592", "0.6121789", "0.6047488", "0.60329384", "0.60329384", "0.60329384", "0.59962136", "0.5982917", "0.59756655", "0.5966633", "0.59452456", "0.5930876", "0.5910871", "0.59092414", "0.5863659", "0.5804842", "0.57979834", "0.5774437", "0.57218885", "0.57163554", "0.5700126", "0.5682827", "0.5644461", "0.56408465", "0.56408465", "0.5632388", "0.56025374", "0.55967313" ]
0.6322891
58
The public API for prompting the user before navigating away from a screen.
function Prompt(_ref) { var message = _ref.message, _ref$when = _ref.when, when = _ref$when === void 0 ? true : _ref$when; return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Consumer, null, function (context) { !context ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__["default"])(false, "You should not use <Prompt> outside a <Router>") : undefined : void 0; if (!when || context.staticContext) return null; var method = context.history.block; return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Lifecycle, { onMount: function onMount(self) { self.release = method(message); }, onUpdate: function onUpdate(self, prevProps) { if (prevProps.message !== message) { self.release(); self.release = method(message); } }, onUnmount: function onUnmount(self) { self.release(); }, message: message }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function navigateAway() {\n switch (document.body.id) {\n case 'options':\n chrome.runtime.sendMessage({\n 'name': 'OptionsSave',\n 'excludes': gTplData.options.globalExcludesStr.trim(),\n 'useCodeMirror': gTplData.options.useCodeMirror,\n }, logUnhandledError);\n break;\n case 'user-script-options':\n chrome.runtime.sendMessage({\n 'name': 'UserScriptOptionsSave',\n 'details': gTplData.activeScript,\n }, logUnhandledError);\n break;\n case 'user-script':\n if (gTplData.pendingUninstall > 0) {\n uninstall(gTplData.activeScript.uuid);\n return;\n }\n gTplData.activeScript.updateMessage = '';\n gTplData.activeScript = {};\n break;\n }\n}", "function ExitPage() {\n\t\talert('Are you sure you want navigate away from this App?');\n\t\tgetit()\n\t}", "_backPress(event) {\n this.props.navigator.pop()\n }", "_prevScreenApp() {\n\t\tthis.props.navigation.goBack(null);\n }", "abortPageNavigate() {\n\n this.confirm_navigation_level = 2;\n\n history.back();\n\n setTimeout(function() {\n this.confirm_navigation_level = 1;\n }, 300);\n }", "handleGoBack(){\n this.props.navigator.pop();\n }", "goBackToHairdresserAccount(){\n\t\tvar self=this;\n\t\tself.AuthToken.erase('description');\n\t\tself.$location.path('/hairdresser/account');\n\t}", "_onBack () {\n this.props.navigator.pop();\n }", "_logout() {\n // Ask to confirm\n Alert.alert('Logout', 'Are you sure you want to logout?',\n [\n {\n text: 'Yes',\n onPress: () => {\n this.setState({ loaded: false })\n this.navigator.pop()\n }\n },\n { text: 'No' }\n ]\n )\n }", "_navigateBack(){\n this.props.navigator.pop()\n }", "function disappear(){\n\tif (document.getElementById(\"prompt\")){\n\t\tvar prompt = document.getElementById(\"prompt\");\n\t\tprompt.parentNode.removeChild(prompt);\n\t}\n}", "_onBack () { \n this.props.navigator.pop();\n }", "_closeModal () {\n this.props.navigator.pop()\n }", "onBackButtonClick_() {\n this.userActed('os-trial-back');\n }", "cancel () {\n this.$window.history.back();\n }", "goBack() {\n this.props.navigator.pop({\n animated: false,\n });\n }", "function cancel() {\n window.history.back();\n}", "back() {\n if (!this._initialized || this._popStateInProgress) {\n return;\n }\n const state = window.history.state;\n if (this._isValidState(state) && state.uid > 0) {\n window.history.back();\n }\n }", "function onBackKeyDown() {\n if(app.views.main.router.currentRoute.path == \"/login/\" )\n {\n navigator.app.exitApp();\n }\n else\n {\n if(localStorage.user_role == \"Driver\")\n {\n if(app.views.main.router.currentRoute.path == \"/pesanan/\")\n {\n navigator.app.exitApp();\n\n }\n else\n {\n //app.views.main.router.navigate('/pesanan/');\n app.views.main.router.back();\n }\n }\n else\n {\n if(app.views.main.router.currentRoute.path == \"/beranda/\")\n {\n navigator.app.exitApp();\n }\n else\n {\n //app.views.main.router.navigate('/beranda/');\n app.views.main.router.back();\n }\n }\n }\n}", "function cancel() {\n history.goBack();\n }", "function LeaveStandalone()\n\t{\n\t\tif(m_should_back_out){\n\t\t\tm_should_back_out = false;\n\t\t\thistory.back();\n\t\t}\n\t\telse{\n\t\t\tHide();\n\t\t}\n\t}", "function onGoBack() {\n setFormDataEdit(null);\n setStep('Menu');\n }", "goBack() {\n // signs users out b/c Firebase won't let you create a user without also logging in as them\n // this saves confusion after a team captain creates a player and goes back signed in as a different person\n firebase.auth().signOut();\n window.history.back();\n }", "function be_logout(page) {\n ask({cmd:'be_logout',page:page},_be_logout,'jo?');\n}", "function back() {\n 'use strict';\n\n welcomeScreen.style.display = 'block';\n gameScreen.style.display = 'none';\n endScreen.style.display = 'none';\n reset();\n}", "goBackToHairdresserAccount(){\n\t\tvar self=this;\n\t\tif(self.AuthToken.getObj('hairdresserDetails')){\n\t\t\tself.AuthToken.erase('hairdresserDetails');\n\t\t}\n\t\tself.$state.go('hairdresseraccount');\n\t\t//self.$location.path('/hairdresser/account');\n\t}", "onDonePress() {\n this.props.navigator.pop({ animated: false });\n }", "navigateAway() {\n alert('Please create an account to access Dashboard!');\n this.props.history.push('/');\n }", "function backMenu() {\n inquirer.prompt([\n {\n type: 'list',\n message: 'What would you like to do?',\n name: 'action',\n choices: [\n \"go back to main menu\",\n \"end session\"\n ]\n }\n ]).then(({ action }) => {\n switch (action) {\n case \"go back to main menu\":\n mainMenu();\n break;\n case \"end session\":\n connection.end();\n break;\n }\n });\n}", "onBackButtonClicked_() {\n if (this.uiStep === ENROLLMENT_STEP.SIGNIN) {\n if (this.lastBackMessageValue_) {\n this.lastBackMessageValue_ = false;\n this.$.authView.back();\n } else {\n this.cancel();\n }\n }\n }", "hide() {\n this.backButtonOpen_ = false;\n chrome.accessibilityPrivate.setSwitchAccessMenuState(\n false, SAConstants.EMPTY_LOCATION, 0);\n this.menuPanel_.setFocusRing(SAConstants.BACK_ID, false);\n }", "return() {\n this.location.back();\n }", "function quit() {\n inquirer.prompt([\n {\n type: \"confirm\",\n name: \"menu\",\n message: \"Would you like to go back to the main menu?\"\n }\n ]).then(function (arg) {\n if (arg.menu === false) {\n connection.end();\n process.exit();\n } else {\n userPrompt();\n }\n });\n}", "function onBackClick() {\n\tAlloy.Globals.NAVIGATION_CONTROLLER.closeWindow('welcomeContentScreen');\n}", "closeScreen() {\n this.loading = true;\n this[NavigationMixin.Navigate]({\n type: \"standard__recordPage\",\n attributes: {\n recordId: this.customerRecorId,\n objectApiName: \"Account\", // objectApiName is optional\n actionName: \"view\"\n }\n });\n this.loading = false;\n }", "cancelNavigation() {\n this.clearActiveRegion();\n this.setCurrentFocus();\n this.resetInterractionStates();\n }", "function onUnload() {\n var result = 0;\n if (modalDocument.getElementById('prompt-input')) {\n result = {\n input1: '',\n buttonIndex: 0\n };\n }\n mainWindow.setTimeout(function() {\n callback(result);\n }, 10);\n }", "async logout(){\n Alert.alert(\n 'Are you sure you want to logout?',\n 'I thought we had something special...',\n [\n { text: 'Cancel' },\n { text: \"Yes\", onPress: () => {\n AsyncStorage.multiRemove([\"token\", \"id\"]).then(() => {\n this.props.navigator.resetTo({ name: \"Login\" });\n });\n }\n },\n ],\n )\n }", "back() {\n this._platformStrategy.back();\n }", "function onBackKeyDown() {\n\tif (shouYinEmployee.id) {\n\t\tshowAlert('提示', '请先完成交接班才能退出!');\n\t\treturn;\n\t}\n\tnavigator.notification.confirm('按确定退出程序!', // message\n\tonConfirm, // callback to invoke with index of button pressed\n\t'确定要退出程序吗?', // title\n\t'确定,取消' // buttonLabels\n\t);\n}", "back() {\n this._platformStrategy.back();\n }", "back() {\n this._platformStrategy.back();\n }", "back() {\n this._platformStrategy.back();\n }", "back() {\n this._platformStrategy.back();\n }", "back() {\n this._platformStrategy.back();\n }", "function goBack(){\n\tg_cache.user_history.pop();\n\tfetchUser(g_cache.user_history.pop());\n}", "function quitGame() {\n const choice = confirm(\"Are you sure you want to leave this page?\");\n\n if (choice === true) {\n window.location = \"index.html\";\n }\n }", "function goBack() {\n\t\ttogglePage();\n\t\tdisposeThrownShurikens();\n\t\tupdateThrownShurikenCount();\n\t\tcleanBelt();\n\t}", "function backToGame() {\r\n //Unpause the game\r\n togglePause();\r\n\r\n //Hide the modal\r\n hideModal();\r\n\r\n //Remove the event listeners\r\n removeListeners();\r\n }", "function back() {\n window.history.back();\n //director.navigateTo({ path: 'customer-service-dashboard' });\n }", "navigateBack() {\n this.props.clearSearch(3);\n this.props.dashboardNavigateBack();\n this.props.disableSelectionMode();\n this.props.setDashboardBucketId(null);\n }", "function cancelForgotUsername(){\n\tcloseWindow();\n}", "function returnBack() {\n window.history.back()\n}", "navigationView_viewIsBeingPoppedFrom () {\n const self = this\n // I don't always get popped but when I do I maintain correct state\n self.wizardController.PatchToDifferentWizardTaskMode_withoutPushingScreen(\n self.options.wizardController_current_wizardTaskModeName,\n self.options.wizardController_current_wizardTaskMode_stepIdx - 1\n )\n }", "function logout() {\n updateState('account', null);\n navigate('/login');\n}", "function back(){\r\n\tif(appMenuOpen){\r\n\t\tappMenuOpen = false;\r\n\t\t$(\"#app-menu\").attr(\"style\", \"display: none;\");\r\n\t}\r\n\r\n\tif(recentAppsOpen){\r\n\t\trecentAppsOpen = false;\r\n\r\n\t\t//un-Hides menu bar on bottom of screen\r\n\t\t$(\"#bottom-menu-bar\").attr(\"style\",\"display: block;\");\r\n\t\t$(\"#recent-apps-screen\").attr(\"style\", \"display: none;\");\r\n\t}\r\n\r\n\t// screens to just close\r\n\t$(\"#call-screen\").attr(\"style\",\"display: none;\");\r\n\t$(\"#camera-screen\").attr(\"style\",\"display: none;\");\r\n\r\n\t//Hides notifications-box\r\n\t$(\"#notification-box\").css(\"display\", \"none\");\r\n}", "function goBackTo() {\n window.history.back()\n}", "function goBack() {\n\t\t\t$window.history.back();\n\t\t}", "logOut() {\n AsyncStorage.removeItem('userHash', (err, res) => {\n this.props.navigation.navigate('Login');\n });\n }", "function confirmBack(){\n let youSure = confirm('If you go back to the menu your art will be lost...');\n //if the user is sure, reload the page (bringing you back to the menu)\n if(youSure == true){\n location.reload();\n }\n}", "_backToMainAccount() {\n this._closeMenu();\n AuthActions.backToMainAccount();\n }", "exitGame() {\n // !Maybe solution for AppLogger or similar\n setTimeout(() => {\n window.top.location.href = RealityCheckModel.exit_URL || RealityCheckModel.lobby_URL;\n });\n }", "function goBack() {\n window.history.back();\n }", "function goBack() {\n window.history.back();\n }", "function goBack() {\n window.history.back();\n }", "function goBack(){\nwindow.close();\n}", "handleCancel() {\n this.cancel = true;\n this.changeScreen('screen-input');\n }", "function goBack() {\n PathStore.pop();\n}", "onBackPress() {\n const { history } = this.props;\n this.props.onNavigateToEmailListing();\n history.goBack();\n }", "onBackPress() {\n\t\tconst { history } = this.props;\n\t\tthis.props.onNavigateToEmailListing();\n\t\thistory.goBack();\n\t}", "function goBack() {\n window.history.back();\n }", "function goBack() {\n if (!vm.isModal) {\n $window.history.back();\n }\n else {\n $scope.modalInstance.dismiss('cancel');\n }\n }", "function goBack() {\n if (!vm.isModal) {\n $window.history.back();\n }\n else {\n $scope.modalInstance.dismiss('cancel');\n }\n }", "function goBack(){\n // *Navigating back:\n window.history.back();\n }", "function exit_user(){\n window.location.href='/logout'\n}", "function end(){\n inquirer.prompt({\n name: \"endScreen\",\n type: \"list\",\n message: \"What would you like to do now?\",\n choices: [\n \"continue shopping\",\n \"quit\"\n ]\n }).then(function(answer){\n if(answer.endScreen === \"continue shopping\"){\n storefront();\n } else {\n process.exit();\n };\n });\n}", "function closeLocker()\n {\n if (confirm(\"Are you sure you want to close the locker without locking?\"))\n {\n locker._pin = \"\";\n locker._locked = false;\n locker._contents = document.getElementById('lockerContents').value;\n locker._label = document.getElementById('lockerLabel').value;\n locker._color = document.getElementById('lockerColor').value;\n updateLocalStorage(locker);\n updateLocalStorage(lockers);\n alert(\"Warning: You are closing the locker before locking it! \");\n window.location = \"index.html\";\n }\n }", "function backAction() {\n switch (navigation[navigation.length-1]) {\n case \"list\":\n listAvailableQuizzes();\n break;\n case \"question\":\n showMore(quizNumber);\n break;\n case \"leaderboard\":\n showMore(quizNumber);\n break;\n\n }\n navigation.pop();\n if (navigation.length <= 0) {\n backButton.style.display = \"none\";\n }\n}", "cancelCreate() {\r\n this.props.history.goBack();\r\n }", "function logOut() {\n input = readline.question(\"Are you sure you want to log out? (yes / no)\\n>> \");\n if (input === \"yes\") {\n console.log(\"Logging out, thanks for using MustGet Banking CLI!\");\n // Clear user\n user = {};\n // If user wants to logout, return back to beginning of program\n currentLoc = \"start\";\n } else if (input === \"no\") {\n console.log(\"Ok, returning to menu\");\n // If user doesn't want to logout, return back to menu.\n currentLoc = \"menu\";\n }\n}", "function backToHome() {\r\n // unsaved warning box \r\n if (!warnUnsavedDialog())\r\n return;\r\n\r\n location.href = '/dbmiannotator/main';\r\n}", "function loginModalCallback(){\n\t\tvar screenName;\n\t\t\n\t\tif(ScreenManager.getCurrentScreen().getDisplayName != null){\n\t\t\tscreenName = ScreenManager.getCurrentScreen().getDisplayName();\n\t\t}else{\n\t\t\tscreenName = ScreenManager.getCurrentScreen().displayName;\n\t\t}\n\t\t\n\t\tif(screenName == WelcomeScreen.displayName){\n\t\t\tModalManager.hideModal();\n\t\t\tScreenManager.changeScreen(new UserIdentityScreen())\n\t\t}else{\n\t\t\tModalManager.hideModal();\n\t\t\tScreenManager.replaceScreen(ScreenManager.getCurrentScreen());\n\t\t}\n\t}", "handleBackToLogin() {\n this.props.displayRegister(false);\n }", "function goBackOrGoHome() {\n if(WinJS.Navigation.canGoBack) {\n WinJS.Navigation.back();\n }\n else {\n navigate('home');\n }\n }", "logout() {\n this.setState({\n modalVisible: false\n })\n this.props.navigation.navigate('Home',{});\n }", "function closeMe()\n{\n browser.runtime.sendMessage({\n type: \"app.get\",\n what: \"senderId\"\n }).then(tabId =>\n browser.tabs.remove(tabId).catch(err =>\n {\n // Opera 68 throws a \"Tabs cannot be edited right now (user may be\n // dragging a tab).\" exception when we attempt to close the window\n // using `browser.tabs.remove`.\n window.close();\n })\n );\n}", "function goBack() {\n window.history.back();\n}", "function goBack() {\n window.history.back();\n}", "logout(){\n AsyncStorage.setItem(\"Email\", '');\n AsyncStorage.setItem(\"Password\", '');\n const resetAction = NavigationActions.reset({\n index: 0,\n actions: [\n NavigationActions.navigate({ routeName: 'Login' }),\n ],\n });\n this.props.navigation.dispatch(resetAction);\n }", "function cancelRememberUserAboutUnsavedData(){\n\twindow.onbeforeunload = null;\n}", "navigateBack() {\n this.props.navigator.pop()\n this.setCurrentPageIndex(1)\n }", "function goBack() {\n\t\n\tprevious = window.parent.name;\n\t\n\tif ( isEdited == true ) {\n\t\tif ( ! confirm ( QST_BACK_ )) {\n\t\t\treturn;\n\t\t}\n\t}\t\n\t\n\tself.close();\n\n}", "function OnBtnBack_Click( e )\r\n{\r\n try\r\n {\r\n // On iOS devices, the NavigationWindow will be closed.\r\n // Instead on Android devices, the Window will be close\r\n if( OS_IOS )\r\n {\r\n $.navigationWindowViewUsersLocationsView.close() ;\r\n }\r\n else\r\n {\r\n $.viewUsersLocationsViewWindow.close() ;\r\n }\r\n }\r\n catch( exception )\r\n {\r\n Alloy.Globals.AlertUserAndLogAsync( L( 'generic_exception_msg' ) + exception.message ) ;\r\n }\r\n}", "function backToMenuFromGame()\r\n\t\t{\r\n\t\t\tresetMatch();\r\n\t\t\tcancelAnimationFrame(requestId);\r\n\t\t\tdocument.getElementById('canvasSpace').style.display = \"none\";\r\n\t\t\tdocument.getElementById('menuInGame').style.display = \"none\";\r\n\t\t\tdocument.getElementById('settings').style.display = \"none\";\r\n\t\t\tdocument.getElementById('menu').style.display = \"initial\";\r\n\t\t}", "async redirectToLoginScreen() {\n await removeMnemonicNotSaved();\n this.props.navigation.navigate('LoginScreen');\n }", "function onBackButton() {\r\n\tnavigator.app.exitApp();\r\n}", "function goBack() { $window.history.back(); }", "function goBack() {\n // remove latest from directory arrays\n dirs.pop()\n // browse to our new route\n navigate()\n}", "function back() {\n setMode(history.pop());\n setHistory(history);\n }", "function onBackKeyDown() {\n var backbutton = document.getElementById(\"button-back\");\n\n if (backbutton !== null) {\n backbutton.click();\n } else {\n if (navigator.app) {\n navigator.app.exitApp();\n } else if (navigator.device) {\n navigator.device.exitApp();\n } else {\n window.close();\n }\n }\n}", "goBack() {\n try {\n browser.back();\n return true;\n }\n catch (ex) {\n return false;\n }\n }" ]
[ "0.635917", "0.6337324", "0.6293868", "0.6037227", "0.60223913", "0.6019256", "0.5973522", "0.595812", "0.5906849", "0.59040695", "0.589938", "0.58895904", "0.58619976", "0.5861335", "0.5848037", "0.5846685", "0.5827347", "0.5801943", "0.58009577", "0.5794085", "0.57781357", "0.5770892", "0.57693714", "0.5757184", "0.575243", "0.5746605", "0.5721314", "0.56831086", "0.566931", "0.56685716", "0.56674534", "0.5659187", "0.565331", "0.5649971", "0.5639645", "0.56352484", "0.56238914", "0.5614855", "0.5613682", "0.560809", "0.5605306", "0.5605306", "0.5605306", "0.5605306", "0.5605306", "0.56011987", "0.5552266", "0.55510986", "0.5549849", "0.55383277", "0.55370444", "0.5509777", "0.55068666", "0.5504977", "0.5496407", "0.5490863", "0.54886645", "0.54880404", "0.5484301", "0.5478785", "0.5466859", "0.5461502", "0.54563177", "0.54563177", "0.54563177", "0.54537684", "0.5450453", "0.5449115", "0.54229367", "0.5422291", "0.54183835", "0.5415642", "0.5415642", "0.54151016", "0.54089767", "0.54048705", "0.540021", "0.53963727", "0.5394581", "0.53933203", "0.5387976", "0.5387337", "0.53811705", "0.53795797", "0.5378542", "0.5376458", "0.53728855", "0.53728855", "0.5372382", "0.53718925", "0.536605", "0.5361819", "0.5359901", "0.53433496", "0.5341672", "0.53388923", "0.533292", "0.53222984", "0.53160244", "0.5313426", "0.53082526" ]
0.0
-1
Public API for generating a URL pathname from a path and parameters.
function generatePath(path, params) { if (path === void 0) { path = "/"; } if (params === void 0) { params = {}; } return path === "/" ? path : compilePath(path)(params, { pretty: true }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makePath(var_args){\n\t var result = join(slice(arguments), '/');\n\t // need to disconsider duplicate '/' after protocol (eg: 'http://')\n\t return result.replace(/([^:\\/]|^)\\/{2,}/g, '$1/');\n\t }", "function makePath(var_args){\n var result = join(slice(arguments), '/');\n // need to disconsider duplicate '/' after protocol (eg: 'http://')\n return result.replace(/([^:\\/]|^)\\/{2,}/g, '$1/');\n }", "function makePath(var_args){\n var result = join(slice(arguments), '/');\n // need to disconsider duplicate '/' after protocol (eg: 'http://')\n return result.replace(/([^:\\/]|^)\\/{2,}/g, '$1/');\n }", "function generatePath(path, params) {\n if (path === void 0) {\n path = '/';\n }\n\n if (params === void 0) {\n params = {};\n }\n\n return path === '/'\n ? path\n : compilePath(path)(params, {\n pretty: true,\n });\n }", "function _createURL()\n { var arr\n\n if(arguments.length === 1) arr=arguments[0]\n else arr = arguments\n\n var url = _transaction.server.location\n\n // arr:['route', 'article', 54 ] => str:\"/route/article/54\"\n for (var i=0; i<arr.length; i++){\n url += '/';\n if (arr[i] in _transaction.server)\n url += _transaction.server[arr[i]];\n else if (arr[i]+'Path' in _transaction.server)\n url += _transaction.server[arr[i]+'Path'];\n else\n url += arr[i]\n }\n\n return url;\n }", "function generatePath(path,params){if(path===void 0){path=\"/\";}if(params===void 0){params={};}return path===\"/\"?path:compilePath(path)(params,{pretty:true});}", "function generatePath(path, params) {\n if (path === void 0) {\n path = \"/\";\n }\n if (params === void 0) {\n params = {};\n }\n return path === \"/\" ? path : compilePath(path)(params, {\n pretty: true\n });\n}", "function react_router_generatePath(path, params) {\n if (path === void 0) {\n path = \"/\";\n }\n\n if (params === void 0) {\n params = {};\n }\n\n return path === \"/\" ? path : react_router_compilePath(path)(params, {\n pretty: true\n });\n}", "function generatePath(path = \"/\", params = {}) {\n return path === \"/\" ? path : compilePath(path)(params, { pretty: true });\n}", "function genUrl(opts, path$$1) {\n\t // If the host already has a path, then we need to have a path delimiter\n\t // Otherwise, the path delimiter is the empty string\n\t var pathDel = !opts.path ? '' : '/';\n\n\t // If the host already has a path, then we need to have a path delimiter\n\t // Otherwise, the path delimiter is the empty string\n\t return opts.protocol + '://' + opts.host +\n\t (opts.port ? (':' + opts.port) : '') +\n\t '/' + opts.path + pathDel + path$$1;\n\t}", "function makePath() {\n var path = [''];\n for (var i=0,l=arguments.length,arg,argType; i<l; i++) {\n arg = arguments[i];\n argType = typeof arg;\n if (argType === 'string' || (argType === 'number' && !isNaN(arg))) {\n arg = String(arg);\n if (arg.length) path.push(arg.replace(/^\\/|\\/$/g, ''));\n }\n }\n return path.join('/').replace(/\\/$/, '');\n}", "makePath(pathname, query) {\n if (query) {\n if (typeof query !== 'string')\n query = this.stringifyQuery(query);\n\n if (query !== '')\n return pathname + '?' + query;\n }\n\n return pathname;\n }", "function buildPath (basePath, queryParams) {\n basePath = basePath.concat('?')\n var url = basePath.concat(queryString.stringify(queryParams))\n return url\n }", "function path() {\n return new Path(join.apply(null, arguments));\n}", "function makeUrl() {\n let args = Array.from(arguments);\n return args.reduce(function (acc, cur) {\n return urljoin(acc, cur);\n });\n}", "function genUrl(opts, path) {\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n var pathDel = !opts.path ? '' : '/';\n\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n return opts.protocol + '://' + opts.host +\n (opts.port ? (':' + opts.port) : '') +\n '/' + opts.path + pathDel + path;\n }", "function genUrl(opts, path) {\n\t // If the host already has a path, then we need to have a path delimiter\n\t // Otherwise, the path delimiter is the empty string\n\t var pathDel = !opts.path ? '' : '/';\n\t\n\t // If the host already has a path, then we need to have a path delimiter\n\t // Otherwise, the path delimiter is the empty string\n\t return opts.protocol + '://' + opts.host +\n\t (opts.port ? (':' + opts.port) : '') +\n\t '/' + opts.path + pathDel + path;\n\t}", "function makeurl(path) {\n if (path.indexOf(\"://\") > 0) {\n return path;\n }\n return url + \"/\" + path;\n }", "function genUrl(opts, path) {\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n var pathDel = !opts.path ? '' : '/';\n\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n return opts.protocol + '://' + opts.host + ':' + opts.port + '/' +\n opts.path + pathDel + path;\n}", "function genUrl(opts, path) {\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n var pathDel = !opts.path ? '' : '/';\n\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n return opts.protocol + '://' + opts.host +\n (opts.port ? (':' + opts.port) : '') +\n '/' + opts.path + pathDel + path;\n}", "function genUrl(opts, path) {\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n var pathDel = !opts.path ? '' : '/';\n\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n return opts.protocol + '://' + opts.host +\n (opts.port ? (':' + opts.port) : '') +\n '/' + opts.path + pathDel + path;\n}", "function genUrl(opts, path) {\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n var pathDel = !opts.path ? '' : '/';\n\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n return opts.protocol + '://' + opts.host +\n (opts.port ? (':' + opts.port) : '') +\n '/' + opts.path + pathDel + path;\n}", "function genUrl(opts, path) {\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n var pathDel = !opts.path ? '' : '/';\n\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n return opts.protocol + '://' + opts.host +\n (opts.port ? (':' + opts.port) : '') +\n '/' + opts.path + pathDel + path;\n}", "function genUrl(opts, path) {\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n var pathDel = !opts.path ? '' : '/';\n\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n return opts.protocol + '://' + opts.host +\n (opts.port ? (':' + opts.port) : '') +\n '/' + opts.path + pathDel + path;\n}", "function genUrl(opts, path) {\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n var pathDel = !opts.path ? '' : '/';\n\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n return opts.protocol + '://' + opts.host +\n (opts.port ? (':' + opts.port) : '') +\n '/' + opts.path + pathDel + path;\n}", "function genUrl(opts, path) {\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n var pathDel = !opts.path ? '' : '/';\n\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n return opts.protocol + '://' + opts.host +\n (opts.port ? (':' + opts.port) : '') +\n '/' + opts.path + pathDel + path;\n}", "function genUrl(opts, path) {\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n var pathDel = !opts.path ? '' : '/';\n\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n return opts.protocol + '://' + opts.host +\n (opts.port ? (':' + opts.port) : '') +\n '/' + opts.path + pathDel + path;\n}", "function genUrl(opts, path) {\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n var pathDel = !opts.path ? '' : '/';\n\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n return opts.protocol + '://' + opts.host +\n (opts.port ? (':' + opts.port) : '') +\n '/' + opts.path + pathDel + path;\n}", "buildUrl() {\n let url = this.hostname;\n\n if (this.port !== 80) {\n url += ':' + this.port;\n }\n\n let path = this.path;\n if (path.substring(0, 1) !== '/') {\n path = '/' + path;\n }\n\n url += path;\n\n url = replaceUrlParams(url, this.givenArgs);\n url = url.replace('//', '/');\n url = 'https://' + url;\n return url;\n }", "function makeurl( path ) {\n if (path.indexOf(\"://\") > 0) return path;\n return url + \"/\" + path;\n }", "function urlResolve(...segments){var _path$default;const joinedPath=(_path$default=_path.default).join.apply(_path$default,segments);if(_os.default.platform()===`win32`){return joinedPath.replace(/\\\\/g,`/`);}return joinedPath;}", "function constructURL(params){\n \n delimiter = '/';\n \n url = new Array(domainName, pathToAPI);\n\n if(params.module){\n \n url.push(params.module);\n\n if(params.id && params.datatype){\n \n url.push(params.datatype + params.id);\n \n }\n\n }else throw {code: 400, message: \"No module name\"};\n url.push(\"\");\n return url.join(delimiter);\n \n}", "function generateGetURL(path, data){\n\tvar i = 0;\n\tvar url = base_url + path;\n\tfor (i=0; i<data.length; i++){\n\t\tif (isNaN(data[i]) && data[i].indexOf(\"/\") > 0){\n\t\t\tstep1 = data[i].replace('/','-');\n\t\t\tstep2 = step1.replace('/','-');\n\t\t\tdata[i] = step2;\t\t\t\n\t\t}\n\t\telse if (data[i]==\"\"){\n\t\t\tdata[i] = '-';\n\t\t}\n\t\turl = url + encodeURIComponent(data[i]) + \"/\";\t\t\n\t}\n\turl = url.substring(0, url.length -1);\n\treturn decodeURIComponent(url);\n}", "function _joinAndCanonicalizePath(parts) {\n var path = parts[_ComponentIndex.Path];\n path = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__[\"b\" /* isBlank */])(path) ? '' : _removeDotSegments(path);\n parts[_ComponentIndex.Path] = path;\n return _buildFromEncodedParts(parts[_ComponentIndex.Scheme], parts[_ComponentIndex.UserInfo], parts[_ComponentIndex.Domain], parts[_ComponentIndex.Port], path, parts[_ComponentIndex.QueryData], parts[_ComponentIndex.Fragment]);\n}", "function makeUrl(params)\n{\n var ret = SGL_JS_FRONT_CONTROLLER != ''\n ? SGL_JS_WEBROOT + '/' + SGL_JS_FRONT_CONTROLLER\n : SGL_JS_WEBROOT;\n var moduleName = params.module ? params.module : '';\n var managerName = params.manager ? params.manager : moduleName;\n\n switch (SGL_JS_URL_STRATEGY) {\n\n // make classic URL\n case 'SGL_UrlParser_ClassicStrategy':\n if (ret.charAt(ret.length - 1) != '?') {\n ret = ret + '?';\n }\n ret = ret + 'moduleName=' + escape(moduleName) + '&managerName=' + escape(managerName);\n for (x in params) {\n if (x == 'module' || x == 'manager') {\n continue;\n }\n // add param\n ret = '&' + ret + escape(x) + '=' + escape(params[x]);\n }\n break;\n\n // make default Seagull SEF URL\n default:\n ret = ret + '/' + escape(moduleName) + '/' + escape(managerName) + '/';\n for (x in params) {\n if (x == 'module' || x == 'manager') {\n continue;\n }\n ret = ret + escape(x) + '/' + escape(params[x]) + '/';\n }\n break;\n }\n return ret;\n}", "function _joinAndCanonicalizePath(parts) {\n\t var path = parts[_ComponentIndex.Path];\n\t path = lang_1.isBlank(path) ? '' : _removeDotSegments(path);\n\t parts[_ComponentIndex.Path] = path;\n\t return _buildFromEncodedParts(parts[_ComponentIndex.Scheme], parts[_ComponentIndex.UserInfo], parts[_ComponentIndex.Domain], parts[_ComponentIndex.Port], path, parts[_ComponentIndex.QueryData], parts[_ComponentIndex.Fragment]);\n\t}", "getRoutePath () {\n const slashGroupRegex = /\\/{2,}/g\n const slashTrailRegex = /(^\\/)|(\\/$)/g\n const slashValidRegex = /^(\\/)|((\\/[^\\/]+)+)$/\n\n const segments = _.compact(_.flattenDeep(_.toArray(arguments)))\n const isArgumentsValid = segments.length && _.every(segments, s => _.isArray(s) || _.isString(s))\n\n if (!isArgumentsValid) {\n throw new TypeError([\n 'trailpack-router cannot parse the arguments given to Footprints.getRoutePath:',\n segments, 'Argument types not recognized'\n ].join(' '))\n }\n\n const path = '/' + segments.join('/')\n .replace(slashGroupRegex, '/')\n .replace(slashTrailRegex, '')\n\n if (!slashValidRegex.test(path)) {\n throw new RangeError([\n 'trailpack-router produced an invalid route path: ', path,\n 'arguments given:', segments\n ].join(' '))\n }\n\n return path\n }", "function genUrl(opts, path) {\n if (opts.remote) {\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n var pathDel = !opts.path ? '' : '/';\n\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n return opts.protocol + '://' + opts.host + ':' + opts.port + '/' +\n opts.path + pathDel + path;\n }\n\n return '/' + path;\n}", "buildPath(path = '') {\n if (path.indexOf('http') === 0) {\n return path;\n }\n\n return this.baseUrl + path;\n }", "function makeUrl() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return args.reduce(function (acc, cur) { return url_join_1[\"default\"](acc, cur); });\n}", "function _joinAndCanonicalizePath(parts){var path=parts[_ComponentIndex.Path];path=path==null?'':_removeDotSegments(path);parts[_ComponentIndex.Path]=path;return _buildFromEncodedParts(parts[_ComponentIndex.Scheme],parts[_ComponentIndex.UserInfo],parts[_ComponentIndex.Domain],parts[_ComponentIndex.Port],path,parts[_ComponentIndex.QueryData],parts[_ComponentIndex.Fragment]);}", "function genPath(){\n var path = ['1'];\n for(var i = 0; i < arguments.length; i++){\n path.push(arguments[i], '1');\n }\n return path;\n}", "buildURL(){\n var url = this._super(...arguments);\n if (url.lastIndexOf('/') !== url.length - 1) {\n url += '/';\n }\n return url;\n }", "function _joinAndCanonicalizePath(parts) {\n var path = parts[_ComponentIndex.Path];\n path = path == null ? '' : _removeDotSegments(path);\n parts[_ComponentIndex.Path] = path;\n return _buildFromEncodedParts(parts[_ComponentIndex.Scheme], parts[_ComponentIndex.UserInfo], parts[_ComponentIndex.Domain], parts[_ComponentIndex.Port], path, parts[_ComponentIndex.QueryData], parts[_ComponentIndex.Fragment]);\n }", "function _joinAndCanonicalizePath(parts) {\n var path = parts[_ComponentIndex.Path];\n path = path == null ? '' : _removeDotSegments(path);\n parts[_ComponentIndex.Path] = path;\n return _buildFromEncodedParts(parts[_ComponentIndex.Scheme], parts[_ComponentIndex.UserInfo], parts[_ComponentIndex.Domain], parts[_ComponentIndex.Port], path, parts[_ComponentIndex.QueryData], parts[_ComponentIndex.Fragment]);\n}", "function _joinAndCanonicalizePath(parts) {\n var path = parts[_ComponentIndex.Path];\n path = path == null ? '' : _removeDotSegments(path);\n parts[_ComponentIndex.Path] = path;\n return _buildFromEncodedParts(parts[_ComponentIndex.Scheme], parts[_ComponentIndex.UserInfo], parts[_ComponentIndex.Domain], parts[_ComponentIndex.Port], path, parts[_ComponentIndex.QueryData], parts[_ComponentIndex.Fragment]);\n}", "function _joinAndCanonicalizePath(parts) {\n var path = parts[_ComponentIndex.Path];\n path = path == null ? '' : _removeDotSegments(path);\n parts[_ComponentIndex.Path] = path;\n return _buildFromEncodedParts(parts[_ComponentIndex.Scheme], parts[_ComponentIndex.UserInfo], parts[_ComponentIndex.Domain], parts[_ComponentIndex.Port], path, parts[_ComponentIndex.QueryData], parts[_ComponentIndex.Fragment]);\n}", "function _joinAndCanonicalizePath(parts) {\n var path = parts[_ComponentIndex.Path];\n path = path == null ? '' : _removeDotSegments(path);\n parts[_ComponentIndex.Path] = path;\n return _buildFromEncodedParts(parts[_ComponentIndex.Scheme], parts[_ComponentIndex.UserInfo], parts[_ComponentIndex.Domain], parts[_ComponentIndex.Port], path, parts[_ComponentIndex.QueryData], parts[_ComponentIndex.Fragment]);\n}", "static stringURIPath(uriobj) {\nvar res;\nres = uriobj.path;\nif (uriobj.query != null) {\nres += \"?\" + uriobj.query;\n}\nreturn res;\n}", "function formatPath(urlobj)\n{\n\tvar path = urlobj.pathname;\n\t\n\tif (urlobj.search !== null)\n\t{\n\t\tpath += urlobj.search;\n\t}\n\t\n\treturn path;\n}", "function buildRoutePath(mountpath, path) {\n return mountpath + utils.prefix(path.replace(/{([^}]+)}/g, ':$1'), '/');\n}", "function buildRoutePath(mountpath, path) {\n return mountpath + Utils.prefix(path.replace(/{([^}]+)}/g, ':$1'), '/');\n}", "function _joinAndCanonicalizePath(parts) {\n let path = parts[_ComponentIndex.Path];\n path = path == null ? '' : _removeDotSegments(path);\n parts[_ComponentIndex.Path] = path;\n return _buildFromEncodedParts(parts[_ComponentIndex.Scheme], parts[_ComponentIndex.UserInfo], parts[_ComponentIndex.Domain], parts[_ComponentIndex.Port], path, parts[_ComponentIndex.QueryData], parts[_ComponentIndex.Fragment]);\n}", "function _joinAndCanonicalizePath(parts) {\n let path = parts[_ComponentIndex.Path];\n path = path == null ? '' : _removeDotSegments(path);\n parts[_ComponentIndex.Path] = path;\n return _buildFromEncodedParts(parts[_ComponentIndex.Scheme], parts[_ComponentIndex.UserInfo], parts[_ComponentIndex.Domain], parts[_ComponentIndex.Port], path, parts[_ComponentIndex.QueryData], parts[_ComponentIndex.Fragment]);\n}", "function _joinAndCanonicalizePath(parts) {\n let path = parts[_ComponentIndex.Path];\n path = path == null ? '' : _removeDotSegments(path);\n parts[_ComponentIndex.Path] = path;\n return _buildFromEncodedParts(parts[_ComponentIndex.Scheme], parts[_ComponentIndex.UserInfo], parts[_ComponentIndex.Domain], parts[_ComponentIndex.Port], path, parts[_ComponentIndex.QueryData], parts[_ComponentIndex.Fragment]);\n}" ]
[ "0.72512805", "0.7178873", "0.7178873", "0.68712044", "0.68696356", "0.6721023", "0.6654717", "0.65425456", "0.644447", "0.6395405", "0.63352627", "0.63270307", "0.628425", "0.62621105", "0.62249243", "0.61872166", "0.6135351", "0.61011547", "0.609315", "0.6084816", "0.6084816", "0.6084816", "0.6084816", "0.6084816", "0.6084816", "0.6084816", "0.6084816", "0.6084816", "0.60714626", "0.60652274", "0.60292745", "0.60241497", "0.6022738", "0.60018986", "0.59460616", "0.5917354", "0.5891541", "0.58683085", "0.5860721", "0.58569187", "0.58515835", "0.5823484", "0.5820711", "0.5795333", "0.5764963", "0.5754601", "0.5754601", "0.5754601", "0.5749633", "0.573909", "0.57340723", "0.57334346", "0.569503", "0.569503", "0.569503" ]
0.6648755
42
The public API for navigating programmatically with a component.
function Redirect(_ref) { var computedMatch = _ref.computedMatch, to = _ref.to, _ref$push = _ref.push, push = _ref$push === void 0 ? false : _ref$push; return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Consumer, null, function (context) { !context ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__["default"])(false, "You should not use <Redirect> outside a <Router>") : undefined : void 0; var history = context.history, staticContext = context.staticContext; var method = push ? history.push : history.replace; var location = Object(history__WEBPACK_IMPORTED_MODULE_3__["createLocation"])(computedMatch ? typeof to === "string" ? generatePath(to, computedMatch.params) : Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__["default"])({}, to, { pathname: generatePath(to.pathname, computedMatch.params) }) : to); // When rendering in a static context, // set the new location immediately. if (staticContext) { method(location); return null; } return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Lifecycle, { onMount: function onMount() { method(location); }, onUpdate: function onUpdate(self, prevProps) { var prevLocation = Object(history__WEBPACK_IMPORTED_MODULE_3__["createLocation"])(prevProps.to); if (!Object(history__WEBPACK_IMPORTED_MODULE_3__["locationsAreEqual"])(prevLocation, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__["default"])({}, location, { key: prevLocation.key }))) { method(location); } }, to: to }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "navigateToComponent(event) {\n let contractCode = event.currentTarget.dataset.item;\n // eslint-disable-next-line no-console\n console.log('contractcode:'+contractCode);\n this[NavigationMixin.Navigate]({\n type: 'standard__component',\n attributes: {\n componentName: 'c__alternateEndingModifyPlan' \n },\n state: {\n c__currentContractCode: contractCode\n }\n });\n }", "moveToElement(componentRef, element) {\n element.appendChild(componentRef.location.nativeElement);\n }", "Navigate(string, Variant, Variant, Variant, Variant) {\n\n }", "navigate( prefix ) {\n const {navigateWithId} = this.props;\n const point = this.point;\n return ( ) => navigateWithId( prefix, point );\n }", "navigateToProperty() {\n this[NavigationMixin.Navigate]({\n type: 'standard__recordPage',\n attributes: {\n recordId: this.property.Id,\n objectApiName: 'Rental_Property__c',\n actionName: 'view'\n }\n });\n }", "_scrollTo (params) {\n let selector\n if (params.nodeId) {\n selector = `[data-id=\"${params.nodeId}\"]`\n } else if (params.section) {\n selector = `[data-section=\"${params.section}\"]`\n } else {\n throw new Error('Illegal argument')\n }\n let comp = this.refs.contentPanel.find(selector)\n if (comp) {\n this._scrollElementIntoView(comp.el, true)\n }\n let router = this.context.router\n // ATTENTION: do not change the route when running tests otherwise the test url get's lost\n if (router && !platform.test) {\n router.writeRoute(Object.assign({ viewName: this.props.viewName }, params))\n }\n }", "gotoDetails(){\n const { navigator } = this.props;\n navigator.push({ name: 'PRODUCT_DETAIL'});\n\n }", "onItemClick() {\n this.navigateTo(this.item.path);\n }", "navigate(url) {\n return this.agent.invoke_navigate({ url });\n }", "navigateCmp(objectNAme, recId) {\n this[NavigationMixin.Navigate]({\n type: \"standard__recordPage\",\n attributes: {\n recordId: recId,\n objectApiName: objectNAme, // objectApiName is optional\n actionName: \"view\"\n }\n });\n this.isSpinnerShow = false;\n }", "NavigateTo(path) {\n this.props.push('/' + path);\n }", "function navigate(name, params) {\n navigationRef.current?.navigate(name, params);\n}", "_navigate(method, hoveredItem, lastOpenedContainer) {\n const that = this;\n\n if (!hoveredItem) {\n if (method === '_getNextEnabledChild') {\n if (that._view) {\n that.$.backButton.setAttribute('hover', '');\n that.$.backButton.$.button.setAttribute('hover', '');\n that._focusedViaKeyboard = that.$.backButton;\n }\n else {\n that._hoverViaKeyboard(that._getFirstEnabledChild(lastOpenedContainer));\n }\n }\n else {\n that._hoverViaKeyboard(that._getLastEnabledChild(lastOpenedContainer));\n }\n\n return;\n }\n\n let navigateToChild;\n\n if (method === '_getNextEnabledChild' && hoveredItem === that.$.backButton) {\n navigateToChild = that._getFirstEnabledChild(lastOpenedContainer);\n\n if (navigateToChild) {\n that.$.backButton.removeAttribute('hover');\n that.$.backButton.$.button.removeAttribute('hover');\n }\n else {\n return;\n }\n }\n else if (method === '_getPreviousEnabledChild' && that._view && hoveredItem === that._getFirstEnabledChild(lastOpenedContainer)) {\n that.$.backButton.setAttribute('hover', '');\n that.$.backButton.$.button.setAttribute('hover', '');\n that._focusedViaKeyboard = that.$.backButton;\n hoveredItem.removeAttribute('focus');\n return;\n }\n else {\n navigateToChild = that[method](hoveredItem);\n }\n\n if (navigateToChild) {\n hoveredItem.removeAttribute('focus');\n that._hoverViaKeyboard(navigateToChild);\n }\n }", "getFromComponent(componentName, funcName, args=undefined){\n return this.#components.get(componentName)[funcName](args);\n }", "function navigatingTo(args) {\n page = args.object;\n}", "function navigatingTo(args) {\n /*\n This gets a reference this page’s <Page> UI component. You can\n view the API reference of the Page to see what’s available at\n https://docs.nativescript.org/api-reference/classes/_ui_page_.page.html\n */\n var page = args.object;\n}", "function navigatingTo(args) {\n // Get the event sender\n var page = args.object;\n}", "createAccount() {\n this.props.nav.navigate(\"Create Student User\");\n }", "goToSignup(){\n this.props.navigator.push({\n component: Signup\n });\n }", "function checkComponent(component, props = null) {\n\t\tswitch (component) {\n\t\t\tcase 'Inbox':\n\t\t\t\tchangeCurrentComponent(goTo(Inbox));\n\t\t\t\tbreak;\n\t\t\tcase 'Contacts':\n\t\t\t\tchangeCurrentComponent(goTo(Contacts));\n\t\t\t\tbreak;\n\t\t\tcase 'NewContact':\n\t\t\t\tchangeCurrentComponent(goTo(NewContact, props));\n\t\t\t\tbreak;\n\t\t\tcase 'Settings':\n\t\t\t\tchangeCurrentComponent(goTo(Settings, props));\n\t\t\t\tbreak;\n\t\t\tcase 'Login':\n\t\t\t\tchangeCurrentComponent(goTo(Login));\n\t\t\t\tbreak;\n\t\t\tcase 'Thread':\n\t\t\t\tchangeCurrentComponent(goTo(Thread, props));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tchangeCurrentComponent(goTo(Login));\n\t\t\t\tbreak;\n\t\t}\n\t}", "goToSignup(){\n this.props.navigator.push({\n component: Signup\n });\n }", "navigateToRoute(route, params, options) {\r\n let path = this.generate(route, params);\r\n return this.navigate(path, options);\r\n }", "_navigate(method, focusedItem, lastOpenedContainer) {\n const that = this;\n\n if (!focusedItem) {\n if (method === '_getNextEnabledChild') {\n that._hoverViaKeyboard(that._getFirstEnabledChild(lastOpenedContainer));\n }\n else {\n that._hoverViaKeyboard(that._getLastEnabledChild(lastOpenedContainer));\n }\n\n return;\n }\n\n const navigateToChild = that[method](focusedItem);\n\n if (navigateToChild) {\n focusedItem.$.removeClass('focus');\n focusedItem.removeAttribute('focus');\n\n that._hoverViaKeyboard(navigateToChild);\n }\n }", "openFromComponent(component, config) {\n return this._attach(component, config);\n }", "_navigate (){\n this.props.navigator.push({title: 'Home Screen', index: 0})\n }", "function onNavigationItemTap(args) {\n console.log('onNavigationItemTap');\n const component = args.object;\n const componentRoute = component.route;\n\n frameModule.topmost().navigate({\n moduleName: componentRoute,\n transition: {\n name: \"fade\"\n }\n });\n}", "_navigate (){\n this.props.navigator.push({title: 'Filter Page', index: 3})\n }", "componentDidMount(){\n\t\tthis.pushComponent();\n\t}", "openFindInPage() {\n this.controller.openFindInPage();\n }", "onElementoPressed(elemento){\n\n this.props.navigator.push({\n name: 'Detalles',\n passProps: {elemento: elemento}\n })\n\n }", "static goTo() {\n // to implement on child\n }", "static goPage(params, page) {\n const navigation = NavigationUtil.navigation;\n /*children level router can't jump to parent level router*/\n //const {navigation} = params;\n if (!navigation) {\n console.log('NavigationUtil.navigation can\\'t be null.')\n }\n navigation.navigate(\n page,\n {\n ...params\n }\n );\n }", "handleClick() {\n let conf = {\n type: \"standard__recordPage\", // type defines what type of PageReference it is, whether it is a record page,an lightning app, or login page or any other thing \n attributes: { // attribute is used to define the properties of the configuration file\n recordId: \"00B5g00000EXixUEAT\",\n objectApiName: \"Lead\",\n actionName: \"view\"\n }\n };\n\n this[NavigationMixin.Navigate](conf);\n }", "function navigatingTo(args) {\n var page = args.object;\n var vm = observable_1.fromObject({ device: new device_view_model_1.Device() });\n page.bindingContext = vm;\n}", "navigate(route){\n let state = null;\n\n switch(route){\n case 'superheroes':\n state = new App.states.SuperHeroes();\n break;\n }\n\n this.container.innerHTML = '';\n this.container.appendChild( state.render() );\n if (route === 'superheroes') {\n document.getElementById('first').onclick = () => state.firstPage()\n document.getElementById('next').onclick = () => state.nextPage()\n document.getElementById('previous').onclick = () => state.previousPage()\n document.getElementById('last').onclick = () => state.lastPage()\n document.getElementById('search').onclick = () => state.findHeroes()\n document.addEventListener('click', (e) => {\n if(e.target.tagName === 'TD') {\n const id = e.target.parentElement.getAttribute('data-ref')\n document.getElementById('modal-'+id).checked = true\n state.loadDetails(id)\n }\n })\n state.load()\n }\n }", "['click .method-container a'](e, $el) {\n\t\tToc.goToHash($el.attr('href'));\n\t}", "handleClick() {\n this[NavigationMixin.Navigate]({\n type: \"standard__recordPage\",\n attributes: {\n recordId: this.record.Id,\n actionName: \"view\"\n }\n });\n }", "navigateTo(pageId) {\r\n window.location.href = `#${pageId}`;\r\n }", "nav_helper_view(data) {\n\t\tp11.nav_helper_view(data);\n\t\tutil.elementClickable(p11.nextBtn)\n\t}", "async gotoMenuPage(testController) {\n await testController.click('#menu-page');\n }", "onDriveClick() {\n this.navigateTo(this.drive.root);\n }", "handleGoToSite(apt){\n // console.log('handleGoToSite: ', this)\n // console.log('handleGoToSite apt: ', apt)\n var url = `https://www.airbnb.com/rooms/${apt}`\n this.props.navigator.push({\n title: 'Web View',\n component: Web,\n passProps: {\n id: apt,\n url: url\n }\n })\n }", "async gotoMyVendorPage(testController) {\n await testController.click('#my-vendor-page');\n }", "navigateHyperlink() {\n let fieldBegin = this.getHyperlinkField();\n if (fieldBegin) {\n this.fireRequestNavigate(fieldBegin);\n }\n }", "async function navigateToCommand() {\r\n const page = agent.parameters.page\r\n\r\n if (page === \"home\") {\r\n await navigateTo('/')\r\n } else if (page === \"cart\") {\r\n if (token === \"\" || typeof token === 'undefined') {\r\n addAgentMessage(\"Sorry I cannot perform that. Please login first!\")\r\n return;\r\n }\r\n await navigateTo('/cart')\r\n }\r\n\r\n addAgentMessage('Okay!')\r\n }", "viewThisInvoice() { FlowRouter.go('invoice', { invoiceId: this.props.invoice._id } ) }", "function navigatingTo(args) {\n var page = args.object;\n page.bindingContext = new main_view_model_1.ViewModel();\n}", "function navigatingTo(args) {\n var page = args.object;\n var vm = new observable_1.Observable();\n var items = new observable_array_1.ObservableArray(observable_1.fromObject({ index: 0, text: \"Option 1\", selected: true }), observable_1.fromObject({ index: 1, text: \"Option 2\", selected: false }), observable_1.fromObject({ index: 2, text: \"Option 3\", selected: false }), observable_1.fromObject({ index: 3, text: \"Option 4\", selected: false }), observable_1.fromObject({ index: 4, text: \"Option 4\", selected: true }), observable_1.fromObject({ index: 5, text: \"Option 4\", selected: false }));\n vm.set(\"items\", items);\n page.bindingContext = vm;\n}", "function navigateTo(activeItem) {\n\n var text = $(activeItem).text();\n var path = $(activeItem).data(\"path\");\n var children = parseInt($(activeItem).data(\"children\"));\n\n if (children > 0) {\n\n path = path + \"\\\\\";\n $(idSearchBoxJQ).val(path);\n populateResults();\n }\n\n }", "async navigateTo() {\n await this.driver.get(this.pageUrl);\n await this.driver.wait(\n until.elementLocated(By.className(this.pageLocator)),\n this.defaultTimeout\n );\n }", "async navigateTo() {\n await this.driver.get(this.pageUrl);\n await this.driver.wait(\n until.elementLocated(By.css(`div[data-pid=${this.pageLocator}]`)),\n this.defaultTimeout\n );\n }", "navigateToLabPage() {\n return this._navigate(this.buttons.lab, 'labPage.js');\n }", "redirct(id)\n{\n this[NavigationMixin.Navigate]({\n type: 'standard__recordPage',\n attributes: {\n recordId: id,\n // objectApiName: 'Opportunity', // objectApiName is optional\n actionName: 'view'\n }\n });\n}", "navigateTo(path) {\n this.props.history.push(path);\n }", "navigateTo(date) {\n if (this.isOpen()) {\n this._cRef.instance.navigateTo(date);\n }\n }", "_navigateNext() {\n this._navigate(this.next.id, 'endpoint');\n }", "redirect() {\n const { navigate } = this.props.navigation\n navigate('MyWorkout')\n }", "static goToHome() {\n browser.refresh();\n new MenuBar().clickHome();\n }", "function NavBar_Item_Click(event)\n{\n\t//get html\n\tvar html = Browser_GetEventSourceElement(event);\n\t//this a sub component?\n\tif (html.Style_Parent)\n\t{\n\t\t//use the parent\n\t\thtml = html.Style_Parent;\n\t}\n\t//valid?\n\tif (html && html.Action_Parent && !html.IsSelected || __DESIGNER_CONTROLLER)\n\t{\n\t\t//get the data\n\t\tvar data = [\"\" + html.Action_Index];\n\t\t//trigger the event\n\t\tvar result = __SIMULATOR.ProcessEvent(new Event_Event(html.Action_Parent, __NEMESIS_EVENT_SELECT, data));\n\t\t//not blocking it?\n\t\tif (!result.Block)\n\t\t{\n\t\t\t//not an action?\n\t\t\tif (!result.AdvanceToStateId)\n\t\t\t{\n\t\t\t\t//notify that we have changed data\n\t\t\t\t__SIMULATOR.NotifyLogEvent({ Type: __LOG_USER_DATA, Name: html.Action_Parent.GetDesignerName(), Data: data });\n\t\t\t}\n\t\t\t//update selection\n\t\t\thtml.Action_Parent.Properties[__NEMESIS_PROPERTY_SELECTION] = html.Action_Index;\n\t\t\t//and update its state\n\t\t\tNavBar_UpdateSelection(html.Action_Parent.HTML, html.Action_Parent);\n\t\t}\n\t}\n}", "navigateToRequestTvShow() {\n console.log('Navegar a solicitar nueva serie');\n this.props.navigator.push({\n name: 'requestTvShow',\n passProps: {\n searchText: this.state.searchText\n }\n });\n }", "visitElementClicked() {\r\n this.props.visitListClick(this.props.index);\r\n }", "_navigate(routeName, props = null){\n\t this.props.navigator.push({\n\t name: routeName,\n\t passProps: { ...props }\n\t })\n\t}", "function Component() {\n return this; // this is needed in Edge !!!\n } // Component is lazily setup because it needs", "_navigateList(){\n this.props.navigator.push({\n name: 'MyListView', // Matches route.name\n })\n }", "showProjectChooser() {\n return navigate(\"/\")\n }", "navigate(fragment, options) {\r\n if (!this.isConfigured && this.parent) {\r\n return this.parent.navigate(fragment, options);\r\n }\r\n this.isExplicitNavigation = true;\r\n return this.history.navigate(_resolveUrl(fragment, this.baseUrl, this.history._hasPushState), options);\r\n }", "navigate(route) {\n return this.props.navigation.dispatch(\n NavigationActions.navigate({ routeName: route })\n );\n }", "async gotoManageVendorPage(testController) {\n await testController.click('#manage-vendor-page');\n }", "function navigatingTo(args) {\n var page = args.object;\n page.bindingContext = new RockModel_1.RockModel(page);\n}", "navigatPageMonCompte() {\n this.props.navigation.navigate('MonCompte');\n }", "clickOnServicesLink() {\n this.servicesLink.click();\n }", "goToView(viewName, options, variable) {\n options = options || {};\n const pageName = options.pageName;\n const transition = options.transition || '';\n const $event = options.$event;\n const activePage = this.app.activePage;\n const prefabName = variable && variable._context && variable._context.prefabName;\n // Check if app is Prefab\n if (this.app.isPrefabType) {\n this.goToElementView($(parentSelector).find('[name=\"' + viewName + '\"]'), viewName, pageName, variable);\n }\n else {\n // checking if the element is present in the page or not, if no show an error toaster\n // if yes check if it is inside a partial/prefab in the page and then highlight the respective element\n // else goto the page in which the element exists and highlight the element\n if (pageName !== activePage.activePageName && !prefabName) {\n if (this.isPartialWithNameExists(pageName)) {\n this.goToElementView($('[partialcontainer][content=\"' + pageName + '\"]').find('[name=\"' + viewName + '\"]'), viewName, pageName, variable);\n }\n else {\n // Todo[Shubham]: Make an API call to get all pages and check if the page name\n // is a page and then do this call else show an error as:\n // this.app.notifyApp(CONSTANTS.WIDGET_DOESNT_EXIST, 'error');\n this.goToPage(pageName, {\n viewName: viewName,\n $event: $event,\n transition: transition,\n urlParams: options.urlParams\n });\n // subscribe to an event named pageReady which notifies this subscriber\n // when all widgets in page are loaded i.e when page is ready\n const pageReadySubscriber = this.app.subscribe('pageReady', (page) => {\n this.goToElementView($(parentSelector).find('[name=\"' + viewName + '\"]'), viewName, pageName, variable);\n pageReadySubscriber();\n });\n }\n }\n else if (prefabName && this.isPrefabWithNameExists(prefabName)) {\n this.goToElementView($('[prefabName=\"' + prefabName + '\"]').find('[name=\"' + viewName + '\"]'), viewName, pageName, variable);\n }\n else if (!pageName || pageName === activePage.activePageName) {\n this.goToElementView($(parentSelector).find('[name=\"' + viewName + '\"]'), viewName, pageName, variable);\n }\n else {\n this.app.notifyApp(CONSTANTS.WIDGET_DOESNT_EXIST, 'error');\n }\n }\n }", "getComponent() {\n return this.querySelector(\"div\");\n }", "scrollIntoViewIfNeeded(params) {\n if (this._isString(params))\n params = { selector: params }\n return this._scrollIntoViewIfNeeded(this.currentTabDebuggeeId, params.selector, params.hrefRegex)\n }", "async gotoAddMenuPage(testController) {\n await testController.click('#add-menu-food-page');\n }", "onRender () {\n console.log(this.component);\n if(undefined !== this.component) {\n this.el.querySelector(`[data-id=\"${this.component}\"]`).classList.add(\"active\");\n }\n\n var Navigation = new NavigationView();\n App.getNavigationContainer().show(Navigation);\n Navigation.setItemAsActive(\"components\");\n this.showComponent(this.component);\n\n }", "navigateToClinicPage() {\n return this._navigate(this.buttons.clinic, 'clinicPage.js');\n }", "function NavNavigate(/**string*/ page, /**string*/ company)\r\n{\r\n\tSeS(\"G_AddressBar\").DoClick();\r\n\tvar addressEdit = SeS(\"G_AddressEdit\");\r\n\tif (!company)\r\n\t{\r\n\t\tvar currentPage = \"\" + addressEdit.GetText();\r\n\t\tcompany = currentPage.split(\"/\")[0];\r\n\t}\r\n\taddressEdit.DoSetText(company + \"/\" + page);\r\n\taddressEdit.DoSendKeys(\"{ENTER}\");\r\n}", "next() {\n const that = this;\n\n that.navigateTo(that.pageIndex + 1);\n }", "_levelOneNavigate(method, focusedItem, lastOpenedContainer) {\n const that = this;\n\n if (!focusedItem) {\n const enabledChild = that[method](lastOpenedContainer);\n\n if (enabledChild) {\n that._hoverViaKeyboard(enabledChild);\n }\n }\n else {\n if (method === '_getLastEnabledChild') {\n that._navigate('_getPreviousEnabledChild', focusedItem, lastOpenedContainer);\n }\n else {\n that._navigate('_getNextEnabledChild', focusedItem, lastOpenedContainer);\n }\n }\n }", "_onSelect(data) { \n this.props.navigator.push({title: 'Details Page', index: 4, \n passProps : { data: data}}) \n }", "navigate() {\n this.props.history.push('/contact');\n }", "homeClicked() {\n this.props.navChanged(\"Home\");\n }", "function goToWidget(id) {\n document.getElementById(id).scrollIntoView({\n behavior: 'smooth'\n });\n }", "goTo(route) {\n this.props.history.replace(`/${route}`)\n }", "@api invoke() {\n console.log(\"Hi, I'm an action. INVOKE HEADLESS\");\n let event = new ShowToastEvent({\n title: 'I am a headless action!',\n message: 'Hi there! Starting...',\n });\n this.dispatchEvent(event);\n // this[NavigationMixin.Navigate]({\n // type: 'standard__objectPage',\n // attributes: {\n // objectApiName: 'Contact',\n // actionName: 'home',\n // },\n // });\n }", "activeComponent(){ \n switch(this.nav.state.activeComponent){\n case \"Enter\":\n return(<Enter/>)\n case \"Login\":\n return(<Login/>)\n default:\n if(typeof this.props.component != 'undefined' && this.props.component.lenght>0){\n Alerts.show(\"Bad component \" + this.props.component)\n }\n if(window.location.hash.length==0){ //to avoid excess mount of the default component\n return (<Enter/>)\n }\n }\n\n }", "static openContactPage() {\n browser.click(HomePage.elements.contactpagelink)\n }", "function MenuItem(props) {\n /*\n * Store our anchorTarget in state\n * We do not set it here, preferring to wait for after the component\n * is mounted to avoid any errors\n */\n\n /*\n * Where all the magic happens -- scrollIntoView on click\n */\n const handleClick = event => {\n event.preventDefault();\n props.target.current.scrollIntoView({\n behavior: \"smooth\",\n block: \"start\"\n });\n };\n\n /*\n * Return the MenuItem as JSX\n * Remember to set your ariaLabel for accessability!\n */\n return (\n <li style={{ color: \"white\" }} className=\"anchors\">\n <a\n href={`#${props.name}`}\n onClick={handleClick}\n ariaLabel={`Scroll to ${props.name}`}\n >\n\n <div className=\"anchors-button\"><img alt=\"\" src={process.env.PUBLIC_URL + \"/assets/navButtonBlack.svg\"} /><span style={{position: 'absolute'}}>{props.name}</span></div>\n </a>\n </li>\n );\n}", "onClick(button) {\n this.setState({\n page: button\n });\n document.getElementById(button).scrollIntoView({\n behavior: \"smooth\",\n block: \"nearest\"\n });\n }", "_renderNewRootComponent(/* instance, ... */) { }", "goToHomePage() {\r\n Actions.jump('selectMethod');\r\n }", "navigateToDocs() {\n this.props.enableDocsList();\n }", "goTo (x, y) {\n\t\tthis.props.changeThatView(x,y)\n\t}", "onNavigate (routeData) {\n this.channel.trigger('before:navigate', routeData.linked)\n\n routeData.linked.show(routeData.params)\n .then(() => {\n this.channel.trigger('navigate', routeData.linked)\n })\n .catch((error) => {\n console.error(error)\n this.channel.trigger('error')\n })\n }", "handleClick() {\n\t\tthis.props.changePage(\"aboutSplunk\");\n\t}", "async gotoAddVendorPage(testController) {\n await testController.click('#add-vendor-page');\n }", "pageScrollTo(){\n let element = document.getElementById( App.current_page );\n \n //scroll to the particular section of the page.\n if( element ){\n element.scrollIntoView({behavior: 'smooth'});\n }\n }", "componentDidMount() {\n this.gotoPage(this.state.currentPage);\n }", "getCurrentComponent(){\n return this.currentComponent;\n }", "function GoToProductDetail(e) {\n Ti.API.info(\"inside GoToProductDetails\");\n Ti.API.info(\"on click\" + e);\n Ti.API.info(\"on click stringify\" + JSON.stringify(e));\n Ti.API.info(e.section.getItemAt(e.itemIndex));\n Ti.API.info(e.section.getItemAt(e.itemIndex).properties.Mid);\n var ProductDetail = Alloy.createController('ProductDetail', e.section.getItemAt(e.itemIndex).properties.Mid, access_token).getView();\n ProductDetail.open();\n\n}" ]
[ "0.61909544", "0.58901256", "0.5834737", "0.5770242", "0.56208116", "0.5563699", "0.55466664", "0.55171984", "0.5478709", "0.54625344", "0.5461492", "0.5452722", "0.54364544", "0.5411622", "0.54054534", "0.5397201", "0.5391978", "0.53629184", "0.5354345", "0.53436154", "0.534234", "0.533602", "0.5330076", "0.532159", "0.5316912", "0.5299056", "0.5293208", "0.528343", "0.52749586", "0.526225", "0.5252324", "0.5244987", "0.52439183", "0.5230936", "0.5227601", "0.5227037", "0.52261096", "0.5217641", "0.52117836", "0.51991177", "0.51901203", "0.51815116", "0.51796746", "0.5164262", "0.51623464", "0.5147075", "0.51467216", "0.51289845", "0.5125727", "0.511222", "0.50846237", "0.508245", "0.50811285", "0.50700635", "0.5069828", "0.5066224", "0.5048878", "0.50360066", "0.5033327", "0.50166255", "0.5015376", "0.5015362", "0.50110775", "0.50041026", "0.49971083", "0.4996851", "0.4996715", "0.49940476", "0.4989705", "0.4980675", "0.49753004", "0.4974242", "0.49708638", "0.49674794", "0.49565142", "0.49442884", "0.49408984", "0.4935282", "0.49269357", "0.49244976", "0.49221638", "0.4921551", "0.49192473", "0.49168673", "0.4905139", "0.49034983", "0.4903083", "0.49030235", "0.48992833", "0.48980623", "0.4888592", "0.48869553", "0.48867783", "0.48854876", "0.48801118", "0.48794448", "0.48696932", "0.4867998", "0.4867062", "0.48574993", "0.48563132" ]
0.0
-1
Public API for matching a URL pathname to a path.
function matchPath(pathname, options) { if (options === void 0) { options = {}; } if (typeof options === "string" || Array.isArray(options)) { options = { path: options }; } var _options = options, path = _options.path, _options$exact = _options.exact, exact = _options$exact === void 0 ? false : _options$exact, _options$strict = _options.strict, strict = _options$strict === void 0 ? false : _options$strict, _options$sensitive = _options.sensitive, sensitive = _options$sensitive === void 0 ? false : _options$sensitive; var paths = [].concat(path); return paths.reduce(function (matched, path) { if (!path && path !== "") return null; if (matched) return matched; var _compilePath = compilePath$1(path, { end: exact, strict: strict, sensitive: sensitive }), regexp = _compilePath.regexp, keys = _compilePath.keys; var match = regexp.exec(pathname); if (!match) return null; var url = match[0], values = match.slice(1); var isExact = pathname === url; if (exact && !isExact) return null; return { path: path, // the path used to match url: path === "/" && url === "" ? "/" : url, // the matched portion of the URL isExact: isExact, // whether or not we matched exactly params: keys.reduce(function (memo, key, index) { memo[key.name] = values[index]; return memo; }, {}) }; }, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function matchPath(pathname,options){if(options===void 0){options={};}if(typeof options===\"string\")options={path:options};var _options=options,path=_options.path,_options$exact=_options.exact,exact=_options$exact===void 0?false:_options$exact,_options$strict=_options.strict,strict=_options$strict===void 0?false:_options$strict,_options$sensitive=_options.sensitive,sensitive=_options$sensitive===void 0?false:_options$sensitive;var paths=[].concat(path);return paths.reduce(function(matched,path){if(matched)return matched;var _compilePath=compilePath$1(path,{end:exact,strict:strict,sensitive:sensitive}),regexp=_compilePath.regexp,keys=_compilePath.keys;var match=regexp.exec(pathname);if(!match)return null;var url=match[0],values=match.slice(1);var isExact=pathname===url;if(exact&&!isExact)return null;return{path:path,// the path used to match\nurl:path===\"/\"&&url===\"\"?\"/\":url,// the matched portion of the URL\nisExact:isExact,// whether or not we matched exactly\nparams:keys.reduce(function(memo,key,index){memo[key.name]=values[index];return memo;},{})};},null);}", "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path) return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index$$1) {\n memo[key.name] = values[index$$1];\n return memo;\n }, {})\n };\n }, null);\n}", "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path) return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path) return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path) return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path) return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path) return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path) return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path) return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === 'string' || Array.isArray(options)) {\n options = {\n path: options,\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive =\n _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function(matched, path) {\n if (!path && path !== '') return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive,\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === '/' && url === '' ? '/' : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function(memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {}),\n };\n }, null);\n }", "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "function matchPath(path, source) {\r\n const matcher = match(source, { decode: decodeURIComponent });\r\n return matcher(path);\r\n}", "function matchPath(path, source) {\n const matcher = match(source, { decode: decodeURIComponent });\n return matcher(path);\n}", "function react_router_matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path) return null;\n if (matched) return matched;\n\n var _compilePath = react_router_compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "computeMatch(pathname) {\n if (!pathname) {\n const location = this.activeRouter.get('location');\n pathname = location.pathname;\n }\n const match = matchPath(pathname, {\n path: this.urlMatch || this.url,\n exact: this.exact,\n strict: this.strict\n });\n return match;\n }", "function matchPattern(pattern,pathname){ // Ensure pattern starts with leading slash for consistency with pathname.\nif(pattern.charAt(0)!=='/'){pattern='/'+pattern;}var _compilePattern2=compilePattern(pattern);var regexpSource=_compilePattern2.regexpSource;var paramNames=_compilePattern2.paramNames;var tokens=_compilePattern2.tokens;if(pattern.charAt(pattern.length-1)!=='/'){regexpSource+='/?'; // Allow optional path separator at end.\n} // Special-case patterns like '*' for catch-all routes.\nif(tokens[tokens.length-1]==='*'){regexpSource+='$';}var match=pathname.match(new RegExp('^'+regexpSource,'i'));if(match==null){return null;}var matchedPath=match[0];var remainingPathname=pathname.substr(matchedPath.length);if(remainingPathname){ // Require that the match ends at a path separator, if we didn't match\n// the full path, so any remaining pathname is a new path segment.\nif(matchedPath.charAt(matchedPath.length-1)!=='/'){return null;} // If there is a remaining pathname, treat the path separator as part of\n// the remaining pathname for properly continuing the match.\nremainingPathname='/'+remainingPathname;}return {remainingPathname:remainingPathname,paramNames:paramNames,paramValues:match.slice(1).map(function(v){return v&&decodeURIComponent(v);})};}", "function match(_ref, callback) {\n var routes = _ref.routes;\n var location = _ref.location;\n var parseQueryString = _ref.parseQueryString;\n var stringifyQuery = _ref.stringifyQuery;\n var basename = _ref.basename;\n\n !location ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'match needs a location') : _invariant2['default'](false) : undefined;\n\n var history = createHistory({\n routes: _RouteUtils.createRoutes(routes),\n parseQueryString: parseQueryString,\n stringifyQuery: stringifyQuery,\n basename: basename\n });\n\n // Allow match({ location: '/the/path', ... })\n if (typeof location === 'string') location = history.createLocation(location);\n\n history.match(location, function (error, redirectLocation, nextState) {\n callback(error, redirectLocation, nextState && _extends({}, nextState, { history: history }));\n });\n}", "function match(_ref, callback) {\n var routes = _ref.routes;\n var location = _ref.location;\n var parseQueryString = _ref.parseQueryString;\n var stringifyQuery = _ref.stringifyQuery;\n var basename = _ref.basename;\n\n !location ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'match needs a location') : _invariant2['default'](false) : undefined;\n\n var history = createHistory({\n routes: _RouteUtils.createRoutes(routes),\n parseQueryString: parseQueryString,\n stringifyQuery: stringifyQuery,\n basename: basename\n });\n\n // Allow match({ location: '/the/path', ... })\n if (typeof location === 'string') location = history.createLocation(location);\n\n history.match(location, function (error, redirectLocation, nextState) {\n callback(error, redirectLocation, nextState && _extends({}, nextState, { history: history }));\n });\n}", "computeMatch() {\n if (this.location) {\n this.match = matchPath.matchPath(this.location.pathname, {\n path: this.urlMatch || this.url,\n exact: this.exact,\n strict: this.strict\n });\n }\n }", "function match(_ref, callback) {\n\t var routes = _ref.routes;\n\t var location = _ref.location;\n\t var parseQueryString = _ref.parseQueryString;\n\t var stringifyQuery = _ref.stringifyQuery;\n\t var basename = _ref.basename;\n\n\t !location ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'match needs a location') : _invariant2['default'](false) : undefined;\n\n\t var history = createHistory({\n\t routes: _RouteUtils.createRoutes(routes),\n\t parseQueryString: parseQueryString,\n\t stringifyQuery: stringifyQuery,\n\t basename: basename\n\t });\n\n\t // Allow match({ location: '/the/path', ... })\n\t if (typeof location === 'string') location = history.createLocation(location);\n\n\t history.match(location, function (error, redirectLocation, nextState) {\n\t callback(error, redirectLocation, nextState && _extends({}, nextState, { history: history }));\n\t });\n\t}", "function path(path, callback) {\n var m = regexpify(path).exec(document.location.pathname);\n if (m) {\n callback.call(this, m);\n }\n}", "function match(_ref, callback) {\n\t var routes = _ref.routes;\n\t var location = _ref.location;\n\t var parseQueryString = _ref.parseQueryString;\n\t var stringifyQuery = _ref.stringifyQuery;\n\t var basename = _ref.basename;\n\n\t !location ? true ? _invariant2['default'](false, 'match needs a location') : _invariant2['default'](false) : undefined;\n\n\t var history = createHistory({\n\t routes: _RouteUtils.createRoutes(routes),\n\t parseQueryString: parseQueryString,\n\t stringifyQuery: stringifyQuery,\n\t basename: basename\n\t });\n\n\t // Allow match({ location: '/the/path', ... })\n\t if (typeof location === 'string') location = history.createLocation(location);\n\n\t history.match(location, function (error, redirectLocation, nextState) {\n\t callback(error, redirectLocation, nextState && _extends({}, nextState, { history: history }));\n\t });\n\t}", "function match(_ref, callback) {\n\t var routes = _ref.routes;\n\t var location = _ref.location;\n\t var parseQueryString = _ref.parseQueryString;\n\t var stringifyQuery = _ref.stringifyQuery;\n\t var basename = _ref.basename;\n\n\t !location ? true ? _invariant2['default'](false, 'match needs a location') : _invariant2['default'](false) : undefined;\n\n\t var history = createHistory({\n\t routes: _RouteUtils.createRoutes(routes),\n\t parseQueryString: parseQueryString,\n\t stringifyQuery: stringifyQuery,\n\t basename: basename\n\t });\n\n\t // Allow match({ location: '/the/path', ... })\n\t if (typeof location === 'string') location = history.createLocation(location);\n\n\t history.match(location, function (error, redirectLocation, nextState) {\n\t callback(error, redirectLocation, nextState && _extends({}, nextState, { history: history }));\n\t });\n\t}", "function match(_ref, callback) {\n\t var routes = _ref.routes;\n\t var location = _ref.location;\n\t var parseQueryString = _ref.parseQueryString;\n\t var stringifyQuery = _ref.stringifyQuery;\n\t var basename = _ref.basename;\n\n\t !location ? false ? _invariant2['default'](false, 'match needs a location') : _invariant2['default'](false) : undefined;\n\n\t var history = createHistory({\n\t routes: _RouteUtils.createRoutes(routes),\n\t parseQueryString: parseQueryString,\n\t stringifyQuery: stringifyQuery,\n\t basename: basename\n\t });\n\n\t // Allow match({ location: '/the/path', ... })\n\t if (typeof location === 'string') location = history.createLocation(location);\n\n\t history.match(location, function (error, redirectLocation, nextState) {\n\t callback(error, redirectLocation, nextState && _extends({}, nextState, { history: history }));\n\t });\n\t}", "function matchHandler (url)\n{\n request (url, cb);\n}", "match(path, req, res) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet {mPath, mRegexp: regexp, mKeys} = this;\n\t\t\tif (!mPath && !path) {return resolve();}\n\t\t\tif (path === mPath) {return resolve();}\n\t\t\tif (!mPath) {return reject();}\n\t\t\tlet match = regexp.exec(path);\n\t\t\tif (!match) {return reject();}\n\t\t\tif (1 === match.length) {\n\t\t\t\t// Totally match.\n\t\t\t\treturn resolve();\n\t\t\t}\n\t\t\t// Here can use async.\n\t\t\tlet i = 1;\n\t\t\tlet t = () => {\n\t\t\t\tif (i >= match.length) {return resolve();}\n\t\t\t\tlet matchi = match[i];\n\t\t\t\t// Set params.\n\t\t\t\tlet name = mKeys[i - 1].name;\n\t\t\t\ti++;\n\t\t\t\tlet value = decode_param(matchi);\n\t\t\t\t// if (val !== undefined || !(hasOwnProperty.call(params, prop))) {\n\t\t\t\tthis.mRouter.onParamParsed(null, req, res, name, value, t);\n\t\t\t\t// }\n\t\t\t};\n\t\t\tt();\n\t\t});\n\t}", "function matchPath(verb, path) {\n for (var i = 0; i < routes[verb].length; i++) {\n var routeObj = routes[verb][i];\n if (path.match(routeObj.rePath)) {\n return routeObj;\n }\n }\n return false;\n }", "function routePath(url) {\n var match = parseUrl(url)\n return match &&\n match.protocol === winLocation.protocol &&\n match.host === winLocation.host &&\n match.pathname + (match.search || '')\n}", "getMatch(pathname) {\n let route = this;\n if (route.data.path instanceof Array) {\n let match=null;\n route.data.path.some((r) => {\n match= this.match(r,pathname);\n return match != null;\n });\n return match;\n }else {\n return this.match(route.data.path,pathname);\n }\n }", "findStringFromRoute(param){\n let existStatus = false\n if(this.props.location.pathname.indexOf(param) != -1){\n existStatus = true\n }else{\n existStatus = false\n }\n return existStatus\n }", "function matchPattern(pattern,pathname){ // Ensure pattern starts with leading slash for consistency with pathname.\n\tif(pattern.charAt(0)!=='/'){pattern='/'+pattern;}var _compilePattern2=compilePattern(pattern);var regexpSource=_compilePattern2.regexpSource;var paramNames=_compilePattern2.paramNames;var tokens=_compilePattern2.tokens;if(pattern.charAt(pattern.length-1)!=='/'){regexpSource+='/?'; // Allow optional path separator at end.\n\t} // Special-case patterns like '*' for catch-all routes.\n\tif(tokens[tokens.length-1]==='*'){regexpSource+='$';}var match=pathname.match(new RegExp('^'+regexpSource,'i'));if(match==null){return null;}var matchedPath=match[0];var remainingPathname=pathname.substr(matchedPath.length);if(remainingPathname){ // Require that the match ends at a path separator, if we didn't match\n\t// the full path, so any remaining pathname is a new path segment.\n\tif(matchedPath.charAt(matchedPath.length-1)!=='/'){return null;} // If there is a remaining pathname, treat the path separator as part of\n\t// the remaining pathname for properly continuing the match.\n\tremainingPathname='/'+remainingPathname;}return {remainingPathname:remainingPathname,paramNames:paramNames,paramValues:match.slice(1).map(function(v){return v&&decodeURIComponent(v);})};}", "function matchPattern(pattern,pathname){ // Ensure pattern starts with leading slash for consistency with pathname.\n\tif(pattern.charAt(0)!=='/'){pattern='/'+pattern;}var _compilePattern2=compilePattern(pattern);var regexpSource=_compilePattern2.regexpSource;var paramNames=_compilePattern2.paramNames;var tokens=_compilePattern2.tokens;if(pattern.charAt(pattern.length-1)!=='/'){regexpSource+='/?'; // Allow optional path separator at end.\n\t} // Special-case patterns like '*' for catch-all routes.\n\tif(tokens[tokens.length-1]==='*'){regexpSource+='$';}var match=pathname.match(new RegExp('^'+regexpSource,'i'));if(match==null){return null;}var matchedPath=match[0];var remainingPathname=pathname.substr(matchedPath.length);if(remainingPathname){ // Require that the match ends at a path separator, if we didn't match\n\t// the full path, so any remaining pathname is a new path segment.\n\tif(matchedPath.charAt(matchedPath.length-1)!=='/'){return null;} // If there is a remaining pathname, treat the path separator as part of\n\t// the remaining pathname for properly continuing the match.\n\tremainingPathname='/'+remainingPathname;}return {remainingPathname:remainingPathname,paramNames:paramNames,paramValues:match.slice(1).map(function(v){return v&&decodeURIComponent(v);})};}", "function match(_ref, callback) { // 38\n var routes = _ref.routes; // 39\n var location = _ref.location; // 40\n var parseQueryString = _ref.parseQueryString; // 41\n var stringifyQuery = _ref.stringifyQuery; // 42\n var basename = _ref.basename; // 43\n // 44\n _invariant2['default'](location, 'match needs a location'); // 45\n // 46\n var history = createHistory({ // 47\n routes: _RouteUtils.createRoutes(routes), // 48\n parseQueryString: parseQueryString, // 49\n stringifyQuery: stringifyQuery, // 50\n basename: basename // 51\n }); // 52\n // 53\n // Allow match({ location: '/the/path', ... }) // 54\n if (typeof location === 'string') location = history.createLocation(location);\n // 56\n history.match(location, function (error, redirectLocation, nextState) {\n callback(error, redirectLocation, nextState && _extends({}, nextState, { history: history }));\n }); // 59\n} // 60", "function pathMatcher(url){\n\t// console.log('pathMatcher', url, routes_tree)\n\tif (! routes_tree) throw new Error('No routes defined.')\n\n\tvar args = [], n = 0\n\n\t// Convert route into array of URL segments, ending with \"$\", the leaf node.\n\tvar route = url.slice(1).replace(/\\/$/g,'').split('?')[0].split('/')\n\troute[route.length] = '$'\n\n\tvar result = route.reduce(treeClimber, routes_tree)\n\tvar ctrl\n\tif (result && result[0]) {\n\t\tctrl = function(req,res){ // leaf node from matching route, or undefined.\n\t\t\tresult[0](req,res,args)\n\t\t}\n\t} else {\n\t\tctrl = null\n\t}\n\treturn ctrl\n\n\n\t// We define this internally so that args and n are within scope.\n\t// Climb the routes tree. Always check first for a matching static route segment before trying regex.\n\tfunction treeClimber(obj, seg){\n\t\tif (! obj) return null\n\n\t\treturn obj[seg] || (function(){\n\t\t\tvar regs = obj['<regex>'] || undefined\n\t\t\tif (regs) {\n\t\t\t\tfor (var i=0; i < regs.patterns.length; i++) {\n\t\t\t\t\tif (regs.patterns[i].test(seg)) {\n\t\t\t\t\t\targs[n++] = seg // Increments n after the value is used for the assignment. More performant than .push().\n\t\t\t\t\t\treturn regs[regs.patterns[i].toString()]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})()\n\t}\n\n}", "function matcher(strToMatch) {\n var reg = extReg(strToMatch);\n return function (path) {\n if (path.search(reg) >= 0) {\n return path;\n }\n else {\n return undefined;\n }\n };\n}", "function matchPattern(pattern, pathname) {\r\n\t // Ensure pattern starts with leading slash for consistency with pathname.\r\n\t if (pattern.charAt(0) !== '/') {\r\n\t pattern = '/' + pattern;\r\n\t }\r\n\t\r\n\t var _compilePattern2 = compilePattern(pattern);\r\n\t\r\n\t var regexpSource = _compilePattern2.regexpSource;\r\n\t var paramNames = _compilePattern2.paramNames;\r\n\t var tokens = _compilePattern2.tokens;\r\n\t\r\n\t if (pattern.charAt(pattern.length - 1) !== '/') {\r\n\t regexpSource += '/?'; // Allow optional path separator at end.\r\n\t }\r\n\t\r\n\t // Special-case patterns like '*' for catch-all routes.\r\n\t if (tokens[tokens.length - 1] === '*') {\r\n\t regexpSource += '$';\r\n\t }\r\n\t\r\n\t var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\r\n\t if (match == null) {\r\n\t return null;\r\n\t }\r\n\t\r\n\t var matchedPath = match[0];\r\n\t var remainingPathname = pathname.substr(matchedPath.length);\r\n\t\r\n\t if (remainingPathname) {\r\n\t // Require that the match ends at a path separator, if we didn't match\r\n\t // the full path, so any remaining pathname is a new path segment.\r\n\t if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\r\n\t return null;\r\n\t }\r\n\t\r\n\t // If there is a remaining pathname, treat the path separator as part of\r\n\t // the remaining pathname for properly continuing the match.\r\n\t remainingPathname = '/' + remainingPathname;\r\n\t }\r\n\t\r\n\t return {\r\n\t remainingPathname: remainingPathname,\r\n\t paramNames: paramNames,\r\n\t paramValues: match.slice(1).map(function (v) {\r\n\t return v && decodeURIComponent(v);\r\n\t })\r\n\t };\r\n\t}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern),\n regexpSource = _compilePattern2.regexpSource,\n paramNames = _compilePattern2.paramNames,\n tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n } // Special-case patterns like '*' for catch-all routes.\n\n\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n } // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n\n\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function getParam(regex){\r\n\treturn document.location.pathname.match(regex);\r\n}", "function mountMatchesUrl (mount, url) {\n\n mount = ensureTrailingSlash(mount);\n url = ensureTrailingSlash(removeQuery(url));\n return mount === url.slice(0, mount.length);\n\n function removeQuery (path) {\n var queryPosition = path.indexOf('?'),\n hasQuery = Boolean(queryPosition + 1);\n return hasQuery ? path.slice(0, queryPosition) : path;\n }\n function ensureTrailingSlash (path) {\n var last = path.length - 1;\n return (path[last] !== '/') ? path + '/' : path;\n }\n\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern);\n\n var regexpSource = _compilePattern2.regexpSource;\n var paramNames = _compilePattern2.paramNames;\n var tokens = _compilePattern2.tokens;\n\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern);\n\n var regexpSource = _compilePattern2.regexpSource;\n var paramNames = _compilePattern2.paramNames;\n var tokens = _compilePattern2.tokens;\n\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern);\n\n var regexpSource = _compilePattern2.regexpSource;\n var paramNames = _compilePattern2.paramNames;\n var tokens = _compilePattern2.tokens;\n\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern);\n\n var regexpSource = _compilePattern2.regexpSource;\n var paramNames = _compilePattern2.paramNames;\n var tokens = _compilePattern2.tokens;\n\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern);\n\n var regexpSource = _compilePattern2.regexpSource;\n var paramNames = _compilePattern2.paramNames;\n var tokens = _compilePattern2.tokens;\n\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern);\n\n var regexpSource = _compilePattern2.regexpSource;\n var paramNames = _compilePattern2.paramNames;\n var tokens = _compilePattern2.tokens;\n\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern);\n\n var regexpSource = _compilePattern2.regexpSource;\n var paramNames = _compilePattern2.paramNames;\n var tokens = _compilePattern2.tokens;\n\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern);\n\n var regexpSource = _compilePattern2.regexpSource;\n var paramNames = _compilePattern2.paramNames;\n var tokens = _compilePattern2.tokens;\n\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern);\n\n var regexpSource = _compilePattern2.regexpSource;\n var paramNames = _compilePattern2.paramNames;\n var tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern),\n regexpSource = _compilePattern2.regexpSource,\n paramNames = _compilePattern2.paramNames,\n tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern),\n regexpSource = _compilePattern2.regexpSource,\n paramNames = _compilePattern2.paramNames,\n tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern),\n regexpSource = _compilePattern2.regexpSource,\n paramNames = _compilePattern2.paramNames,\n tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern),\n regexpSource = _compilePattern2.regexpSource,\n paramNames = _compilePattern2.paramNames,\n tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern),\n regexpSource = _compilePattern2.regexpSource,\n paramNames = _compilePattern2.paramNames,\n tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern),\n regexpSource = _compilePattern2.regexpSource,\n paramNames = _compilePattern2.paramNames,\n tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern),\n regexpSource = _compilePattern2.regexpSource,\n paramNames = _compilePattern2.paramNames,\n tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern),\n regexpSource = _compilePattern2.regexpSource,\n paramNames = _compilePattern2.paramNames,\n tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern),\n regexpSource = _compilePattern2.regexpSource,\n paramNames = _compilePattern2.paramNames,\n tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern),\n regexpSource = _compilePattern2.regexpSource,\n paramNames = _compilePattern2.paramNames,\n tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern),\n regexpSource = _compilePattern2.regexpSource,\n paramNames = _compilePattern2.paramNames,\n tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern),\n regexpSource = _compilePattern2.regexpSource,\n paramNames = _compilePattern2.paramNames,\n tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern),\n regexpSource = _compilePattern2.regexpSource,\n paramNames = _compilePattern2.paramNames,\n tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern),\n regexpSource = _compilePattern2.regexpSource,\n paramNames = _compilePattern2.paramNames,\n tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern),\n regexpSource = _compilePattern2.regexpSource,\n paramNames = _compilePattern2.paramNames,\n tokens = _compilePattern2.tokens;\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}" ]
[ "0.7498882", "0.6678314", "0.6661474", "0.6661474", "0.6661474", "0.6661474", "0.6661474", "0.6661474", "0.6661474", "0.6660707", "0.66498595", "0.6639335", "0.6639335", "0.6639335", "0.65086794", "0.64705783", "0.63369954", "0.61034983", "0.6070344", "0.6049082", "0.6049082", "0.6048111", "0.603958", "0.5976412", "0.59523493", "0.59523493", "0.59476316", "0.59067875", "0.59029776", "0.58731973", "0.5869506", "0.5855365", "0.5806719", "0.58001065", "0.58001065", "0.57439035", "0.57305956", "0.5693508", "0.55736667", "0.5573345", "0.5553737", "0.5546255", "0.5535176", "0.5535176", "0.5535176", "0.5535176", "0.5535176", "0.5535176", "0.5535176", "0.5535176", "0.5534146", "0.5522162", "0.5522162", "0.5522162", "0.5522162", "0.5522162", "0.5522162", "0.5522162", "0.5522162", "0.5522162", "0.5522162", "0.5522162", "0.5522162", "0.5522162", "0.5522162", "0.5522162" ]
0.6640138
37
A public higherorder component to access the imperative API
function withRouter(Component) { var displayName = "withRouter(" + (Component.displayName || Component.name) + ")"; var C = function C(props) { var wrappedComponentRef = props.wrappedComponentRef, remainingProps = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_10__["default"])(props, ["wrappedComponentRef"]); return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Consumer, null, function (context) { !context ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__["default"])(false, "You should not use <" + displayName + " /> outside a <Router>") : undefined : void 0; return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__["default"])({}, remainingProps, context, { ref: wrappedComponentRef })); }); }; C.displayName = displayName; C.WrappedComponent = Component; if (true) { C.propTypes = { wrappedComponentRef: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object]) }; } return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_11___default()(C, Component); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FunctionalComponent() {}", "function higherOrder(a) {\n a(); \n}", "function purchaseItem(...fns) => fns.reduce(compose)\n\n{} // so I have to make sure that I have returned in here this property", "_isolatedComputeForWrapper(component) {\n const computations = ReactInterpreter.computations(component);\n return this.optimizer.compute(computations);\n }", "function purchaseItem(...fns) => fns.reduce(compose)\n\n{} // the reduce function which is in itself a higher order function", "get asTraversal() {\n return traversal(this.reduce, this.toArray, this.over)\n }", "_makeIterator() {\n return this.fn.apply(this.context, this.args);\n }", "fmap (_) {\n return this\n }", "function Composition() {}", "function Composition() {}", "function Composition() {}", "function Composition() {}", "ap (aFn) { \n //return this.fmap(aFn.value)\n return aFn.chain(fn => Right.of(fn(this.value)))\n }", "[Symbol.iterator]() {\n return this.inOrder();\n }", "function bind(fn, thisArg, ...outerArgs){\n// rest operator \n return function(...innerArgs) {\n// spread operator\n return fn.apply(thisArg, [...outerArgs, ...innerArgs]);\n }\n}", "function accessM(f) {\n return P.chain_(environment(), f);\n}", "function Component() {\n return this; // this is needed in Edge !!!\n } // Component is lazily setup because it needs", "_precomputeComputeForWrapper(component) {\n const computations = ReactInterpreter.computations(component);\n const computedValues = this.optimizer.compute(computations);\n this.renderer.notifyAboutCompute(component, computations, computedValues);\n return computedValues;\n }", "function\nXATS2JS_lazy_cfr(a1x1)\n{\nlet xtmp1;\nlet xtmp3;\n;\nxtmp3 =\nfunction()\n{\nlet xtmp2;\n{\nxtmp2 = a1x1();\n}\n;\nreturn xtmp2;\n} // lam-function\n;\nxtmp1 = XATS2JS_new_lazy(xtmp3);\nreturn xtmp1;\n} // function // XATS2JS_lazy_cfr(0)", "function i(e){[\"next\",\"throw\",\"return\"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}", "function intermediate() { }", "function e(e){return (0, F[e.operation])(...e.parameters)}", "static dimap(context) {\n return new Hask(function(f) {\n return new Hask(function(g) {\n return new Hask(function(p) {\n if (p instanceof Pierce) {\n const getter = Hask.compose(context).call(p.getter).call(f);\n\n const setter = Hask.compose(context).call(Hask.compose(context).call(g).call(p.setter)).call(Hask.first(context).call(f));\n\n return new Pierce(getter, setter);\n } else {\n throw new TypeError(\"p\");\n }\n });\n });\n });\n }", "function z(){// can be called as an API method\nD(),F()}", "function higherOrder( callbackFn ){\n //call the callback function inside body\n callbackFn() //this is a function call.\n}", "parameterizer() {\n return __awaiter(this, void 0, void 0, function* () {\n const deployed = this.requireDeployed();\n return yield deployed.methods.parameterizer().call();\n });\n }", "*[Symbol.iterator]() {\n let i = 0\n while (i < this.size()) {\n yield this.get(i)\n i++\n }\n }", "function Xb(){return function(v){return v}}", "function\nXATS2JS_lazy_vt_cfr(a1x1)\n{\nlet xtmp10;\nlet xtmp12;\nlet xtmp13;\n;\nxtmp12 =\nfunction()\n{\nlet xtmp11;\n{\nxtmp11 = a1x1();\n}\n;\nreturn xtmp11;\n} // lam-function\n;\nxtmp13 =\nfunction()\n{\nlet xtmp11;\n} // lam-function\n;\nxtmp10 = XATS2JS_new_llazy(xtmp12,xtmp13);\nreturn xtmp10;\n} // function // XATS2JS_lazy_vt_cfr(2)", "function curry(func) {\n // Your code goes here\n}", "get $__ctx__() { return LOBBY.__proto__; }", "[Symbol.iterator]() { return this; }", "[Symbol.iterator]() { return this; }", "[Symbol.iterator]() { return this; }", "[Symbol.iterator]() { return this; }", "[Symbol.iterator]() { return this; }", "value(...args) {\n return [...this][methodName](...args);\n }", "function purchaseItem(...fns) => fns.reduce(compose)\n\n{} // & act over the data that we receive", "function compose(fns) {\n\n\n}", "function __it() {}", "function MyFunctionalComponent() {\n return <input />;\n}", "ap (_) { \n return this\n }", "constructor() {\r\n let useCalled = false;\r\n\r\n this.run = async (...args) => {\r\n if (useCalled) {\r\n const next = args.pop();\r\n\r\n next();\r\n }\r\n return args;\r\n };\r\n\r\n addProp(this, 'use',\r\n /**\r\n * Agrega un middleware al workflow\r\n * @param {Function} fn - función middleware a agregar\r\n *\r\n * @return {this} - Retorna la actual instancia\r\n */\r\n (fn) => {\r\n useCalled = true;\r\n\r\n this.run = ((stack) => (async (...args) => {\r\n const next = args.pop();\r\n\r\n return stack.call(this, ...args, async () => fn.call(this, ...args, next.bind(this, ...args)));\r\n }).bind(this))(this.run);\r\n\r\n return this;\r\n }\r\n );\r\n }", "function getImplementation( cb ){\n\n }", "[Symbol.iterator]() {\n return this.container[Symbol.iterator]();\n }", "function promoterenhancer(){\n\n}", "[Symbol.iterator]() {\n return this.#array[Symbol.iterator]();\n }", "function accessManaged(f) {\n return core.chain_((0, _environment.environment)(), f);\n}", "function modifierFactory(callback) {\n return iteratorFactory(wrapperFactory(callback))\n}", "function FunctionIterable(fn){\n this.fn = fn\n}", "function justInvoke(fn){\n return fn()\n}//justInvoke", "function getMakeActive(){\n /*void -> function*/\n return function(){makeActive(this);}\n}", "function getMakeActive(){\n /*void -> function*/\n return function(){makeActive(this);}\n}", "function compose2 (f, g) {\n\tfunction next(a) {\n\n\t};\n\n}", "function invoker() {\n // using a regular function as higher order by passing it other functions\n return greeting(hello, goodbye);\n}", "function g(a){[\"next\",\"throw\",\"return\"].forEach(function(b){a[b]=function(a){return this._invoke(b,a)}})}", "function l(e){[\"next\",\"throw\",\"return\"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}", "function internals(){\r\n return {a: acc, b: brs, c: cnt, m: m, r: r};\r\n }", "function oi(){}", "function makeOpComposition () {\n \n var ops = []; \n var domain = makeEmptyMap(); \n var gen = 0; \n \n var func = function (s) {\n return function (i) {\n return evaluate(domain.has(i) ? (ops.length-1) - (gen-domain.get(i)) : -1, i)(i);\n }\n \n // determine selection state of i but only access the elements \n // of ops (staring from ind) that have i in their domain\n function evaluate(ind, i) {\n if (ind < 0) return s; // i defined in the base selection mapping s\n else {\n var op = ops[ind];\n return op(function (j) { return evaluate(ind - op.domain.get(i), j)(i); });\n // the call to evaluate is wrapped to a lambda to make the call lazy.\n // op will only call the lambda if op.f.constant is false\n }\n }\n }\n \n func.domain = domain;\n \n // member functions of func\n func.push = function (op) {\n ops.push(op);\n ++gen\n op.domain.forEach(function(_, i) {\n op.domain.set(i, domain.has(i) ? gen - domain.get(i) : ops.length);\n domain.set(i, gen); \n });\n }\n func.pop = function () {\n var n = ops.length;\n var op = ops.pop();\n --gen;\n // domain updated for those elements that are in op.domain\n op.domain.forEach(function (_, i) {\n if (op.domain.get(i) >= n) domain.delete(i); // no op defines i\n else domain.set(i, domain.get(i) - op.domain.get(i)); \n });\n return op;\n }\n func.top = function () { return ops[ops.length - 1]; }\n func.top2 = function () { return ops[ops.length - 2]; }\n func.shift = function (bmap) {\n var op = ops.shift();\n op.domain.forEach(function(_, i) {\n if (domain.get(i) - gen === ops.length) { domain.delete(i); }\n // if lastOp the only op that defines i, remove i from domain\n });\n return op;\n }\n func.size = function () { return ops.length; }\n func.removeIndex = function (i) {\n if (!domain.has(i)) return;\n \n // find the first op in ops that defines i\n var j = (ops.length - 1) - (gen - domain.get(i));\n \n while (j >= 0) {\n var d = ops[j].domain.get(i);\n ops[j].domain.delete(i);\n j -= d;\n }\n domain.delete(i);\n }\n \n return func;\n }", "*[Symbol.iterator]() {\n const length = this.length;\n for (let i = 0 ; i < length ; i++) {\n yield this.get(i);\n }\n }", "static second(context) {\n return new Hask(function(p) {\n if (p instanceof Pierce) {\n const getter = Hask.second(context).call(p.getter);\n\n const setter = new Hask(function(__x_s_b__) {\n return __x_s_b__.call(new Hask(function(__x_s__) {\n return new Hask(function(b) {\n return Hask.second(context).call(new Hask(function(s) {\n return p.setter.call(Hask.Tuple(context).call(s).call(b));\n })).call(__x_s__);\n });\n }));\n });\n\n return new Pierce(getter, setter);\n } else {\n throw new TypeError(\"p\");\n }\n });\n }", "chain(_) {\n return this\n }", "obtain(){}", "[ Symbol.iterator]( ...args){\n\t\t// look at retained state\n\t\tconst iteration= this.state&& this.state[ Symbol.iterator]\n\t\tif( iteration){\n\t\t\t// & iterate through it all\n\t\t\treturn iteration.call( this.state, ...args)\n\t\t}\n\t}", "function liftf(fn){\n return function buffalo(x){ // arrow funcs are anonymous funcs\n return function wings(y){\n return fn(x,y)\n }\n }\n}", "function liftg(binary) {\n return function(first) {\n if (first === undefined) {\n return first;\n }\n return function more(next) {\n if (next === undefined) {\n return first;\n }\n first = binary(first, next);\n return more;\n };\n };\n}", "function __func(){}", "function\nXATS2JS_llazy_cfr(a1x1)\n{\nlet xtmp5;\nlet xtmp7;\nlet xtmp8;\n;\nxtmp7 =\nfunction()\n{\nlet xtmp6;\n{\nxtmp6 = a1x1();\n}\n;\nreturn xtmp6;\n} // lam-function\n;\nxtmp8 =\nfunction()\n{\nlet xtmp6;\n} // lam-function\n;\nxtmp5 = XATS2JS_new_llazy(xtmp7,xtmp8);\nreturn xtmp5;\n} // function // XATS2JS_llazy_cfr(1)", "function I(){return L.apply(null,arguments)}", "consstructor(){\n this.traverseMethod = 'pre-order';\n }", "function xs(t, e, n, r) {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__awaiter\"])(this, void 0, void 0, (function() {\n var i, o, s, u, a, c;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__generator\"])(this, (function(h) {\n switch (h.label) {\n case 0:\n // PORTING NOTE: On Web only, we inject the code that registers new Limbo\n // targets based on view changes. This allows us to only depend on Limbo\n // changes when user code includes queries.\n return t.$o = function(e, n, r) {\n return function(t, e, n, r) {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__awaiter\"])(this, void 0, void 0, (function() {\n var i, o, s;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_3__[\"__generator\"])(this, (function(u) {\n switch (u.label) {\n case 0:\n return i = e.view._o(n), i.Nn ? [ 4 /*yield*/ , zi(t.localStore, e.query, \n /* usePreviousResults= */ !1).then((function(t) {\n var n = t.documents;\n return e.view._o(n, i);\n })) ] : [ 3 /*break*/ , 2 ];\n\n case 1:\n // The query has a limit and some docs were removed, so we need\n // to re-run the query against the local store to make sure we\n // didn't lose any good docs that had been past the limit.\n i = u.sent(), u.label = 2;\n\n case 2:\n return o = r && r.targetChanges.get(e.targetId), s = e.view.applyChanges(i, \n /* updateLimboDocuments= */ t.isPrimaryClient, o), [ 2 /*return*/ , (Ks(t, e.targetId, s.To), \n s.snapshot) ];\n }\n }));\n }));\n }(t, e, n, r);\n }, [ 4 /*yield*/ , zi(t.localStore, e, \n /* usePreviousResults= */ !0) ];\n\n case 1:\n return i = h.sent(), o = new Ss(e, i.Bn), s = o._o(i.documents), u = un.createSynthesizedTargetChangeForCurrentChange(n, r && \"Offline\" /* Offline */ !== t.onlineState), \n a = o.applyChanges(s, \n /* updateLimboDocuments= */ t.isPrimaryClient, u), Ks(t, n, a.To), c = new Ns(e, n, o), \n [ 2 /*return*/ , (t.Po.set(e, c), t.Vo.has(n) ? t.Vo.get(n).push(e) : t.Vo.set(n, [ e ]), \n a.snapshot) ];\n }\n }));\n }));\n}", "[Symbol.iterator]() {\n return this.items[Symbol.iterator]();\n }", "[Symbol.iterator]() {\n return this.items[Symbol.iterator]();\n }", "function Hoc(WrappedComponent) {\n return (0, _Guac2.default)(WrappedComponent);\n}", "[Symbol.iterator]() {\n return this._items[Symbol.iterator]();\n }", "compute() {\n\n}", "[Symbol.iterator]() {\n return stack[Symbol.iterator]();\n }", "inorderTraversal() {\n\n }", "function compose() {\n \n const args = arguments;\n const start = args.length - 1;\n // console.log('----------------------------------------')\n // console.log('arguments: ',arguments)\n // console.log('args: ',args)\n // console.log('start: ',start)\n\n return function () {\n\n let i = start;\n let result = args[start].apply(this, arguments);\n\n // console.log('i antes del while: ',i)\n // console.log('result antes del while: ',result)\n\n while (i--) {\n\n result = args[i].call(this, result);\n // console.log('Op: args[i].call(this), result: ',args[i].call(this, result))\n // console.log('i en el while: ',i)\n // console.log('result en el while: ',result)\n }\n\n // console.log('result antes de retornar: ',result)\n return result;\n }\n}", "function ApolloWrapper({ children }) {\n return <ApolloProvider client={client}>{children}</ApolloProvider>\n}", "function includeHelpers(func) {\n\n // ## jam.identity()\n\n // Simple function that passes the values it receives to the next function.\n // Useful if you need a `process.nextTick` inserted in-between your call chain.\n func.identity = function(next) {\n function _identity(next) {\n var args = arguments;\n tick(function() {\n next.apply(this, replaceHead(args, null));\n });\n }\n\n // This function can also be passed to jam verbatim.\n return (typeof next === 'function') ?\n _identity.apply(this, arguments) :\n _identity;\n };\n\n // ## jam.nextTick()\n\n // Alias for `.identity`. Use when you need a `process.nextTick` inserted in-between\n // your call chain.\n func.nextTick = func.identity\n\n // ## jam.return( [args...] )\n\n // Returns a set of values to the next function in the chain. Useful when you want to\n // pass in the next function verbatim without wrapping it in a `function() { }` just\n // to pass values into it.\n func.return = function() {\n var args = toArgs(arguments);\n return function(next) {\n args.unshift(null);\n next.apply(this, args);\n };\n };\n\n // ## jam.null()\n\n // Similar to `.identity` but absorbs all arguments that has been passed to it and\n // forward nothing to the next function. Effectively nullifying any arguments passed\n // from previous jam call.\n // \n // Like `jam.identity`, this function can be passed to the jam chain verbatim.\n func.null = function(next) {\n function _null(next) { next(); }\n\n return (typeof next === 'function') ? _null.call(this, next) : _null;\n };\n\n // ## jam.call( function, [args...] )\n\n // Convenience for calling functions that accepts arguments in standard node.js\n // convention. Since jam insert `next` as first argument, most functions cannot be\n // passed directly into the jam chain, thus this helper function.\n // \n // If no `args` is given, this function passes arguments given to `next()` call from\n // previous function directly to the function (with proper callback) placement).\n // \n // Use this in combination with `jam.return` or `jam.null` if you want to control the\n // arguments that are passed to the function.\n func.call = function(func) {\n ensureFunc(func, 'function');\n\n var args = toArgs(arguments);\n args.shift(); // func\n\n if (args.length) { // use provided arguments\n return function(next) {\n args.push(next);\n func.apply(this, args);\n };\n\n } else { // use passed-in arguments during chain resolution\n return function(next) {\n args = toArgs(arguments);\n args.shift(); // move next to last position\n args.push(next);\n\n func.apply(this, args);\n };\n }\n };\n\n // ## jam.each( array, iterator( next, element, index ) )\n\n // Execute the given `iterator` function for each element given in the `array`. The\n // iterator is given a `next` function and the element to act on. The next step in the\n // chain will receive the original array passed verbatim so you can chain multiple\n // `.each` calls to act on the same array.\n // \n // You can also pass `arguments` and `\"strings\"` as an array or you can omit the array\n // entirely, in which case this method will assume that the previous chain step\n // returns something that looks like an array as its first result.\n // \n // Under the hood, a JAM step is added for each element. So the iterator will be\n // called serially, one after another finish. A parallel version maybe added in the\n // future.\n func.each = function(array, iterator) {\n if (typeof array === 'function') {\n iterator = array;\n array = null\n } else {\n ensureArray(array, 'array');\n }\n\n ensureFunc(iterator, 'iterator');\n\n return function(next, array_) {\n var arr = array || array_;\n\n // Builds another JAM chain internally\n var chain = jam(jam.identity)\n , count = arr.length;\n\n for (var i = 0; i < count; i++) (function(element, i) {\n chain = chain(function(next) { iterator(next, element, i); });\n })(arr[i], i);\n\n chain = chain(function(next) { next(null, arr); });\n return chain(next);\n };\n };\n\n // ## jam.map( array, iterator( next, element, index ) )\n\n // Works exactly like the `each` helper but if a value is passed to the iterator's\n // `next` function, it is collected into a new array which will be passed to the next\n // function in the JAM chain after `map`.\n // \n // Like with `each`, you can omit the `array` input, in which case this method will\n // assume that the previous chain step returns something that looks like an array as\n // its first result.\n func.map = function(array, iterator) {\n if (typeof array === 'function') {\n iterator = array;\n array = null;\n } else {\n ensureArray(array, 'array');\n }\n\n ensureFunc(iterator, 'iterator');\n\n return function(next, array_) {\n var arr = array || array_;\n\n // Builds another JAM chain internally and collect results.\n // TODO: Dry with .each?\n var chain = jam(jam.identity)\n , count = arr.length\n , result = [];\n\n for (var i = 0; i < count; i++) (function(element, i) {\n chain = chain(function(next, previous) {\n result.push(previous);\n iterator(next, element, i);\n });\n })(arr[i], i);\n\n chain = chain(function(next, last) {\n result.push(last);\n result.shift(); // discard first undefined element\n next(null, result);\n });\n\n return chain(next);\n };\n };\n\n // ## jam.timeout( timeout )\n\n // Pauses the chain for the specified `timeout` using `setTimeout`. Useful for\n // inserting a delay in-between a long jam chain.\n func.timeout = function(timeout) {\n ensureNum(timeout, 'timeout');\n\n return function(next) {\n var args = replaceHead(arguments, null);\n setTimeout(function() { next.apply(this, args); }, timeout);\n };\n };\n\n // ## jam.promise( [chain] )\n\n // Returns a JAM promise, useful when you are starting an asynchronous call outside of\n // the JAM chain itself but wants the callback to call into the chain. In other words,\n // this allow you to put a 'waiting point' (aka promise?) into existing JAM chain that\n // waits for the initial call to finish and also pass any arguments passed to the\n // callback to the next step in the JAM chain as well.\n //\n // This function will returns a callback that automatically bridges into the JAM\n // chain. You can pass the returned callback to any asynchronous function and the JAM\n // chain (at the point of calling .promise()) will wait for that asynchronous function\n // to finish effectively creating a 'waiting point'.\n //\n // Additionally, any arguments passed to the callback are forwarded to the next call\n // in the JAM chain as well. If errors are passed, then it is fast-forwarded to the\n // last handler normally like normal JAM steps.\n func.promise = function(chain) {\n chain = typeof chain === 'function' ? chain : // chain is supplied\n typeof this === 'function' ? this : // called from the chain variable\n ensureFunc(chain, 'chain'); // fails\n\n if (typeof chain === 'undefined' && typeof this === 'function') {\n chain = this;\n }\n\n var args = null, next = null;\n\n chain(function(next_) {\n if (args) return next_.apply(this, args); // callback already called\n next = next_; // wait for callback\n });\n\n return function() {\n if (next) return next.apply(this, arguments); // chain promise already called\n args = arguments; // wait for chain to call the promise\n };\n };\n\n // TODO: noError() ? or absorbError()\n return func;\n }", "function a(e){return function(t){return i(t,e)}}", "function a(e){return function(t){return i(t,e)}}", "function PipeDecorator(){}// WARNING: interface has both a type and a value, skipping emit", "chain (_) {\n return this \n }", "async execPipeline(operation, scope) {\n scope = await fetch(scope, operation, this.fetcher, this) // eslint-disable-line no-param-reassign\n const ops = operation.operations.slice()\n const firstOp = ops.shift()\n debug('first op', firstOp)\n let current = await this.exec(firstOp, scope)\n debug('first op result:', current)\n while (ops.length > 0) {\n debug('current:', current)\n const nextOp = ops.shift()\n debug('nextOp:', nextOp)\n current = await this.pipe(nextOp, current) // eslint-disable-line no-await-in-loop\n }\n debug('current:', current)\n return current\n }", "function PebbleChain () {}", "mutate() {}", "mutate() {}", "function wrapper() {\r\n this.render = () => {\r\n return element;\r\n };\r\n }", "*[Symbol.iterator]() {\n let node = this.head;\n\n while(node) {\n yield node;\n node = node.next;\n }\n }", "function zi(){return zi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zi.apply(this,arguments)}", "init(){\n this.initFunctional();\n }", "function outer() {\n // Arrow Functionで定義した関数を返す\n return () => {\n // この関数の外側には`outer`関数が存在する\n // `outer`関数に`this`を書いた場合と同じ\n return this;\n };\n}", "function WorkShopModule(teacher) {\n var publicAPI = { ask, }\n return publicAPI;\n\n function ask(question) {\n console.log(teacher, question)\n }\n}", "function IntroToFuncComp() {\n\treturn <Demo></Demo>;\n}", "function Iterable() {}", "async index () {\n return await Operator.all()\n }", "[Symbol.iterator]() {\n this._update();\n return this._list[Symbol.iterator]();\n }", "*[Symbol.iterator]() {\n let pointer = this.head\n while (pointer) {\n yield pointer\n pointer = pointer.next\n }\n }" ]
[ "0.6069312", "0.57844883", "0.57722145", "0.5677805", "0.56025374", "0.5341893", "0.5338482", "0.5236804", "0.51687837", "0.51687837", "0.51687837", "0.51687837", "0.51505935", "0.50862324", "0.50576675", "0.5054869", "0.5033653", "0.5029701", "0.50271124", "0.5022082", "0.5021882", "0.5016339", "0.50143945", "0.50139636", "0.50067025", "0.50029325", "0.49984434", "0.4982643", "0.49813625", "0.4973284", "0.4965628", "0.49634278", "0.49634278", "0.49634278", "0.49634278", "0.49634278", "0.49592623", "0.49584162", "0.49458912", "0.49397147", "0.49345374", "0.49253303", "0.49118686", "0.48997584", "0.48951977", "0.48846045", "0.4880256", "0.4880219", "0.48746854", "0.4871678", "0.48708212", "0.48653868", "0.48653868", "0.48613015", "0.4859956", "0.4857834", "0.4848014", "0.48336554", "0.48302585", "0.48259813", "0.4824905", "0.48213646", "0.48213077", "0.48202056", "0.4819584", "0.48163873", "0.4807229", "0.4804933", "0.48029965", "0.479508", "0.47874808", "0.4783373", "0.47799295", "0.47799295", "0.47769484", "0.4772052", "0.47709474", "0.47703332", "0.4767966", "0.47588834", "0.47472", "0.473327", "0.47304758", "0.47304758", "0.47294164", "0.47261682", "0.47102198", "0.47072297", "0.47062165", "0.47062165", "0.47019398", "0.46977323", "0.46974427", "0.4697436", "0.4694689", "0.46925277", "0.4689024", "0.46837917", "0.46829787", "0.46800038", "0.4679135" ]
0.0
-1
This is done to register the method called with moment() without creating circular dependencies.
function setHookCallback (callback) { hookCallback = callback; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(moment) {\n this.moment = moment;\n }", "moment(date) {\n return moment(date);\n }", "viewDateMoment () {\n const m = moment(this.props.viewDate)\n return function () {\n return m.clone()\n }\n }", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\n return null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\n return null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function Sb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\n return null===d||isNaN(+d)||(y(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Ob(c,d),Tb(this,e,a),this}}", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function DateHelper() {}", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Mb(c,d),Sb(this,e,a),this}}", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Mb(c,d),Sb(this,e,a),this}}", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Mb(c,d),Sb(this,e,a),this}}", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Mb(c,d),Sb(this,e,a),this}}", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Mb(c,d),Sb(this,e,a),this}}", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function makeGetterAndSetter(name, key) {\n moment.fn[name] = moment.fn[name + 's'] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n moment.updateOffset(this);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Nb(c,d),Sb(this,e,a),this}}", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\nreturn null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"===typeof c?+c:c,e=Nb(c,d),Sb(this,e,a),this}}", "function Rb(a,b){return function(c,d){var e,f;\n//invert the arguments, but complain about it\n return null===d||isNaN(+d)||(x(b,\"moment().\"+b+\"(period, number) is deprecated. Please use moment().\"+b+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),f=c,c=d,d=f),c=\"string\"==typeof c?+c:c,e=Nb(c,d),Sb(this,e,a),this}}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(\n\t name,\n\t 'moment().' +\n\t name +\n\t '(period, number) is deprecated. Please use moment().' +\n\t name +\n\t '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n\t );\n\t tmp = val;\n\t val = period;\n\t period = tmp;\n\t }\n\t\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function oldMomentFormat(mom,formatStr){return oldMomentProto.format.call(mom,formatStr);// oldMomentProto defined in moment-ext.js\n}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(\n\t name,\n\t 'moment().' +\n\t name +\n\t '(period, number) is deprecated. Please use moment().' +\n\t name +\n\t '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n\t );\n\t tmp = val;\n\t val = period;\n\t period = tmp;\n\t }\n\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(\n\t name,\n\t 'moment().' +\n\t name +\n\t '(period, number) is deprecated. Please use moment().' +\n\t name +\n\t '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n\t );\n\t tmp = val;\n\t val = period;\n\t period = tmp;\n\t }\n\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "resetCalendarMoment(date =\"\"){\n if(date && /^([0-9]{4}-[0-9]{2}-[0-9]{2})/.test(date)){\n //if there is date string\n //and it is in date pattern\n //then create that moment\n this._moment = moment(date);\n }else{\n this._moment = moment();\n }\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val;\n val = period;\n period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "calcCurrentMoment() {\n return moment();\n }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\t\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = create__createDuration(val, period);\n\t add_subtract__addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val;\n val = period;\n period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = createDuration(val, period);\n\t addSubtract(this, dur, direction);\n\t return this;\n\t };\n\t}", "function makeShortcut(name, key) {\n moment.fn[name] = function (input) {\n var utc = this._isUTC ? 'UTC' : '';\n if (input != null) {\n this._d['set' + utc + key](input);\n return this;\n } else {\n return this._d['get' + utc + key]();\n }\n };\n }", "function Sb(a, b) {\n return function (c, d) {\n var e, f;\n //invert the arguments, but complain about it\n return null === d || isNaN(+d) || (y(b, \"moment().\" + b + \"(period, number) is deprecated. Please use moment().\" + b + \"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"), f = c, c = d, d = f), c = \"string\" == typeof c ? +c : c, e = Ob(c, d), Tb(this, e, a), this\n }\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n\treturn function (val, period) {\n\t\tvar dur, tmp;\n\t\t//invert the arguments, but complain about it\n\t\tif (period !== null && !isNaN(+period)) {\n\t\t\tdeprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n\t\t\t'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n\t\t\ttmp = val; val = period; period = tmp;\n\t\t}\n\n\t\tval = typeof val === 'string' ? +val : val;\n\t\tdur = createDuration(val, period);\n\t\taddSubtract(this, dur, direction);\n\t\treturn this;\n\t};\n}", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).');\n\t tmp = val; val = period; period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = moment.duration(val, period);\n\t addOrSubtractDurationFromMoment(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val; val = period; period = tmp;\n }\n\n val = typeof val === 'string' ? +val : val;\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n\t return function (val, period) {\n\t var dur, tmp;\n\t //invert the arguments, but complain about it\n\t if (period !== null && !isNaN(+period)) {\n\t deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).');\n\t tmp = val;val = period;period = tmp;\n\t }\n\n\t val = typeof val === 'string' ? +val : val;\n\t dur = moment.duration(val, period);\n\t addOrSubtractDurationFromMoment(this, dur, direction);\n\t return this;\n\t };\n\t }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }", "function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }" ]
[ "0.6808176", "0.61082673", "0.59246933", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5748391", "0.5740086", "0.5740086", "0.5740086", "0.5735562", "0.5735562", "0.5735562", "0.5735562", "0.5735562", "0.5725336", "0.56975675", "0.56674", "0.56674", "0.56674", "0.56674", "0.56674", "0.5642981", "0.5642981", "0.5642981", "0.5642981", "0.5642981", "0.5642981", "0.5642981", "0.5642981", "0.5642981", "0.5642981", "0.5642981", "0.5642981", "0.56427294", "0.56267935", "0.56143224", "0.5587938", "0.5575233", "0.55609953", "0.55609953", "0.5476486", "0.5476486", "0.5476486", "0.5476486", "0.5458085", "0.5458085", "0.5453357", "0.5435501", "0.543035", "0.543035", "0.5422996", "0.54126036", "0.54126036", "0.54126036", "0.54126036", "0.54126036", "0.5411312", "0.5411312", "0.5411312", "0.5411312", "0.5411312", "0.54086506", "0.53990215", "0.5375705", "0.5370718", "0.5370718", "0.5370718", "0.5370718", "0.5370718", "0.5370718", "0.5370718", "0.5370718", "0.5370718", "0.53700495", "0.53632814", "0.5356188", "0.53330636", "0.5331728", "0.53299034", "0.5328133", "0.53208745", "0.53208745", "0.53208745", "0.53208745", "0.53208745", "0.53208745", "0.53208745", "0.53208745", "0.53208745", "0.53208745", "0.53208745" ]
0.0
-1
compare two arrays, return the number of differences
function compareArrays(array1, array2, dontConvert) { var len = Math.min(array1.length, array2.length), lengthDiff = Math.abs(array1.length - array2.length), diffs = 0, i; for (i = 0; i < len; i++) { if ((dontConvert && array1[i] !== array2[i]) || (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { diffs++; } } return diffs + lengthDiff; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (~~array1[i] !== ~~array2[i]) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function countDifferences(a, b) {\n let diffs = 0;\n for (let i = 0; i < a.length; ++i) {\n if (a[i] !== b[i]) {\n ++diffs;\n }\n }\n return diffs;\n}", "function howmany_diff(ary1, ary2){\n for (var i = 0; i < ary1.length; i++){\n var a = ary1[i]\n var b = ary2[i]\n if (a != b){\n diff++\n }\n }\n }", "function howmany_diff(ary1, ary2) {\n for (var i = 0; i < ary1.length; i++) {\n var a = ary1[i]\n var b = ary2[i]\n if (a != b) {\n diff++\n }\n }\n }", "function arrayDiff(a1, a2) {\n\tvar totalDiff = 0;\n\ta2.forEach((elem, index) => {\n\t\ttotalDiff += Math.abs(elem - a1[index]);\n\t});\n\treturn totalDiff;\n}", "function compatibility(arr1, arr2) {\n var totalDiff = 0;\n for (let i in arr1) {\n totalDiff = totalDiff + difference(arr1[i], arr2[i])\n }\n return totalDiff\n}", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length);\n var lengthDiff = Math.abs(array1.length - array2.length);\n var diffs = 0;\n var i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i])\n || (!dontConvert && Object(__WEBPACK_IMPORTED_MODULE_0__type_checks__[\"k\" /* toInt */])(array1[i]) !== Object(__WEBPACK_IMPORTED_MODULE_0__type_checks__[\"k\" /* toInt */])(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t}", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n\t var len = Math.min(array1.length, array2.length),\n\t lengthDiff = Math.abs(array1.length - array2.length),\n\t diffs = 0,\n\t i;\n\t for (i = 0; i < len; i++) {\n\t if ((dontConvert && array1[i] !== array2[i]) ||\n\t (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n\t diffs++;\n\t }\n\t }\n\t return diffs + lengthDiff;\n\t }", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }", "function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if ((dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }" ]
[ "0.82791424", "0.82791424", "0.82791424", "0.82791424", "0.82791424", "0.82791424", "0.82791424", "0.82791424", "0.82791424", "0.82791424", "0.82791424", "0.79984933", "0.79866725", "0.79537725", "0.7922521", "0.77097225", "0.75572866", "0.75463253", "0.75318825", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.7503132", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.749946", "0.7497887", "0.7497887", "0.7497887", "0.74965256", "0.74871886" ]
0.0
-1
format date using native date object
function formatMoment(m, format) { if (!m.isValid()) { return m.localeData().invalidDate(); } format = expandFormat(format, m.localeData()); formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); return formatFunctions[format](m); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "formatDate(date) {\n\t\treturn date.toString()\n\t\t.replace(/(\\d{4})(\\d{2})(\\d{2})/, (string, year, month, day) => `${year}-${month}-${day}`);\n\t}", "static formatDate(date) {\n return new Date(date).toLocaleDateString();\n }", "formatTheDate(date, format) {\n const [ year, month, day ] = (date.toISOString()).substr(0, 10).split('-');\n return dateFns.format(new Date(\n year,\n (month - 1),\n day,\n ), format);\n }", "function formatDate(obj) {\n const date = new Date(obj.date).toLocaleString(\"default\", {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n });\n obj.date = date;\n return obj;\n}", "function formatDate(date) {\n return format(new Date(date), 'yyyy-MM-dd')\n}", "getFormattedDate(date) {\n return dayjs(date).format(\"MMM MM, YYYY\");\n }", "function formatDate(date) {\n var d = new Date(date);\n d = d.toLocaleString();\n return d;\n }", "function formatDate(d) {\n return `${d.year}-${d.month}-${d.day}`\n }", "_format(dtf, date) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setUTCFullYear` and `setUTCHours` instead.\n const d = new Date();\n d.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n d.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n return dtf.format(d);\n }", "_format(dtf, date) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setUTCFullYear` and `setUTCHours` instead.\n const d = new Date();\n d.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n d.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n return dtf.format(d);\n }", "_format(dtf, date) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setUTCFullYear` and `setUTCHours` instead.\n const d = new Date();\n d.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n d.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n return dtf.format(d);\n }", "function _getFormattedDate(date) {\n var year = date.getFullYear();\n var month = (1 + date.getMonth()).toString();\n month = month.length > 1 ? month : '0' + month;\n var day = date.getDate().toString();\n day = day.length > 1 ? day : '0' + day;\n return month + '/' + day + '/' + year;\n }", "function formatDate(date, format) {\n return format\n .replace(/yyyy/i, util_toString(date.getFullYear()))\n .replace(/MM/i, lpad(date.getMonth() + 1))\n .replace(/M/i, util_toString(date.getMonth()))\n .replace(/dd/i, lpad(date.getDate()))\n .replace(/d/i, util_toString(date.getDate()));\n}", "function formatDate(date) {\n var day = date.getDate();\n var month = date.getMonth() + 1; //Months are zero based\n var year = date.getFullYear();\n var formattedDate = year + \"-\" + month + \"-\" + day;\n return formattedDate;\n }", "function formatDate(date) {\n\tif (date == null) {\n\t\treturn null;\n\t}\n\tvar d = date.getDate();\n\tvar m = date.getMonth() + 1;\n\tvar y = date.getFullYear();\n\treturn '' + (d <= 9 ? '0' + d : d) + '-' + (m <= 9 ? '0' + m : m) + '-' + y;\n}", "function formatDate(date) {\n let source = new Date(date);\n let day = source.getDate();\n let month = source.getMonth() + 1;\n let year = source.getFullYear();\n\n return `${day}/${month}/${year}`;\n }", "function formatDate(date) {\n\treturn new Date(date.split(' ').join('T'))\n}", "function formatDate(date) {\r\n date = new Date(date);\r\n let DD = date.getDate();\r\n if (DD < 10) {\r\n DD = \"0\" + DD;\r\n }\r\n let MM = date.getMonth() +1;\r\n if (MM < 10) {\r\n MM = \"0\" + MM;\r\n }\r\n const YYYY = date.getFullYear();\r\n return DD + \"/\" + MM + \"/\" + YYYY;\r\n }", "getFormattedDate(date) {\n const year = date.getFullYear();\n const month = (date.getUTCMonth() + 1).toString().padStart(2, '0');\n const day = (date.getUTCDate()).toString().padStart(2, '0');\n // Logger.log(`Day: ${day}, Month: ${month}, Year:${year}`)\n const dateFormatted = `${year}-${month}-${day}`;\n return dateFormatted;\n }", "function formatDate(date) {\n \n var dd = date.getDate();\n if (dd < 10) {\n dd = '0' + dd;\n }\n \n var mm = date.getMonth() + 1;\n if (mm < 10) {\n mm = '0' + mm;\n }\n \n var yy = date.getFullYear();\n if (yy < 10) {\n yy = '0' + yy;\n }\n \n return mm + '/' + dd + '/' + yy;\n }", "function formatDate(date) {\r\n\r\n let dd = date.getDate();\r\n if (dd < 10) dd = '0' + dd;\r\n\r\n let mm = date.getMonth() + 1;\r\n if (mm < 10) mm = '0' + mm;\r\n\r\n let yy = date.getFullYear() % 100;\r\n if (yy < 10) yy = '0' + yy;\r\n\r\n return dd + '.' + mm + '.' + yy;\r\n}", "function formatDate(date) {\r\n date = new Date(date);\r\n let DD = date.getDate();\r\n if (DD < 10) {\r\n DD = \"0\" + DD;\r\n }\r\n let MM = date.getMonth() +1;\r\n if (MM < 10) {\r\n MM = \"0\" + MM;\r\n }\r\n const YYYY = date.getFullYear();\r\n return DD + \"/\" + MM + \"/\" + YYYY;\r\n}", "function formatDate(date){\n\t\tvar formatted = {\n\t\t\tdate:date,\n\t\t\tyear:date.getFullYear().toString().slice(2),\n\t\t\tmonth:s.months[date.getMonth()],\n\t\t\tmonthAbv:s.monthsAbv[date.getMonth()],\n\t\t\tmonthNum:date.getMonth() + 1,\n\t\t\tday:date.getDate(),\n\t\t\tslashDate:undefined,\n\t\t\ttime:formatTime(date)\n\t\t}\n\t\tformatted.slashDate = formatted.monthNum + '/' + formatted.day + '/' + formatted.year;\n\t\treturn formatted;\n\t}", "function formatDate(date) {\n var day = (\"0\" + date.getDate()).slice(-2);\n var month = (\"0\" + (date.getMonth() + 1)).slice(-2);\n var year = date.getFullYear().toString().slice(-2);\n return day + month + year;\n}", "function formatDate(date,formatStr){return renderFakeFormatString(getParsedFormatString(formatStr).fakeFormatString,date);}", "function formatDate(date)\n{\n g_date=date.getDate();\n if(g_date <=9)\n {\n g_date=\"0\"+g_date;\n }\n g_month=date.getMonth();\n g_year=date.getFullYear();\n if (g_year < 2000) g_year += 1900;\n return todaysMonthName(date)+\" \"+g_date+\", \"+g_year;\n}", "_stringify(date){\n date = date.toLocaleDateString();\n return date;\n }", "function getFormattedDate(date) {\n return $filter('date')(date, 'yyyy-MM-dd');\n }", "function formatDate(date, format){\n if(!date){\n return '0000-00-00';\n }\n var dd = date.substring(0, 2);\n var mm = date.substring(3, 5);\n var yy = date.substring(6);\n if (format == 'dmy') {\n return dd + '-' + mm + '-' + yy;\n } else {\n return yy + '-' + mm + '-' + dd;\n }\n }", "formatDate (date){\n var d = new Date(date),\n month = (d.getMonth() + 1),\n day = d.getDate(),\n year = d.getFullYear();\n if (month.length < 2)\n month = '0' + month;\n if (day.length < 2)\n day = '0' + day;\n return [year, month, day].join('-');\n }", "function formatDate(date) {\n var day = date.getDate();\n if (day < 10) {\n day = \"0\" + day;\n }\n\n var month = date.getMonth() + 1;\n if (month < 10) {\n month = \"0\" + month;\n }\n\n var year = date.getFullYear();\n\n return day + \".\" + month + \".\" + year;\n}", "function convertToFormat (dateObj, dateFormat) {\r\n var month = dateObj.getMonth() + 1;\r\n var date = dateObj.getDate();\r\n var year = dateObj.getFullYear();\r\n var dateString;\r\n switch (dateFormat) {\r\n case 'yyyy.m.d':\r\n dateString = year + '.' + month + '.' + date;\r\n break;\r\n case 'yyyy-m-d':\r\n dateString = year + '-' + month + '-' + date;\r\n break;\r\n case 'yyyy/m/d':\r\n dateString = year + '/' + month + '/' + date;\r\n break;\r\n case 'yyyy/mm/dd':\r\n dateString = year + '/' + _makeTwoDigits(month) + '/' + _makeTwoDigits(date);\r\n break;\r\n case 'dd/mm/yyyy':\r\n dateString = _makeTwoDigits(date) + '/' + _makeTwoDigits(month) + '/' + year;\r\n break;\r\n case 'dd-mm-yyyy':\r\n dateString = _makeTwoDigits(date) + '-' + _makeTwoDigits(month) + '-' + year;\r\n break;\r\n case 'd-m-yyyy':\r\n dateString = date + '-' + month + '-' + year;\r\n break;\r\n case 'd/m/yyyy':\r\n dateString = date + '/' + month + '/' + year;\r\n break;\r\n case 'd/mm/yyyy':\r\n dateString = date + '/' + _makeTwoDigits(month) + '/' + year;\r\n break;\r\n case 'dd.mm.yyyy':\r\n dateString = _makeTwoDigits(date) + '.' + _makeTwoDigits(month) + '.' + year;\r\n break;\r\n case 'm/d/yyyy':\r\n dateString = month + '/' + date + '/' + year;\r\n break;\r\n default:\r\n dateString = _makeTwoDigits(date) + '.' + _makeTwoDigits(month) + '.' + year;\r\n }\r\n return dateString;\r\n }", "function formatDate(){\n if (!Date.prototype.toISODate) {\n Date.prototype.toISODate = function() {\n return this.getFullYear() + '-' +\n ('0'+ (this.getMonth()+1)).slice(-2) + '-' +\n ('0'+ this.getDate()).slice(-2);\n }\n }\n }", "function formatDate(date) {\n const d = new Date(date);\n return d.getFullYear() + \"-\" + twoDigits(d.getMonth() + 1) + \"-\" + twoDigits(d.getDate());\n}", "function formattedDate(d) {\n let month = String(d.getMonth() + 1);\n let day = String(d.getDate());\n const year = String(d.getFullYear());\n\n if (month.length < 2) month = '0' + month;\n if (day.length < 2) day = '0' + day;\n\n return `${year}-${month}-${day}`;\n }", "function formatDate(d) {\n if (d === undefined){\n d = (new Date()).toISOString()\n }\n let currDate = new Date(d);\n let year = currDate.getFullYear();\n let month = currDate.getMonth() + 1;\n let dt = currDate.getDate();\n let time = currDate.toLocaleTimeString('en-SG')\n\n if (dt < 10) {\n dt = '0' + dt;\n }\n if (month < 10) {\n month = '0' + month;\n }\n\n return dt + \"/\" + month + \"/\" + year + \" \" + time ;\n }", "function formattedDate(date) {\r\n\t\t\t\t\tvar d = new Date(date),\r\n\t\t\t\t\t\tmonth = '' + (d.getMonth() + 1),\r\n\t\t\t\t\t\tday = '' + d.getDate(),\r\n\t\t\t\t\t\tyear = d.getFullYear();\r\n\r\n\t\t\t\t\tif (month.length < 2) month = '0' + month;\r\n\t\t\t\t\tif (day.length < 2) day = '0' + day;\r\n\t\t\t\t\treturn [year, month, day].join('-');\r\n\t\t\t\t}", "function getFormattDate(date) {\n let month = (1 + date.getMonth()).toString();\n month = month.length > 1 ? month : \"0\" + month;\n\n let day = date.getDate().toString();\n day = day.length > 1 ? day : \"0\" + day;\n\n return (date.getFullYear() + \"-\" + month + \"-\" + day);\n}", "function getFormattDate(date) {\n let month = (1 + date.getMonth()).toString();\n month = month.length > 1 ? month : \"0\" + month;\n\n let day = date.getDate().toString();\n day = day.length > 1 ? day : \"0\" + day;\n\n return (date.getFullYear() + \"-\" + month + \"-\" + day);\n}", "function formatDate(date) {\r\n var d = date ? new Date(date) : new Date()\r\n month = '' + (d.getMonth() + 1),\r\n day = '' + d.getDate(),\r\n year = d.getFullYear();\r\n if (month.length < 2)\r\n month = '0' + month;\r\n if (day.length < 2)\r\n day = '0' + day;\r\n\r\n return `${day}${month}${year}`;\r\n}", "function _formatDate(date) {\n\t//remove timezone GMT otherwise move time\n\tvar offset = date.getTimezoneOffset() * 60000;\n\tvar dateFormatted = new Date(date - offset);\n dateFormatted = dateFormatted.toISOString();\n if (dateFormatted.indexOf(\"T\") > 0)\n dateFormatted = dateFormatted.split('T')[0];\n return dateFormatted;\n}", "function formatDate(date) {\n const month = date.getMonth() + 1;\n const day = date.getDate();\n const year = date.getFullYear();\n \n return `${month}/${day}/${year}`;\n }", "function formatDate(date) {\r\n return date.getFullYear().toString() + (date.getMonth() + 1).toString().padStart(2, '0') + date.getDate().toString() \r\n + date.getHours().toString().padStart(2, '0') + date.getMinutes().toString().padStart(2, '0');\r\n }", "function formatDate(date) {\n var dd = date.getDate()\n if (dd < 10) dd = '0' + dd;\n var mm = date.getMonth() + 1\n if (mm < 10) mm = '0' + mm;\n var yy = date.getFullYear();\n if (yy < 10) yy = '0' + yy;\n return dd + '.' + mm + '.' + yy;\n}", "formatDate(date) {\n var d = new Date(date),\n month = '' + (d.getMonth() + 1),\n day = '' + d.getDate(),\n year = d.getFullYear();\n if (month.length < 2) \n month = '0' + month;\n if (day.length < 2) \n day = '0' + day;\n return [year, month, day].join('-');\n }", "function formatDate(date) {\n // date is a date object\n const options = { year: 'numeric', month: 'long', day: 'numeric', timeZone: 'UTC' };\n return date.toLocaleDateString('en-US', options);\n}", "function formatDate(date) {\n // date is a date object\n const options = { year: 'numeric', month: 'short', day: 'numeric', timeZone: 'UTC' };\n return date.toLocaleString('en-US', options);\n}", "function _date(obj) {\n return exports.PREFIX.date + ':' + obj.toISOString();\n}", "function get_formatted_date(date) {\n function get_formatted_num(num, expected_length) {\n var str = \"\";\n var num_str = num.toString();\n var num_zeros = expected_length - num_str.length;\n for (var i = 0; i < num_zeros; ++i) {\n str += '0';\n }\n str += num_str;\n return str;\n }\n var msg = get_formatted_num(date.getFullYear(), 4) + \"-\";\n msg += get_formatted_num(date.getMonth() + 1, 2) + \"-\";\n msg += get_formatted_num(date.getDate(), 2) + \" \";\n msg += get_formatted_num(date.getHours(), 2) + \":\";\n msg += get_formatted_num(date.getMinutes(), 2) + \":\";\n msg += get_formatted_num(date.getSeconds(), 2);\n return msg;\n}", "function formatDate(date) {\n var d = new Date(date),\n month = '' + (d.getMonth() + 1),\n day = '' + d.getDate(),\n year = d.getFullYear();\n \n if (month.length < 2) month = '0' + month;\n if (day.length < 2) day = '0' + day;\n \n return [year, month, day].join('-');\n }", "function formattedDate(date) {\n\n // Récupération\n var month = String(date.getMonth() + 1);\n var day = String(date.getDate());\n var year = String(date.getFullYear());\n\n // Ajout du 0\n if (month.length < 2) \n month = '0' + month;\n\n // Ajout du 0\n if (day.length < 2) \n day = '0' + day;\n\n return day+'/'+month+'/'+year;\n }", "function formatDate(date,format) {\n if (!format){\n format = \"yyyy-MM-dd\";\n }\n if (date === null){\n return null;\n }\n if (!(date instanceof Date)){\n date = new Date(date);\n }\n let day = date.getDate();\n let month = date.getMonth();\n let year = date.getFullYear();\n let hour = date.getHours();\n let min = date.getMinutes();\n let sec = date.getSeconds();\n\n let str = format.replace(\"yyyy\",year)\n .replace(\"MM\",fillString(month+1,2,-1,\"0\"))\n .replace(\"dd\",fillString(day,2,-1,\"0\"))\n .replace(\"HH\",fillString(hour,2,-1,\"0\"))\n .replace(\"mm\",fillString(min,2,-1,\"0\"))\n .replace(\"ss\",fillString(sec,2,-1,\"0\"))\n ;\n return str;\n }", "function prettyFormatDate(date) {\n return Utilities.formatDate(new Date(date), \"GMT-7\", \"MM/dd/yy\").toString();\n}", "function formatDate(date) {\n var newDate = new Date(date);\n var dd = newDate.getDate();\n var mm = newDate.getMonth() + 1; // January is 0!\n\n var yyyy = newDate.getFullYear();\n\n if (dd < 10) {\n dd = \"0\".concat(dd);\n }\n\n if (mm < 10) {\n mm = \"0\".concat(mm);\n }\n\n var formatedDate = \"\".concat(dd, \"/\").concat(mm, \"/\").concat(yyyy);\n return formatedDate;\n}", "function formatDate(date) {\n var day = date.getDate();\n var month = date.getMonth();\n var year = date.getFullYear();\n month++;\n if (month < 10)\n month = '0' + month;\n if (day < 10)\n day = '0' + day;\n return [year, month, day].join('-').toString();\n}", "formatDate(date) {\n return date.toISOString().replaceAll(\"-\", \"\").substring(0, 8);\n }", "function formatDate(date) {\n\t\tvar day = date.getDate();\n\t\t\n\t\t// Add '0' if needed\n\t\tif (parseInt(day / 10) == 0) {\n\t\t\tday = \"0\" + day;\n\t\t}\n\t\t\n\t\tvar month = date.getMonth() + 1; // months start at 0\n\t\t\n\t\t// Add '0' if needed\n\t\tif (parseInt(month / 10) == 0) {\n\t\t\tmonth = \"0\" + month;\n\t\t}\n\t\t\n\t\tvar year = date.getFullYear();\n\t\t\n\t\treturn day + \"/\" + month + \"/\" + year;\n\t}", "function formatDate(date) {\n\t\treturn (date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear() + ' - ' + formatTime([date.getHours(), date.getMinutes()]));\n\t}", "_convertDateObjToString(obj) {\n\n let date = \"\";\n\n if (obj && obj.day && obj.month && obj.year) {\n let month = String(obj.month);\n let day = String(obj.day);\n let year = String(obj.year);\n\n if (month.length < 2) {\n month = \"0\" + month;\n }\n\n if (day.length < 2) {\n day = \"0\" + day;\n }\n\n if (year.length < 4) {\n var l = 4 - year.length;\n for (var i = 0; i < l; i++) {\n year = \"0\" + year;\n }\n }\n date = year + \"-\" + month + \"-\" + day;\n }\n\n return date;\n }", "function formatDate(date)\n{\n date = new Date(date * 1000);\n return '' + date.getFullYear() + '/' + lpad(date.getMonth(), 2, '0') + '/' + lpad(date.getDate(), 2, '0') + ' ' + lpad(date.getHours(), 2, '0') + ':' + lpad(date.getMinutes(), 2, '0');\n}", "function formatDate(date) {\n var d = new Date(date),\n month = '' + (d.getMonth() + 1),\n day = '' + d.getDate(),\n year = d.getFullYear();\n\n if (month.length < 2) {\n month = '0' + month;\n }\n if (day.length < 2) {\n day = '0' + day;\n }\n\n return [year, month, day].join('-');\n}", "formatDate(x) {\n let date = new Date(x)\n let _month = date.getMonth() + 1 < 10 ? `0${date.getMonth() + 1}` : date.getMonth() + 1\n let _date = date.getDate() < 10 ? `0${date.getDate()}` : date.getDate()\n let _hour = date.getHours() < 10 ? `0${date.getHours()}` : date.getHours()\n let _minute = date.getMinutes() < 10 ? `0${date.getMinutes()}` : date.getMinutes()\n let _second = date.getSeconds() < 10 ? `0${date.getSeconds()}` : date.getSeconds()\n let dateStr = `${date.getFullYear()}-${_month}-${_date} ${_hour}:${_minute}:${_second}`\n return dateStr\n }", "returnDateFormat(date){\n var day = new Date(date);\n return day.toDateString();\n }", "function formatDate (date) {\n if (date) {\n const year = date.getFullYear()\n const month = date.getMonth() + 1\n const day = date.getDate()\n return year + '-' + month.toString().padStart(2, '0') + '-' + day.toString().padStart(2, '0')\n } else {\n return ''\n }\n}", "formatDateTime(date, format) {\n date = new Date(date);\n var result = format || 'y-m-d h:i:s';\n result = result.replace('y', date.getFullYear());\n result = result.replace('m', this.pad(date.getMonth() + 1, 2));\n result = result.replace('d', this.pad(date.getDate(), 2));\n result = result.replace('h', this.pad(date.getHours(), 2));\n result = result.replace('i', this.pad(date.getMinutes(), 2));\n result = result.replace('s', this.pad(date.getSeconds(), 2));\n return result;\n }", "function formatDate(date) {\n var date = new Date(date * 1000);\n return `${date.getMonth() + 1}/${date.getDate()}/${date.getUTCFullYear()}`;\n}", "static formatDate(date) {\n let formattedDate = '';\n\n formattedDate += date.getUTCFullYear();\n formattedDate += '-' + ('0' + (date.getUTCMonth() + 1)).substr(-2);\n formattedDate += '-' + ('0' + date.getUTCDate()).substr(-2);\n\n return formattedDate;\n }", "formatted_date() {\n return this.created_at.toLocaleDateString()\n }", "function formatDate(date) {\n var year = date.getFullYear()\n var month = (1 + date.getMonth()).toString()\n var day = date.getUTCDate()\n return month + \"/\" + day + \"/\" + year\n}", "function formatDate(date){\n var yr = date.getFullYear();\n var mnth = date.getMonth()+1;\n if(mnth < 10){\n mnth = `0${mnth}`;\n }\n var day = date.getDate()\n if(day < 10){\n day = `0${day}`;\n }\n return yr+\"-\"+mnth+\"-\"+day;\n}", "function formatDate(date){\n var dd = date.getDate(),\n mm = date.getMonth()+1, //January is 0!\n yyyy = date.getFullYear();\n\n if(dd<10) dd='0'+dd;\n if(mm<10) mm='0'+mm;\n\n return yyyy+'-'+mm+'-'+dd;\n}", "function dateformat(date) {\n \n // Main array that will be used to sort out the date.\n let dateArray = date.split('-');\n // Sorts days\n let dayArray = dateArray[2].split('T');\n let day = dayArray[0];\n // Sets up month and year months\n let month = dateArray[1];\n let year = dateArray[0];\n // Using the global standard or writing DOB\n let formatedDOB = [day, month, year].join('-');\n // Retuns the data from the formatted DOB.\n return formatedDOB;\n }", "function formatDate ( date ) {\n return date.getDate() + nth(date.getDate()) + \" \" +\n months[date.getMonth()] + \" \" +\n date.getFullYear();\n}", "function formatDate(date) {\n if (date) {\n var formattedDate = new Date(date);\n return formattedDate.toLocaleDateString();\n } else {\n return null;\n }\n}", "function formatDate(date) {\n return date.getFullYear() + '-' +\n (date.getMonth() < 9 ? '0' : '') + (date.getMonth()+1) + '-' +\n (date.getDate() < 10 ? '0' : '') + date.getDate();\n}", "function formatDate(date, formatStr) {\n\t\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n\t}", "function formatDate(date) {\n\t\t\t\treturn date.getDate() + \"-\" + (date.getMonth()+1) + \"-\" + date.getFullYear();\n\t\t\t}", "function pgFormatDate(date) {\n /* Via http://stackoverflow.com/questions/3605214/javascript-add-leading-zeroes-to-date */\n return String(date.getFullYear()+'-'+(date.getMonth()+1)+'-'+date.getDate()); \n}", "function setFormatoDate(data) {\n let dd = (\"0\" + (data.getDate())).slice(-2);\n let mm = (\"0\" + (data.getMonth() + 1)).slice(-2);\n let yyyy = data.getFullYear();\n return dd + '/' + mm + '/' + yyyy;\n}", "function formatDate(date, format, options) {\n\treturn formatDates(date, null, format, options);\n}", "function formatDate(date, format, options) {\n\treturn formatDates(date, null, format, options);\n}", "function formatDate(date, format, options) {\n\treturn formatDates(date, null, format, options);\n}", "prettyBirthday() {//Can be put in method\n return dayjs(this.person.dob.date)\n .format('DD MMMM YYYY')//change in assignment to different format not default\n }", "function dateFormatter(date){\n var year = date.getFullYear();\n var month = date.getMonth() + 1;\n var day = date.getDate();\n return year + '-' + ('0' + month).slice(-2) + '-' + day; // the '0' and the slicing is for left padding\n}", "static formatDate (date, format) {\n let year = date.getFullYear(),\n month = Timer.zero(date.getMonth()+1),\n day = Timer.zero(date.getDate()),\n hours = Timer.zero(date.getHours()),\n minute = Timer.zero(date.getMinutes()),\n second = Timer.zero(date.getSeconds()),\n week = date.getDay();\n return format.replace(/yyyy/g, year)\n .replace(/MM/g, month)\n .replace(/dd/g, day)\n .replace(/hh/g, hours)\n .replace(/mm/g, minute)\n .replace(/ss/g, second)\n .replace(/ww/g, Timer.weekName(week));\n }", "function formatDate(date){\n var yyyy = date.getFullYear();\n var mm = date.getMonth() + 1;\n var dd = date.getDate();\n //console.log(\"This is dd\" + dd);\n if(dd<10){\n dd='0'+ dd;\n }\n if(mm<10){\n mm='0'+mm;\n } \n return ( mm + '/' + dd + '/' + yyyy);\n \n }", "dateFormate(d) {\n const date = new Date(d)\n const j = date.getDate()\n const m = (date.getUTCMonth() + 1)\n const a = date.getUTCFullYear()\n return (\"0\" + j).slice(-2) + '/' + (\"0\" + m).slice(-2) + '/' + a\n }", "function format(d) {\n const month = d.getMonth() >= 9 ? d.getMonth() + 1 : `0${d.getMonth() + 1}`;\n const day = d.getDate() >= 10 ? d.getDate() : `0${d.getDate()}`;\n const year = d.getFullYear();\n return `${month}/${day}/${year}`;\n}", "function formatDate(date) {\n var d = new Date(date),\n month = '' + (d.getMonth() + 1),\n day = '' + d.getDate(),\n year = d.getFullYear();\n if (month.length < 2) month = '0' + month;\n if (day.length < 2) day = '0' + day;\n return [year, month, day].join('-');\n }", "function formatDate(dateToConvert) {\n\treturn format(new Date(dateToConvert));\n}", "function formatDate(date) {\n let year = date.getFullYear();\n let month = date.getMonth() + 1;\n let day = date.getDate();\n return [year, month, day].join('-');\n}", "formatDate(value, format) {\n format = format || '';\n if (value) {\n return window.moment(value)\n .format(format);\n }\n return \"n/a\";\n }", "function formatDate(date) {\n result = \"\";\n if (date) {\n result += date.getDate() + \"/\"; // Day\n result += (date.getMonth() + 1) + \"/\";\n result += (date.getYear() + 1900);\n }\n return result;\n}", "formatDate(d) {\n return moment(d).format('DD/MM/YYYY')\n }", "function formattedDate(d = new Date()) {\n return [d.getDate(), d.getMonth() + 1, d.getFullYear()]\n .map((n) => (n < 10 ? `0${n}` : `${n}`))\n .join(\"/\")\n .concat(` at ${getTime(d)}`);\n }", "_formatDate(date, tzOffset) {\n let str = window.iotlg.dateFormat;\n let actualDate = new Date();\n actualDate.setTime(date.getTime() + this._getMilliseconds(tzOffset, UNIT_HOUR));\n let hours = (actualDate.getUTCHours());\n let day = (actualDate.getUTCDate());\n\n str = str.replace(\"yyyy\", actualDate.getUTCFullYear());\n str = str.replace(\"mm\", this._fillUp(actualDate.getUTCMonth() + 1, 2));\n str = str.replace(\"dd\", this._fillUp(day, 2));\n str = str.replace(\"hh\", this._fillUp(hours, 2));\n str = str.replace(\"MM\", this._fillUp(actualDate.getUTCMinutes(), 2));\n str = str.replace(\"ss\", this._fillUp(actualDate.getUTCSeconds(), 2));\n str = str.replace(\" \", \"\\n\");\n return str;\n }", "function formatDate(rawDate) {\n return rawDate.replace(/(\\d{4})[-/](\\d{2})[-/](\\d{2})/, '$3.$2.$1');\n}", "getDateFormated(date) {\n const formatDate = new Intl.DateTimeFormat('en-GB', {\n day: 'numeric',\n month: 'short',\n year: 'numeric'\n }).format;\n return formatDate(date);\n }", "function formatDate(val) {\n var d = new Date(val),\n day = d.getDate(),\n month = d.getMonth() + 1,\n year = d.getFullYear();\n\n if (day < 10) {\n day = \"0\" + day;\n }\n if (month < 10) {\n month = \"0\" + month;\n }\n return month + \"/\" + day + \"/\" + year;\n}", "function formattedDate(d = new Date) {\n\treturn [d.getDate(), d.getMonth()+1, d.getFullYear()]\n\t\t.map(n => n < 10 ? `0${n}` : `${n}`).join('/');\n }", "function reFormatDate(date) {\n const d= new Date(Date.parse(date));\n let mm = d.getMonth() + 1;\n const yyyy = d.getFullYear();\n let dd = d.getDate();\n\n if (dd < 10) {\n dd = `0${dd}`;\n }\n if (mm < 10) {\n mm = `0${mm}`;\n }\n return `${yyyy}-${mm}-${dd}`;\n }" ]
[ "0.75320816", "0.7421278", "0.7386446", "0.7386206", "0.73497903", "0.7336332", "0.73048234", "0.7300858", "0.7292591", "0.7292591", "0.7292591", "0.7221218", "0.7213261", "0.7210653", "0.7188191", "0.71826464", "0.71783525", "0.71683335", "0.71673006", "0.71582985", "0.7136396", "0.71351296", "0.7116119", "0.7094242", "0.706227", "0.70609725", "0.704927", "0.7048684", "0.703367", "0.70264095", "0.7026313", "0.7015168", "0.7003348", "0.6994713", "0.6985144", "0.6984923", "0.69840693", "0.6977675", "0.6977675", "0.6977597", "0.69757605", "0.6975543", "0.6970286", "0.6963518", "0.6961424", "0.69570905", "0.69568783", "0.69550544", "0.694989", "0.6949591", "0.6942341", "0.6942232", "0.6940583", "0.69388914", "0.6935119", "0.6934607", "0.6933395", "0.69221574", "0.69161093", "0.6916095", "0.69148", "0.6909679", "0.68973136", "0.6889287", "0.68878007", "0.6875211", "0.68711346", "0.6871014", "0.68709546", "0.68678564", "0.68650454", "0.6862945", "0.6851623", "0.68475795", "0.684524", "0.68389064", "0.6835438", "0.6835073", "0.6827606", "0.6824828", "0.6824828", "0.6824828", "0.6824674", "0.6817718", "0.6815951", "0.681486", "0.68108004", "0.68101245", "0.68099517", "0.6809602", "0.68090725", "0.68019825", "0.6801209", "0.67929906", "0.6790544", "0.6789918", "0.67863476", "0.6785376", "0.67850566", "0.67833906", "0.67782235" ]
0.0
-1
pick the locale from the array try ['enau', 'engb'] as 'enau', 'engb', 'en', as in move through the list trying each substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
function chooseLocale(names) { var i = 0, j, next, locale, split; while (i < names.length) { split = normalizeLocale(names[i]).split('-'); j = split.length; next = normalizeLocale(names[i + 1]); next = next ? next.split('-') : null; while (j > 0) { locale = loadLocale(split.slice(0, j).join('-')); if (locale) { return locale; } if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { //the next array item is better than a shallower substring of this one break; } j--; } i++; } return globalLocale; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n \n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n }", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return null;\n}", "function chooseLocale(names) {\n var i = 0, j, next, locale, split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}" ]
[ "0.70815086", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7076946", "0.7073045" ]
0.0
-1
This function will load locale and then set the global locale. If no arguments are passed in, it will simply return the current global locale key.
function getSetGlobalLocale (key, values) { var data; if (key) { if (isUndefined(values)) { data = getLocale(key); } else { data = defineLocale(key, values); } if (data) { // moment.duration._locale = moment._locale = data; globalLocale = data; } else { if ((typeof console !== 'undefined') && console.warn) { //warn user if arguments are passed but the locale could not be set console.warn('Locale ' + key + ' not found. Did you forget to load it?'); } } } return globalLocale._abbr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data = getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\nglobalLocale = data;}else {if(typeof console !== 'undefined' && console.warn){ //warn user if arguments are passed but the locale could not be set\nconsole.warn('Locale ' + key + ' not found. Did you forget to load it?');}}}return globalLocale._abbr;}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined$1(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\r\n var data;\r\n if (key) {\r\n if (isUndefined(values)) {\r\n data = getLocale(key);\r\n }\r\n else {\r\n data = defineLocale(key, values);\r\n }\r\n\r\n if (data) {\r\n // moment.duration._locale = moment._locale = data;\r\n globalLocale = data;\r\n }\r\n else {\r\n if ((typeof console !== 'undefined') && console.warn) {\r\n //warn user if arguments are passed but the locale could not be set\r\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\r\n }\r\n }\r\n }\r\n\r\n return globalLocale._abbr;\r\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t else {\n\t if ((typeof console !== 'undefined') && console.warn) {\n\t //warn user if arguments are passed but the locale could not be set\n\t console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n\t }\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t else {\n\t if ((typeof console !== 'undefined') && console.warn) {\n\t //warn user if arguments are passed but the locale could not be set\n\t console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n\t }\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t else {\n\t if ((typeof console !== 'undefined') && console.warn) {\n\t //warn user if arguments are passed but the locale could not be set\n\t console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n\t }\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t }", "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t else {\n\t if ((typeof console !== 'undefined') && console.warn) {\n\t //warn user if arguments are passed but the locale could not be set\n\t console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n\t }\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t }", "function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn User if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }", "function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }" ]
[ "0.73265904", "0.729834", "0.72949797", "0.72495294", "0.72495294", "0.72495294", "0.72495294", "0.72495294", "0.72495294", "0.7241661", "0.7241661", "0.72304165", "0.7218095", "0.7214398", "0.7210484", "0.7210484", "0.7210484", "0.7210484", "0.72065747", "0.72061956", "0.7206148", "0.7206148", "0.7206148", "0.7206148", "0.7206148" ]
0.0
-1
Pick the first defined of two or three arguments.
function defaults(a, b, c) { if (a != null) { return a; } if (b != null) { return b; } return c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pick() {\n\tvar args = arguments,\n\t\ti,\n\t\targ,\n\t\tlength = args.length;\n\tfor (i = 0; i < length; i++) {\n\t\targ = args[i];\n\t\tif (typeof arg !== 'undefined' && arg !== null) {\n\t\t\treturn arg;\n\t\t}\n\t}\n}", "function pick() {\n\t\tvar args = arguments,\n\t\t\ti,\n\t\t\targ,\n\t\t\tlength = args.length;\n\t\tfor (i = 0; i < length; i++) {\n\t\t\targ = args[i];\n\t\t\tif (arg !== UNDEFINED && arg !== null) {\n\t\t\t\treturn arg;\n\t\t\t}\n\t\t}\n\t}", "function firstArg() {\n\treturn arguments != \"\" ? [...arguments].shift() : undefined;\n}", "function pick() {\n var args = arguments,\n i,\n arg,\n length = args.length;\n for (i = 0; i < length; i++) {\n arg = args[i];\n if (arg !== UNDEFINED && arg !== null) {\n return arg;\n }\n }\n }", "function getFirstDefined() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n for (var _i3 = 0, _args = args; _i3 < _args.length; _i3++) {\n var arg = _args[_i3];\n\n if (arg !== undefined) {\n return arg;\n }\n }\n\n return undefined;\n } // variable used to generate id", "function $pick() {\r\n\t\tfor (var i=0,l=arguments.length; i<l; i++) {\r\n\t\t\tif ($chk(arguments[i])) return arguments[i];\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "function v1() {\r\n for (var args = arguments, i = 0, l = args.length; i < l && args[i] == undefined; i++);\r\n return has(args, i) ? args[i] : args[l - 1];\r\n }", "function or() {\r\n\t\t\tvar remain = _.without(arguments, undefined); \r\n\t\t\tif (remain.length === 0)\r\n\t\t\t\treturn undefined;\r\n\t\t\treturn remain[0];\r\n\t\t}", "function getFirstDefined(...args) {\n\t for (const arg of args) {\n\t if (arg !== undefined) {\n\t return arg;\n\t }\n\t }\n\t return undefined;\n\t}", "function f(x) {\n let firstArg = arguments[0];\n\n return firstArg;\n}", "function firstDefined() {\n var i = -1;\n while (++i < arguments.length) {\n if (arguments[i] !== undefined) {\n return arguments[i];\n }\n }\n return undefined;\n }", "function get_arg_2() { return arguments[2]; }", "function mrcPick(arg, def) {\n return (typeof arg !== \"undefined\" ? arg : def);\n}", "function firstString() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n for (var i = 0; i < args.length; i++) {\n var arg = args[i];\n if (typeof arg === \"string\") {\n return arg;\n }\n }\n}", "function firstString() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n for (var i = 0; i < args.length; i++) {\r\n var arg = args[i];\r\n if (typeof arg === \"string\") {\r\n return arg;\r\n }\r\n }\r\n}", "function f(a, b, c, d, e, f) {\n let sixthArg = arguments[5];\n let thirdArg = arguments[2];\n\n return sixthArg;\n}", "function myOtherFunction (first_argument = second_argument, second_argument) {}", "function RandomArg()\n{\n\tvar r = Math.floor(Math.random()*arguments.length);\n\treturn arguments[r];\n}", "function getArg(aArgs,aName,aDefaultValue){if(aName in aArgs){return aArgs[aName];}else if(arguments.length===3){return aDefaultValue;}else{throw new Error('\"'+aName+'\" is a required argument.');}}", "function doWhat(first, second, third) {\n if (arguments.length != 3) {\n throw new Error(\"Excepts 3 arguments, but invoke with \" +\n arguments.length + \" arguments\");\n }\n}", "function randomChoice()\n{\n assert (\n arguments.length > 0,\n 'must supply at least one possible choice'\n );\n\n var idx = randomInt(0, arguments.length - 1);\n\n return arguments[idx];\n}", "function isTwoPassed(){\n var args = Array.prototype.slice.call(arguments);\n return args.indexOf(2) != -1;\n}", "function getArg(args, type, number) {\n var count = 1, number = (number || 1);\n for (var i = 0; i < args.length; i++) {\n //Check for type, If function then ensure \"callee\" is excluded\n if (typeof args[i] == type && !(type == \"function\" && args[i].name == \"callee\")) {\n if (number == 1) return args[i];\n else number++;\n }\n }\n }", "function abc(a,b) {\n var c = 6;\n return arguments[0] + b + c;\n}", "function foo() {\n\tvar a = arguments[0] !== (void 0) ? arguments[0] : 2;\n\tconsole.log( a );\n}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t }", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t }", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t }", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName]\n } else if (arguments.length === 3) {\n return aDefaultValue\n } else {\n throw new Error('\"' + aName + '\" is a required argument.')\n }\n }", "function getFirstElement ([a, b]) {\n let getArray = [a, b] \n return getArray[0]\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function one(a,...rest){\n console.log(a,rest)\n}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}", "function getArg(aArgs, aName, aDefaultValue) {\n\t\t if (aName in aArgs) {\n\t\t return aArgs[aName];\n\t\t } else if (arguments.length === 3) {\n\t\t return aDefaultValue;\n\t\t } else {\n\t\t throw new Error('\"' + aName + '\" is a required argument.');\n\t\t }\n\t\t}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }", "function sayArguments(first, second) {\n first = first || 'first';\n second = second || 'second'; // || Значение по умолчанию\n let args = '';\n\n for (let i = 0; i < arguments.length; i++) {\n args += arguments[i] + ' ';\n }\n console.log( 'Arguments: ' + args );\n}", "function smallestValue(){\n return Math.min(...arguments);\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n }\n throw new Error('\"' + aName + '\" is a required argument.');\n\n}", "function test() {\n return arguments.slice(arguments.length - 1)[0]; //ERROR, there is not slice method\n}", "function getThirdArgument() {\n\n // Stores all possible arguments in array\n argumentArray = process.argv;\n\n // Loops through words in node argument\n for (var i = 3; i < argumentArray.length; i++) {\n argument += argumentArray[i];\n }\n return argument;\n}", "function oneOf(args) { }", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}", "function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}" ]
[ "0.7629042", "0.75575334", "0.74523604", "0.7447829", "0.6875494", "0.6672635", "0.6649544", "0.66400206", "0.65779024", "0.6487554", "0.64760274", "0.64054173", "0.62996894", "0.62969613", "0.62835485", "0.61632556", "0.61517835", "0.5961853", "0.59598327", "0.5933788", "0.5932596", "0.5919368", "0.588653", "0.58661693", "0.5844922", "0.5843471", "0.5843471", "0.5843471", "0.5843471", "0.5819852", "0.5816442", "0.5788889", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5776305", "0.5775556", "0.57646376", "0.57646376", "0.57646376", "0.57646376", "0.57646376", "0.57646376", "0.57646376", "0.57646376", "0.57646376", "0.57646376", "0.57646376", "0.57646376", "0.5755687", "0.57524157", "0.5742633", "0.5736218", "0.572891", "0.57214624", "0.5666182", "0.5661547", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525", "0.565525" ]
0.0
-1
convert an array to a date. the array should mirror the parameters below note: all values past the year are optional and will default to the lowest possible value. [year, month, day , hour, minute, second, millisecond]
function configFromArray (config) { var i, date, input = [], currentDate, expectedWeekday, yearToUse; if (config._d) { return; } currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { dayOfYearFromWeekInfo(config); } //if the day of the year is set, figure out what it is if (config._dayOfYear != null) { yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { getParsingFlags(config)._overflowDayOfYear = true; } date = createUTCDate(yearToUse, 0, config._dayOfYear); config._a[MONTH] = date.getUTCMonth(); config._a[DATE] = date.getUTCDate(); } // Default to current date. // * if no year, month, day of month are given, default to today // * if day of month is given, default month and year // * if month is given, default only year // * if year is given, don't default anything for (i = 0; i < 3 && config._a[i] == null; ++i) { config._a[i] = input[i] = currentDate[i]; } // Zero out whatever was not defaulted, including time for (; i < 7; i++) { config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; } // Check for 24:00:00.000 if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) { config._nextDay = true; config._a[HOUR] = 0; } config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed // with parseZone. if (config._tzm != null) { config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); } if (config._nextDay) { config._a[HOUR] = 24; } // check for mismatching day of week if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) { getParsingFlags(config).weekdayMismatch = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dateFromArray(input) {\n return new Date(input[0], input[1] || 0, input[2] || 1, input[3] || 0, input[4] || 0, input[5] || 0, input[6] || 0);\n }", "function dateFromArray(input) {\n return new Date(input[0], input[1] || 0, input[2] || 1, input[3] || 0, input[4] || 0, input[5] || 0, input[6] || 0);\n }", "function datearray(num)\n{\n var ret = []\n var day = Math.floor(num/1000000)\n ret.push(day)\n num = num-(day*1000000)\n var month = Math.floor(num/10000)\n ret.push(month)\n num = num-(month*10000)\n var year = Math.floor(num)\n ret.push(year)\n return ret\n}", "function SP_CreateDateObject(arrDate)\n{\n\tvar oDate;\n\t\n\tif(arrDate.length == 3)\n\t{\n\t\t// Check First Element is either day or year\n\t\t\n\t\tif(arrDate[0].length == 4) //means year , passing array date is of format yyyy-mmm-dd\n\t\t{\n\t\t\toDate = new Date(arrDate[0], --arrDate[1], arrDate[2]);\n\t\t}\n\t\telse //means day, passing array date is of format dd-mmm-yyyy \n\t\t{\n\t\t\toDate = new Date(arrDate[2], SP_GetMonthNumber(arrDate[1]), arrDate[0]);\t\t\n\t\t}\n\t}\n\telse\n\t{\n\t\toDate = new Date();\n\t}\n\t\n\treturn oDate;\n}", "function formArray (array, oneRMArray) {\n var data = []\n for (var i = 0; i < array.length; i++) {\n var d;\n var monthString = array[i].month.toString();\n var dayString = array[i].day.toString();\n var yearString = array[i].year.toString();\n var d = new Date(monthString + \"-\" + dayString + \"-\" + yearString);\n var dParsed = Date.parse(d);\n\n data[i] = {\n x: dParsed,\n y: oneRMArray[i]\n } \n }\n return data\n }", "function formatDATADate(dateArr) {\r\n\r\n var val = [];\r\n\r\n for (date in dateArr) {\r\n val.push(new Date(formatDate(date)).getTime());\r\n }\r\n\r\n return val;\r\n}", "makeArray(d) {\n var da = new Date(d);\n return [da.getUTCFullYear(), da.getUTCMonth() + 1, da.getUTCDate(), 0, 0, 0, 0];\n }", "function fillDate(array) {\n var last = array.length - 1;\n var firstDate = array[0].datestamp;\n var lastDate = array[last].datestamp;\n\n var fullarray = betweenDate(firstDate, lastDate);\n\n return fullarray;\n }", "fromArray(a) {\n var d = [].concat(a);\n d[1]--;\n return Date.UTC.apply(null, d);\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += config._tzh || 0;\n input[4] += config._tzm || 0;\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += config._tzh || 0;\n input[4] += config._tzm || 0;\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += config._tzh || 0;\n input[4] += config._tzm || 0;\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += config._tzh || 0;\n input[4] += config._tzm || 0;\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += config._tzh || 0;\n input[4] += config._tzm || 0;\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += ~~((config._tzm || 0) / 60);\n input[4] += ~~((config._tzm || 0) % 60);\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += ~~((config._tzm || 0) / 60);\n input[4] += ~~((config._tzm || 0) % 60);\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function dateFromArray(config) {\n var i, date, input = [];\n\n if (config._d) {\n return;\n }\n\n for (i = 0; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += ~~((config._tzm || 0) / 60);\n input[4] += ~~((config._tzm || 0) % 60);\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function BuildDates(date){\r\n var array = new Array();\r\n array['day'] = (date.getDate() < 10) ?\r\n '0' + date.getDate().toString() :\r\n date.getDate().toString();\r\n \r\n array['month'] = (date.getMonth() < 9) ?\r\n '0' + (date.getMonth()+1).toString() :\r\n (date.getMonth()+1).toString();\r\n \r\n array['year'] = date.getFullYear().toString();\r\n return array;\r\n}", "function date() {\n return new Date(year, ...arguments)\n }", "function dateFromArray(config) {\n var i, date, input = [], currentDate;\n\n if (config._d) {\n return;\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n currentDate = currentDateArray(config);\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // add the offsets to the time to be parsed so that we can have a clean array for checking isValid\n input[3] += ~~((config._tzm || 0) / 60);\n input[4] += ~~((config._tzm || 0) % 60);\n\n date = new Date(0);\n\n if (config._useUTC) {\n date.setUTCFullYear(input[0], input[1], input[2]);\n date.setUTCHours(input[3], input[4], input[5], input[6]);\n } else {\n date.setFullYear(input[0], input[1], input[2]);\n date.setHours(input[3], input[4], input[5], input[6]);\n }\n\n config._d = date;\n }", "function createDateArray( date ) {\r\n return date.split( '-' ).map(function( value ) { return +value })\r\n }", "function makeFriendlyDates(arr) {\n var months = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"];\n var start = arr[0].split('-'), startStr = '';\n var end = arr[1].split('-'), endStr = '';\n var result = [];\n function toNum(str) {\n return +str;\n }\n // convert to readable day formant\n function dayFormat(day) {\n switch (day) {\n case 1:\n case 21:\n return day + 'st';\n case 2:\n case 22:\n return day + 'nd';\n case 3:\n case 23:\n return day + 'rd';\n default:\n return day + 'th';\n }\n }\n start = start.map(toNum);\n end = end.map(toNum);\n var startYear = start[0], startMonth = start[1], startDay = start[2];\n var endYear = end[0], endMonth = end[1], endDay = end[2];\n // ending date equals to starting date\n if (arr[0] === arr[1]) {\n result.push(months[startMonth - 1] + ' ' + dayFormat(startDay) + ', ' + startYear);\n return result;\n }\n startStr += months[startMonth - 1] + ' ' + dayFormat(startDay);\n if (endYear === startYear) {\n if (startYear !== 2016) {\n startStr += ', ' + startYear; \n }\n if (endMonth === startMonth ) {\n endStr += dayFormat(endDay); // two dates within a month, just output ending day\n } else {\n endStr += months[endMonth - 1] + ' ' + dayFormat(endDay);\n }\n } else if (endYear - startYear === 1) {\n if (endMonth === startMonth && endDay < startDay || endMonth < startMonth) { // within one year\n endStr += months[endMonth - 1] + ' ' + dayFormat(endDay);\n if (startYear !== 2016) {\n startStr += ', ' + startYear; \n }\n } else if (endMonth >= startMonth) { // exceed one year\n startStr += ', ' + startYear;\n endStr += months[endMonth - 1] + ' ' + dayFormat(endDay) + ', ' + endYear;\n }\n } else if (endYear - startYear > 1) { // exceed one year\n startStr += ', ' + startYear;\n endStr += months[endMonth - 1] + ' ' + dayFormat(endDay) + ', ' + endYear;\n }\n\n result.push(startStr, endStr);\n return result;\n}", "function makeDateArray(weatherData, array){\n weatherData.data.forEach((item, index) => {\n Object.keys(item).forEach(key => {\n if(key === \"datetime\") {\n array.push(dateFormat(weatherData.data[index][key]));\n return array;\n }\n });\n });\n}", "formatDateForArray(date, month, year) {\n //console.log('month-->'+month+'date-->'+date);\n if (month <= 9 ) \n month = '0' + (month+1);\n if (date <= 9) \n date = '0' + (date);\n\n return [year, month, date].join('-');\n }", "parseDate(arrayOfStrings)\n {\n let newStr=arrayOfStrings[3];\n newStr += '-';\n switch(arrayOfStrings[1])\n {\n case 'Jan':\n newStr+='01';\n break;\n case 'Feb':\n newStr+='02';\n break;\n case 'Mar':\n newStr+='03';\n break;\n case 'Apr':\n newStr+='04';\n break;\n case 'May':\n newStr+='05';\n break;\n case 'Jun':\n newStr+='06';\n break;\n case 'Jul':\n newStr+='07';\n break;\n case 'Aug':\n newStr+='08';\n break;\n case 'Sep':\n newStr+='09';\n break;\n case 'Oct':\n newStr+='10';\n break;\n case 'Nov':\n newStr+='11';\n break;\n case 'Dec':\n newStr+='12';\n break;\n default:\n break;\n }\n newStr+='-';\n newStr+=arrayOfStrings[2];\n\n return newStr;\n }", "function sortByYear\n(\n array\n) \n{\n return array.sort(function(a,b)\n {\n var x = parseInt(a.number.split('-')[1]);\n var y = parseInt(b.number.split('-')[1]);\n return ((x < y) ? -1 : ((x > y) ? 0 : 1));\n }).reverse();\n}", "function frmt_date(a,field) {\n for(var i=0; i < a.length; i++){\n if( ! a[i][field] ) { continue }\n var d = new Date(a[i][field] * 1000)\n a[i][field] = d.toISOString().substr(0,16).replace('T',' ')\n }\n return(a)\n}", "function date2arr(date)\r\n{\r\n\t//\tdate = yyyy-mm-dd\r\n\tif(date != null && date.length > 0 && date.toLowerCase() != \"null\")\r\n\t{\r\n\t\tvar tmp = date.split(\"-\");\r\n\t\tvar arr = new Array();\r\n\t\tarr[0] = tmp[2];\r\n\t\tarr[1] = tmp[1];\r\n\t\tarr[2] = Number(tmp[0]);\r\n\t\treturn arr;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn null;\r\n\t}\r\n}", "function normalizeDate(year, month, day) {\n return [year.padStart(4, '2000'), month.padStart(2, '0'), day.padStart(2, '0')];\n }", "function transformSortDate(arr) {\n const sortedArray = arr.sort((a, b) => {\n return b.timestamp + a.timestamp;\n });\n return sortedArray;\n}", "function dateStringToObject(date){\n var splitString = date.split(\"-\");// gonna set up our YYYY-MM-DD format\n var dateObject = {}; // object variable we will push results to\n // date should have a year(1), month(2), day(3) array input\n dateObject.year = splitString[0];\n dateObject.month = splitString[1];\n dateObject.day = splitString[2];\n return dateObject;\n} //(OPTION 1)", "function textifyDates(myArr){\n \n \n for(var r=0; r < myArr.length; r++){\n for(var c=0; c < myArr[r].length; c++){\n if (Object.prototype.toString.call(myArr[r][c]) === '[object Date]'){\n try { \n //myArr[r] = myArr[r].toString();\n myArr[r] = Utilities.formatDate(myArr[r], \"GMT+08:00\", \"dd-MMM-yyyy\")\n } \n catch(err) { myArr[r][c] = err};\n }\n }\n }\n return myArr;\n}", "function dateToUnix(dateArr){\n var d = new Date(dateArr[2],months.indexOf(getMonth(dateArr)),dateArr[1].substr(0,dateArr[1].length-1),0,0,0,0);\n return d.valueOf() / 1000 -18000;\n}", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function gregorianDateArrToStr([year, month, day]): string {\n return moment.utc([year, month - 1, day]).format('YYYY-MM-DD');\n}", "function toDate(value){if(isDate(value)){return value;}if(typeof value==='number'&&!isNaN(value)){return new Date(value);}if(typeof value==='string'){value=value.trim();var parsedNb=parseFloat(value);// any string that only contains numbers, like \"1234\" but not like \"1234hello\"\nif(!isNaN(value-parsedNb)){return new Date(parsedNb);}if(/^(\\d{4}-\\d{1,2}-\\d{1,2})$/.test(value)){/* For ISO Strings without time the day, month and year must be extracted from the ISO String\n before Date creation to avoid time offset and errors in the new Date.\n If we only replace '-' with ',' in the ISO String (\"2015,01,01\"), and try to create a new\n date, some browsers (e.g. IE 9) will throw an invalid Date error.\n If we leave the '-' (\"2015-01-01\") and try to create a new Date(\"2015-01-01\") the timeoffset\n is applied.\n Note: ISO months are 0 for January, 1 for February, ... */var _a=Object(tslib__WEBPACK_IMPORTED_MODULE_1__[\"__read\"])(value.split('-').map(function(val){return+val;}),3),y=_a[0],m=_a[1],d=_a[2];return new Date(y,m-1,d);}var match=void 0;if(match=value.match(ISO8601_DATE_REGEX)){return isoStringToDate(match);}}var date=new Date(value);if(!isDate(date)){throw new Error(\"Unable to convert \\\"\"+value+\"\\\" into a date\");}return date;}", "function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== config._d.getDay()) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }", "function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== config._d.getDay()) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }", "function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== config._d.getDay()) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }", "function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function convertDates(d) {\n\tfor (var i = d.length; i--;)\n\t\tconvertDateObj(d[i]);\n\treturn d;\n}", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray(config) {\n var i, date, input = [],\n currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray(config) {\n var i, date, input = [],\n currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray(config) {\n var i, date, input = [],\n currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray(config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function makeDateObjects(data){\r\n\t\tconsole.log(\"makeDateObjects\");\r\n\t\tfor (i = 0; i < data.length; i++){\r\n\t\t\tvar datestring = data[i][selectedOptions.dateField];\r\n\t\t\tvar thisYear = parseInt(datestring.substring(0,4));\r\n\t\t\tvar thisMonth = parseInt(datestring.substring(5,7));\r\n\t\t\tvar thisDay = parseInt(datestring.substring(8,10));\r\n\t\t\tvar thisDateComplete = new Date(thisYear, thisMonth-1, thisDay); // JS-Date Month begins at 0\r\n\t\t\tzaehlstellen_data[i][selectedOptions.dateField] = thisDateComplete;\r\n\t\t}\r\n\t}", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }", "function configFromArray (config) {\n var i, date, input = [], currentDate, yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse)) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n }" ]
[ "0.7055193", "0.7055193", "0.69697016", "0.6847807", "0.66343343", "0.64591527", "0.612902", "0.612504", "0.6066711", "0.60143846", "0.60143846", "0.60143846", "0.60143846", "0.60143846", "0.5960663", "0.5960663", "0.5960663", "0.589971", "0.5884706", "0.58757216", "0.58684486", "0.5802239", "0.5767689", "0.5684165", "0.5650704", "0.5617277", "0.5612", "0.5598578", "0.55619097", "0.55160004", "0.5502408", "0.5437515", "0.5386048", "0.52929395", "0.5291209", "0.52879816", "0.528694", "0.528694", "0.528694", "0.528694", "0.5272048", "0.5259713", "0.5259463", "0.5258595", "0.5258595", "0.5258595", "0.52561176", "0.5253329", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474", "0.5248474" ]
0.0
-1
date from iso format
function configFromISO(config) { var i, l, string = config._i, match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), allowTime, dateFormat, timeFormat, tzFormat; if (match) { getParsingFlags(config).iso = true; for (i = 0, l = isoDates.length; i < l; i++) { if (isoDates[i][1].exec(match[1])) { dateFormat = isoDates[i][0]; allowTime = isoDates[i][2] !== false; break; } } if (dateFormat == null) { config._isValid = false; return; } if (match[3]) { for (i = 0, l = isoTimes.length; i < l; i++) { if (isoTimes[i][1].exec(match[3])) { // match[2] should be 'T' or space timeFormat = (match[2] || ' ') + isoTimes[i][0]; break; } } if (timeFormat == null) { config._isValid = false; return; } } if (!allowTime && timeFormat != null) { config._isValid = false; return; } if (match[4]) { if (tzRegex.exec(match[4])) { tzFormat = 'Z'; } else { config._isValid = false; return; } } config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); configFromStringAndFormat(config); } else { config._isValid = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isoDate(date)\n{\n\treturn date.getFullYear() + \"-\" + (date.getMonth() + 1) + \"-\" + date.getDate()\n}", "function dateFromISO8601(isostr) {\n var parts = isostr.match(/\\d+/g);\n var date = new Date(parts[0], parts[1] - 1, parts[2], parts[3], parts[4], parts[5]);\n var mm = date.getMonth() + 1;\n mm = (mm < 10) ? '0' + mm : mm;\n var dd = date.getDate();\n dd = (dd < 10) ? '0' + dd : dd;\n var yyyy = date.getFullYear();\n var finaldate = mm + '/' + dd + '/' + yyyy;\n return finaldate;\n }", "function parseIsoDate(dateStr) {\n \tif(dateStr.length <10) return null;\n \tvar d = dateStr.substring(0,10).split('-');\t\n \tfor(var i in d) { \n \t\td[i]=parseInt(d[i]);\n \t};\n \td[1] = d[1] -1;//month;\n \tvar t = dateStr.substring(11,19).split(':');\n \treturn new Date(d[0],d[1],d[2],t[0],t[1],t[2]);\n }", "function ISOdate(d) {\r\n\ttry {\r\n\t\treturn d.toISOString().slice(0,10);\r\n\t}catch(e){\r\n\t\treturn 'Invalid ';\r\n\t}\r\n}", "function isoStringToDate(match){var date=new Date(0);var tzHour=0;var tzMin=0;// match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\nvar dateSetter=match[8]?date.setUTCFullYear:date.setFullYear;var timeSetter=match[8]?date.setUTCHours:date.setHours;// if there is a timezone defined like \"+01:00\" or \"+0100\"\nif(match[9]){tzHour=Number(match[9]+match[10]);tzMin=Number(match[9]+match[11]);}dateSetter.call(date,Number(match[1]),Number(match[2])-1,Number(match[3]));var h=Number(match[4]||0)-tzHour;var m=Number(match[5]||0)-tzMin;var s=Number(match[6]||0);var ms=Math.round(parseFloat('0.'+(match[7]||0))*1000);timeSetter.call(date,h,m,s,ms);return date;}", "function datetoisostring() { // @return String:\r\n return uudate(this).ISO();\r\n}", "function parseISODate(str) {\n pieces = /(\\d{4})-(\\d{2})-(\\d{2})/g.exec(str);\n if (pieces === null)\n return null;\n var year = parseInt(pieces[1], 10),\n month = parseInt(pieces[2], 10),\n day = parseInt(pieces[3], 10);\n return new Date(year, month - 1, day); // In ISO, months are 1-12; in JavaScript, months are 0-11.\n }", "function toISODate(date) {\n return date.toISOString().split('T')[0];\n }", "convertISOToCalendarFormat(ISOdate) {\n const isoArray = ISOdate.toString().split(' ');\n let day = isoArray[2];\n const monthStr = isoArray[1];\n const year = isoArray[3];\n\n const month = convertMonthStringtoNumber(monthStr);\n\n day = day.length === 2 ? day : '0' + day;\n\n return year + '-' + month + '-' + day;\n }", "function dateFromIsoString(isoDateString) {\r\n return fastDateParse.apply(null, isoDateString.split(/\\D/));\r\n }", "function isoToDate(s) {\n if (s instanceof Date) { return s; }\n if (typeof s === 'string') { return new Date(s); }\n}", "function iso8601Decoder(isoStr) {\n return Date.parse(isoStr);\n }", "function formatIso(date) {\n\t return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n\t}", "function formatIso(date) {\n\t return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n\t}", "function formatIso(date) {\n\t return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n\t}", "function formatIso(date) {\n\t return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n\t}", "function parseIsoToTimestamp(_date) {\n if ( _date !== null ) {\n var s = $.trim(_date);\n s = s.replace(/-/, \"/\").replace(/-/, \"/\");\n s = s.replace(/-/, \"/\").replace(/-/, \"/\");\n s = s.replace(/:00.000/, \"\");\n s = s.replace(/T/, \" \").replace(/Z/, \" UTC\");\n s = s.replace(/([\\+\\-]\\d\\d)\\:?(\\d\\d)/, \" $1$2\"); // -04:00 -> -0400\n return Number(new Date(s));\n }\n return null;\n }", "function convertDate( date ){\n\tvar day;\n\tvar month;\n\tvar year;\n\n\t//Extract year, month and day\n\tmonth = date.substr(0,2);\n\tday = date.substr(3,2);\n\tyear = date.substr(6);\n\n\t//compile the ynab compatible format\n\tdate = (year + \"-\" + month + \"-\" + day);\n\t\n\treturn date;\n}", "function amzDate(date, short) {\n const result = date.toISOString().replace(/[:\\-]|\\.\\d{3}/g, '').substr(0, 17)\n if (short) {\n return result.substr(0, 8)\n }\n return result\n}", "function parseISOString(s) {\n var b = s.split(/\\D+/);\n return new Date(Date.UTC(b[0], --b[1], b[2], b[3], b[4], 0, 0));\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function convertDate(date) {\n let day = date.substr(8, 2);\n let month = date.substr(5, 2);\n let year = date.substr(0, 4);\n date = day + \"/\" + month + \"/\" + year;\n return date;\n }", "function parseDate(isoString) {\n // Parse isoDateTimeString to JavaScript date object\n isoString = isoString.split('.', 1);\n return new Date(isoString[0] + '+00:00');\n }", "function isoDateFormat(strDateView) {\n return moment(strDateView, \"DD/MM/YYYY HH:mm\").format(\"YYYY-MM-DD HH:mm\")\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function formatIso(date) {\n return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10);\n}", "function _dateCoerce(obj) {\n return obj.toISOString();\n}", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function formatDateIso(date) {\n\tif (!date || date == null) {\n\t\treturn \"\";\n\t}\n\t\n\tvar jsDate = new Date(date);\n\t\n\t// get the calendar-date components of the iso date. \n\tvar YYYY = jsDate.getFullYear();\n\tvar MM = (jsDate.getMonth() + 1) < 10 ? '0' + (jsDate.getMonth() + 1) : (jsDate.getMonth() + 1); // month should be in the form 'MM'.\n\tvar DD = jsDate.getDate() < 10 ? '0' + jsDate.getDate() : jsDate.getDate(); // day should be in the form 'DD'.\n\t\n\t// get the clock-time components of the iso date.\n\tvar hh = jsDate.getHours() < 10 ? '0' + jsDate.getHours() : jsDate.getHours(); // hours should be in the form 'hh'.\n\tvar mm = jsDate.getMinutes() < 10 ? '0' + jsDate.getMinutes() : jsDate.getMinutes(); // minutes should be in the form 'mm'.\n\tvar ss = jsDate.getSeconds() < 10 ? '0' + jsDate.getSeconds() : jsDate.getSeconds(); // seconds should be in the form 'ss'.\n\tvar sss = '000'; //just hardcoded 000 for milliseconds...\n\t\n\t// assemble the iso date from the date and time components.\n\tvar isoDate = YYYY + '-' + MM + '-' + DD + 'T' + // add the date components.\n\t\thh + ':' + mm + ':' + ss + '.' + sss + 'Z'; // add the time components.\n\t\t\n\t// return the iso-formatted version of the date.\n\treturn isoDate;\n}", "function getDate(dateISO){ \n let appointmentDate = new Date(dateISO);\n const date = appointmentDate.getDate() +'/' + appointmentDate.getMonth() + '/'+ appointmentDate.getFullYear();\n return date;\n }", "static isoDateTime(date) {\n var pad;\n console.log('Util.isoDatetime()', date);\n console.log('Util.isoDatetime()', date.getUTCMonth().date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes, date.getUTCSeconds);\n pad = function(n) {\n if (n < 10) {\n return '0' + n;\n } else {\n return n;\n }\n };\n return date.getFullYear()(+'-' + pad(date.getUTCMonth() + 1) + '-' + pad(date.getUTCDate()) + 'T' + pad(date.getUTCHours()) + ':' + pad(date.getUTCMinutes()) + ':' + pad(date.getUTCSeconds()) + 'Z');\n }", "makeDateRFC3339(date) {\n var ret = this.dateStrings(date)\n return ret.year + \"-\" + ret.month + \"-\" + ret.day\n }", "function dateConverter(date){\r\n dateF = date.trim();\r\n let d = dateF.substring(0, 2);\r\n let m = dateF.substring(3,5);\r\n let y = dateF.substring(6,10);\r\n return(y +\"-\"+m+\"-\"+d);\r\n}", "function formatDateToISO(date) {\n return date.toISOString().split('T')[0];\n}", "function ISODateString(a){function b(a){return a<10?\"0\"+a:a}return a.getUTCFullYear()+\"-\"+b(a.getUTCMonth()+1)+\"-\"+b(a.getUTCDate())+\"T\"+b(a.getUTCHours())+\":\"+b(a.getUTCMinutes())+\":\"+b(a.getUTCSeconds())+\"Z\"}", "function isoToFormattedDate(timestamp) {\n\tvar date = new Date(timestamp);\n\treturn (date.getMonth() + 1) + '/' + date.getDate() + '/' + date.getFullYear();\n}", "isIsoFormat(value) {\n let dateRegex = RegExp('[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]$');\n return dateRegex.test(value);\n }", "function parseDateFormat(date) {\n return $filter('date')(date, 'yyyy-MM-dd');\n }", "function isoDateString(date, extended) {\n date = (date === undefined ? new Date() : date);\n var dash = (extended === 1 ? \"-\" : \"\");\n var yr = date.getFullYear();\n var dd = (\"0\" + date.getDate()).slice(-2);\n var mm = (\"0\" + (date.getMonth()+1)).slice(-2);\n \n return yr.toString() + dash +\n mm.toString() + dash +\n dd.toString();\n}", "function ISO_2022() {}", "function ISO_2022() {}", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(string) {\n var format = 'YYYY-MM-DDT',\n i;\n if (isoRegex.exec(string)) {\n for (i = 0; i < 3; i++) {\n if (isoTimes[i][1].exec(string)) {\n format += isoTimes[i][0];\n break;\n }\n }\n return makeDateFromStringAndFormat(string, format + 'Z');\n }\n return new Date(string);\n }", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0; // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours; // if there is a timezone defined like \"+01:00\" or \"+0100\"\n\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0); // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n\n var ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function get_date(d) {\n var date1 = new Date(d.substr(0, 4), d.substr(5, 2) - 1, d.substr(8, 2), d.substr(11, 2), d.substr(14, 2), d.substr(17, 2));\n return date1;\n }", "function convert_date(str){var tmp=str.split(\".\");return new Date(tmp[1]+\"/\"+tmp[0]+\"/\"+tmp[2])}", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n moment.createFromInputFallback(config);\n }\n }", "function convertBritishToISO(date) {\r\n dateF = date.trim();\r\n let d = dateF.substring(0, 2);\r\n let m = dateF.substring(3,5);\r\n let y = dateF.substring(6,10);\r\n return(y +\"/\"+m+\"/\"+d);\r\n}", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n \n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function toISODate(date) { // yyyy-mm-dd\n \"use strict\";\n var yyyy, mm, dd;\n // JavaScript provides no simple way to format a date-only\n yyyy = \"\" + date.getFullYear();\n mm = date.getMonth() + 1; // Months go from 0 .. 11\n dd = date.getDate();\n // Need leading zeroes to form the yyyy-mm-dd pattern.\n if (mm < 10) {\n mm = \"0\" + mm; // This converts it to a string\n }\n if (dd < 10) {\n dd = \"0\" + dd; // This converts it to a string\n }\n return \"\" + yyyy + \"-\" + mm + \"-\" + dd;\n}", "function formatDate(isoDateStr) {\n var date = new Date(isoDateStr);\n var monthNames = [\n \"Jan\", \"Feb\", \"Mar\",\n \"Apr\", \"May\", \"Jun\", \"Jul\",\n \"Aug\", \"September\", \"Oct\",\n \"Nov\", \"Dec\"\n ];\n\n var day = date.getDate();\n var monthIndex = date.getMonth();\n var year = date.getFullYear();\n var yearStr = \"\";\n if (year != (new Date()).getFullYear()) {\n yearStr = \", \" + String(year);\n }\n\n return \" \" + monthNames[monthIndex] + \" \" + day + \" \" + yearStr;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function parseDate (date) {\n var d = '';\n var t = date.indexOf('T');\n let index = date.indexOf('-');\n \n if(index === -1 && t === 8){\n d += date.substring(0, 4) + '-';\n d += date.substring(4, 6) + '-';\n d += date.substring(6, 8) + date.substr(8);\n } else if (index > -1 && t === 10) {\n return date;\n } else {\n console.error('invalid date');\n return null;\n }\n return d;\n }", "function iso8601date() {\n var date = new Date();\n\n function pad(number) {\n return (number < 10 ? '0' : '') + number;\n }\n function pad3(number) {\n return (number < 10 ? '0' : (number < 100 ? '00' : '')) + number;\n }\n\n return date.getUTCFullYear() + '-' +\n pad(date.getUTCMonth() + 1) + '-' +\n pad(date.getUTCDay()) + ' ' +\n pad(date.getUTCHours()) + ':' +\n pad(date.getUTCMinutes()) + ':' +\n pad(date.getUTCSeconds()) + '.' +\n pad3(date.getUTCMilliseconds());\n}", "function toIsoDate(dateString) {\n var splitted = dateString.split(\"/\");\n return new Date(splitted[2], splitted[1] - 1, splitted[0]);\n}", "extractDateFormat() {\n const isoString = '2018-12-31T12:00:00.000Z' // example date\n\n const intlString = this.props.intl.formatDate(isoString) // generate a formatted date\n const dateParts = isoString.split('T')[0].split('-') // prepare to replace with pattern parts\n\n return intlString\n .replace(dateParts[2], 'dd')\n .replace(dateParts[1], 'MM')\n .replace(dateParts[0], 'yyyy')\n }", "makeDateObjectFromCompact(datestring) {\n if (datestring !== undefined && datestring.length === 8) {\n let year = parseInt(datestring.substring(0, 4))\n let month = parseInt(datestring.substring(4, 6)) - 1\n let day = parseInt(datestring.substring(6, 8))\n return new Date(year, month, day)\n } else {\n return \"\"\n }\n }", "function ISODateString(d){\n function pad(n){return n<10 ? '0'+n : n}\n return d.getUTCFullYear()+'-'\n + pad(d.getUTCMonth()+1)+'-'\n + pad(d.getUTCDate())+'T'\n + pad(d.getUTCHours())+':'\n + pad(d.getUTCMinutes())+':'\n + pad(d.getUTCSeconds())+'Z'}", "getFormattedDate ({ date }) {\n if (typeof date === 'string') {\n return format(parseISO(date), \"d 'de' MMMM', às' HH'h'mm\", {\n locale: ptBR\n })\n }\n return format(date, \"d 'de' MMMM', às' HH'h'mm\", {\n locale: ptBR\n })\n }", "function makeDateFromString(config) {\n\t parseISO(config);\n\t if (config._isValid === false) {\n\t delete config._isValid;\n\t moment.createFromInputFallback(config);\n\t }\n\t }", "function makeDateFromString(config) {\n\t parseISO(config);\n\t if (config._isValid === false) {\n\t delete config._isValid;\n\t moment.createFromInputFallback(config);\n\t }\n\t }", "function FormatDate(date) {\n return new Date( parseInt( date.substr(6) ) );\n}", "function convertDate(dateIn)\n{\n let dateYear = dateIn.charAt(0);\n dateYear += dateIn.charAt(1);\n dateYear += dateIn.charAt(2);\n dateYear += dateIn.charAt(3);\n\n let dateMonth = dateIn.charAt(5) + dateIn.charAt(6);\n let dateDay = dateIn.charAt(8) + dateIn.charAt(9);\n\n let dateOut = dateDay + '-' + dateMonth + '-' + dateYear;\n return dateOut;\n}", "function convertDate(date) {\n let day = date.substring(8);\n let month = date.substring(5, 7);\n let year = date.substring(2,4);\n let newDate = `${month} /${day} /${year}`;\n return newDate;\n}", "function to_date(x){\n return new Date(x.substring(0,4), x.substring(5,7)-1, x.substring(8,10), x.substring(11,13), x.substring(14,16), x.substring(17,19));\n}", "function getISOLocalDate(value) {\n if (!value) {\n return value;\n }\n\n var date = new Date(value);\n\n if (isNaN(date.getTime())) {\n throw new Error(\"Invalid date: \".concat(value));\n }\n\n var year = getYear(date);\n var month = \"0\".concat(getMonth(date)).slice(-2);\n var day = \"0\".concat(getDay(date)).slice(-2);\n return \"\".concat(year, \"-\").concat(month, \"-\").concat(day);\n}", "function getISOLocalDate(value) {\n if (!value) {\n return value;\n }\n\n var date = new Date(value);\n\n if (isNaN(date.getTime())) {\n throw new Error(\"Invalid date: \".concat(value));\n }\n\n var year = getYear(date);\n var month = \"0\".concat(getMonth(date)).slice(-2);\n var day = \"0\".concat(getDay(date)).slice(-2);\n return \"\".concat(year, \"-\").concat(month, \"-\").concat(day);\n}", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }" ]
[ "0.7161587", "0.7084152", "0.69561076", "0.68181574", "0.66757625", "0.66372114", "0.6559707", "0.6525335", "0.6466161", "0.6465599", "0.644205", "0.64171946", "0.6406543", "0.6406543", "0.6406543", "0.6406543", "0.63656497", "0.63241196", "0.6322188", "0.62742394", "0.62635076", "0.62635076", "0.62635076", "0.62635076", "0.6256379", "0.62237656", "0.6219025", "0.6201553", "0.6201553", "0.6201553", "0.6201553", "0.6201553", "0.6201553", "0.6201553", "0.6187698", "0.6187633", "0.618634", "0.618634", "0.61794", "0.61792564", "0.6172095", "0.613812", "0.61320627", "0.6129032", "0.609373", "0.6090011", "0.6071324", "0.60647243", "0.6062863", "0.60613644", "0.60613644", "0.606091", "0.606091", "0.606091", "0.606091", "0.606091", "0.6034974", "0.6000997", "0.5995632", "0.5995632", "0.5995632", "0.5995632", "0.5985886", "0.59761006", "0.5967464", "0.5967464", "0.59647685", "0.59567374", "0.59377056", "0.5936541", "0.5930827", "0.5930827", "0.5930827", "0.5930827", "0.5930827", "0.5930065", "0.5928079", "0.59234697", "0.5912456", "0.5900138", "0.5890115", "0.5882479", "0.58786935", "0.58786935", "0.58709115", "0.58588386", "0.5855063", "0.585465", "0.58419347", "0.58419347", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354", "0.5841354" ]
0.0
-1
date and time from ref 2822 format
function configFromRFC2822(config) { var match = rfc2822.exec(preprocessRFC2822(config._i)); if (match) { var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); if (!checkWeekday(match[1], parsedArray, config)) { return; } config._a = parsedArray; config._tzm = calculateOffset(match[8], match[9], match[10]); config._d = createUTCDate.apply(null, config._a); config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); getParsingFlags(config).rfc2822 = true; } else { config._isValid = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createDrupalDateFromPieces(date, hour, minute, marker) {\n //Build time\n var time = hour + ':' + minute + ' ' + marker;\n //Build full date\n var dateTime = moment(date + ' ' + time, 'YYYY-MM-DD hh:mm A');\n //Return date in 24-hour format\n return moment(dateTime);\n }", "function createdOnParser(data) {\n let str = data.split('T');\n let date = str[0];\n let time = str[1].split('.')[0];\n return `${ date } at ${ time }`;\n }", "function render_datetime(data){\n\t var datetime = data.split(' ');\n\t var date = datetime[0].split('-').reverse().join('/');\n\t var time = datetime[1].substring(0,5);\n\t return date+' às '+time;\n\t}", "function longForm(){\n return Date.parse(date.split(\",\")[1].match(/[a-zA-Z0-9 \\:]+/)[0].trim().replace(\" at \", \" \"));\n }", "function dl(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function formatDate(date, format) {\n format = format + \"\";\n var result = \"\";\n var i_format = 0;\n var c = \"\";\n var token = \"\";\n var y = date.getYear() + \"\";\n var M = date.getMonth() + 1;\n var d = date.getDate();\n var E = date.getDay();\n var H = date.getHours();\n var m = date.getMinutes();\n var s = date.getSeconds();\n var yyyy, yy, MMM, MM, dd, hh, h, mm, ss, ampm, HH, H, KK, K, kk, k;\n // Convert real date parts into formatted versions\n var value = new Object();\n if (y.length < 4) {\n y = \"\" + (y - 0 + 1900);\n }\n value[\"y\"] = \"\" + y;\n value[\"yyyy\"] = y;\n value[\"yy\"] = y.substring(2, 4);\n value[\"M\"] = M;\n value[\"MM\"] = LZ(M);\n value[\"MMM\"] = MONTH_NAMES[M - 1];\n value[\"NNN\"] = MONTH_NAMES[M + 11];\n value[\"d\"] = d;\n value[\"dd\"] = LZ(d);\n value[\"E\"] = DAY_NAMES[E + 7];\n value[\"EE\"] = DAY_NAMES[E];\n value[\"H\"] = H;\n value[\"HH\"] = LZ(H);\n if (H == 0) {\n value[\"h\"] = 12;\n } else if (H > 12) {\n value[\"h\"] = H - 12;\n } else {\n value[\"h\"] = H;\n }\n value[\"hh\"] = LZ(value[\"h\"]);\n if (H > 11) {\n value[\"K\"] = H - 12;\n } else {\n value[\"K\"] = H;\n }\n value[\"k\"] = H + 1;\n value[\"KK\"] = LZ(value[\"K\"]);\n value[\"kk\"] = LZ(value[\"k\"]);\n if (H > 11) {\n value[\"a\"] = \"PM\";\n } else {\n value[\"a\"] = \"AM\";\n }\n value[\"m\"] = m;\n value[\"mm\"] = LZ(m);\n value[\"s\"] = s;\n value[\"ss\"] = LZ(s);\n while (i_format < format.length) {\n c = format.charAt(i_format);\n token = \"\";\n while ((format.charAt(i_format) == c) && (i_format < format.length)) {\n token += format.charAt(i_format++);\n }\n if (value[token] != null) {\n result = result + value[token];\n } else {\n result = result + token;\n }\n }\n return result;\n}", "function transformDateAndTime(datetime) {\n\t//console.log(\"Date Initial: \" + datetime);\n\tdatetime = datetime.replace(/[^0-9]/g, '');\n\t//console.log(\"Date First: \" + datetime);\n\tdatetime = datetime.substring(4,8) + datetime.substring(2, 4) + datetime.substring(0, 2) + \"T\" \n\t\t\t\t+ datetime.substring(8,14) + \"Z\";\n\treturn datetime;\n}", "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "makeDateRFC3339(date) {\n var ret = this.dateStrings(date)\n return ret.year + \"-\" + ret.month + \"-\" + ret.day\n }", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function gh_time(str, format) {\r\n if (!str) {\r\n return 'invalid date';\r\n }\r\n return str.replace(/T.+/, '');\r\n //var d = new Date(str.replace(/T/, ' ').replace(/Z/, ''));\r\n //return this.date(d, format);\r\n}", "function t(e,t,r){var n=\" \";return(e%100>=20||e>=100&&e%100==0)&&(n=\" de \"),e+n+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[r]}", "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var o=\" \";return(e%100>=20||e>=100&&e%100==0)&&(o=\" de \"),e+o+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,a){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[a]}", "function readTime(){\n checkLen(8);\n var low = buf.readUInt32LE(pos);\n var high = buf.readUInt32LE(pos + 4) & 0x3FFFFFFF;\n var tz = (buf[pos + 7] & 0xc0) >> 6;\n pos += 8;\n return formDateString(high, low, tz);\n }", "function formatDate(date,format) {\r\n\tformat=format+\"\";\r\n\tvar result=\"\";\r\n\tvar i_format=0;\r\n\tvar c=\"\";\r\n\tvar token=\"\";\r\n\tvar y=date.getYear()+\"\";\r\n\tvar M=date.getMonth()+1;\r\n\tvar d=date.getDate();\r\n\tvar E=date.getDay();\r\n\tvar H=date.getHours();\r\n\tvar m=date.getMinutes();\r\n\tvar s=date.getSeconds();\r\n\tvar yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;\r\n\t// Convert real date parts into formatted versions\r\n\tvar value=new Object();\r\n\tif (y.length < 4) {y=\"\"+(y-0+1900);}\r\n\tvalue[\"y\"]=\"\"+y;\r\n\tvalue[\"yyyy\"]=y;\r\n\tvalue[\"yy\"]=y.substring(2,4);\r\n\tvalue[\"M\"]=M;\r\n\tvalue[\"MM\"]=LZ(M);\r\n\tvalue[\"MMM\"]=MONTH_NAMES[M-1];\r\n\tvalue[\"NNN\"]=MONTH_NAMES[M+11];\r\n\tvalue[\"d\"]=d;\r\n\tvalue[\"dd\"]=LZ(d);\r\n\tvalue[\"E\"]=DAY_NAMES[E+7];\r\n\tvalue[\"EE\"]=DAY_NAMES[E];\r\n\tvalue[\"H\"]=H;\r\n\tvalue[\"HH\"]=LZ(H);\r\n\tif (H==0){value[\"h\"]=12;}\r\n\telse if (H>12){value[\"h\"]=H-12;}\r\n\telse {value[\"h\"]=H;}\r\n\tvalue[\"hh\"]=LZ(value[\"h\"]);\r\n\tif (H>11){value[\"K\"]=H-12;} else {value[\"K\"]=H;}\r\n\tvalue[\"k\"]=H+1;\r\n\tvalue[\"KK\"]=LZ(value[\"K\"]);\r\n\tvalue[\"kk\"]=LZ(value[\"k\"]);\r\n\tif (H > 11) { value[\"a\"]=\"PM\"; }\r\n\telse { value[\"a\"]=\"AM\"; }\r\n\tvalue[\"m\"]=m;\r\n\tvalue[\"mm\"]=LZ(m);\r\n\tvalue[\"s\"]=s;\r\n\tvalue[\"ss\"]=LZ(s);\r\n\twhile (i_format < format.length) {\r\n\t\tc=format.charAt(i_format);\r\n\t\ttoken=\"\";\r\n\t\twhile ((format.charAt(i_format)==c) && (i_format < format.length)) {\r\n\t\t\ttoken += format.charAt(i_format++);\r\n\t\t\t}\r\n\t\tif (value[token] != null) { result=result + value[token]; }\r\n\t\telse { result=result + token; }\r\n\t\t}\r\n\treturn result;\r\n\t}", "function gexfDateString(date) {\n\tvar ye = '' + date.getFullYear();\n\tvar mo = '' + (date.getMonth() + 1);\n\tvar da = '' + date.getDate();\n\tvar ho = '' + date.getHours();\n\tvar mi = '' + date.getMinutes();\n\tvar se = '' + date.getSeconds();\n\twhile (mo.length < 2) mo = '0' + mo;\n\twhile (da.length < 2) da = '0' + da;\n\twhile (ho.length < 2) ho = '0' + ho;\n\twhile (mi.length < 2) mi = '0' + mi;\n\twhile (se.length < 2) se = '0' + se;\n\treturn [ye,'-',mo,'-',da,'T',ho,':',mi,':',se].join('');\n}", "function formatDate(date,format) {\r\n\tformat=format+\"\";\r\n\tvar result=\"\";\r\n\tvar i_format=0;\r\n\tvar c=\"\";\r\n\tvar token=\"\";\r\n\tvar y=date.getYear()+\"\";\r\n\tvar M=date.getMonth()+1;\r\n\tvar d=date.getDate();\r\n\tvar E=date.getDay();\r\n\tvar H=date.getHours();\r\n\tvar m=date.getMinutes();\r\n\tvar s=date.getSeconds();\r\n\tvar yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;\r\n\t// Convert real date parts into formatted versions\r\n\tvar value=new Array();\r\n\tif (y.length < 4) {\t\r\n\t\ty=\"\"+(y-0+1900);\r\n\t}\r\n\tvalue[\"y\"]=\"\"+y;\r\n\tvalue[\"yyyy\"]=y;\r\n\tvalue[\"yy\"]=y.substring(2,4);\r\n\tvalue[\"M\"]=M;\r\n\tvalue[\"MM\"]=LZ(M);\r\n\tvalue[\"MMM\"]=MONTH_NAMES[M-1];\r\n\tvalue[\"NNN\"]=MONTH_NAMES[M+11];\r\n\tvalue[\"d\"]=d;\r\n\tvalue[\"dd\"]=LZ(d);\r\n\tvalue[\"E\"]=DAY_NAMES[E+7];\r\n\tvalue[\"EE\"]=DAY_NAMES[E];\r\n\tvalue[\"H\"]=H;\r\n\tvalue[\"HH\"]=LZ(H);\r\n\tif (H==0){value[\"h\"]=12;}\r\n\telse if (H>12){value[\"h\"]=H-12;}\r\n\telse {value[\"h\"]=H;}\r\n\tvalue[\"hh\"]=LZ(value[\"h\"]);\r\n\tif (H>11){value[\"K\"]=H-12;} else {value[\"K\"]=H;}\r\n\tvalue[\"k\"]=H+1;\r\n\tvalue[\"KK\"]=LZ(value[\"K\"]);\r\n\tvalue[\"kk\"]=LZ(value[\"k\"]);\r\n\tif (H > 11) { value[\"a\"]=\"PM\"; }\r\n\telse { value[\"a\"]=\"AM\"; }\r\n\tvalue[\"m\"]=m;\r\n\tvalue[\"mm\"]=LZ(m);\r\n\tvalue[\"s\"]=s;\r\n\tvalue[\"ss\"]=LZ(s);\r\n\twhile (i_format < format.length) {\r\n\t\tc=format.charAt(i_format);\r\n\t\ttoken=\"\";\r\n\t\twhile ((format.charAt(i_format)==c) && (i_format < format.length)) {\r\n\t\t\ttoken += format.charAt(i_format++);\r\n\t\t\t}\r\n\t\tif (value[token] != null) { result=result + value[token]; }\r\n\t\telse { result=result + token; }\r\n\t\t}\r\n\treturn result;\r\n\t}", "function process_date(date) {\n var ts = date.split('-'), dpart=[], hpart=[];\n\n function t2s(t) {\n if (!t) { return '00'; }\n return ( +t < 10 ? '0' : '' ) + t;\n }\n\n for (i=0; i<3; i++) { //u\n dpart.push(t2s(ts[i]));\n }\n for (i=3; i<6; i++) {\n hpart.push(t2s(ts[i]));\n }\n\n return dpart.join('/') + ' ' + hpart.join(':');\n }", "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function e(t,e,n){var i=\" \";return(t%100>=20||t>=100&&t%100==0)&&(i=\" de \"),t+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function e(t,e,n){var i=\" \";return(t%100>=20||t>=100&&t%100==0)&&(i=\" de \"),t+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function e(t,e,n){var i=\" \";return(t%100>=20||t>=100&&t%100==0)&&(i=\" de \"),t+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function e(t,e,n){var i=\" \";return(t%100>=20||t>=100&&t%100==0)&&(i=\" de \"),t+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function e(t,e,r){var i=\" \";return(t%100>=20||t>=100&&t%100==0)&&(i=\" de \"),t+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[r]}", "function t(e,t,a){var n=\" \";return(e%100>=20||e>=100&&e%100==0)&&(n=\" de \"),e+n+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[a]}", "function e(t,e,n){var i=\" \";return(t%100>=20||t>=100&&t%100==0)&&(i=\" de \"),t+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function e(t,e,n){var r=\" \";return(t%100>=20||t>=100&&t%100==0)&&(r=\" de \"),t+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "function e(t,e,r){var n=\" \";return(t%100>=20||t>=100&&t%100==0)&&(n=\" de \"),t+n+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[r]}", "function convertDate(time) {\n\tif (time == undefined || time.length != 19) {\n\t\tconsole.log(\"Time is not valid!\" + \" (1064)\");\n\t\treturn new Date();\n\t}\n\tvar d = new Date(time.substring(6,10), time.substring(3,5), time.substring(0,2), time.substring(11,13), time.substring(14,16), time.substring(17,19));\n\tconsole.log(\"Converted time from \" + time + \" to \" + d + \" (1065)\");\n\treturn d;\n}", "function e(t,e,n){var r=\" \";return(t%100>=20||t>=100&&t%100==0)&&(r=\" de \"),t+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function cubism_graphiteFormatDate(time) {\n return Math.floor(time / 1000);\n}", "function cubism_graphiteFormatDate(time) {\n return Math.floor(time / 1000);\n}", "function a(e,a,t){var n=\" \";return(e%100>=20||e>=100&&e%100==0)&&(n=\" de \"),e+n+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[t]}", "static _extractDateParts(date){return{day:date.getDate(),month:date.getMonth(),year:date.getFullYear()}}", "function t(a,r,_){var l={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"s\\u0103pt\\u0103m\\xE2ni\",MM:\"luni\",yy:\"ani\"},h=\" \";return(a%100>=20||a>=100&&a%100==0)&&(h=\" de \"),a+h+l[_]}", "function dateFormat(datum){\n \t\t\tvar day = datum.getDay();\n \t\t\tvar date = datum.getDate();\n \t\t\tvar month = datum.getMonth();\n \t\t\tvar year = datum.getYear();\n \t\t\tvar hour = datum.getHours();\n \t\t\tvar minutes = datum.getMinutes();\n\t\t}", "toFinnishTime(date) {\n //var date = new Date();\n date.setHours(date.getHours()+2);\n return date.toJSON().replace(/T/, ' ').replace(/\\..+/, '');\n }", "parseOracleDate(buf, useLocalTime = true) {\n let fseconds = 0;\n if (buf.length >= 11) {\n fseconds = Math.floor(buf.readUInt32BE(7) / (1000 * 1000));\n }\n const year = (buf[0] - 100) * 100 + buf[1] - 100;\n return settings._makeDate(useLocalTime, year, buf[2], buf[3], buf[4] - 1,\n buf[5] - 1, buf[6] - 1, fseconds, 0);\n }", "getReadableDate (timestamp) {\n try {\n const _date = new Date(timestamp * 1000).toISOString().slice(0, 10)\n const _time = new Date(timestamp * 1000).toISOString().slice(11, 19)\n\n return `${_date} ${_time}`\n } catch (error) {\n console.error(error)\n }\n }", "function convertDate(date, time) {\n\tvar y = eval(date.substring(0, 4));\n\tvar m = eval(date.substring(5, 7));\n\tvar d = eval(date.substring(8, 10));\n\t\n\t// Assume toDateString() returns a string like 'Thu Jul 08 2010'\n\tvar str = new Date(y, m - 1, d).toDateString().substring(0, 10);\n\t\n\tif (time.indexOf(':') >= 0) {\n\t\tstr += ', ' + twentyFourHourToTwelveHour(time.substring(0, 5));\t\n\t}\n\treturn str;\n}", "function get_formatted_date(date) {\n function get_formatted_num(num, expected_length) {\n var str = \"\";\n var num_str = num.toString();\n var num_zeros = expected_length - num_str.length;\n for (var i = 0; i < num_zeros; ++i) {\n str += '0';\n }\n str += num_str;\n return str;\n }\n var msg = get_formatted_num(date.getFullYear(), 4) + \"-\";\n msg += get_formatted_num(date.getMonth() + 1, 2) + \"-\";\n msg += get_formatted_num(date.getDate(), 2) + \" \";\n msg += get_formatted_num(date.getHours(), 2) + \":\";\n msg += get_formatted_num(date.getMinutes(), 2) + \":\";\n msg += get_formatted_num(date.getSeconds(), 2);\n return msg;\n}", "function t(e,t,n){var r={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";if(e%100>=20||e>=100&&e%100===0){o=\" de \"}return e+o+r[n]}", "function datehashrfc() { // @return RFC1123DateString: \"Wed, 16 Sep 2009 16:18:14 GMT\"\r\n var rv = (new Date(this.time)).toUTCString();\r\n\r\n if (uu.ie && rv.indexOf(\"UTC\") > 0) {\r\n // http://d.hatena.ne.jp/uupaa/20080515\r\n\r\n rv = rv.replace(/UTC/, \"GMT\");\r\n (rv.length < 29) && (rv = rv.replace(/, /, \", 0\")); // [IE] fix format\r\n }\r\n return rv;\r\n}", "function t(e,t,n){var r={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},a=\" \";if(e%100>=20||e>=100&&e%100===0){a=\" de \"}return e+a+r[n]}", "function filenameToReadableDate(filename) {\n var split = filename.split('T');\n var date = split[0].split('_')[2].split('-');\n var time = split[1].substr(0, 4);\n return date[2] + '/' + date[1] + '/' + date[0] + ' at ' + time.substr(0, 2) + ':' + time.substr(2, 4);\n }", "function ms(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "function formatDateAndTime(datetime)\n{\n\treturn datetime.substring(9, 11)+\":\"+datetime.substring(11,13)+\":\"+datetime.substring(13,15)\n\t\t\t+\" \"+datetime.substring(6,8)+\"-\"+datetime.substring(4,6)+\"-\"+datetime.substring(0,4);\n}", "function getTime(time) {\n time = time.toString().split(' ');\n var month = new Date(Date.parse(time[1] +\" 1, 2000\")).getMonth()+1\n var hms = time[4].split(':');\n var new_time = time[3] + '-' + (\"00\" + month).slice(-2) + '-' + time[2] + 'T' + hms[0] + ':' + hms[1] + ':' + hms[2] + '.000Z';\n return new_time;\n }", "function parseDate (date) {\n var d = '';\n var t = date.indexOf('T');\n let index = date.indexOf('-');\n \n if(index === -1 && t === 8){\n d += date.substring(0, 4) + '-';\n d += date.substring(4, 6) + '-';\n d += date.substring(6, 8) + date.substr(8);\n } else if (index > -1 && t === 10) {\n return date;\n } else {\n console.error('invalid date');\n return null;\n }\n return d;\n }", "function parse_external_time(text, success) {\n var time = TIME_RE.exec(text);\n if (time != null) {\n time = new Date(time[1].trim()).getTime();\n success(time);\n }\n}", "function cut_date(register_date){\n let register_date_string = register_date.toISOString();\n let split_date = register_date_string.split(\"T\")[1];\n let split_time = split_date.split(\".\")[0];\n return split_time;\n}", "function e(e,t,n){return e+(20<=e%100||100<=e&&e%100==0?\" de \":\" \")+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}" ]
[ "0.653082", "0.63895303", "0.6154629", "0.6096161", "0.60804975", "0.605977", "0.60540193", "0.605324", "0.605324", "0.605324", "0.605324", "0.6040541", "0.6028883", "0.6021129", "0.6021129", "0.6021129", "0.6021129", "0.6021129", "0.6021129", "0.6021129", "0.6021129", "0.6021129", "0.6021129", "0.6021129", "0.60169667", "0.59945226", "0.59771127", "0.597495", "0.597495", "0.596328", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5950483", "0.5933974", "0.59314626", "0.5928641", "0.59284973", "0.59065413", "0.5901136", "0.58995897", "0.58995897", "0.58995897", "0.58995897", "0.58909506", "0.58909506", "0.58909506", "0.58909506", "0.5867927", "0.5867427", "0.5847704", "0.5847463", "0.58446264", "0.5814297", "0.58098656", "0.5782785", "0.5782785", "0.5782707", "0.5776116", "0.57668716", "0.57485163", "0.5724437", "0.5722063", "0.5720733", "0.5718697", "0.5715817", "0.5714077", "0.56996375", "0.56862354", "0.56841004", "0.56840295", "0.56804836", "0.5677643", "0.56740606", "0.567262", "0.5671365", "0.56699353" ]
0.0
-1
date from iso format or fallback
function configFromString(config) { var matched = aspNetJsonRegex.exec(config._i); if (matched !== null) { config._d = new Date(+matched[1]); return; } configFromISO(config); if (config._isValid === false) { delete config._isValid; } else { return; } configFromRFC2822(config); if (config._isValid === false) { delete config._isValid; } else { return; } // Final attempt, use Input Fallback hooks.createFromInputFallback(config); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isoToDate(s) {\n if (s instanceof Date) { return s; }\n if (typeof s === 'string') { return new Date(s); }\n}", "function isoStringToDate(match){var date=new Date(0);var tzHour=0;var tzMin=0;// match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\nvar dateSetter=match[8]?date.setUTCFullYear:date.setFullYear;var timeSetter=match[8]?date.setUTCHours:date.setHours;// if there is a timezone defined like \"+01:00\" or \"+0100\"\nif(match[9]){tzHour=Number(match[9]+match[10]);tzMin=Number(match[9]+match[11]);}dateSetter.call(date,Number(match[1]),Number(match[2])-1,Number(match[3]));var h=Number(match[4]||0)-tzHour;var m=Number(match[5]||0)-tzMin;var s=Number(match[6]||0);var ms=Math.round(parseFloat('0.'+(match[7]||0))*1000);timeSetter.call(date,h,m,s,ms);return date;}", "function parseIsoDate(dateStr) {\n \tif(dateStr.length <10) return null;\n \tvar d = dateStr.substring(0,10).split('-');\t\n \tfor(var i in d) { \n \t\td[i]=parseInt(d[i]);\n \t};\n \td[1] = d[1] -1;//month;\n \tvar t = dateStr.substring(11,19).split(':');\n \treturn new Date(d[0],d[1],d[2],t[0],t[1],t[2]);\n }", "function makeDateFromString(config) {\n\t parseISO(config);\n\t if (config._isValid === false) {\n\t delete config._isValid;\n\t moment.createFromInputFallback(config);\n\t }\n\t }", "function makeDateFromString(config) {\n\t parseISO(config);\n\t if (config._isValid === false) {\n\t delete config._isValid;\n\t moment.createFromInputFallback(config);\n\t }\n\t }", "function ISOdate(d) {\r\n\ttry {\r\n\t\treturn d.toISOString().slice(0,10);\r\n\t}catch(e){\r\n\t\treturn 'Invalid ';\r\n\t}\r\n}", "function isoDate(date)\n{\n\treturn date.getFullYear() + \"-\" + (date.getMonth() + 1) + \"-\" + date.getDate()\n}", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "isIsoFormat(value) {\n let dateRegex = RegExp('[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]$');\n return dateRegex.test(value);\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n parseISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n\t\tparseISO(config);\n\t\tif (config._isValid === false) {\n\t\t\tdelete config._isValid;\n\t\t\tmoment.createFromInputFallback(config);\n\t\t}\n\t}", "function parseISODate(str) {\n pieces = /(\\d{4})-(\\d{2})-(\\d{2})/g.exec(str);\n if (pieces === null)\n return null;\n var year = parseInt(pieces[1], 10),\n month = parseInt(pieces[2], 10),\n day = parseInt(pieces[3], 10);\n return new Date(year, month - 1, day); // In ISO, months are 1-12; in JavaScript, months are 0-11.\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function dateFromISO8601(isostr) {\n var parts = isostr.match(/\\d+/g);\n var date = new Date(parts[0], parts[1] - 1, parts[2], parts[3], parts[4], parts[5]);\n var mm = date.getMonth() + 1;\n mm = (mm < 10) ? '0' + mm : mm;\n var dd = date.getDate();\n dd = (dd < 10) ? '0' + dd : dd;\n var yyyy = date.getFullYear();\n var finaldate = mm + '/' + dd + '/' + yyyy;\n return finaldate;\n }", "function validateDateFormat(sDateToBeProcressed) {\r\n \"use strict\";\r\n var oDates = new Date(sDateToBeProcressed);\r\n if (isNaN(oDates)) {\r\n var arrSplitedDate = sDateToBeProcressed.replace(/[-]/g, \"/\");\r\n arrSplitedDate = arrSplitedDate.split(\"/\");\r\n var sFormattedDate = arrSplitedDate[1] + \"-\" + arrSplitedDate[0] + \"-\" + arrSplitedDate[2];\r\n oDates = new Date(sFormattedDate);\r\n }\r\n return oDates.toISOString();\r\n}", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function parseIsoToTimestamp(_date) {\n if ( _date !== null ) {\n var s = $.trim(_date);\n s = s.replace(/-/, \"/\").replace(/-/, \"/\");\n s = s.replace(/-/, \"/\").replace(/-/, \"/\");\n s = s.replace(/:00.000/, \"\");\n s = s.replace(/T/, \" \").replace(/Z/, \" UTC\");\n s = s.replace(/([\\+\\-]\\d\\d)\\:?(\\d\\d)/, \" $1$2\"); // -04:00 -> -0400\n return Number(new Date(s));\n }\n return null;\n }", "function dateFromIsoString(isoDateString) {\r\n return fastDateParse.apply(null, isoDateString.split(/\\D/));\r\n }", "deserialize(value) {\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the\n // string is the right format first.\n if (ISO_8601_REGEX.test(value)) {\n let date = new Date(value);\n if (this.isValid(date)) {\n return date;\n }\n }\n }\n return super.deserialize(value);\n }", "deserialize(value) {\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the\n // string is the right format first.\n if (ISO_8601_REGEX.test(value)) {\n let date = new Date(value);\n if (this.isValid(date)) {\n return date;\n }\n }\n }\n return super.deserialize(value);\n }", "deserialize(value) {\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the\n // string is the right format first.\n if (ISO_8601_REGEX.test(value)) {\n let date = new Date(value);\n if (this.isValid(date)) {\n return date;\n }\n }\n }\n return super.deserialize(value);\n }", "getFormattedDate ({ date }) {\n if (typeof date === 'string') {\n return format(parseISO(date), \"d 'de' MMMM', às' HH'h'mm\", {\n locale: ptBR\n })\n }\n return format(date, \"d 'de' MMMM', às' HH'h'mm\", {\n locale: ptBR\n })\n }", "function universal() {\n return doFormat(date, {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n weekday: 'long',\n hour: 'numeric',\n minute: '2-digit',\n second: '2-digit'\n });\n }", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0; // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours; // if there is a timezone defined like \"+01:00\" or \"+0100\"\n\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0); // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n\n var ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function getISOLocalDate(value) {\n if (!value) {\n return value;\n }\n\n var date = new Date(value);\n\n if (isNaN(date.getTime())) {\n throw new Error(\"Invalid date: \".concat(value));\n }\n\n var year = getYear(date);\n var month = \"0\".concat(getMonth(date)).slice(-2);\n var day = \"0\".concat(getDay(date)).slice(-2);\n return \"\".concat(year, \"-\").concat(month, \"-\").concat(day);\n}", "function getISOLocalDate(value) {\n if (!value) {\n return value;\n }\n\n var date = new Date(value);\n\n if (isNaN(date.getTime())) {\n throw new Error(\"Invalid date: \".concat(value));\n }\n\n var year = getYear(date);\n var month = \"0\".concat(getMonth(date)).slice(-2);\n var day = \"0\".concat(getDay(date)).slice(-2);\n return \"\".concat(year, \"-\").concat(month, \"-\").concat(day);\n}", "function configFromISO(config) {\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__utils_type_checks__[\"b\" /* isString */])(config._i)) {\n return config;\n }\n var input = config._i;\n var match = extendedIsoRegex.exec(input) || basicIsoRegex.exec(input);\n var allowTime;\n var dateFormat;\n var timeFormat;\n var tzFormat;\n if (!match) {\n config._isValid = false;\n return config;\n }\n // getParsingFlags(config).iso = true;\n var i;\n var l;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return config;\n }\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return config;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return config;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n }\n else {\n config._isValid = false;\n return config;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__from_string_and_format__[\"a\" /* configFromStringAndFormat */])(config);\n}", "function parseDateFormat(date) {\n return $filter('date')(date, 'yyyy-MM-dd');\n }", "function configFromISO(config) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_1__utils_type_checks__[\"i\" /* isString */])(config._i)) {\n return config;\n }\n var input = config._i;\n var match = extendedIsoRegex.exec(input) || basicIsoRegex.exec(input);\n var allowTime;\n var dateFormat;\n var timeFormat;\n var tzFormat;\n if (!match) {\n config._isValid = false;\n return config;\n }\n // getParsingFlags(config).iso = true;\n var i;\n var l;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return config;\n }\n if (match[3]) {\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return config;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return config;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n }\n else {\n config._isValid = false;\n return config;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n return Object(__WEBPACK_IMPORTED_MODULE_2__from_string_and_format__[\"a\" /* configFromStringAndFormat */])(config);\n}", "function makeDateFromString(string) {\n var format = 'YYYY-MM-DDT',\n i;\n if (isoRegex.exec(string)) {\n for (i = 0; i < 3; i++) {\n if (isoTimes[i][1].exec(string)) {\n format += isoTimes[i][0];\n break;\n }\n }\n return makeDateFromStringAndFormat(string, format + 'Z');\n }\n return new Date(string);\n }", "normalize(str) {\n if (str && !CommonUtils.isDate(str)) {\n var match = str.match(/^(\\d{1,2})\\/(\\d{1,2})\\/(\\d{4})$/);\n if (match) {\n return new Date(match[3], match[2] - 1, match[1]);\n }\n match = str.match(/^(\\d{4})-(\\d{1,2})-(\\d{1,2})$/);\n if (match) {\n return new Date(match[1], match[2] - 1, match[3]);\n }\n }\n }", "function parseDate (date) {\n var d = '';\n var t = date.indexOf('T');\n let index = date.indexOf('-');\n \n if(index === -1 && t === 8){\n d += date.substring(0, 4) + '-';\n d += date.substring(4, 6) + '-';\n d += date.substring(6, 8) + date.substr(8);\n } else if (index > -1 && t === 10) {\n return date;\n } else {\n console.error('invalid date');\n return null;\n }\n return d;\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function isoStringToDate(match) {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0; // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours; // if there is a timezone defined like \"+01:00\" or \"+0100\"\n\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0); // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "convertDateToISOString(date) {\n if (date) return moment(date, defaultDateFormat).toISOString();\n return date;\n }", "function isoDateFormat(strDateView) {\n return moment(strDateView, \"DD/MM/YYYY HH:mm\").format(\"YYYY-MM-DD HH:mm\")\n}", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n \n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0; // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours; // if there is a timezone defined like \"+01:00\" or \"+0100\"\n\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0); // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n\n var ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}", "function _dateCoerce(obj) {\n return obj.toISOString();\n}", "function configFromISO(config){var i,l,string=config._i,match=extendedIsoRegex.exec(string)||basicIsoRegex.exec(string),allowTime,dateFormat,timeFormat,tzFormat;if(match){getParsingFlags(config).iso=true;for(i=0,l=isoDates.length;i<l;i++){if(isoDates[i][1].exec(match[1])){dateFormat=isoDates[i][0];allowTime=isoDates[i][2]!==false;break;}}if(dateFormat==null){config._isValid=false;return;}if(match[3]){for(i=0,l=isoTimes.length;i<l;i++){if(isoTimes[i][1].exec(match[3])){// match[2] should be 'T' or space\r\n\ttimeFormat=(match[2]||' ')+isoTimes[i][0];break;}}if(timeFormat==null){config._isValid=false;return;}}if(!allowTime&&timeFormat!=null){config._isValid=false;return;}if(match[4]){if(tzRegex.exec(match[4])){tzFormat='Z';}else{config._isValid=false;return;}}config._f=dateFormat+(timeFormat||'')+(tzFormat||'');configFromStringAndFormat(config);}else{config._isValid=false;}}// date from iso format or fallback", "function configFromISO(config){var i,l,string=config._i,match=extendedIsoRegex.exec(string)||basicIsoRegex.exec(string),allowTime,dateFormat,timeFormat,tzFormat;if(match){getParsingFlags(config).iso=true;for(i=0,l=isoDates.length;i<l;i++){if(isoDates[i][1].exec(match[1])){dateFormat=isoDates[i][0];allowTime=isoDates[i][2]!==false;break;}}if(dateFormat==null){config._isValid=false;return;}if(match[3]){for(i=0,l=isoTimes.length;i<l;i++){if(isoTimes[i][1].exec(match[3])){// match[2] should be 'T' or space\r\n\ttimeFormat=(match[2]||' ')+isoTimes[i][0];break;}}if(timeFormat==null){config._isValid=false;return;}}if(!allowTime&&timeFormat!=null){config._isValid=false;return;}if(match[4]){if(tzRegex.exec(match[4])){tzFormat='Z';}else{config._isValid=false;return;}}config._f=dateFormat+(timeFormat||'')+(tzFormat||'');configFromStringAndFormat(config);}else{config._isValid=false;}}// date from iso format or fallback", "function ISO_2022() {}", "function ISO_2022() {}", "function iso8601Decoder(isoStr) {\n return Date.parse(isoStr);\n }", "function parseISO(config) {\n\t var i, l,\n\t string = config._i,\n\t match = isoRegex.exec(string);\n\n\t if (match) {\n\t config._pf.iso = true;\n\t for (i = 0, l = isoDates.length; i < l; i++) {\n\t if (isoDates[i][1].exec(string)) {\n\t // match[5] should be 'T' or undefined\n\t config._f = isoDates[i][0] + (match[6] || ' ');\n\t break;\n\t }\n\t }\n\t for (i = 0, l = isoTimes.length; i < l; i++) {\n\t if (isoTimes[i][1].exec(string)) {\n\t config._f += isoTimes[i][0];\n\t break;\n\t }\n\t }\n\t if (string.match(parseTokenTimezone)) {\n\t config._f += 'Z';\n\t }\n\t makeDateFromStringAndFormat(config);\n\t } else {\n\t config._isValid = false;\n\t }\n\t }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }", "function parseISO(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be 'T' or undefined\n config._f = isoDates[i][0] + (match[6] || ' ');\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += 'Z';\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }" ]
[ "0.69151974", "0.66991687", "0.6643978", "0.65537083", "0.65537083", "0.6520427", "0.6492825", "0.64871174", "0.6448661", "0.64316744", "0.64316744", "0.64103484", "0.64103484", "0.6407205", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.64045346", "0.63858414", "0.6371779", "0.63675845", "0.63675845", "0.63675845", "0.63675845", "0.63675845", "0.6310807", "0.63043165", "0.6296922", "0.6296922", "0.6296922", "0.6296922", "0.62956905", "0.62956905", "0.62956905", "0.62956905", "0.62367827", "0.62285906", "0.62221026", "0.62221026", "0.62221026", "0.62183875", "0.61820984", "0.6167017", "0.6166754", "0.6166754", "0.6166754", "0.6166754", "0.6166754", "0.61617094", "0.61617094", "0.6147587", "0.61250347", "0.61188406", "0.611831", "0.6112176", "0.61092424", "0.6103642", "0.6103642", "0.6103642", "0.6103642", "0.6103642", "0.6071104", "0.60573643", "0.60538405", "0.60504943", "0.60102975", "0.60096854", "0.60056126", "0.60056126", "0.5989161", "0.5989161", "0.5979461", "0.5974252", "0.5971357", "0.5971357", "0.5971357", "0.5971161", "0.5971161", "0.5971161", "0.5971161", "0.5971161", "0.5971161" ]
0.0
-1
date from string and format string
function configFromStringAndFormat(config) { // TODO: Move this to another part of the creation flow to prevent circular deps if (config._f === hooks.ISO_8601) { configFromISO(config); return; } if (config._f === hooks.RFC_2822) { configFromRFC2822(config); return; } config._a = []; getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` var string = '' + config._i, i, parsedInput, tokens, token, skipped, stringLength = string.length, totalParsedInputLength = 0; tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; for (i = 0; i < tokens.length; i++) { token = tokens[i]; parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput, // 'regex', getParseRegexForToken(token, config)); if (parsedInput) { skipped = string.substr(0, string.indexOf(parsedInput)); if (skipped.length > 0) { getParsingFlags(config).unusedInput.push(skipped); } string = string.slice(string.indexOf(parsedInput) + parsedInput.length); totalParsedInputLength += parsedInput.length; } // don't parse if it's not a known token if (formatTokenFunctions[token]) { if (parsedInput) { getParsingFlags(config).empty = false; } else { getParsingFlags(config).unusedTokens.push(token); } addTimeToArrayFromToken(token, parsedInput, config); } else if (config._strict && !parsedInput) { getParsingFlags(config).unusedTokens.push(token); } } // add remaining unparsed input length to the string getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; if (string.length > 0) { getParsingFlags(config).unusedInput.push(string); } // clear _12h flag if hour is <= 12 if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) { getParsingFlags(config).bigHour = undefined; } getParsingFlags(config).parsedDateParts = config._a.slice(0); getParsingFlags(config).meridiem = config._meridiem; // handle meridiem config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); configFromArray(config); checkOverflow(config); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeDateFromStringAndFormat(string, format) {\n var datePartArray = [0, 0, 1, 0, 0, 0, 0],\n config = {\n tzh : 0, // timezone hour offset\n tzm : 0 // timezone minute offset\n },\n tokens = format.match(formattingTokens),\n i, parsedInput;\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n string = string.replace(getParseRegexForToken(tokens[i]), '');\n addTimeToArrayFromToken(tokens[i], parsedInput, datePartArray, config);\n }\n // handle am pm\n if (config.isPm && datePartArray[3] < 12) {\n datePartArray[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config.isPm === false && datePartArray[3] === 12) {\n datePartArray[3] = 0;\n }\n // handle timezone\n datePartArray[3] += config.tzh;\n datePartArray[4] += config.tzm;\n // return\n return config.isUTC ? new Date(Date.UTC.apply({}, datePartArray)) : dateFromArray(datePartArray);\n }", "function format_date(d_str) {\n return new Date(d_str.replace(/(\\d{2}).(\\d{2}).(\\d{4})/, \"$2/$1/$3\"))\n}", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens);\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function get_date_from_string(date_str){\n var parts =date_str.split('-');\n if(parts[0].length == 6){\n // working with date format DDMMYY\n var date_list = parts[0].match(/.{1,2}/g);\n var result_date = new Date(date_list[2].padStart(4, '20'), date_list[1]-1, date_list[0])\n return result_date;\n }else if(parts[0].length == 2){\n var result_date = new Date(parts[2].padStart(4, '20'), parts[1]-1, parts[0]);\n return result_date;\n }else{\n // unknown format. Do nothing\n return\n }\n}", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function parseDate(str) {\n var m = str.match(/^(\\d{4})\\-(\\d{1,2})\\-(\\d{1,2})/);\n return (m) ? `${m[2]}/${m[3]}/${m[1]}` : null;\n}", "function convert_date(str){var tmp=str.split(\".\");return new Date(tmp[1]+\"/\"+tmp[0]+\"/\"+tmp[2])}", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function str2date(str) {\n\t\t\ttry {\n\t\t\t\tvar t = (str).split(/[- :]/);\n\t\t\t\treturn new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);\n\t\t\t} catch (err) {\n\t\t\t\talert(err);\n\t\t\t}\n\t\t}", "function str2date(str) {\n\t\t\ttry {\n\t\t\t\tvar t = (str).split(/[- :]/);\n\t\t\t\treturn new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);\n\t\t\t} catch (err) {\n\t\t\t\talert(err);\n\t\t\t}\n\t\t}", "function makeDateFromStringAndFormat(string, format) {\n var inArray = [0, 0, 1, 0, 0, 0, 0],\n timezoneHours = 0,\n timezoneMinutes = 0,\n isUsingUTC = false,\n inputParts = string.match(inputCharacters),\n formatParts = format.match(tokenCharacters),\n len = Math.min(inputParts.length, formatParts.length),\n i,\n isPm;\n\n // function to convert string input to date\n function addTime(format, input) {\n var a;\n switch (format) {\n // MONTH\n case 'M' :\n // fall through to MM\n case 'MM' :\n inArray[1] = ~~input - 1;\n break;\n case 'MMM' :\n // fall through to MMMM\n case 'MMMM' :\n for (a = 0; a < 12; a++) {\n if (moment.monthsParse[a].test(input)) {\n inArray[1] = a;\n break;\n }\n }\n break;\n // DAY OF MONTH\n case 'D' :\n // fall through to DDDD\n case 'DD' :\n // fall through to DDDD\n case 'DDD' :\n // fall through to DDDD\n case 'DDDD' :\n inArray[2] = ~~input;\n break;\n // YEAR\n case 'YY' :\n input = ~~input;\n inArray[0] = input + (input > 70 ? 1900 : 2000);\n break;\n case 'YYYY' :\n inArray[0] = ~~Math.abs(input);\n break;\n // AM / PM\n case 'a' :\n // fall through to A\n case 'A' :\n isPm = (input.toLowerCase() === 'pm');\n break;\n // 24 HOUR\n case 'H' :\n // fall through to hh\n case 'HH' :\n // fall through to hh\n case 'h' :\n // fall through to hh\n case 'hh' :\n inArray[3] = ~~input;\n break;\n // MINUTE\n case 'm' :\n // fall through to mm\n case 'mm' :\n inArray[4] = ~~input;\n break;\n // SECOND\n case 's' :\n // fall through to ss\n case 'ss' :\n inArray[5] = ~~input;\n break;\n // TIMEZONE\n case 'Z' :\n // fall through to ZZ\n case 'ZZ' :\n isUsingUTC = true;\n a = (input || '').match(timezoneParseRegex);\n if (a && a[1]) {\n timezoneHours = ~~a[1];\n }\n if (a && a[2]) {\n timezoneMinutes = ~~a[2];\n }\n // reverse offsets\n if (a && a[0] === '+') {\n timezoneHours = -timezoneHours;\n timezoneMinutes = -timezoneMinutes;\n }\n break;\n }\n }\n for (i = 0; i < len; i++) {\n addTime(formatParts[i], inputParts[i]);\n }\n // handle am pm\n if (isPm && inArray[3] < 12) {\n inArray[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (isPm === false && inArray[3] === 12) {\n inArray[3] = 0;\n }\n // handle timezone\n inArray[3] += timezoneHours;\n inArray[4] += timezoneMinutes;\n // return\n return isUsingUTC ? new Date(Date.UTC.apply({}, inArray)) : dateFromArray(inArray);\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function dateParser(strDate, format){\nif(!checkValidDate(strDate))\nreturn new Date();\n\nvar slash1 = strDate.indexOf(\"/\");\nif (slash1 == -1) { slash1 = strDate.indexOf(\"-\"); }\n// if no slashes or dashes, invalid date\nif (slash1 == -1) { return false; }\nvar dateYear = strDate.substring(0, slash1);\nvar dateYearAndMonth = strDate.substring(slash1+1, strDate.length);\nvar slash2 = dateYearAndMonth.indexOf(\"/\");\nif (slash2 == -1) { slash2 = dateYearAndMonth.indexOf(\"-\"); }\n// if not a second slash or dash, invalid date\nif (slash2 == -1) { return false; }\nvar dateMonth = dateYearAndMonth.substring(0, slash2);\nvar dateDay = dateYearAndMonth.substring(slash2+1, dateYearAndMonth.length);\nvar retDate = new Date(dateYear,dateMonth-1,dateDay);\nreturn retDate;\n}", "function stringToDate(_date,_format,_delimiter)\r\n{\r\n var formatLowerCase=_format.toLowerCase();\r\n var formatItems=formatLowerCase.split(_delimiter);\r\n var dateItems=_date.split(_delimiter);\r\n var monthIndex=formatItems.indexOf(\"mm\");\r\n var dayIndex=formatItems.indexOf(\"dd\");\r\n var yearIndex=formatItems.indexOf(\"yyyy\");\r\n var month=parseInt(dateItems[monthIndex]);\r\n month-=1;\r\n var formatedDate = new Date(dateItems[yearIndex],month,dateItems[dayIndex]);\r\n return formatedDate;\r\n}", "function makeDateFromString(string) {\n var format = 'YYYY-MM-DDT',\n i;\n if (isoRegex.exec(string)) {\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n format += isoTimes[i][0];\n break;\n }\n }\n return parseTokenTimezone.exec(string) ? \n makeDateFromStringAndFormat(string, format + ' Z') :\n makeDateFromStringAndFormat(string, format);\n }\n return new Date(string);\n }", "function stringToDate(_date,_format,_delimiter)\n{\n var formatLowerCase=_format.toLowerCase();\n var formatItems=formatLowerCase.split(_delimiter);\n var dateItems=_date.split(_delimiter);\n var monthIndex=formatItems.indexOf(\"mm\");\n var dayIndex=formatItems.indexOf(\"dd\");\n var yearIndex=formatItems.indexOf(\"yyyy\");\n var month=parseInt(dateItems[monthIndex]);\n month-=1;\n var formatedDate = new Date(dateItems[yearIndex],month,dateItems[dayIndex]);\n return formatedDate;\n}", "function makeDateFromString(string) {\n var format = 'YYYY-MM-DDT',\n i;\n if (isoRegex.exec(string)) {\n for (i = 0; i < 3; i++) {\n if (isoTimes[i][1].exec(string)) {\n format += isoTimes[i][0];\n break;\n }\n }\n return makeDateFromStringAndFormat(string, format + 'Z');\n }\n return new Date(string);\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function $dateFromString(obj, expr, options) {\n var args = core_1.computeValue(obj, expr, null, options);\n args.format = args.format || _internal_1.DATE_FORMAT;\n args.onNull = args.onNull || null;\n var dateString = args.dateString;\n if (util_1.isNil(dateString))\n return args.onNull;\n // collect all separators of the format string\n var separators = args.format.split(/%[YGmdHMSLuVzZ]/);\n separators.reverse();\n var matches = args.format.match(/(%%|%Y|%G|%m|%d|%H|%M|%S|%L|%u|%V|%z|%Z)/g);\n var dateParts = {};\n // holds the valid regex of parts that matches input date string\n var expectedPattern = \"\";\n for (var i = 0, len = matches.length; i < len; i++) {\n var formatSpecifier = matches[i];\n var props = _internal_1.DATE_SYM_TABLE[formatSpecifier];\n if (util_1.isObject(props)) {\n // get pattern and alias from table\n var m = props.re.exec(dateString);\n // get the next separtor\n var delimiter = separators.pop() || \"\";\n if (m !== null) {\n // store and cut out matched part\n dateParts[props.name] = /^\\d+$/.exec(m[0]) ? parseInt(m[0]) : m[0];\n dateString =\n dateString.substr(0, m.index) +\n dateString.substr(m.index + m[0].length);\n // construct expected pattern\n expectedPattern +=\n _internal_1.regexQuote(delimiter) + _internal_1.regexStrip(props.re.toString());\n }\n else {\n dateParts[props.name] = null;\n }\n }\n }\n // 1. validate all required date parts exists\n // 2. validate original dateString against expected pattern.\n if (util_1.isNil(dateParts.year) ||\n util_1.isNil(dateParts.month) ||\n util_1.isNil(dateParts.day) ||\n !new RegExp(\"^\" + expectedPattern + \"$\").exec(args.dateString))\n return args.onError;\n var tz = _internal_1.parseTimezone(args.timezone);\n // create the date. month is 0-based in Date\n var d = new Date(Date.UTC(dateParts.year, dateParts.month - 1, dateParts.day, 0, 0, 0));\n if (!util_1.isNil(dateParts.hour))\n d.setUTCHours(dateParts.hour);\n if (!util_1.isNil(dateParts.minute))\n d.setUTCMinutes(dateParts.minute);\n if (!util_1.isNil(dateParts.second))\n d.setUTCSeconds(dateParts.second);\n if (!util_1.isNil(dateParts.millisecond))\n d.setUTCMilliseconds(dateParts.millisecond);\n // The minute part is unused when converting string.\n // This was observed in the tests on MongoDB site but not officially stated anywhere\n tz.minute = 0;\n _internal_1.adjustDate(d, tz);\n return d;\n}", "formatDate(str) {\n let string = str.slice(0, str.lastIndexOf('T'))\n let fields = string.split('-');\n let finalString = fields[2] + '-' + fields[1] + '-' + fields[0]\n return finalString\n }", "formatDate(str) {\n let string = str.slice(0, str.lastIndexOf('T'))\n let fields = string.split('-');\n let finalString = fields[2] + '-' + fields[1] + '-' + fields[0]\n return finalString\n }", "function formatDate(date, formatStr) {\n\t\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n\t}", "function format_date(date_string, data_source) {\n var date = new Date(date_string);\n return {v: date, f: date_string};\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromString(config) {\n var i, l,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 0, l = isoDates.length; i < l; i++) {\n if (isoDates[i][1].exec(string)) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i][0] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0, l = isoTimes.length; i < l; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (string.match(parseTokenTimezone)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n moment.createFromInputFallback(config);\n }\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n \n config._a = [];\n config._pf.empty = true;\n \n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n \n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n \n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n \n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n \n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (getParseRegexForToken(token, config).exec(string) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (getParseRegexForToken(token, config).exec(string) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function formatDate(date, formatStr) {\n return formatDateWithChunks(date, getFormatStringChunks(formatStr));\n }", "function formatDate(string){\n var options = { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' };\n return new Date(string).toLocaleDateString([],options);\n}", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function formatDate(date, formatStr) {\n\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n}", "function formatDate(date, formatStr) {\n\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n}", "function formatDate(date, formatStr) {\n\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n}", "function formatDate(date, formatStr) {\n\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n}", "function formatDate(date, formatStr) {\n\treturn formatDateWithChunks(date, getFormatStringChunks(formatStr));\n}", "function getFormatDate(date) {\n\t\tvar arr = date.split('/');\n\t\treturn new Date(parseInt(arr[2]), parseInt(arr[1])-1, parseInt(arr[0]));\n\t}", "function makeDateFromStringAndFormat(config) {\n\t if (config._f === moment.ISO_8601) {\n\t parseISO(config);\n\t return;\n\t }\n\n\t config._a = [];\n\t config._pf.empty = true;\n\n\t // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\t var string = '' + config._i,\n\t i, parsedInput, tokens, token, skipped,\n\t stringLength = string.length,\n\t totalParsedInputLength = 0;\n\n\t tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n\t for (i = 0; i < tokens.length; i++) {\n\t token = tokens[i];\n\t parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n\t if (parsedInput) {\n\t skipped = string.substr(0, string.indexOf(parsedInput));\n\t if (skipped.length > 0) {\n\t config._pf.unusedInput.push(skipped);\n\t }\n\t string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n\t totalParsedInputLength += parsedInput.length;\n\t }\n\t // don't parse if it's not a known token\n\t if (formatTokenFunctions[token]) {\n\t if (parsedInput) {\n\t config._pf.empty = false;\n\t }\n\t else {\n\t config._pf.unusedTokens.push(token);\n\t }\n\t addTimeToArrayFromToken(token, parsedInput, config);\n\t }\n\t else if (config._strict && !parsedInput) {\n\t config._pf.unusedTokens.push(token);\n\t }\n\t }\n\n\t // add remaining unparsed input length to the string\n\t config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n\t if (string.length > 0) {\n\t config._pf.unusedInput.push(string);\n\t }\n\n\t // handle am pm\n\t if (config._isPm && config._a[HOUR] < 12) {\n\t config._a[HOUR] += 12;\n\t }\n\t // if is 12 am, change hours to 0\n\t if (config._isPm === false && config._a[HOUR] === 12) {\n\t config._a[HOUR] = 0;\n\t }\n\n\t dateFromConfig(config);\n\t checkOverflow(config);\n\t }", "function makeDateFromStringAndFormat(config) {\n\t\tif (config._f === moment.ISO_8601) {\n\t\t\tparseISO(config);\n\t\t\treturn;\n\t\t}\n\n\t\tconfig._a = [];\n\t\tconfig._pf.empty = true;\n\n\t\t// This array is used to make a Date, either with `new Date` or `Date.UTC`\n\t\tvar string = '' + config._i, i, parsedInput, tokens, token, skipped, stringLength = string.length, totalParsedInputLength = 0;\n\n\t\ttokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n\t\tfor (i = 0; i < tokens.length; i++) {\n\t\t\ttoken = tokens[i];\n\t\t\tparsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n\t\t\tif (parsedInput) {\n\t\t\t\tskipped = string.substr(0, string.indexOf(parsedInput));\n\t\t\t\tif (skipped.length > 0) {\n\t\t\t\t\tconfig._pf.unusedInput.push(skipped);\n\t\t\t\t}\n\t\t\t\tstring = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n\t\t\t\ttotalParsedInputLength += parsedInput.length;\n\t\t\t}\n\t\t\t// don't parse if it's not a known token\n\t\t\tif (formatTokenFunctions[token]) {\n\t\t\t\tif (parsedInput) {\n\t\t\t\t\tconfig._pf.empty = false;\n\t\t\t\t} else {\n\t\t\t\t\tconfig._pf.unusedTokens.push(token);\n\t\t\t\t}\n\t\t\t\taddTimeToArrayFromToken(token, parsedInput, config);\n\t\t\t} else if (config._strict && !parsedInput) {\n\t\t\t\tconfig._pf.unusedTokens.push(token);\n\t\t\t}\n\t\t}\n\n\t\t// add remaining unparsed input length to the string\n\t\tconfig._pf.charsLeftOver = stringLength - totalParsedInputLength;\n\t\tif (string.length > 0) {\n\t\t\tconfig._pf.unusedInput.push(string);\n\t\t}\n\n\t\t// clear _12h flag if hour is <= 12\n\t\tif (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n\t\t\tconfig._pf.bigHour = undefined;\n\t\t}\n\t\t// handle am pm\n\t\tif (config._isPm && config._a[HOUR] < 12) {\n\t\t\tconfig._a[HOUR] += 12;\n\t\t}\n\t\t// if is 12 am, change hours to 0\n\t\tif (config._isPm === false && config._a[HOUR] === 12) {\n\t\t\tconfig._a[HOUR] = 0;\n\t\t}\n\t\tdateFromConfig(config);\n\t\tcheckOverflow(config);\n\t}", "function makeDateFromStringAndFormat(config) {\n\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\t if (config._f === moment.ISO_8601) {\n\t parseISO(config);\n\t return;\n\t }\n\n\t config._a = [];\n\t config._pf.empty = true;\n\n\t // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\t var string = '' + config._i,\n\t i,\n\t parsedInput,\n\t tokens,\n\t token,\n\t skipped,\n\t stringLength = string.length,\n\t totalParsedInputLength = 0;\n\n\t tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n\t for (i = 0; i < tokens.length; i++) {\n\t token = tokens[i];\n\t parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n\t if (parsedInput) {\n\t skipped = string.substr(0, string.indexOf(parsedInput));\n\t if (skipped.length > 0) {\n\t config._pf.unusedInput.push(skipped);\n\t }\n\t string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n\t totalParsedInputLength += parsedInput.length;\n\t }\n\t // don't parse if it's not a known token\n\t if (formatTokenFunctions[token]) {\n\t if (parsedInput) {\n\t config._pf.empty = false;\n\t } else {\n\t config._pf.unusedTokens.push(token);\n\t }\n\t addTimeToArrayFromToken(token, parsedInput, config);\n\t } else if (config._strict && !parsedInput) {\n\t config._pf.unusedTokens.push(token);\n\t }\n\t }\n\n\t // add remaining unparsed input length to the string\n\t config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n\t if (string.length > 0) {\n\t config._pf.unusedInput.push(string);\n\t }\n\n\t // clear _12h flag if hour is <= 12\n\t if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n\t config._pf.bigHour = undefined;\n\t }\n\t // handle meridiem\n\t config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\t dateFromConfig(config);\n\t checkOverflow(config);\n\t }", "function unformatDate(datestr) {\n var y = parseInt(datestr.slice(0, 4)),\n m = parseInt(datestr.slice(5, 7)) - 1,\n dy = parseInt(datestr.slice(8));\n\n return (new Date(y, m, dy));\n}", "function unformatDate(datestr) {\n var y = parseInt(datestr.slice(0, 4)),\n m = parseInt(datestr.slice(5, 7)) - 1,\n dy = parseInt(datestr.slice(8));\n\n return (new Date(y, m, dy));\n}", "function parseDate(str) {\n \t\t//var m = str.match(/^(\\d{1,2})-(\\d{1,2})-(\\d{4})$/);\n \t\tvar m = str.match(/^(0?[1-9]|[12][0-9]|3[01])[\\.\\-](0?[1-9]|1[012])[\\.\\-]\\d{4}$/);\n \t\treturn (m) ? new Date(m[3], m[2]-1, m[1]) : null;\n\t}", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function getDateFromString(str)\n{\n var dateRE1 = /([0-9]{1,4})(?:\\-|\\/|\\.|\\u5e74|\\u6708|\\u65e5)([0-9]{1,2})(?:\\-|\\/|\\.|\\u5e74|\\u6708|\\u65e5)*([0-9]{1,4})*/i;\n var dateRE2 = /(on)?\\s*(([0-9]*)(?:st|th|rd|nd)*(?:\\s|of|\\-a|\\-|,|\\.)*(january|jan|february|feb|march|mar|april|apr|may|june|jun|july|jul|august|aug|september|sept|sep|october|oct|november|nov|december|dec)(?:\\s|\\-|\\.)*([0-9]*))/i;\n var dateRE3 = /(on)?\\s*((january|jan|february|feb|march|mar|april|apr|may|june|jun|july|jul|august|aug|september|sept|sep|october|oct|november|nov|december|dec)(?:\\s|,|\\.|\\-)*([0-9]+)(?:st|th|rd|nd)*(?:\\s|,|\\.|\\-a|\\-)*([0-9]*))/i;\n var dateRE4 = /(on)?\\s*((next)?\\s*(monday|mon|tuesday|tue|wednesday|wed|thursday|thu|friday|fri|saturday|sat|sunday|sun))/i;\n var dateRE5 = /(in)?\\s*(one|two|three|four|five|six|seven|eight|nine|ten|[0-9]+)\\s*(years|year|yrs|yr|months|month|mons|mon|weeks|week|wks|wk|days|day)/i;\n var dateRE6 = /end\\s*of\\s*(?:the)*\\s*(week|w|month|m)/i;\n var dateRE7 =/(on)?\\s*([0-9]+)(?:st|th|rd|nd)/i;\n var dateRE8 = /\\s*(yesterday|tod|today|tom|tomorrow)/i;\n \n \n if (DEBUG) log(\"getDateFromString: Looking for date in '\" + str + \"'\");\n var dateRE1match = dateRE1.exec(str);\n var dateRE2match = dateRE2.exec(str);\n var dateRE3match = dateRE3.exec(str);\n var dateRE4match = dateRE4.exec(str);\n var dateRE5match = dateRE5.exec(str);\n var dateRE6match = dateRE6.exec(str);\n var dateRE7match = dateRE7.exec(str);\n var dateRE8match = dateRE8.exec(str);\n \n if (dateRE1match)\n {\n if (DEBUG) log(\"dateRE1 match for '\" + str + \"' = '\" + dateRE1match[0] + \"'\");\n return dateRE1match[0];\n }\n \n if (dateRE2match)\n {\n if (DEBUG) log(\"dateRE2 match for '\" + str + \"' = '\" + dateRE2match[0] + \"'\");\n return dateRE2match[0];\n }\n \n if (dateRE3match)\n {\n if (DEBUG) log(\"dateRE3 match for '\" + str + \"' = '\" + dateRE3match[0] + \"'\");\n return dateRE3match[0];\n }\n \n if (dateRE4match)\n {\n if (DEBUG) log(\"dateRE4 match for '\" + str + \"' = '\" + dateRE4match[0] + \"'\");\n return dateRE4match[0];\n }\n \n if (dateRE5match)\n {\n if (DEBUG) log(\"dateRE5 match for '\" + str + \"' = '\" + dateRE5match[0] + \"'\");\n return dateRE5match[0];\n }\n \n if (dateRE6match)\n {\n if (DEBUG) log(\"dateRE6 match for '\" + str + \"' = '\" + dateRE6match[0] + \"'\");\n return dateRE6match[0];\n }\n \n if (dateRE7match)\n {\n if (DEBUG) log(\"dateRE7 match for '\" + str + \"' = '\" + dateRE7match[0] + \"'\");\n return dateRE7match[0];\n }\n \n if (dateRE8match)\n {\n if (DEBUG) log(\"dateRE8 match for '\" + str + \"' = '\" + dateRE8match[0] + \"'\");\n return dateRE8match[0];\n }\n \n if (DEBUG) log(\"NO MATCH FOR DATE STRING '\" + str + \"'!!!!!\");\n return;\n}", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n dateFromConfig(config);\n checkOverflow(config);\n }", "function parseStringToDate(string) {\n if (string) {\n var parts = string.match(/(\\d+)/g);\n // new Date(year, month [, date [, hours[, minutes[, seconds[, ms]]]]])\n return new Date(parts[0], parts[1] - 1, parts[2]); // months are 0-based\n }\n }", "function formatDate(string) {\n var date = new Date(string);\n let options = {\n day: \"numeric\",\n month: \"long\",\n };\n return date.toLocaleString(\"en-US\", options);\n }", "function formatDate(date, format){\n if(!date){\n return '0000-00-00';\n }\n var dd = date.substring(0, 2);\n var mm = date.substring(3, 5);\n var yy = date.substring(6);\n if (format == 'dmy') {\n return dd + '-' + mm + '-' + yy;\n } else {\n return yy + '-' + mm + '-' + dd;\n }\n }", "function castStringToDate(str) {\n if (str !== undefined && str.length === 16) {\n let day = str.slice(0, 2);\n let month = str.slice(3, 5);\n let americanDateString = month + '-' + day + str.slice(5); // MM-DD-YYYY HH:MM\n return new Date(americanDateString);\n } else {\n console.error('Error casting ' + str + ' to date.')\n }\n return new Date()\n}", "normalize(str) {\n if (str && !CommonUtils.isDate(str)) {\n var match = str.match(/^(\\d{1,2})\\/(\\d{1,2})\\/(\\d{4})$/);\n if (match) {\n return new Date(match[3], match[2] - 1, match[1]);\n }\n match = str.match(/^(\\d{4})-(\\d{1,2})-(\\d{1,2})$/);\n if (match) {\n return new Date(match[1], match[2] - 1, match[3]);\n }\n }\n }", "function formatDate(date,formatStr){return renderFakeFormatString(getParsedFormatString(formatStr).fakeFormatString,date);}", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }" ]
[ "0.7544057", "0.7378126", "0.71777546", "0.71777546", "0.71777546", "0.71777546", "0.71671367", "0.7163808", "0.7163808", "0.7163808", "0.7163808", "0.7163808", "0.71498096", "0.71486294", "0.71486294", "0.71486294", "0.70893186", "0.7086403", "0.70293576", "0.70293576", "0.70195943", "0.70195943", "0.70195943", "0.70195943", "0.70195943", "0.7002717", "0.7002717", "0.69697803", "0.6963666", "0.69486713", "0.6941472", "0.6931618", "0.69212186", "0.68995607", "0.68969715", "0.68969715", "0.68969715", "0.68969715", "0.68969715", "0.6896638", "0.68942904", "0.68942904", "0.68848205", "0.6881519", "0.68802357", "0.68802357", "0.6860201", "0.68580484", "0.68580484", "0.68559957", "0.68525356", "0.68521965", "0.68521965", "0.68521965", "0.68521965", "0.68521965", "0.68521965", "0.68521965", "0.68521965", "0.6838409", "0.6838409", "0.6838409", "0.6838409", "0.6838409", "0.6829404", "0.6784215", "0.6758764", "0.6727878", "0.6727878", "0.6727878", "0.6726412", "0.6726379", "0.6726379", "0.6725158", "0.6717375", "0.6717375", "0.6717375", "0.6717375", "0.6717375", "0.6717375", "0.6695233", "0.66870695", "0.66870695", "0.6683349", "0.6683229", "0.6678988", "0.66708475", "0.66647357", "0.6660571", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495", "0.66551495" ]
0.0
-1
date from string and array of format strings
function configFromStringAndArray(config) { var tempConfig, bestMoment, scoreToBeat, i, currentScore; if (config._f.length === 0) { getParsingFlags(config).invalidFormat = true; config._d = new Date(NaN); return; } for (i = 0; i < config._f.length; i++) { currentScore = 0; tempConfig = copyConfig({}, config); if (config._useUTC != null) { tempConfig._useUTC = config._useUTC; } tempConfig._f = config._f[i]; configFromStringAndFormat(tempConfig); if (!isValid(tempConfig)) { continue; } // if there is any input that was not parsed add a penalty for that format currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; getParsingFlags(tempConfig).score = currentScore; if (scoreToBeat == null || currentScore < scoreToBeat) { scoreToBeat = currentScore; bestMoment = tempConfig; } } extend(config, bestMoment || tempConfig); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeDateFromStringAndArray(string, formats) {\n var output,\n inputParts = string.match(parseMultipleFormatChunker) || [],\n formattedInputParts,\n scoreToBeat = 99,\n i,\n currentDate,\n currentScore;\n for (i = 0; i < formats.length; i++) {\n currentDate = makeDateFromStringAndFormat(string, formats[i]);\n formattedInputParts = formatMoment(new Moment(currentDate), formats[i]).match(parseMultipleFormatChunker) || [];\n currentScore = compareArrays(inputParts, formattedInputParts);\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n output = currentDate;\n }\n }\n return output;\n }", "function makeDateFromStringAndFormat(string, format) {\n var datePartArray = [0, 0, 1, 0, 0, 0, 0],\n config = {\n tzh : 0, // timezone hour offset\n tzm : 0 // timezone minute offset\n },\n tokens = format.match(formattingTokens),\n i, parsedInput;\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n string = string.replace(getParseRegexForToken(tokens[i]), '');\n addTimeToArrayFromToken(tokens[i], parsedInput, datePartArray, config);\n }\n // handle am pm\n if (config.isPm && datePartArray[3] < 12) {\n datePartArray[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config.isPm === false && datePartArray[3] === 12) {\n datePartArray[3] = 0;\n }\n // handle timezone\n datePartArray[3] += config.tzh;\n datePartArray[4] += config.tzm;\n // return\n return config.isUTC ? new Date(Date.UTC.apply({}, datePartArray)) : dateFromArray(datePartArray);\n }", "function makeDateFromStringAndArray(string, formats) {\n var output,\n inputParts = string.match(inputCharacters),\n scores = [],\n scoreToBeat = 99,\n i,\n curDate,\n curScore;\n for (i = 0; i < formats.length; i++) {\n curDate = makeDateFromStringAndFormat(string, formats[i]);\n curScore = compareArrays(inputParts, formatMoment(new Moment(curDate), formats[i]).match(inputCharacters));\n if (curScore < scoreToBeat) {\n scoreToBeat = curScore;\n output = curDate;\n }\n }\n return output;\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens);\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "parseDate(arrayOfStrings)\n {\n let newStr=arrayOfStrings[3];\n newStr += '-';\n switch(arrayOfStrings[1])\n {\n case 'Jan':\n newStr+='01';\n break;\n case 'Feb':\n newStr+='02';\n break;\n case 'Mar':\n newStr+='03';\n break;\n case 'Apr':\n newStr+='04';\n break;\n case 'May':\n newStr+='05';\n break;\n case 'Jun':\n newStr+='06';\n break;\n case 'Jul':\n newStr+='07';\n break;\n case 'Aug':\n newStr+='08';\n break;\n case 'Sep':\n newStr+='09';\n break;\n case 'Oct':\n newStr+='10';\n break;\n case 'Nov':\n newStr+='11';\n break;\n case 'Dec':\n newStr+='12';\n break;\n default:\n break;\n }\n newStr+='-';\n newStr+=arrayOfStrings[2];\n\n return newStr;\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (getParseRegexForToken(token, config).exec(string) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (getParseRegexForToken(token, config).exec(string) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function $dateFromString(obj, expr, options) {\n var args = core_1.computeValue(obj, expr, null, options);\n args.format = args.format || _internal_1.DATE_FORMAT;\n args.onNull = args.onNull || null;\n var dateString = args.dateString;\n if (util_1.isNil(dateString))\n return args.onNull;\n // collect all separators of the format string\n var separators = args.format.split(/%[YGmdHMSLuVzZ]/);\n separators.reverse();\n var matches = args.format.match(/(%%|%Y|%G|%m|%d|%H|%M|%S|%L|%u|%V|%z|%Z)/g);\n var dateParts = {};\n // holds the valid regex of parts that matches input date string\n var expectedPattern = \"\";\n for (var i = 0, len = matches.length; i < len; i++) {\n var formatSpecifier = matches[i];\n var props = _internal_1.DATE_SYM_TABLE[formatSpecifier];\n if (util_1.isObject(props)) {\n // get pattern and alias from table\n var m = props.re.exec(dateString);\n // get the next separtor\n var delimiter = separators.pop() || \"\";\n if (m !== null) {\n // store and cut out matched part\n dateParts[props.name] = /^\\d+$/.exec(m[0]) ? parseInt(m[0]) : m[0];\n dateString =\n dateString.substr(0, m.index) +\n dateString.substr(m.index + m[0].length);\n // construct expected pattern\n expectedPattern +=\n _internal_1.regexQuote(delimiter) + _internal_1.regexStrip(props.re.toString());\n }\n else {\n dateParts[props.name] = null;\n }\n }\n }\n // 1. validate all required date parts exists\n // 2. validate original dateString against expected pattern.\n if (util_1.isNil(dateParts.year) ||\n util_1.isNil(dateParts.month) ||\n util_1.isNil(dateParts.day) ||\n !new RegExp(\"^\" + expectedPattern + \"$\").exec(args.dateString))\n return args.onError;\n var tz = _internal_1.parseTimezone(args.timezone);\n // create the date. month is 0-based in Date\n var d = new Date(Date.UTC(dateParts.year, dateParts.month - 1, dateParts.day, 0, 0, 0));\n if (!util_1.isNil(dateParts.hour))\n d.setUTCHours(dateParts.hour);\n if (!util_1.isNil(dateParts.minute))\n d.setUTCMinutes(dateParts.minute);\n if (!util_1.isNil(dateParts.second))\n d.setUTCSeconds(dateParts.second);\n if (!util_1.isNil(dateParts.millisecond))\n d.setUTCMilliseconds(dateParts.millisecond);\n // The minute part is unused when converting string.\n // This was observed in the tests on MongoDB site but not officially stated anywhere\n tz.minute = 0;\n _internal_1.adjustDate(d, tz);\n return d;\n}", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n \n scoreToBeat,\n i,\n currentScore;\n \n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n \n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n \n if (!isValid(tempConfig)) {\n continue;\n }\n \n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n \n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n \n tempConfig._pf.score = currentScore;\n \n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n \n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "function makeDateFromStringAndFormat(config) {\n\t\tif (config._f === moment.ISO_8601) {\n\t\t\tparseISO(config);\n\t\t\treturn;\n\t\t}\n\n\t\tconfig._a = [];\n\t\tconfig._pf.empty = true;\n\n\t\t// This array is used to make a Date, either with `new Date` or `Date.UTC`\n\t\tvar string = '' + config._i, i, parsedInput, tokens, token, skipped, stringLength = string.length, totalParsedInputLength = 0;\n\n\t\ttokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n\t\tfor (i = 0; i < tokens.length; i++) {\n\t\t\ttoken = tokens[i];\n\t\t\tparsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n\t\t\tif (parsedInput) {\n\t\t\t\tskipped = string.substr(0, string.indexOf(parsedInput));\n\t\t\t\tif (skipped.length > 0) {\n\t\t\t\t\tconfig._pf.unusedInput.push(skipped);\n\t\t\t\t}\n\t\t\t\tstring = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n\t\t\t\ttotalParsedInputLength += parsedInput.length;\n\t\t\t}\n\t\t\t// don't parse if it's not a known token\n\t\t\tif (formatTokenFunctions[token]) {\n\t\t\t\tif (parsedInput) {\n\t\t\t\t\tconfig._pf.empty = false;\n\t\t\t\t} else {\n\t\t\t\t\tconfig._pf.unusedTokens.push(token);\n\t\t\t\t}\n\t\t\t\taddTimeToArrayFromToken(token, parsedInput, config);\n\t\t\t} else if (config._strict && !parsedInput) {\n\t\t\t\tconfig._pf.unusedTokens.push(token);\n\t\t\t}\n\t\t}\n\n\t\t// add remaining unparsed input length to the string\n\t\tconfig._pf.charsLeftOver = stringLength - totalParsedInputLength;\n\t\tif (string.length > 0) {\n\t\t\tconfig._pf.unusedInput.push(string);\n\t\t}\n\n\t\t// clear _12h flag if hour is <= 12\n\t\tif (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n\t\t\tconfig._pf.bigHour = undefined;\n\t\t}\n\t\t// handle am pm\n\t\tif (config._isPm && config._a[HOUR] < 12) {\n\t\t\tconfig._a[HOUR] += 12;\n\t\t}\n\t\t// if is 12 am, change hours to 0\n\t\tif (config._isPm === false && config._a[HOUR] === 12) {\n\t\t\tconfig._a[HOUR] = 0;\n\t\t}\n\t\tdateFromConfig(config);\n\t\tcheckOverflow(config);\n\t}", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n\t var tempConfig, bestMoment, scoreToBeat, i, currentScore;\n\n\t if (config._f.length === 0) {\n\t config._pf.invalidFormat = true;\n\t config._d = new Date(NaN);\n\t return;\n\t }\n\n\t for (i = 0; i < config._f.length; i++) {\n\t currentScore = 0;\n\t tempConfig = copyConfig({}, config);\n\t if (config._useUTC != null) {\n\t tempConfig._useUTC = config._useUTC;\n\t }\n\t tempConfig._pf = defaultParsingFlags();\n\t tempConfig._f = config._f[i];\n\t makeDateFromStringAndFormat(tempConfig);\n\n\t if (!_isValid(tempConfig)) {\n\t continue;\n\t }\n\n\t // if there is any input that was not parsed add a penalty for that format\n\t currentScore += tempConfig._pf.charsLeftOver;\n\n\t //or tokens\n\t currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n\t tempConfig._pf.score = currentScore;\n\n\t if (scoreToBeat == null || currentScore < scoreToBeat) {\n\t scoreToBeat = currentScore;\n\t bestMoment = tempConfig;\n\t }\n\t }\n\n\t extend(config, bestMoment || tempConfig);\n\t }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n initializeParsingFlags(tempConfig);\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n initializeParsingFlags(tempConfig);\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n initializeParsingFlags(tempConfig);\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "parseDate(value, format) {\n if (format == null || value == null) {\n throw \"Invalid arguments\";\n }\n value = (typeof value === \"object\" ? value.toString() : value + \"\");\n if (value === \"\") {\n return null;\n }\n let iFormat, dim, extra, iValue = 0, shortYearCutoff = (typeof this.shortYearCutoff !== \"string\" ? this.shortYearCutoff : new Date().getFullYear() % 100 + parseInt(this.shortYearCutoff, 10)), year = -1, month = -1, day = -1, doy = -1, literal = false, date, lookAhead = (match) => {\n let matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);\n if (matches) {\n iFormat++;\n }\n return matches;\n }, getNumber = (match) => {\n let isDoubled = lookAhead(match), size = (match === \"@\" ? 14 : (match === \"!\" ? 20 :\n (match === \"y\" && isDoubled ? 4 : (match === \"o\" ? 3 : 2)))), minSize = (match === \"y\" ? size : 1), digits = new RegExp(\"^\\\\d{\" + minSize + \",\" + size + \"}\"), num = value.substring(iValue).match(digits);\n if (!num) {\n throw \"Missing number at position \" + iValue;\n }\n iValue += num[0].length;\n return parseInt(num[0], 10);\n }, getName = (match, shortNames, longNames) => {\n let index = -1;\n let arr = lookAhead(match) ? longNames : shortNames;\n let names = [];\n for (let i = 0; i < arr.length; i++) {\n names.push([i, arr[i]]);\n }\n names.sort((a, b) => {\n return -(a[1].length - b[1].length);\n });\n for (let i = 0; i < names.length; i++) {\n let name = names[i][1];\n if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {\n index = names[i][0];\n iValue += name.length;\n break;\n }\n }\n if (index !== -1) {\n return index + 1;\n }\n else {\n throw \"Unknown name at position \" + iValue;\n }\n }, checkLiteral = () => {\n if (value.charAt(iValue) !== format.charAt(iFormat)) {\n throw \"Unexpected literal at position \" + iValue;\n }\n iValue++;\n };\n if (this.view === 'month') {\n day = 1;\n }\n for (iFormat = 0; iFormat < format.length; iFormat++) {\n if (literal) {\n if (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n literal = false;\n }\n else {\n checkLiteral();\n }\n }\n else {\n switch (format.charAt(iFormat)) {\n case \"d\":\n day = getNumber(\"d\");\n break;\n case \"D\":\n getName(\"D\", this.getTranslation(primeng_api__WEBPACK_IMPORTED_MODULE_6__[\"TranslationKeys\"].DAY_NAMES_SHORT), this.getTranslation(primeng_api__WEBPACK_IMPORTED_MODULE_6__[\"TranslationKeys\"].DAY_NAMES));\n break;\n case \"o\":\n doy = getNumber(\"o\");\n break;\n case \"m\":\n month = getNumber(\"m\");\n break;\n case \"M\":\n month = getName(\"M\", this.getTranslation(primeng_api__WEBPACK_IMPORTED_MODULE_6__[\"TranslationKeys\"].MONTH_NAMES_SHORT), this.getTranslation(primeng_api__WEBPACK_IMPORTED_MODULE_6__[\"TranslationKeys\"].MONTH_NAMES));\n break;\n case \"y\":\n year = getNumber(\"y\");\n break;\n case \"@\":\n date = new Date(getNumber(\"@\"));\n year = date.getFullYear();\n month = date.getMonth() + 1;\n day = date.getDate();\n break;\n case \"!\":\n date = new Date((getNumber(\"!\") - this.ticksTo1970) / 10000);\n year = date.getFullYear();\n month = date.getMonth() + 1;\n day = date.getDate();\n break;\n case \"'\":\n if (lookAhead(\"'\")) {\n checkLiteral();\n }\n else {\n literal = true;\n }\n break;\n default:\n checkLiteral();\n }\n }\n }\n if (iValue < value.length) {\n extra = value.substr(iValue);\n if (!/^\\s+/.test(extra)) {\n throw \"Extra/unparsed characters found in date: \" + extra;\n }\n }\n if (year === -1) {\n year = new Date().getFullYear();\n }\n else if (year < 100) {\n year += new Date().getFullYear() - new Date().getFullYear() % 100 +\n (year <= shortYearCutoff ? 0 : -100);\n }\n if (doy > -1) {\n month = 1;\n day = doy;\n do {\n dim = this.getDaysCountInMonth(year, month - 1);\n if (day <= dim) {\n break;\n }\n month++;\n day -= dim;\n } while (true);\n }\n date = this.daylightSavingAdjust(new Date(year, month - 1, day));\n if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {\n throw \"Invalid date\"; // E.g. 31/02/00\n }\n return date;\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n\t\tvar tempConfig, bestMoment,\n\n\t\tscoreToBeat, i, currentScore;\n\n\t\tif (config._f.length === 0) {\n\t\t\tconfig._pf.invalidFormat = true;\n\t\t\tconfig._d = new Date(NaN);\n\t\t\treturn;\n\t\t}\n\n\t\tfor (i = 0; i < config._f.length; i++) {\n\t\t\tcurrentScore = 0;\n\t\t\ttempConfig = copyConfig({}, config);\n\t\t\tif (config._useUTC != null) {\n\t\t\t\ttempConfig._useUTC = config._useUTC;\n\t\t\t}\n\t\t\ttempConfig._pf = defaultParsingFlags();\n\t\t\ttempConfig._f = config._f[i];\n\t\t\tmakeDateFromStringAndFormat(tempConfig);\n\n\t\t\tif (!isValid(tempConfig)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// if there is any input that was not parsed add a penalty for that format\n\t\t\tcurrentScore += tempConfig._pf.charsLeftOver;\n\n\t\t\t//or tokens\n\t\t\tcurrentScore += tempConfig._pf.unusedTokens.length * 10;\n\n\t\t\ttempConfig._pf.score = currentScore;\n\n\t\t\tif (scoreToBeat == null || currentScore < scoreToBeat) {\n\t\t\t\tscoreToBeat = currentScore;\n\t\t\t\tbestMoment = tempConfig;\n\t\t\t}\n\t\t}\n\n\t\textend(config, bestMoment || tempConfig);\n\t}", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "function makeDateFromStringAndArray(config) {\n\t var tempConfig,\n\t bestMoment,\n\n\t scoreToBeat,\n\t i,\n\t currentScore;\n\n\t if (config._f.length === 0) {\n\t config._pf.invalidFormat = true;\n\t config._d = new Date(NaN);\n\t return;\n\t }\n\n\t for (i = 0; i < config._f.length; i++) {\n\t currentScore = 0;\n\t tempConfig = copyConfig({}, config);\n\t if (config._useUTC != null) {\n\t tempConfig._useUTC = config._useUTC;\n\t }\n\t tempConfig._pf = defaultParsingFlags();\n\t tempConfig._f = config._f[i];\n\t makeDateFromStringAndFormat(tempConfig);\n\n\t if (!isValid(tempConfig)) {\n\t continue;\n\t }\n\n\t // if there is any input that was not parsed add a penalty for that format\n\t currentScore += tempConfig._pf.charsLeftOver;\n\n\t //or tokens\n\t currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n\t tempConfig._pf.score = currentScore;\n\n\t if (scoreToBeat == null || currentScore < scoreToBeat) {\n\t scoreToBeat = currentScore;\n\t bestMoment = tempConfig;\n\t }\n\t }\n\n\t extend(config, bestMoment || tempConfig);\n\t }", "function makeDateFromStringAndFormat(config) {\n\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n\t if (config._f === moment.ISO_8601) {\n\t parseISO(config);\n\t return;\n\t }\n\n\t config._a = [];\n\t config._pf.empty = true;\n\n\t // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\t var string = '' + config._i,\n\t i, parsedInput, tokens, token, skipped,\n\t stringLength = string.length,\n\t totalParsedInputLength = 0;\n\n\t tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n\t for (i = 0; i < tokens.length; i++) {\n\t token = tokens[i];\n\t parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n\t if (parsedInput) {\n\t skipped = string.substr(0, string.indexOf(parsedInput));\n\t if (skipped.length > 0) {\n\t config._pf.unusedInput.push(skipped);\n\t }\n\t string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n\t totalParsedInputLength += parsedInput.length;\n\t }\n\t // don't parse if it's not a known token\n\t if (formatTokenFunctions[token]) {\n\t if (parsedInput) {\n\t config._pf.empty = false;\n\t }\n\t else {\n\t config._pf.unusedTokens.push(token);\n\t }\n\t addTimeToArrayFromToken(token, parsedInput, config);\n\t }\n\t else if (config._strict && !parsedInput) {\n\t config._pf.unusedTokens.push(token);\n\t }\n\t }\n\n\t // add remaining unparsed input length to the string\n\t config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n\t if (string.length > 0) {\n\t config._pf.unusedInput.push(string);\n\t }\n\n\t // handle am pm\n\t if (config._isPm && config._a[HOUR] < 12) {\n\t config._a[HOUR] += 12;\n\t }\n\t // if is 12 am, change hours to 0\n\t if (config._isPm === false && config._a[HOUR] === 12) {\n\t config._a[HOUR] = 0;\n\t }\n\n\t dateFromConfig(config);\n\t checkOverflow(config);\n\t }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n config._pf.iso = true;\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \"Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n dateFromConfig(config);\n checkOverflow(config);\n }", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n dateFromConfig(config);\n checkOverflow(config);\n }", "function stringToDate(_date,_format,_delimiter)\r\n{\r\n var formatLowerCase=_format.toLowerCase();\r\n var formatItems=formatLowerCase.split(_delimiter);\r\n var dateItems=_date.split(_delimiter);\r\n var monthIndex=formatItems.indexOf(\"mm\");\r\n var dayIndex=formatItems.indexOf(\"dd\");\r\n var yearIndex=formatItems.indexOf(\"yyyy\");\r\n var month=parseInt(dateItems[monthIndex]);\r\n month-=1;\r\n var formatedDate = new Date(dateItems[yearIndex],month,dateItems[dayIndex]);\r\n return formatedDate;\r\n}", "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n \n config._a = [];\n config._pf.empty = true;\n \n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n \n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n \n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n \n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n \n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "function stringToDate(_date,_format,_delimiter)\n{\n var formatLowerCase=_format.toLowerCase();\n var formatItems=formatLowerCase.split(_delimiter);\n var dateItems=_date.split(_delimiter);\n var monthIndex=formatItems.indexOf(\"mm\");\n var dayIndex=formatItems.indexOf(\"dd\");\n var yearIndex=formatItems.indexOf(\"yyyy\");\n var month=parseInt(dateItems[monthIndex]);\n month-=1;\n var formatedDate = new Date(dateItems[yearIndex],month,dateItems[dayIndex]);\n return formatedDate;\n}" ]
[ "0.6992324", "0.6912437", "0.6811143", "0.67375225", "0.67375225", "0.67375225", "0.67375225", "0.67375225", "0.67109895", "0.67109895", "0.67109895", "0.66975677", "0.65970886", "0.65863997", "0.65863997", "0.65736145", "0.65736145", "0.65736145", "0.65736145", "0.65736145", "0.65736145", "0.65736145", "0.65736145", "0.65625644", "0.6480043", "0.64605933", "0.64605933", "0.64605933", "0.64605933", "0.64605933", "0.6419801", "0.6419801", "0.6419801", "0.6419801", "0.6419088", "0.640779", "0.640779", "0.640779", "0.640779", "0.640779", "0.640779", "0.640779", "0.640779", "0.640779", "0.640779", "0.6400969", "0.6393603", "0.6393603", "0.6393603", "0.6392714", "0.6371693", "0.6371693", "0.6371693", "0.6371693", "0.6371693", "0.6371693", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6364184", "0.6356297", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6350513", "0.6349246", "0.6341507", "0.63415045", "0.63415045", "0.63415045", "0.6331202", "0.63261753", "0.63261753", "0.6323412", "0.6323412", "0.6299627", "0.6275333", "0.62741286" ]
0.0
-1
Pick a moment m from moments so that m[fn](other) is true for all other. This relies on the function fn to be transitive. moments should either be an array of moment objects or an array, whose first element is an array of moment objects.
function pickBy(fn, moments) { var res, i; if (moments.length === 1 && isArray(moments[0])) { moments = moments[0]; } if (!moments.length) { return createLocal(); } res = moments[0]; for (i = 1; i < moments.length; ++i) { if (!moments[i].isValid() || moments[i][fn](res)) { res = moments[i]; } } return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return moment();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }", "function pickBy(fn, moments) {\n\t\tvar res, i;\n\t\tif (moments.length === 1 && isArray(moments[0])) {\n\t\t\tmoments = moments[0];\n\t\t}\n\t\tif (!moments.length) {\n\t\t\treturn moment();\n\t\t}\n\t\tres = moments[0];\n\t\tfor (i = 1; i < moments.length; ++i) {\n\t\t\tif (moments[i][fn](res)) {\n\t\t\t\tres = moments[i];\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "function pickBy(fn, moments) {\n\t var res, i;\n\t if (moments.length === 1 && isArray(moments[0])) {\n\t moments = moments[0];\n\t }\n\t if (!moments.length) {\n\t return moment();\n\t }\n\t res = moments[0];\n\t for (i = 1; i < moments.length; ++i) {\n\t if (moments[i][fn](res)) {\n\t res = moments[i];\n\t }\n\t }\n\t return res;\n\t }", "function pickBy(fn, moments) {\n\t var res, i;\n\t if (moments.length === 1 && isArray(moments[0])) {\n\t moments = moments[0];\n\t }\n\t if (!moments.length) {\n\t return moment();\n\t }\n\t res = moments[0];\n\t for (i = 1; i < moments.length; ++i) {\n\t if (moments[i][fn](res)) {\n\t res = moments[i];\n\t }\n\t }\n\t return res;\n\t }", "function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }" ]
[ "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.7611965", "0.75762963", "0.75524974", "0.7440313", "0.7440313", "0.7295845" ]
0.0
-1
TODO: Use [].sort instead?
function min () { var args = [].slice.call(arguments, 0); return pickBy('isBefore', args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sort() {\n\t}", "sort() {\n\t}", "function Sort() {}", "sort(){\n\n }", "function sortItems(arr) {\r\n return arr.sort();\r\n}", "function sort(theArray){\n\n}", "function arrangeElements( array ) {\r\n\tarray = array.sort();\r\n\treturn array;\r\n}", "function alfa (arr){\n\tfor (var i = 0; i< arr.length;i++){\n\t\tarr[i].sort();\n\t}\n\treturn arr;\n}", "Sort() {\n\n }", "function Sort(arr)\n{\n\n}", "sort() {\n const ret = [].sort.apply(this, arguments);\n this._registerAtomic('$set', this);\n return ret;\n }", "sort() {\n const ret = [].sort.apply(this, arguments);\n this._registerAtomic('$set', this);\n return ret;\n }", "function sortFunction(val){\n return val.sort();\n}", "function dd(a){a=a.ob();for(var b=[],c=[],d=0;d<a.length;d++){var e=a[d].Lf;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort(ed);b.sort(ed);return[c,b]}", "function sort() {\n // // parse arguments into an array\n var args = [].slice.call(arguments);\n\n // // .. do something with each element of args\n // // YOUR CODE HERE\n var sortedargs = args.sort(function(a, b) {\n return a > b ? 1 : -1\n })\n return sortedargs\n}", "function Zc(a){a=a.Xb();for(var b=[],c=[],d=0;d<a.length;d++){var e=a[d].Zg;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort($c);b.sort($c);return[c,b]}", "function yg(a){a=a.Zb();for(var b=[],c=[],d=0;d<a.length;d++){var e=a[d].ah;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort(zg);b.sort(zg);return[c,b]}", "function sortArr(a, b){\n return a - b ;\n }", "function sort(argument) {\r\n return argument.sort();\r\n}", "function copySorted(arr) {\n return arr.slice().sort();\n}", "function sortData(data)\n\t{\n\t\tfor (let i = 0; i < data.length; i++)\n \t{\n\t \tfor (let j = 0; j < data.length - i - 1; j++)\n\t \t{\n\t \t\tif (+data[j].subCount < +data[j + 1].subCount)\n\t \t\t{\n\t \t\t\tlet tmp = data[j];\n\t \t\t\tdata[j] = data[j + 1];\n\t \t\t\tdata[j + 1] = tmp;\n\t \t\t}\n\t \t}\n \t}\n \treturn data;\n\t}", "function sortMyList() {\n seanBeanMovies.forEach(function(movie) {\n newar.push(movie);\n });\n console.log(newar.sort());\n}", "function sortArray(arr) {\r\n var temp = 0;\r\n for (var i = 0; i < arr.length; ++i) {\r\n for (var j = 0; j < arr.length - 1; ++j) {\r\n if (arr[j].name.charCodeAt(0) < arr[j + 1].name.charCodeAt(0)) {\r\n temp = arr[j + 1];\r\n arr[j + 1] = arr[j];\r\n arr[j] = temp;\r\n }\r\n }\r\n }\r\n console.log(arr);\r\n}", "function sortFunction(){\r\n // parse arguments into an array\r\n var args = [].slice.call(arguments);\r\n return args.sort();\r\n}", "sortBy(arr, compare) {\n let sorted = [];\n sorted = arr.sort(compare);\n return sorted;\n }", "function sortedUUIDs(arr) {\n return arr.map(function (el) {\n return el.uuid;\n }).sort();\n}", "function sortNameUp(arr) {\n return arr.sort()\n }", "function subSort(arr) {\n // didnt get this one. try again\n}", "function mergeSort(array) {\n\n}", "getSortArray() {\n const sortable = []; // {\"1\": 10, \"49\": 5}\n for (const key in this.numberPool) \n sortable.push([Number(key), this.numberPool[key]]);\n \n sortable.sort((a, b) => b[1] - a[1]); // Descending\n return sortable;\n }", "__getArray (sort) {\n sort = sort || 'id'\n\n let items = []\n\n this.state.data.forEach((item) => items.push(item))\n\n items.sort((a, b) => {\n if (a[sort] > b[sort]) return -1\n if (a[sort] < b[sort]) return 1\n return 0\n })\n\n return items\n }", "sort(callback) {\r\n return this.array.sort(callback);\r\n }", "function sortArr2(arr) {\n console.table(arr.sort((a, b) => a - b)\n );\n}", "function mergeSort(arr) {\n\n}", "function show(a) {\n a.sort();\n a.map( e => console.log(e) );\n}", "function sortArray1(arr) {\n return arr.sort((a, b) => a-b)\n}", "sortSpecies() {\n //Sortira igrace po vrsti\n for (let s of this.species) {\n s.sortSpecies();\n }\n\n //Sortira vrste po fitnesu najboljeg igraca\n let temp = [];\n for (let i = 0; i < this.species.length; i++) {\n let max = 0;\n let maxIndex = 0;\n for (let j = 0; j < this.species.length; j++) {\n if (this.species[j].bestFitness > max) {\n max = this.species[j].bestFitness;\n maxIndex = j;\n }\n }\n temp.push(this.species[maxIndex]);\n this.species.splice(maxIndex, 1);\n i--;\n }\n this.species = [];\n arrayCopy(temp, this.species);\n }", "function Ob(){for(var a=J.vb(),b=[],c=[],d=0;d<a.length;d++){var e=a[d].Ak;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort(Pb);b.sort(Pb);return[c,b]}", "sort() {\n for (let i = 0; i < this.values.length - 1; i++) {\n let min = i;\n for (let j = i + 1; j < this.values.length; j++) {\n if (this.values[j] < this.values[min]) min = j;\n }\n\n this.swap(i, min);\n }\n }", "_sortBy(array, selectors) {\n return array.concat().sort((a, b) => {\n for (let selector of selectors) {\n let reverse = selector.order ? -1 : 1;\n\n a = selector.value ? JP.query(a, selector.value)[0] : JP.query(a,selector)[0];\n b = selector.value ? JP.query(b, selector.value)[0] : JP.query(b,selector)[0];\n\n if (a.toUpperCase() > b.toUpperCase()) {\n return reverse;\n }\n if (a.toUpperCase() < b.toUpperCase()) {\n return -1 * reverse;\n }\n }\n return 0;\n });\n }", "function sortData (data) {\n ...\n}", "function start()\n{\n var a = [ 10, 1, 9, 2, 8, 3, 7, 4, 6, 5 ];\n\n outputArray( \"Data items in original order: \", a,\n document.getElementById( \"originalArray\" ) ); \n a.sort( compareIntegers ); // sort the array\n outputArray( \"Data items in ascending order: \", a,\n document.getElementById( \"sortedArray\" ) ); \n} // end function start", "sortedItems() {\n return this.childItems.slice().sort((i1, i2) => {\n return i1.index - i2.index;\n });\n }", "function sortJson() {\r\n\t \r\n}", "function myarrayresult(){\r\narray2.sort(function (a,b) {\r\n return a-b; //For assending order \r\n return b-a; //For descendening Order // Correct \r\n});\r\n}", "sort() {\n let a = this.array;\n const step = 1;\n let compares = 0;\n for (let i = 0; i < a.length; i++) {\n let tmp = a[i];\n for (var j = i; j >= step; j -= step) {\n this.store(step, i, j, tmp, compares);\n compares++;\n if (a[j - step] > tmp) {\n a[j] = a[j - step];\n this.store(step, i, j, tmp, compares);\n } else {\n break;\n }\n }\n a[j] = tmp;\n this.store(step, i, j, tmp, compares);\n }\n this.array = a;\n }", "function task14_16_10(){\n var scores =[320,230,480,120];\n document.write(\"Scores of Students : \"+scores + \"<br>\");\n scores.sort();\n document.write(\"Ordered Score of Students : \"+scores);\n}", "function baseSortBy(array, comparer) {\n var length = array.length;\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n}", "function copySorted(arr){\n let a=arr.slice(0);\n return a.sort();\n}", "function sortKids(mmdKidsList) {\r\n\t\tvar sortedList = [];\r\n\t\tif (mmdKidsList && mmdKidsList instanceof Array) {\r\n\t\t\tfor (var i = 0; i < mmdKidsList.length; i++){\r\n\t\t\t\tif (mmdKidsList[i].scalar){\r\n\t\t\t\t\tsortedList.push(mmdKidsList[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (var j = 0; j < mmdKidsList.length; j++){\r\n\t\t\t\tif (!mmdKidsList[j].scalar){\r\n\t\t\t\t\tsortedList.push(mmdKidsList[j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sortedList;\r\n \t}", "function sortVersionArray(arr) {\n return arr.map( a => a.replace(/\\d+/g, n => +n+100000 ) ).sort()\n .map( a => a.replace(/\\d+/g, n => +n-100000 ) );\n}", "function sortArray() {\n\n //PRZYPISANIE WARTOSCI DO TABLICY\n var points = [41, 3, 6, 1, 114, 54, 64];\n\n //SORTOWANIE OD NAJMNIEJSZEJ DO NAJWIEKSZEJ\n points.sort(function (a, b) {\n //POROWNANIE DWOCH ELEM. TABLICY - MNIEJSZY STAWIA PO LEWEJ, WIEKSZY PO PRAWEJ\n return a - b;\n });\n\n //ZWROCENIE POSORTOWANEJ TABLICY\n return points;\n}", "function sort(unsortedArray) {\n // Your code here\n}", "function testSorts()\n{\n\n\tconsole.log(\"============= original googleResults =============\");\n\tconsole.log(googleResults);\n\t\n\tconsole.log(\"==== before sort array element index name rating ====\");\n\t\n\tgoogleResults.forEach(function(element,index)\n\t{\n\t\t console.log(index + \": name: \" + element.name + \" rating: \" + element.rating);\n\n\t});\n\n\t\t// commented for testing\n\t\t//googleResults.sortByRatingAscending();\n\t\t\n\t\t// commented for testing\n\t\tgoogleResults.sortByRatingDescending();\n\t\t\n\t//===============================================================\t\n\n\tconsole.log(\"============= after sort =============\");\n\n\tgoogleResults.forEach(function(element,index)\n\t{\n\t\t console.log(index + \": name: \" + element.name + \" rating: \" + element.rating);\n\n\t});\n\t\n}//END test", "function sort(arr) {\n return null; \n}", "nameSort() {\n orders.sort( \n function(a,b) {\n return (a[0] < b[0]) ? -1 : (a[0] > b[0]) ? 1 : 0; \n }\n ); \n }", "function alphabeticalOrder(arr) {\n // Add your code below this line\n return arr.sort()\n\n // Add your code above this line\n}", "itemsToSort() {\n return [];\n }", "sort(){\n\t\tvar sortable = [];\n\t\tfor (var vehicle in this.primes) {\n\t\t sortable.push([vehicle, this.primes[vehicle]]);\n\t\t}\n\t\treturn sortable.sort(function(a, b) {\n\t\t return a[1] - b[1];\n\t\t});\n\t}", "function sortContacts(arr){\n arr.sort(function(a,b){\n if (a < b) return -1;\n else if (a > b) return 1;\n return 0;\n });\n return arr;\n }", "function sortMin(arr){\n arr = arr.sort(function(a, b){\n return a>b;\n });\n return arr; \n}", "sort() {\n const a = this.dict;\n const n = a.length;\n\n if( n < 2 ) { // eslint-disable-line \n } else if( n < 100 ) {\n // insertion sort\n for( let i = 1; i < n; i += 1 ) {\n const item = a[ i ];\n let j = i - 1;\n while( j >= 0 && item[ 0 ] < a[ j ][ 0 ] ) {\n a[ j + 1 ] = a[ j ];\n j -= 1;\n }\n a[ j + 1 ] = item;\n }\n } else {\n /**\n * Bottom-up iterative merge sort\n */\n for( let c = 1; c <= n - 1; c = 2 * c ) {\n for( let l = 0; l < n - 1; l += 2 * c ) {\n const m = l + c - 1;\n const r = Math.min( l + 2 * c - 1, n - 1 );\n if( m > r ) continue;\n merge( a, l, m, r );\n }\n }\n }\n }", "function treatArray(raw_arr)\n{\n var arr;\narr=sortArray(raw_arr)\narr=filterArray(arr)\nreturn arr\n}", "function sortArray(arr)\n{\n var abc = 'abcdefghijklmnopqrstuvwxyz';\n var dummy = [];\n\n var assignPriority = function (e)\n {\n if (e === \"...\")\n return ((27 + 1) * 26);\n\n var content = e.split('');\n if (isNaN(content[1]))\n return (((abc.indexOf(content[0]) + 1) * 26) * 100);\n\n return (content[1] * 10) + abc.indexOf(content[0]);\n }\n\n arr.forEach(function (e)\n {\n dummy.push(e);\n dummy.sort(function (a, b)\n {\n return assignPriority(a) - assignPriority(b);\n })\n });\n\n arr.length = 0;\n dummy.forEach(function (e)\n {\n if (arr.indexOf(e) === -1)\n {\n arr.push(e);\n }\n });\n}", "function sortedArr(arr) {\n const sortedArray = arr.slice().sort((a, b) => a - b)\n return sortedArray\n}", "function sortArguments(...args) {\n return args.sort();\n}", "sort() {\n if(this.data.length >= 2){\n for (var i = 0; i < this.data.length - 1; i++){\n for (var j = i + 1; j < this.data.length; j++){\n if (this.data[i].users.length < this.data[j].users.length){\n let tmp = this.data[i];\n this.data[i] = this.data[j];\n this.data[j] = tmp;\n \n }\n }\n \n }\n }\n }", "function sortArray() {\n //Twoj komentarz ...\n //deklaracje tablicy z elemtami\n var points = [41, 3, 6, 1, 114, 54, 64];\n\n //Twoj komentarz ...\n points.sort(function(a, b) {\n //Twoj komentarz ...\n\n return a - b;\n });\n\n //Twoj komentarz ...\n //zwrócenie tablicy points\n return points;\n}", "function bc(){for(var a=B.Za(),b=[],c=[],d=0;d<a.length;d++){var e=a[d].Hf;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort(cc);b.sort(cc);return[c,b]}", "sorted(x) {\n super.sorted(0, x);\n }", "sort () {\r\n this._data.sort((a, b) => a.sortOrder !== b.sortOrder ? b.sortOrder - a.sortOrder : a.value.localeCompare(b.value))\r\n }", "sortListItems() {\n let sortedItems = this.props.listItems.slice();\n return sortedItems.sort((a, b) => {\n if (a.value > b.value) {\n return -1;\n } else if (a.value < b.value) {\n return 1;\n }\n return 0;\n });\n }", "function alphabetSort(){\n const tilesArr = [\"Caribbean\", \"The Bahamans\", \"Mexico\", \"Europe\", \"Bermuda\", \"Alaska\", \"Canada & New England\", \"Hawaii\", \"Panama Canal\", \"Transatlantic\", \"Transpacific\", \"Australia\"];\n tilesArr.sort()\n console.log(tilesArr);\n}", "function sortPlaylist() {\n playlistArr = Object.entries(livePlaylist);\n\n if (playlistArr.length > 2) {\n var sorted = false;\n while (!sorted) {\n sorted = true;\n for (var i = 1; i < playlistArr.length - 1; i++) {\n if ((playlistArr[i][1].upvote < playlistArr[i + 1][1].upvote)) {\n sorted = false;\n var temp = playlistArr[i];\n playlistArr[i] = playlistArr[i + 1];\n playlistArr[i + 1] = temp;\n // })\n }\n // playlistArr[i][1].index = i;\n }\n }\n }\n return playlistArr;\n}", "function sort(compare, elements) {\n //let property = elements[property];\n \n if (Array.isArray(elements)) {\n if (elements.length <= 1) {\n return elements;\n }\n else {\n const middle = Math.floor(elements.length /2);\n \n const left = elements.slice(0, middle);\n const right = elements.slice(middle, elements.length);\n \n const leftSorted = sort(compare, left);\n const rightSorted = sort(compare, right);\n return merge(compare, leftSorted, rightSorted);\n }\n }\n return elements;\n}", "function _sort(array) {\n array.sort(function (a, b) {\n return b.length - a.length;\n });\n }", "function sort() {\n elementArray.sort(function (x, y) {\n return x.elem - y.elem;\n });\n render(elementArray);\n }", "function byAge(arr){\n return arr.sort(function(a, b){\n return a.age - b.age;\n });\n}", "function sort() {\n renderContent(numArray.sort());\n}", "_orderSort(l, r) {\n return l.order - r.order;\n }", "function ed(a){a=a.tc();for(var b=[],c=[],d=0;d<a.length;d++){var e=a[d].cA;e&&(e=e.call(a[d]))&&(e[2]?b.push(e):c.push(e))}c.sort(fd);b.sort(fd);return[c,b]}", "function sortList(a,b) {\n if (a.total < b.total)\n return -1;\n if (a.total > b.total)\n return 1;\n return 0;\n }", "function sortList(a,b) {\n if (a.total < b.total)\n return -1;\n if (a.total > b.total)\n return 1;\n return 0;\n }", "function ls (lista) {\nreturn lista.sort(function(x, y) {\n return y.length - x.length; \n })\n}", "function solution(nums){\n return Array.isArray(nums) ? nums.sort((a, b) => a - b) : [];\n}", "serialize() {\n //creates array with spread syntax, then sorts\n //not cross-compatible with some older versions of browsers like IE11\n const sorted = [...this.data];\n sorted.sort((a , b) => {\n return a.comparator - b.comparator;\n });\n return JSON.stringify(sorted);\n }", "serialize() {\n //creates array with spread syntax, then sorts\n //not cross-compatible with some older versions of browsers like IE11\n const sorted = [...this.data];\n sorted.sort((a , b) => {\n return a.comparator - b.comparator;\n });\n return JSON.stringify(sorted);\n }", "function qsort(l){\r\n return sortBy(compare, l);\r\n}", "function quickersort(a){\n var left = []\n , right = []\n , pivot = a[0]\n if(a.length == 0){\n return []\n }\n for(var i = 1; i < a.length; i++){\n a[i] < pivot ? left.push(a[i]) : right.push(a[i])\n }\n return quickersort(left).concat(pivot, quickersort(right))\n}", "function sort(a, b) {\n return a - b;\n}", "function urutAscending(array) {\r\n array.sort((a, b) => {\r\n return a - b\r\n })\r\nreturn array;\r\n}", "function sort(array) {\n var buf;\n\n for (var j = 0; j < array.length-1; j++)\n for (var i = 0; i < array.length-j; i++) {\n if (array[i] > array[i+1]) {\n buf = array[i];\n array[i] = array[i+1];\n array[i+1] = buf;\n }\n }\n\n return array;\n }", "function mSort (array) {\n if (array.length === 1) {\n return array // return once we hit an array with a single item\n }\n const middle = Math.floor(array.length / 2) // get the middle item of the array rounded down\n const left = array.slice(0, middle) // items on the left side\n const right = array.slice(middle) // items on the right side\n return merge(\n mSort(left),\n mSort(right)\n )\n }", "function sortAsc(a, b) {\n return a[1] - b[1];\n }", "function sortScores(){\n //basically this function will take the two arrays, sort the scores, and set the index of the other\n //To print the high score page in order\n var tempScores = highScoreScores.slice(0);\n var tempNames = highScoreNames.slice(0);\n\n highScoreScores.sort(function(a,b){return b-a});\n for(i=0;i<tempNames.length;i++){\n //Have to admit, the following line of code gave me a headache, but I got it to work\n highScoreNames[i] = tempNames[tempScores.indexOf(highScoreScores[i])];\n }\n}", "async function TopologicalSort(){}", "sorted(matches) {\n // sort on i primary, j secondary\n return matches.sort((m1, m2) => (m1.i - m2.i) || (m1.j - m2.j));\n }", "function asc(arr) {\n\t arr.sort(function (a, b) {\n\t return a - b;\n\t });\n\t return arr;\n\t }", "function sortArray(){\n\n /*Uses the built in sort -method that can accept a function that specifies\n how the array should be sorted. In this case we want the array to be sorted\n based on the object's price. Lower priced cars go first.*/\n function compare(a,b) {\n if (a.price < b.price) return -1;\n if (a.price > b.price) return 1;\n return 0;\n }\n listOfCars.sort(compare);\n console.table(listOfCars);\n\n }", "function sortUnique(a, aRef) {\n return a.filter(function (s, i) {\n return (s && a.indexOf(s) === i);\n }).sort((aRef instanceof Array) ? function (a, b) {\n // Sort by reference string array\n var nA = aRef.indexOf(a),\n nB = aRef.indexOf(b);\n if (nA > -1 && nB > -1)\n return nA - nB;\n else\n return ascendNumeric(a, b);\n } : ascendNumeric);\n}", "function sort(arr) {\n var aux = new Array(arr.length);\n mergeSort(arr, aux, 0, arr.length - 1);\n}" ]
[ "0.76898605", "0.76898605", "0.7431569", "0.73816824", "0.722597", "0.70467216", "0.70034754", "0.698132", "0.69408303", "0.6881676", "0.6873754", "0.6873754", "0.683487", "0.6828153", "0.6822689", "0.68005455", "0.678884", "0.6772283", "0.6722359", "0.6710714", "0.6707308", "0.6704686", "0.67010194", "0.66987246", "0.6691354", "0.66738635", "0.6654174", "0.6646408", "0.6622058", "0.6616808", "0.6606702", "0.6583682", "0.6576973", "0.6575858", "0.65742755", "0.65676975", "0.6566166", "0.6563232", "0.6547169", "0.65400237", "0.65333575", "0.6482559", "0.6478265", "0.64772296", "0.64685214", "0.64404494", "0.6421202", "0.64123255", "0.6408173", "0.6406096", "0.6393698", "0.6392959", "0.63847035", "0.6380037", "0.6365073", "0.63600487", "0.6359684", "0.6353272", "0.63527066", "0.63526255", "0.63494897", "0.63445157", "0.6337815", "0.6337578", "0.63344884", "0.63336337", "0.63305974", "0.6329591", "0.6318442", "0.63151276", "0.6312318", "0.6309623", "0.6307509", "0.6307412", "0.63063383", "0.6305984", "0.6304533", "0.6302472", "0.63021904", "0.62975085", "0.62970626", "0.6295027", "0.6295027", "0.6293797", "0.6287295", "0.6280555", "0.6280555", "0.6277756", "0.6276575", "0.62742436", "0.6270855", "0.62705874", "0.62660074", "0.6263973", "0.6247801", "0.62460333", "0.6244123", "0.6243041", "0.62424666", "0.62385195", "0.62372476" ]
0.0
-1
Return a moment from input, that is local/utc/zone equivalent to model.
function cloneWithOffset(input, model) { var res, diff; if (model._isUTC) { res = model.clone(); diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api. res._d.setTime(res._d.valueOf() + diff); hooks.updateOffset(res, false); return res; } else { return createLocal(input).local(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeAs(input, model) {\n\t return model._isUTC ? moment(input).zone(model._offset || 0) :\n\t moment(input).local();\n\t }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "function makeAs(input, model) {\n\t var res, diff;\n\t if (model._isUTC) {\n\t res = model.clone();\n\t diff = (moment.isMoment(input) || isDate(input) ? +input : +moment(input)) - +res;\n\t // Use low-level api, because this fn is low-level api.\n\t res._d.setTime(+res._d + diff);\n\t moment.updateOffset(res, false);\n\t return res;\n\t } else {\n\t return moment(input).local();\n\t }\n\t }", "function makeAs(input, model) {\n\t\tvar res, diff;\n\t\tif (model._isUTC) {\n\t\t\tres = model.clone();\n\t\t\tdiff = (moment.isMoment(input) || isDate(input) ? +input : +moment(input)) - (+res);\n\t\t\t// Use low-level api, because this fn is low-level api.\n\t\t\tres._d.setTime(+res._d + diff);\n\t\t\tmoment.updateOffset(res, false);\n\t\t\treturn res;\n\t\t} else {\n\t\t\treturn moment(input).local();\n\t\t}\n\t}", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "function momentify(source) {\r\n return moment.utc(source);\r\n}", "parse(value) {\n return +moment.utc(value);\n }", "function makeMoment(args, parseAsUTC, parseZone) {\n var input = args[0];\n var isSingleString = args.length == 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n\n if (moment.isMoment(input)) {\n mom = moment.apply(null, args); // clone it\n transferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n }\n else if (isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args); // will be local\n }\n else { // \"parsing\" is required\n isAmbigTime = false;\n isAmbigZone = false;\n\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) { // let's record the inputted zone somehow\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n if (mom.utcOffset) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n else {\n mom.zone(input); // for moment-pre-2.9\n }\n }\n }\n }\n\n mom._fullCalendar = true; // flag for extended functionality\n\n return mom;\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function makeMoment(args, parseAsUTC, parseZone) {\n\t\tvar input = args[0];\n\t\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\t\tvar isAmbigTime;\n\t\tvar isAmbigZone;\n\t\tvar ambigMatch;\n\t\tvar mom;\n\n\t\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\t\telse { // \"parsing\" is required\n\t\t\tisAmbigTime = false;\n\t\t\tisAmbigZone = false;\n\n\t\t\tif (isSingleString) {\n\t\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\t\tinput += '-01';\n\t\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\t\tisAmbigTime = true;\n\t\t\t\t\tisAmbigZone = true;\n\t\t\t\t}\n\t\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\t\tisAmbigZone = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ($.isArray(input)) {\n\t\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\t// otherwise, probably a string with a format\n\n\t\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\t\tmom = moment.utc.apply(moment, args);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmom = moment.apply(null, args);\n\t\t\t}\n\n\t\t\tif (isAmbigTime) {\n\t\t\t\tmom._ambigTime = true;\n\t\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t\t}\n\t\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\t\tif (isAmbigZone) {\n\t\t\t\t\tmom._ambigZone = true;\n\t\t\t\t}\n\t\t\t\telse if (isSingleString) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tmom._fullCalendar = true; // flag for extended functionality\n\n\t\treturn mom;\n\t}", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar output; // an object with fields for the new FCMoment object\n\n\tif (moment.isMoment(input)) {\n\t\toutput = moment.apply(null, args); // clone it\n\n\t\t// the ambig properties have not been preserved in the clone, so reassign them\n\t\tif (input._ambigTime) {\n\t\t\toutput._ambigTime = true;\n\t\t}\n\t\tif (input._ambigZone) {\n\t\t\toutput._ambigZone = true;\n\t\t}\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\toutput = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC) {\n\t\t\toutput = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\toutput = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\toutput._ambigTime = true;\n\t\t\toutput._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\toutput._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\toutput.zone(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\treturn new FCMoment(output);\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar output; // an object with fields for the new FCMoment object\n\n\tif (moment.isMoment(input)) {\n\t\toutput = moment.apply(null, args); // clone it\n\n\t\t// the ambig properties have not been preserved in the clone, so reassign them\n\t\tif (input._ambigTime) {\n\t\t\toutput._ambigTime = true;\n\t\t}\n\t\tif (input._ambigZone) {\n\t\t\toutput._ambigZone = true;\n\t\t}\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\toutput = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC) {\n\t\t\toutput = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\toutput = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\toutput._ambigTime = true;\n\t\t\toutput._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\toutput._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\toutput.zone(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\treturn new FCMoment(output);\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input)) {\n\t\tmom = moment.apply(null, args); // clone it\n\t\ttransferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tif (mom.utcOffset) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmom.zone(input); // for moment-pre-2.9\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input)) {\n\t\tmom = moment.apply(null, args); // clone it\n\t\ttransferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tif (mom.utcOffset) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmom.zone(input); // for moment-pre-2.9\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input)) {\n\t\tmom = moment.apply(null, args); // clone it\n\t\ttransferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tif (mom.utcOffset) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmom.zone(input); // for moment-pre-2.9\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "function cloneWithOffset(input, model) {\n\tvar res, diff;\n\tif (model._isUTC) {\n\t\tres = model.clone();\n\t\tdiff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n\t\t// Use low-level api, because this fn is low-level api.\n\t\tres._d.setTime(res._d.valueOf() + diff);\n\t\thooks.updateOffset(res, false);\n\t\treturn res;\n\t} else {\n\t\treturn createLocal(input).local();\n\t}\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n if (parseAsUTC === void 0) { parseAsUTC = false; }\n if (parseZone === void 0) { parseZone = false; }\n var input = args[0];\n var isSingleString = args.length === 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args);\n }\n else { // \"parsing\" is required\n isAmbigTime = false;\n isAmbigZone = false;\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) { // let's record the inputted zone somehow\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n }\n }\n mom._fullCalendar = true; // flag for extended functionality\n return mom;\n}", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "function makeMoment(args, parseAsUTC, parseZone) {\n if (parseAsUTC === void 0) { parseAsUTC = false; }\n if (parseZone === void 0) { parseZone = false; }\n var input = args[0];\n var isSingleString = args.length === 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args);\n }\n else {\n isAmbigTime = false;\n isAmbigZone = false;\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) {\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n }\n }\n mom._fullCalendar = true; // flag for extended functionality\n return mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n if (parseAsUTC === void 0) { parseAsUTC = false; }\n if (parseZone === void 0) { parseZone = false; }\n var input = args[0];\n var isSingleString = args.length === 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args);\n }\n else {\n isAmbigTime = false;\n isAmbigZone = false;\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) {\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n }\n }\n mom._fullCalendar = true; // flag for extended functionality\n return mom;\n}", "function makeMoment(args, parseAsUTC, parseZone) {\n if (parseAsUTC === void 0) { parseAsUTC = false; }\n if (parseZone === void 0) { parseZone = false; }\n var input = args[0];\n var isSingleString = args.length === 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args);\n }\n else {\n isAmbigTime = false;\n isAmbigZone = false;\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) {\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n }\n }\n mom._fullCalendar = true; // flag for extended functionality\n return mom;\n}", "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (constructor_1.isMoment(input) || is_date_1.default(input) ? input.valueOf() : local_1.createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks_1.hooks.updateOffset(res, false);\n return res;\n }\n else {\n return local_1.createLocal(input).local();\n }\n}" ]
[ "0.8501202", "0.84184194", "0.84184194", "0.84184194", "0.84184194", "0.84184194", "0.84184194", "0.84184194", "0.84184194", "0.84184194", "0.84184194", "0.84184194", "0.84184194", "0.84184194", "0.84184194", "0.84184194", "0.84184194", "0.84184194", "0.7951035", "0.7933913", "0.7897312", "0.7848992", "0.7848992", "0.7848992", "0.7848992", "0.7848992", "0.7848992", "0.7848992", "0.7848992", "0.7848992", "0.7848992", "0.7848992", "0.7848992", "0.7848992", "0.7848992", "0.71156484", "0.65993977", "0.6559306", "0.6544578", "0.6514949", "0.65121675", "0.65121675", "0.65121675", "0.65121675", "0.65121675", "0.65121675", "0.65121675", "0.65121675", "0.65121675", "0.65121675", "0.65121675", "0.65121675", "0.65121675", "0.64752877", "0.64752877", "0.64752877", "0.64752877", "0.64752877", "0.64036924", "0.64036924", "0.63839006", "0.63839006", "0.63839006", "0.6377099", "0.63654375", "0.6364716", "0.6364716", "0.63448894", "0.6328995", "0.6328995", "0.6328995", "0.63233906" ]
0.0
-1
MOMENTS keepLocalTime = true means only change the timezone, without affecting the local hour. So 5:31:26 +0300 [utcOffset(2, true)]> 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset +0200, so we adjust the time as needed, to be valid. Keeping the time actually adds/subtracts (one hour) from the actual represented time. That is why we call updateOffset a second time. In case it wants us to change the offset again _changeInProgress == true case, then we have to adjust, because there is no such time in the given timezone.
function getSetOffset (input, keepLocalTime, keepMinutes) { var offset = this._offset || 0, localAdjust; if (!this.isValid()) { return input != null ? this : NaN; } if (input != null) { if (typeof input === 'string') { input = offsetFromString(matchShortOffset, input); if (input === null) { return this; } } else if (Math.abs(input) < 16 && !keepMinutes) { input = input * 60; } if (!this._isUTC && keepLocalTime) { localAdjust = getDateOffset(this); } this._offset = input; this._isUTC = true; if (localAdjust != null) { this.add(localAdjust, 'm'); } if (offset !== input) { if (!keepLocalTime || this._changeInProgress) { addSubtract(this, createDuration(input - offset, 'm'), 1, false); } else if (!this._changeInProgress) { this._changeInProgress = true; hooks.updateOffset(this, true); this._changeInProgress = null; } } return this; } else { return this._isUTC ? offset : getDateOffset(this); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSetOffset(input,keepLocalTime){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN;}if(input!=null){if(typeof input==='string'){input=offsetFromString(matchShortOffset,input);}else if(Math.abs(input)<16){input=input*60;}if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this);}this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,'m');}if(offset!==input){if(!keepLocalTime||this._changeInProgress){add_subtract__addSubtract(this,create__createDuration(input-offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress=true;utils_hooks__hooks.updateOffset(this,true);this._changeInProgress=null;}}return this;}else{return this._isUTC?offset:getDateOffset(this);}}", "function getSetOffset(input,keepLocalTime){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN;}if(input!=null){if(typeof input==='string'){input=offsetFromString(matchShortOffset,input);}else if(Math.abs(input)<16){input=input*60;}if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this);}this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,'m');}if(offset!==input){if(!keepLocalTime||this._changeInProgress){add_subtract__addSubtract(this,create__createDuration(input-offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress=true;utils_hooks__hooks.updateOffset(this,true);this._changeInProgress=null;}}return this;}else{return this._isUTC?offset:getDateOffset(this);}}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\r\n var offset = this._offset || 0,\r\n localAdjust;\r\n if (input != null) {\r\n if (typeof input === 'string') {\r\n input = offsetFromString(input);\r\n }\r\n if (Math.abs(input) < 16) {\r\n input = input * 60;\r\n }\r\n if (!this._isUTC && keepLocalTime) {\r\n localAdjust = getDateOffset(this);\r\n }\r\n this._offset = input;\r\n this._isUTC = true;\r\n if (localAdjust != null) {\r\n this.add(localAdjust, 'm');\r\n }\r\n if (offset !== input) {\r\n if (!keepLocalTime || this._changeInProgress) {\r\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\r\n } else if (!this._changeInProgress) {\r\n this._changeInProgress = true;\r\n utils_hooks__hooks.updateOffset(this, true);\r\n this._changeInProgress = null;\r\n }\r\n }\r\n return this;\r\n } else {\r\n return this._isUTC ? offset : getDateOffset(this);\r\n }\r\n }", "function getSetOffset(input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(input);\n }\n if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(input);\n\t }\n\t if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(input);\n\t }\n\t if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset(input,keepLocalTime,keepMinutes){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN;}if(input!=null){if(typeof input==='string'){input=offsetFromString(matchShortOffset,input);if(input===null){return this;}}else if(Math.abs(input)<16&&!keepMinutes){input=input*60;}if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this);}this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,'m');}if(offset!==input){if(!keepLocalTime||this._changeInProgress){addSubtract(this,createDuration(input-offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress=true;hooks.updateOffset(this,true);this._changeInProgress=null;}}return this;}else{return this._isUTC?offset:getDateOffset(this);}}", "function getSetOffset(input,keepLocalTime,keepMinutes){var offset=this._offset||0,localAdjust;if(!this.isValid()){return input!=null?this:NaN;}if(input!=null){if(typeof input==='string'){input=offsetFromString(matchShortOffset,input);if(input===null){return this;}}else if(Math.abs(input)<16&&!keepMinutes){input=input*60;}if(!this._isUTC&&keepLocalTime){localAdjust=getDateOffset(this);}this._offset=input;this._isUTC=true;if(localAdjust!=null){this.add(localAdjust,'m');}if(offset!==input){if(!keepLocalTime||this._changeInProgress){addSubtract(this,createDuration(input-offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress=true;hooks.updateOffset(this,true);this._changeInProgress=null;}}return this;}else{return this._isUTC?offset:getDateOffset(this);}}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset(input,keepLocalTime,keepMinutes){var offset=this._offset || 0,localAdjust;if(!this.isValid()){return input != null?this:NaN;}if(input != null){if(typeof input === 'string'){input = offsetFromString(matchShortOffset,input);if(input === null){return this;}}else if(Math.abs(input) < 16 && !keepMinutes){input = input * 60;}if(!this._isUTC && keepLocalTime){localAdjust = getDateOffset(this);}this._offset = input;this._isUTC = true;if(localAdjust != null){this.add(localAdjust,'m');}if(offset !== input){if(!keepLocalTime || this._changeInProgress){addSubtract(this,createDuration(input - offset,'m'),1,false);}else if(!this._changeInProgress){this._changeInProgress = true;hooks.updateOffset(this,true);this._changeInProgress = null;}}return this;}else {return this._isUTC?offset:getDateOffset(this);}}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\r\n var offset = this._offset || 0,\r\n localAdjust;\r\n if (!this.isValid()) {\r\n return input != null ? this : NaN;\r\n }\r\n if (input != null) {\r\n if (typeof input === 'string') {\r\n input = offsetFromString(matchShortOffset, input);\r\n } else if (Math.abs(input) < 16) {\r\n input = input * 60;\r\n }\r\n if (!this._isUTC && keepLocalTime) {\r\n localAdjust = getDateOffset(this);\r\n }\r\n this._offset = input;\r\n this._isUTC = true;\r\n if (localAdjust != null) {\r\n this.add(localAdjust, 'm');\r\n }\r\n if (offset !== input) {\r\n if (!keepLocalTime || this._changeInProgress) {\r\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\r\n } else if (!this._changeInProgress) {\r\n this._changeInProgress = true;\r\n utils_hooks__hooks.updateOffset(this, true);\r\n this._changeInProgress = null;\r\n }\r\n }\r\n return this;\r\n } else {\r\n return this._isUTC ? offset : getDateOffset(this);\r\n }\r\n }", "function getSetOffset(input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset(input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset(input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n utils_hooks__hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset(input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }", "function getSetOffset(input, keepLocalTime) {\n\t var offset = this._offset || 0,\n\t localAdjust;\n\t if (!this.isValid()) {\n\t return input != null ? this : NaN;\n\t }\n\t if (input != null) {\n\t if (typeof input === 'string') {\n\t input = offsetFromString(matchShortOffset, input);\n\t } else if (Math.abs(input) < 16) {\n\t input = input * 60;\n\t }\n\t if (!this._isUTC && keepLocalTime) {\n\t localAdjust = getDateOffset(this);\n\t }\n\t this._offset = input;\n\t this._isUTC = true;\n\t if (localAdjust != null) {\n\t this.add(localAdjust, 'm');\n\t }\n\t if (offset !== input) {\n\t if (!keepLocalTime || this._changeInProgress) {\n\t add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n\t } else if (!this._changeInProgress) {\n\t this._changeInProgress = true;\n\t utils_hooks__hooks.updateOffset(this, true);\n\t this._changeInProgress = null;\n\t }\n\t }\n\t return this;\n\t } else {\n\t return this._isUTC ? offset : getDateOffset(this);\n\t }\n\t }", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}", "function getSetOffset (input, keepLocalTime) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}" ]
[ "0.6657817", "0.6657817", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.66170067", "0.6590781", "0.659004", "0.6587121", "0.6545045", "0.6545045", "0.653634", "0.653634", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6440821", "0.6437548", "0.6432229", "0.64310664", "0.6423958", "0.642174", "0.642174", "0.6387265", "0.6387265", "0.6387265", "0.6387265", "0.6387265", "0.6387265", "0.6387265", "0.6387265", "0.6387265", "0.6387265", "0.6377344", "0.63595915", "0.6352759", "0.6352759", "0.6352759", "0.6352759", "0.6352759", "0.6352759", "0.6352759", "0.6352759", "0.6352759", "0.6352759", "0.6352759", "0.6352759" ]
0.0
-1
TODO: remove 'name' arg after deprecation is removed
function createAdder(direction, name) { return function (val, period) { var dur, tmp; //invert the arguments, but complain about it if (period !== null && !isNaN(+period)) { deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); tmp = val; val = period; period = tmp; } val = typeof val === 'string' ? +val : val; dur = createDuration(val, period); addSubtract(this, dur, direction); return this; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setName(name) { }", "constructor(name) {\n super(name);\n this.name = name;\n }", "constructor(name) {\n this.name = name;\n }", "constructor(name) {\n this.name = name;\n }", "constructor(name) {\n this.name = name;\n }", "constructor(name) {\n this.name = name;\n }", "constructor(name) {\n this._name = name;\n }", "constructor(name) {\n this._name = name;\n }", "constructor(name) {\n this._name = name;\n }", "constructor(name){\n this._name = name;\n }", "setName( name ) {\n this.name = name;\n }", "getName(newName) {\n this.name = newName;\n }", "setName(name) {\n\t\tthis.name = name;\n\t}", "constructor(name){\n this.name = name\n }", "constructor(name){\n this.name = name;\n }", "setName(name) {\n this.name = name;\n }", "setName(name) {\n this._name = name;\n }", "set type(name) {\n console.warn(\"prototype.type = 'ModelName' is deprecated, use static __name__ instead\");\n this.constructor.__name__ = name;\n }", "set name(x) { this._name = x; }", "get name() {return this._name;}", "get name() { return this._name; }", "get name() { return this._name; }", "get name() { return this._name; }", "get name() { return this._name; }", "get name() { return this._name; }", "get name() { return this._name; }", "get name() { return this._name; }", "get name() { return this._name; }", "setName(name){\n this.name = name;\n }", "set name(value) { this._name = value || \"unknown\"; }", "constructor({ name }) { // { name } is bringing in a object and deconstructing/ unpacking the object into the class \n this.name = name // name is the object you bring in, and this.name is this specific instance of the class is the name of it \n }", "getName() {}", "function getName() { return name; }", "get name() {\n return this.use().name;\n }", "function name(name) {\n return name;\n }", "setName(value){\n\t\tthis.name = value;\n\t}", "constructor(name='test') {\n this.name = name;\n }", "constructor() {\n super();\n this.name = 'none';\n }", "set setName(name){\n _name=name;\n }", "set name(newName) {\n this.setName(newName);\n }", "get name(): string { throw new Error(\"Member class not implemented\"); }", "set name(value) {\n\t\tthis._name = value;\n\t}", "name(name) {\n\t\tthis._name = name;\n\t\treturn this;\n\t}", "get name() {\r\n\t\treturn this._name;\r\n\t}", "name() { }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "getName() {\r\n return this.name;\r\n }", "name(str) {\n this._name = str;\n return this;\n }", "constructor(name) { // méthode constructor avec pour paramètre name\n super(name); // utiliser super pour appeler name\n this.name = \"Kuma\"; // le name devient Kuma\n }", "get name() {\n\t\treturn this.__name;\n\t}", "get name() {\n\t\treturn this.__name;\n\t}", "get name() {\n\t\treturn this.__name;\n\t}", "get name() {\n\t\treturn this.__name;\n\t}", "get name() {\n\t\treturn this.__name;\n\t}", "get name() {\n\t\treturn this.__name;\n\t}", "get name() {\n\t\treturn this.__name;\n\t}", "get name () {\n console.warn(\n 'Deprecation warning: \"channel.name\" is deprecated, use channel.channelName instead'\n )\n return this.channelName\n }", "get name() {\n \treturn 'Stephanie';\n }", "get name() {\r\n return this._name;\r\n }", "get name() {\n\t return this._name;\n\t }", "function getName() {\n\treturn name;\n}", "setName(namePicked) {\n this.name = namePicked; //refer to the object itself using 'this'\n }", "set name(newName) {\n if (newName) {\n this._name = newName;\n }\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "set name(newName) {\n this.setName(newName);\n }", "get name() {\n\t\treturn this._name;\n\t}", "get name() {\n\t\treturn this._name;\n\t}", "get name () {\n\t\treturn this._name;\n\t}", "get name () {\n\t\treturn this._name;\n\t}", "get name () {\n\t\treturn this._name;\n\t}", "get name () {\n\t\treturn this._name;\n\t}", "get name () {\n\t\treturn this._name;\n\t}", "get name () {\n\t\treturn this._name;\n\t}", "_$name() {\n super._$name();\n this._value.name = this._node.key.name;\n }", "function getName(name) {\n return name\n}", "constructor(transport, name) {\n super(transport);\n this.name = name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "get name() {\n return this._name;\n }", "function ensureNameField(desc) {\n desc.name = '';\n }", "get getName() {\n return this._name;\n }", "get name () {\n return this._name;\n }", "['@_name']() {\n super['@_name']();\n if (this._value.name) return;\n\n this._value.name = this._node.declarations[0].id.name;\n }", "function name() {}", "set name(newName) {\n\t this.setName(newName);\n\t }", "constructor () {\n this._name = 'u1';\n }", "get name() {}", "get name() {}", "get name() {}", "get name() {}" ]
[ "0.67782986", "0.6759405", "0.67381084", "0.67381084", "0.67381084", "0.67381084", "0.6733258", "0.6733258", "0.67120683", "0.66484624", "0.6612438", "0.6540716", "0.65202653", "0.65195", "0.6489472", "0.6465985", "0.6462259", "0.6415414", "0.6381141", "0.6297654", "0.6276111", "0.6276111", "0.6276111", "0.6276111", "0.6276111", "0.6276111", "0.6276111", "0.6276111", "0.6185439", "0.6112878", "0.60964316", "0.60552776", "0.6050006", "0.60477877", "0.60141873", "0.5992784", "0.5989703", "0.5979093", "0.5960276", "0.59392995", "0.5917421", "0.5909178", "0.5909035", "0.59078485", "0.59005576", "0.5888179", "0.5888179", "0.5888179", "0.5888179", "0.58705187", "0.58636767", "0.5862385", "0.5862183", "0.5862183", "0.5862183", "0.5862183", "0.5862183", "0.5862183", "0.5862183", "0.58525527", "0.58471906", "0.5845746", "0.58370185", "0.58324045", "0.5831436", "0.5828061", "0.5827184", "0.5827184", "0.58205706", "0.5813581", "0.5813581", "0.5809684", "0.5809684", "0.5809684", "0.5809684", "0.5809684", "0.5809684", "0.5802686", "0.58016807", "0.57931566", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.57724303", "0.5757861", "0.575781", "0.5756826", "0.5755341", "0.57532394", "0.5749995", "0.57188797", "0.5716756", "0.5716756", "0.5716756", "0.5716756" ]
0.0
-1
Return a human readable representation of a moment that can also be evaluated to get a new moment which is the same
function inspect () { if (!this.isValid()) { return 'moment.invalid(/* ' + this._i + ' */)'; } var func = 'moment'; var zone = ''; if (!this.isLocal()) { func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; zone = 'Z'; } var prefix = '[' + func + '("]'; var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY'; var datetime = '-MM-DD[T]HH:mm:ss.SSS'; var suffix = zone + '[")]'; return this.format(prefix + year + datetime + suffix); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inspect(){if(!this.isValid()){return'moment.invalid(/* '+this._i+' */)';}var func='moment';var zone='';if(!this.isLocal()){func=this.utcOffset()===0?'moment.utc':'moment.parseZone';zone='Z';}var prefix='['+func+'(\"]';var year=0<=this.year()&&this.year()<=9999?'YYYY':'YYYYYY';var datetime='-MM-DD[T]HH:mm:ss.SSS';var suffix=zone+'[\")]';return this.format(prefix+year+datetime+suffix);}", "function inspect(){if(!this.isValid()){return'moment.invalid(/* '+this._i+' */)';}var func='moment';var zone='';if(!this.isLocal()){func=this.utcOffset()===0?'moment.utc':'moment.parseZone';zone='Z';}var prefix='['+func+'(\"]';var year=0<=this.year()&&this.year()<=9999?'YYYY':'YYYYYY';var datetime='-MM-DD[T]HH:mm:ss.SSS';var suffix=zone+'[\")]';return this.format(prefix+year+datetime+suffix);}", "function inspect(){if(!this.isValid()){return 'moment.invalid(/* ' + this._i + ' */)';}var func='moment';var zone='';if(!this.isLocal()){func = this.utcOffset() === 0?'moment.utc':'moment.parseZone';zone = 'Z';}var prefix='[' + func + '(\"]';var year=0 <= this.year() && this.year() <= 9999?'YYYY':'YYYYYY';var datetime='-MM-DD[T]HH:mm:ss.SSS';var suffix=zone + '[\")]';return this.format(prefix + year + datetime + suffix);}", "function inspect () {\n\tif (!this.isValid()) {\n\t\treturn 'moment.invalid(/* ' + this._i + ' */)';\n\t}\n\tvar func = 'moment';\n\tvar zone = '';\n\tif (!this.isLocal()) {\n\t\tfunc = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n\t\tzone = 'Z';\n\t}\n\tvar prefix = '[' + func + '(\"]';\n\tvar year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n\tvar datetime = '-MM-DD[T]HH:mm:ss.SSS';\n\tvar suffix = zone + '[\")]';\n\n\treturn this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n\t if (!this.isValid()) {\n\t return 'moment.invalid(/* ' + this._i + ' */)';\n\t }\n\t var func = 'moment';\n\t var zone = '';\n\t if (!this.isLocal()) {\n\t func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n\t zone = 'Z';\n\t }\n\t var prefix = '[' + func + '(\"]';\n\t var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n\t var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n\t var suffix = zone + '[\")]';\n\t\n\t return this.format(prefix + year + datetime + suffix);\n\t }", "function inspect () {\n\t if (!this.isValid()) {\n\t return 'moment.invalid(/* ' + this._i + ' */)';\n\t }\n\t var func = 'moment';\n\t var zone = '';\n\t if (!this.isLocal()) {\n\t func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n\t zone = 'Z';\n\t }\n\t var prefix = '[' + func + '(\"]';\n\t var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n\t var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n\t var suffix = zone + '[\")]';\n\t\n\t return this.format(prefix + year + datetime + suffix);\n\t }", "function inspect () {\n\t if (!this.isValid()) {\n\t return 'moment.invalid(/* ' + this._i + ' */)';\n\t }\n\t var func = 'moment';\n\t var zone = '';\n\t if (!this.isLocal()) {\n\t func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n\t zone = 'Z';\n\t }\n\t var prefix = '[' + func + '(\"]';\n\t var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n\t var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n\t var suffix = zone + '[\")]';\n\t\n\t return this.format(prefix + year + datetime + suffix);\n\t }", "function inspect () {\n\t if (!this.isValid()) {\n\t return 'moment.invalid(/* ' + this._i + ' */)';\n\t }\n\t var func = 'moment';\n\t var zone = '';\n\t if (!this.isLocal()) {\n\t func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n\t zone = 'Z';\n\t }\n\t var prefix = '[' + func + '(\"]';\n\t var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n\t var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n\t var suffix = zone + '[\")]';\n\t\n\t return this.format(prefix + year + datetime + suffix);\n\t }", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n\t if (!this.isValid()) {\n\t return 'moment.invalid(/* ' + this._i + ' */)';\n\t }\n\t var func = 'moment';\n\t var zone = '';\n\t if (!this.isLocal()) {\n\t func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n\t zone = 'Z';\n\t }\n\t var prefix = '[' + func + '(\"]';\n\t var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n\t var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n\t var suffix = zone + '[\")]';\n\n\t return this.format(prefix + year + datetime + suffix);\n\t }", "function inspect () {\n\t if (!this.isValid()) {\n\t return 'moment.invalid(/* ' + this._i + ' */)';\n\t }\n\t var func = 'moment';\n\t var zone = '';\n\t if (!this.isLocal()) {\n\t func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n\t zone = 'Z';\n\t }\n\t var prefix = '[' + func + '(\"]';\n\t var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n\t var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n\t var suffix = zone + '[\")]';\n\n\t return this.format(prefix + year + datetime + suffix);\n\t }", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 < this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}", "function inspect () {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment';\n var zone = '';\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n var prefix = '[' + func + '(\"]';\n var year = (0 < this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';\n var datetime = '-MM-DD[T]HH:mm:ss.SSS';\n var suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}" ]
[ "0.7134383", "0.7134383", "0.71187127", "0.7092415", "0.70798695", "0.70798695", "0.70798695", "0.70798695", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.705595", "0.7052569", "0.7052569", "0.70486224", "0.70486224" ]
0.0
-1
If passed a locale key, it will set the locale for this instance. Otherwise, it will return the locale configuration variables for this instance.
function locale (key) { var newLocaleData; if (key === undefined) { return this._locale._abbr; } else { newLocaleData = getLocale(key); if (newLocaleData != null) { this._locale = newLocaleData; } return this; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function locale(key){var newLocaleData;if(key===undefined){return this._locale._abbr;}else{newLocaleData=getLocale(key);if(newLocaleData!=null){this._locale=newLocaleData;}return this;}}", "function locale(key){var newLocaleData;if(key===undefined){return this._locale._abbr;}else{newLocaleData=getLocale(key);if(newLocaleData!=null){this._locale=newLocaleData;}return this;}}", "function locale(key){var newLocaleData;if(key === undefined){return this._locale._abbr;}else {newLocaleData = getLocale(key);if(newLocaleData != null){this._locale = newLocaleData;}return this;}}", "function locale(key){var newLocaleData;if(key===undefined){return this._locale._abbr;}else{newLocaleData=locale_locales__getLocale(key);if(newLocaleData!=null){this._locale=newLocaleData;}return this;}}", "function locale(key){var newLocaleData;if(key===undefined){return this._locale._abbr;}else{newLocaleData=locale_locales__getLocale(key);if(newLocaleData!=null){this._locale=newLocaleData;}return this;}}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}", "function locale (key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}" ]
[ "0.72865367", "0.72865367", "0.7233091", "0.72062045", "0.72062045", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125", "0.7091125" ]
0.0
-1
actual modulo handles negative numbers (for dates before 1970):
function mod$1(dividend, divisor) { return (dividend % divisor + divisor) % divisor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mod (x, y) {return x < 0? y - (-x % y) : x % y;}", "function testRemainder_17() {\n assertEquals(-0, -0 % Number.MAX_VALUE);\n}", "function moduloWithNegativeZeroDividend(a, b, c)\n{\n var temp = a * b;\n return temp % c;\n}", "function modulo(dividend, divisor)\n{\n var epsilon = divisor / 10000;\n var remainder = dividend % divisor;\n\n if (Math.abs(remainder - divisor) < epsilon || Math.abs(remainder) < epsilon) {\n remainder = 0;\n }\n\n return remainder;\n}", "function modulo(dividend, divisor)\n{\n var epsilon = divisor / 10000;\n var remainder = dividend % divisor;\n\n if (Math.abs(remainder - divisor) < epsilon || Math.abs(remainder) < epsilon) {\n remainder = 0;\n }\n\n return remainder;\n}", "function modulo(dividend, divisor)\n{\n var epsilon = divisor / 10000;\n var remainder = dividend % divisor;\n\n if (Math.abs(remainder - divisor) < epsilon || Math.abs(remainder) < epsilon) {\n remainder = 0;\n }\n\n return remainder;\n}", "function positiveMod(quotient, divisor) {\n var regularMod = quotient % divisor;\n return regularMod < 0 ? regularMod + Math.abs(divisor) : regularMod; \n}", "function modulo(dividend, divisor) {\n var epsilon = divisor / 10000;\n var remainder = dividend % divisor;\n\n if (Math.abs(remainder - divisor) < epsilon || Math.abs(remainder) < epsilon) {\n remainder = 0;\n }\n\n return remainder;\n}", "function safe_mod(a, b) {\n if (b === 0) {\n return 0\n }\n\n return a % b\n}", "_mod(val) {\n if (this.pillar === false) return val\n return (val + this.largezero) % this.width\n }", "function mod( a, b ){ let v = a % b; return ( v < 0 )? b+v : v; }", "function mod(v, d) { return ((v % d) + d) % d; }", "function __Mod(a, b)\n{\n return a - (b * Math.floor(a / b));\n}", "function fixedModulus(a, b) {\n return ((a % b) + b) % b;\n}", "function mod(a, b) {\n\t return a - (b * Math.floor(a / b));\n\t}", "function mod(a, b) {\n\t return a - (b * Math.floor(a / b));\n\t}", "function mod(a, b) {\n\t return a - (b * Math.floor(a / b));\n\t}", "function mod(a, b){\r\n return a - (b * Math.floor(a / b));\r\n}", "function moduloWithNegativeZeroDivisor(a, b, c)\n{\n var temp = a * b;\n return c % temp;\n}", "function mod(a, b)\n{\n return a - (b * Math.floor(a / b));\n}", "function modulo (x,y){\nif( x< y){\n\treturn x;\n }\n\twhile(x >=0){\n x= x-y;\n }\n return y+x;\n\t}", "function mathModulo(n, d) {\n return ((n % d) + d) % d;\n}", "function caml_mod(x,y) {\n if (y == 0) caml_raise_zero_divide ();\n return x%y;\n}", "function mod(a, b) {\n return a - (b * Math.floor(a / b));\n}", "function mod(a, b) {\n return a - (b * Math.floor(a / b));\n}", "function mod(a, b) {\n return a - (b * Math.floor(a / b));\n}", "function mod(a, b) {\n return a - (b * Math.floor(a / b));\n}", "function mod(a, b) {\n return a - (b * Math.floor(a / b));\n}", "function mod(a, b) {\n return a - (b * Math.floor(a / b));\n}", "function mod(a, b){return ((a%b)+b)%b;}", "function mod(a, b) {\n\n return a - (b * Math.floor(a / b));\n\n}", "function mod$1(dividend,divisor){return (dividend % divisor + divisor) % divisor;}", "function evansMod(i, mod) {\n while (i < 0) {\n i += mod;\n }\n return i % mod;\n}", "function moduloWithUnusedNegativeZeroDividend(a, b, c)\n{\n var temp = a * b;\n return (temp % c) | 0;\n}", "function mod(dividend, divisor) {\n let value = dividend % divisor;\n if (value < 0) value += divisor;\n return value;\n }", "_mod(val) {\r\n if (this.pillar === false) return val\r\n return (val + this.largezero) % this.grid.length\r\n }", "function fixedModulo(n, m) {\n return ((n % m) + m) % m;\n}", "function fixedModulo(n, m) {\n return ((n % m) + m) % m;\n}", "function fixedModulo(n, m) {\n return ((n % m) + m) % m;\n}", "function fixedModulo(n, m) {\n return ((n % m) + m) % m;\n}", "function fixedModulo(n, m) {\n return ((n % m) + m) % m;\n}", "function fixedModulo(n, m) {\n return ((n % m) + m) % m;\n}", "function fixedModulo(n, m) {\n return ((n % m) + m) % m;\n}", "function fixedModulo(n, m) {\n return ((n % m) + m) % m;\n}", "function fixedModulo(n, m) {\n return ((n % m) + m) % m;\n}", "function sc_modulo(x, y) {\n var remainder = x % y;\n // if they don't have the same sign\n if ((remainder * y) < 0)\n\treturn remainder + y;\n else\n\treturn remainder;\n}", "function remainder(x, y) {\nreturn x%y;\n}", "function fmod(a, n) {\n\treturn a - n * Math.floor(a / n);\n}", "function remainder(x, y) {\n return x % y;\n }", "function modnum(duration,num,sub){\n\n if(num - sub < 0){\n\treturn duration + (num - sub)%duration;\n }\n else{\n\treturn (num - sub)%duration;\n }\n \n}", "function goodMod(a, b)\n{\n return (b + (a%b)) % b;\n}", "remainder(seconds) {\n return (this.timestamp / (seconds * 1000)) % 1;\n }", "function Modulo(lastNum, secondToLastNum)\n{\n\n // Initialize result\n let result = 0;\n\n // calculating mod of b with a to make\n // b like 0 <= b < a\n for (let i = 0; i < secondToLastNum.length; i++)\n result = (result * 10 + secondToLastNum[i] - '0') % lastNum;\n\n return result; // return modulo\n}", "function modNoBug(num,den){\n\t\treturn ( (num % den ) + den ) % den;\n\t}", "function remainder(x, y) {\n return x % y;\n}", "function remainder(x, y) {\n var z = x/y\n if (z == 1){\n return 0\n } else {\n return x;\n }\n}", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function remainder(n, d) {\n return n % d;\n}", "function mod(v, d) {\n var out = v % d;\n return out < 0 ? out + d : out;\n}", "function mod (num, m) { return ((num % m) + m) % m; }", "function mod (num, m) { return ((num % m) + m) % m; }", "function mod (num, m) { return ((num % m) + m) % m; }", "function amod(a, b) {\n\t return mod(a - 1, b) + 1;\n\t}", "function mod(v, d) {\n var out = v % d;\n return out < 0 ? out + d : out;\n}", "function remainder(x,y){\n return x%y;\n}", "function mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n }", "function sc_remainder(x, y) {\n return x % y;\n}", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function modulus (x, y) {\n\treturn x % y;\n}", "static monthMod(month) {\n return month % 12\n }", "function mod(x, n) {\n const m = x % n;\n return m + (m && x * n < 0 ? n : 0); // add n when m is not 0 and x and n have different signs\n}", "function gmod(n,m){ return ((n%m)+m)%m; }", "function mod$1(dividend, divisor) {\n\t return (dividend % divisor + divisor) % divisor;\n\t }", "function mod(n,m){\n n = n%m;\n if(n<0) n+=m;\n return n;\n}", "function mod(dividend, divisor) {\r\n return (dividend % divisor + divisor) % divisor;\r\n }", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function mod$1(dividend, divisor) {\n\t return ((dividend % divisor) + divisor) % divisor;\n\t }", "function mod$1(dividend, divisor) {\n\t return ((dividend % divisor) + divisor) % divisor;\n\t }", "function mod$1(dividend, divisor) {\n\t return ((dividend % divisor) + divisor) % divisor;\n\t }", "function modul(x=null, y=null){\n\treturn x % y;\n}", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n}", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n}", "function isOddWithoutModulo(num) {\n // your code here\n if(num === 0) {\n return false;\n }\n // gets rid of negative signs\n num = Math.abs(num);\n\n while(num >= 2) {\n num -= 2;\n }\n if(num === 1) {\n return true;\n } else {\n return false;\n }\n }", "function mod(x, range) {\n if (x < range) return x;\n if (x >= range) return Math.abs(range - x);\n}", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n}", "function mod(a, b) {\n\treturn (a % b + b) % b\n}", "function mod(a, b) {\n return (a % b + b) % b\n}", "function amod(a, b)\n{\n return mod(a - 1, b) + 1;\n}", "function amod(a, b) {\n return mod(a - 1, b) + 1;\n}", "function amod(a, b) {\n return mod(a - 1, b) + 1;\n}", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }", "function reminderOf(number, number2){\n console.log(number % number2);\n}", "function resteDiv(a, b) {\n //% modulo divise a par b et donne le reste\n return a % b;\n}", "function caml_int64_mod (x, y)\n{\n if (caml_int64_is_zero (y)) caml_raise_zero_divide ();\n var sign = x[3] ^ y[3];\n if (x[3] & 0x8000) x = caml_int64_neg(x);\n if (y[3] & 0x8000) y = caml_int64_neg(y);\n var r = caml_int64_udivmod(x, y)[2];\n if (sign & 0x8000) r = caml_int64_neg(r);\n return r;\n}", "function mod(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n}" ]
[ "0.70117265", "0.6988928", "0.67461944", "0.6723841", "0.6723841", "0.6723841", "0.67018896", "0.6668628", "0.66457236", "0.66426545", "0.66215557", "0.66181666", "0.6584474", "0.65667367", "0.6554036", "0.6554036", "0.6554036", "0.6545891", "0.6529448", "0.64940953", "0.64859974", "0.64825517", "0.64562804", "0.64431137", "0.64431137", "0.64431137", "0.64431137", "0.64431137", "0.64431137", "0.6434866", "0.64278215", "0.6424459", "0.64116687", "0.6393036", "0.63902843", "0.6375703", "0.63663095", "0.63663095", "0.63663095", "0.63663095", "0.63663095", "0.63663095", "0.63663095", "0.63663095", "0.63663095", "0.6357605", "0.6355545", "0.63449776", "0.634417", "0.633955", "0.63368714", "0.62849355", "0.6254953", "0.6252996", "0.62028235", "0.6168243", "0.6164633", "0.6164048", "0.6159683", "0.6154499", "0.6154499", "0.6154499", "0.6153153", "0.61407936", "0.6136343", "0.6134193", "0.61232597", "0.61063886", "0.61031234", "0.6099689", "0.60925764", "0.60906124", "0.60884106", "0.607112", "0.6069998", "0.60698134", "0.60698134", "0.6065752", "0.6065752", "0.6065752", "0.60648054", "0.6055527", "0.6055527", "0.6052866", "0.6046964", "0.6044951", "0.60388947", "0.60355526", "0.60246277", "0.6021299", "0.6021299", "0.6012898", "0.6012898", "0.6012898", "0.6012898", "0.6012898", "0.6012898", "0.6010921", "0.60036904", "0.6003273", "0.60000134" ]
0.0
-1
() (5) (fmt, 5) (fmt) (true) (true, 5) (true, fmt, 5) (true, fmt)
function listWeekdaysImpl (localeSorted, format, index, field) { if (typeof localeSorted === 'boolean') { if (isNumber(format)) { index = format; format = undefined; } format = format || ''; } else { format = localeSorted; index = format; localeSorted = false; if (isNumber(format)) { index = format; format = undefined; } format = format || ''; } var locale = getLocale(), shift = localeSorted ? locale._week.dow : 0; if (index != null) { return get$1(format, (index + shift) % 7, field, 'day'); } var i; var out = []; for (i = 0; i < 7; i++) { out[i] = get$1(format, (i + shift) % 7, field, 'day'); } return out; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function foo5(a /* : number */, a2 /* : number */) /* : string => boolean => Foo */ {\n return s => b => ({\n moom: b,\n soup: s,\n nmb: a + a2 + 1\n })\n}", "function P$4(t){return t?[l$b(t[0]),l$b(t[1]),l$b(t[2]),l$b(t[3]),l$b(t[4]),l$b(t[5])]:[l$b(),l$b(),l$b(),l$b(),l$b(),l$b()]}", "function n$1(n,t){return n?t?4:3:t?3:2}", "function foo4(a /* : number */) /* : string => boolean => Foo */ {\n return s => b => ({\n moom: b,\n soup: s,\n nmb: a + 1\n })\n}", "function te(){var e;return Y(\"(\"),e=ge(),Y(\")\"),e}", "function cb_true_2(num) {\n print(\"element \" + num); // B3 B6 B9 B15 B18 B21 B27 B30 B33\n return true; // B4 B7 B10 B16 B19 B22 B28 B31 B34\n} // B5 B8 B11 B17 B20 B23 B29 B32 B35", "function P(a,c){return b.fn.format.call(a,c)}", "function example2 () {\n\n let sum = (a, b) => a + b\n \n function strParse (strings, ...params) {\n console.log(strings);\n console.log(strings.raw);\n console.log(params);\n }\n\n let a = 'test'\n let b = 13\n\n let s = strParse`Some ${a}\n string with another param ${b}\n and sum of 5 and 4, that is ${sum(5,4)}`\n}", "function show() {\n return x => x + arguments[0];\n}", "function process(tpl,state) {\n\tconst t = tpl.t, v = tpl.v, r = state.r;\n\tconst d = state.depth;\n\t// reset WS every time\n\tconst ws = state.ws;\n\tconst hasTag = state.hasTag;\n\t//console.log(t,v,ws,hasTag);\n\tstate.ws = false;\n\tstate.hasTag = 0;\n\t//console.log(t,v,tpl.o);\n\tif(t == 1) {\n\t\tif(v == 1) {\n\t\t\tconst last = r.lastChild();\n\t\t\tif(last && last.t === 2 && last.v == 2) {\n\t\t\t\t// 1. mark call\n\t\t\t\tstate.call[d] = true;\n\t\t\t\t//console.log(\"opencall\",d,_strip(r.peek()));\n\t\t\t\t// nest entire tree\n\t\t\t\t// 2. push comma\n\t\t\t\t// TODO add original position to comma\n\t\t\t\tr.mark(\"call\"+d).push(comma());\n\t\t\t} else {\n\t\t\t\tconst cur = r.peek();\n\t\t\t\tif(v == 1 && cur.t !== 6 && cur.t !== 10 && !(cur.t == 4 && (cur.v < 300 || cur.v > 2000))) {\n\t\t\t\t\t//console.log(cur.t,cur.v,cur.o);\n\t\t\t\t\tr.push(seq());\n\t\t\t\t}\n\t\t\t\tr.open(tpl);\n\t\t\t}\n\t\t} else if(v == 3 && state.xml) {\n\t\t\tr.open(tpl);\n\t\t} else {\n\t\t\tr.open(tpl);\n\t\t}\n\t} else if(t == 2) {\n\t\t// FIXME treat all infix-ops in same depth, not just on close\n\t\tstate.r.push(tpl).close();\n\t\tconst cd = d - 1;\n\t\tif(state.call[cd]) {\n\t\t\t// $(x)(2) => call($(x),2)\n\t\t\tstate.call[cd] = false;\n\t\t\t//console.log(\"call\",r.peek());\n\t\t\tr.unmark(\"call\"+cd).insertBefore(openParen()).openBefore({t:6,v:\"call\"}).close();\n\t\t}\n\t\t/*\n\t\t* 1 * 2 + 3\n\t\t* mult(1,2) + 3\n\t\t* 1 + 2 * 3\n\t\t* add(1,2) * 3 => pre, so nest in last\n\t\t* add(1,2 * 3))\n\t\t* add(1,mult(2,3)) => pre, so next in last (we're in subs, so openBefore )\n\t\t */\n\t\tif(state.infix[d]) {\n\t\t\t//console.log(\"peek-close\",_strip(r.peek()));\n\t\t\t// mark close so we can return to it\n\t\t\tr.mark(\"close\");\n\t\t\thandleInfix(state,d);\n\t\t\tr.unmark(\"close\");\n\t\t\tstate.infix[d] = null;\n\t\t}\n\t} else if(t == 4){\n\t\tif(v == 802 || v == 904 || v == 2005) {\n\t\t\tconst last = r.peek();\n\t\t\tconst test = last && (last.o || last.v);\n\t\t\tconst isEmpty = x => x && Triply.nextSibling(Triply.firstChild(x)) == Triply.lastChild(x);\n\t\t\tif(test && ((simpleTypes.includes(test) && isEmpty(last)) || complexTypes.includes(test) || kinds.includes(test))) {\n\t\t\t\ttpl.o = opMap[ v + 3000];\n\t\t\t\tstate.r.insertAfter(closeParen()).movePreviousSibling().insertBefore(openParen()).openBefore(tpl);\n\t\t\t\treturn state;\n\t\t\t} else if(last.t == 1 && last.v == 1) {\n\t\t\t\tconst prev = r.previous();\n\t\t\t\tconst test = prev && prev.o;\n\t\t\t\tif(test && complexTypes.includes(test)) {\n\t\t\t\t\tif(test == \"function\") {\n\t\t\t\t\t\t// convert function(*) to function((...),item()*)\n\t\t\t\t\t\tstate.r.push(seq()).open(openParen())\n\t\t\t\t\t\t\t.push({t:4,o:\"rest-params\"}).open(openParen()).push(closeParen()).close()\n\t\t\t\t\t\t\t.push(closeParen()).close().push(closeParen()).close()\n\t\t\t\t\t\t\t.push({t:4,o:\"any\"}).open(openParen()).push({t:4,o:\"item\"}).open(openParen()).push(closeParen()).close()\n\t\t\t\t\t\t\t.push(closeParen()).close();\n\t\t\t\t\t}\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(v == 505 && hasTag) {\n\t\t\t// TODO replace with tag and flag XML at depth\n\t\t\tr.pop();\n\t\t\tconst qname = state.qname;\n\t\t\tstate.qname = null;\n\t\t\tif(hasTag == 1) {\n\t\t\t\tr.push(openTag(qname,state.attrs));\n\t\t\t\tstate.xml++;\n\t\t\t\tstate.attrs = [];\n\t\t\t} else if(hasTag == 3 || hasTag == 6) {\n\t\t\t\tr.push(closeTag(qname));//.close();\n\t\t\t}\n\t\t\tstate.infix[d]--;\n\t\t\treturn state;\n\t\t} else if(v == 1901) {\n\t\t\tconst last = r.peek();\n\t\t\tif(last.t == 4 && last.v == 507) {\n\t\t\t\t// close tag\n\t\t\t\tif(hasTag) {\n\t\t\t\t\tconst qname = state.qname;\n\t\t\t\t\tr.pop();\n\t\t\t\t\tr.push(openTag(qname,state.attrs));\n\t\t\t\t\tr.push(tpl);\n\t\t\t\t\tstate.attrs = [];\n\t\t\t\t}\n\t\t\t\tstate.hasTag = hasTag + 2;\n\t\t\t\treturn state;\n\t\t\t}\n\t\t} else if(v == 2600) {\n\t\t\tconst prev = r.previousSibling();\n\t\t\tif(prev && prev.t == 1 && prev.v == 3) {\n\t\t\t\tprev.v += 2000;\n\t\t\t}\n\t\t\tconst last = r.peek(1);\n\t\t\tr.pop();\n\t\t\ttpl.o = last.v;\n\t\t} else if(v == 509 && hasTag == 5) {\n\t\t\t// NOTE treat attrs as pairs\n\t\t\tstate.hasTag = hasTag + 1;\n\t\t\treturn state;\n\t\t}\n\t\tif(v == 119 || v == 2005) {\n\t\t\tif(opMap.hasOwnProperty(v)) tpl.o = opMap[v];\n\t\t\tr.push(tpl).open(openParen()).push(closeParen()).close();\n\t\t} else if(v >= 300 && v < 2000) {\n\t\t\t// NOTE always add prefix to distinguish between infix operators and equivalent functions\n\t\t\tconst last = r.peek();\n\t\t\tconst unaryOp = (v == 801 || v == 802) && (!last || !last.t || last.t == 1 || last.t == 4);\n\t\t\tconst v1 = unaryOp ? v + 900 : v;\n\t\t\ttpl.v = v1;\n\t\t\tconst mappedOp = opMap.hasOwnProperty(v1) ? opMap[v1] : \"n:\"+tpl.o;\n\t\t\ttpl.o = mappedOp;\n\t\t\tr.push(tpl);\n\t\t\tif(!state.infix[d]) state.infix[d] = 0;\n\t\t\tr.mark(d+\":\"+state.infix[d]++);\n\t\t} else {\n\t\t\tr.push(tpl);\n\t\t}\n\t} else if(t == 6) {\n\t\tif(/^\\$/.test(v)) {\n\t\t\t// var\n\t\t\ttpl.v = v.replace(/^\\$/,\"\");\n\t\t\tif(/[0-9]/.test(tpl.v)) tpl.t = 8;\n\t\t\tr.push({t:10,v:\"$\",o:\"$\"}).open(openParen()).push(tpl).push(closeParen()).close();\n\t\t} else {\n\t\t\tconst last = r.peek();\n\t\t\tif(last.t == 4 && last.v == 507 && !ws) {\n\t\t\t\tstate.qname = v;\n\t\t\t\tstate.hasTag = hasTag + 1;\n\t\t\t\treturn state;\n\t\t\t} else if(hasTag == 4) {\n\t\t\t\tstate.hasTag = hasTag + 1;\n\t\t\t\tif(!state.attrs) state.attrs = [];\n\t\t\t\tstate.attrs.push([v]);\n\t\t\t} else {\n\t\t\t\tr.push(tpl);\n\t\t\t}\n\t\t}\n\t} else if(t === 0) {\n\t\tr.push(tpl);\n\t\tif(state.infix[d]) {\n\t\t\t// mark close so we can return to it\n\t\t\tr.mark(\"EOS\");\n\t\t\thandleInfix(state,d);\n\t\t\tr.unmark(\"EOS\");\n\t\t\tstate.infix[d] = null;\n\t\t}\n\t} else if(t === 17){\n\t\t// mark WS\n\t\tstate.ws = true;\n\t\tif(hasTag) state.hasTag = 4;\n\t} else {\n\t\tif(hasTag == 6) {\n\t\t\tstate.attrs.lastItem.push(v);\n\t\t\tstate.hasTag = 1;\n\t\t} else {\n\t\t\tr.push(tpl);\n\t\t}\n\t}\n\tstate.depth = tpl.d;\n\treturn state;\n}", "function assert(count, name, test){\n if(!count || !Array.isArray(count) || count.length !== 2) {\n count = [0, '*'];\n } else {\n count[1]++;\n }\n\n var pass = 'false';\n try {\n if (test()) {\n pass = ' true';\n count[0]++;\n }\n } catch(e) {}\n console.log(' ' + (count[1] + ') ').slice(0,5) + pass + ' : ' + name);\n}", "function foo5(f) { f(1, 2, 3, 4); }", "function printer(value){\r\n return value; // => example of a function that can optionally take arguments \r\n}", "function tb(a, b) { var d, e; if (1 === b.length && c(b[0]) && (b = b[0]), !b.length) return sb(); for (d = b[0], e = 1; e < b.length; ++e) b[e].isValid() && !b[e][a](d) || (d = b[e]); return d }", "function assert(count, name, test){\n if(!count || !Array.isArray(count) || count.length !== 2) { \n count = [0, '*']; \n } else {\n count[1]++;\n }\n \n var pass = 'false';\n var errMsg = null;\n try {\n if (test()) { \n pass = ' true';\n count[0]++;\n } \n } catch(e) {\n errMsg = e;\n } \n console.log(' ' + (count[1] + ') ').slice(0,5) + pass + ' : ' + name);\n if (errMsg !== null) {\n console.log(' ' + errMsg + '\\n');\n }\n}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function X(a){for(var b,c=[],d=/\\[([^\\]]*)\\]|\\(([^\\)]*)\\)|(LT|(\\w)\\4*o?)|([^\\w\\[\\(]+)/g;b=d.exec(a);)b[1]?// a literal string inside [ ... ]\nc.push(b[1]):b[2]?// non-zero formatting inside ( ... )\nc.push({maybe:X(b[2])}):b[3]?// a formatting token\nc.push({token:b[3]}):b[5]&&// an unenclosed literal string\nc.push(b[5]);return c}", "function five(string){\n console.log(string);\n console.log(string);\n console.log(string);\n console.log(string);\n console.log(string);\n}", "function genTernaryExp(el){return el.once?genOnce(el):genElement(el);}", "prettyPrintCallback( cb ) {\n // get rid of \"function gen\" and start with parenthesis\n // const shortendCB = cb.toString().slice(9)\n const cbSplit = cb.toString().split('\\n')\n const cbTrim = cbSplit.slice( 3, -2 )\n const cbTabbed = cbTrim.map( v => ' ' + v ) \n \n return cbTabbed.join('\\n')\n }", "function\n// a\nf\n// b\n(\n// c\nx\n// d\n,\n// e\ny\n// f\n)\n// g\n{\n// h\n;\n// i\n;\n// j\n}", "function xt(t,e){return null===t||!1===t||void 0===t?S[e]:(\"number\"===typeof t&&(t=String(t)),t=i.format.from(t),t=T.toStepping(t),!1===t||isNaN(t)?S[e]:t)}", "function tF() {\n \n // 0\n let z = 0;\n let zVal = z ? 'is truthy': 'is falsey';\n console.log(`0 ${zVal} because 0 is a false value`);\n // \"zero\";\n let zS = \"zero\";\n let zSVal = zS ? 'is truthy': 'is falsey';\n console.log(`\"zero\" ${zSVal} because it is a filled string`);\n // const zero = 20;\n const zero = 20;\n let zeroVal = zero ? 'is truthy': 'is falsey';\n console.log(`20 ${zeroVal} because it is a number despite the variable name being zero`);\n // null\n let n = null;\n let nVal = n ? 'is truthy': 'is falsey';\n console.log(`null ${nVal} because it is lacks any value at all`);\n // \"0\"\n let zStrNum = \"0\";\n let zStrNumVal = zStrNum ? 'is truthy': 'is falsey';\n console.log(`\"0\" ${zStrNumVal} because it is a string that contains a character`);\n // !\"\"\n let excl = !\"\";\n let exclVal = excl? 'is truthy': 'is falsey';\n console.log(`!\"\" ${exclVal} because the \"!\" reverts the false value of the empty string to be true`);\n // {}\n let brack = {};\n let brackVal = brack? 'is truthy': 'is falsey';\n console.log(`{} ${brackVal} because JavaScript recognizes it as truthy (honestly i dont understand why it is this way, it seems it should be falsey since no value is contained)`);\n // () => {console.log(\"hello TEKcamp!\");\n let fun = () => {console.log(\"hello TEKcamp!\")};\n let funVal = fun? 'is truthy': 'is falsey';\n console.log(`() => {console.log(\"hello TEKcamp!\")} ${funVal} because the function contains contains a return (console)`);\n // 125\n let onetwofive = 125;\n let otfVal = onetwofive? 'is truthy': 'is falsey';\n console.log(`125 ${otfVal} because it is a number and numbers other than 0 are truthy`);\n // undefined\n let und = undefined;\n let undVal = und? 'is truthy': 'is falsey';\n console.log(`undefined ${undVal} because it doesnt recognize a value being assigned`);\n // \"\"\n let empt = \"\";\n let emptVal = empt? 'is truthy': 'is falsey';\n console.log(`\"\" ${emptVal} because it it is an empty string`);\n }", "function it(t, n) {\n return t + \" \" + n + (1 === t ? \"\" : \"s\");\n}", "function t$i(t,...n){let o=\"\";for(let r=0;r<n.length;r++)o+=t[r]+n[r];return o+=t[t.length-1],o}", "function t(e){if(e)return n(e)}", "function callString(f) {\n return '(' + f.toString() + ')()';\n}", "function n(n,t){return n?t?4:3:t?3:2}", "function parseExp5(state) {\n return lift(state)\n .then(parseExp6)\n .then(opt(alt([ parseExp5$times, parseExp5$div ])));\n}", "function genTernaryExp(el){return altGen?altGen(el,state):el.once?genOnce(el,state):genElement(el,state);}", "function genTernaryExp(el){return altGen?altGen(el,state):el.once?genOnce(el,state):genElement(el,state);}", "function foo4(f) { f(1, 2, 3); }", "function tagFunction(strings, ...values) {\n let name = values[0];\n let age = values[1];\n if (age > 80) {\n return `${strings[0]}${values[0]}`;\n }\n return `${strings[0]}${name}${strings[1]}${age}${strings[2]}`;\n}", "function test_one(x,y) {\n var sink = x;\n\n//CHECK-NEXT: %0 = BinaryOperatorInst '+', %x, 2 : number\n//CHECK-NEXT: %1 = CallInst %x, undefined : undefined, %0 : string|number\n sink(x + 2);\n\n//CHECK-NEXT: %2 = CallInst %x, undefined : undefined, 4 : number\n sink(2 + 2);\n\n//CHECK-NEXT: %3 = BinaryOperatorInst '*', %x, 2 : number\n//CHECK-NEXT: %4 = BinaryOperatorInst '*', %x, 2 : number\n//CHECK-NEXT: %5 = BinaryOperatorInst '+', %3 : number, %4 : number\n//CHECK-NEXT: %6 = CallInst %x, undefined : undefined, %5 : number\n sink(x * 2 + x * 2);\n\n//CHECK-NEXT: %7 = AsInt32Inst %x\n//CHECK-NEXT: %8 = AsInt32Inst %x\n//CHECK-NEXT: %9 = BinaryOperatorInst '+', %7 : number, %8 : number\n//CHECK-NEXT: %10 = CallInst %x, undefined : undefined, %9 : number\n sink((x|0) + (x|0));\n\n//CHECK-NEXT: %11 = CallInst %x, undefined : undefined, \"hibye\" : string\n sink(\"hi\" + \"bye\");\n\n//CHECK-NEXT: %12 = BinaryOperatorInst '+', %x, %y\n//CHECK-NEXT: %13 = CallInst %x, undefined : undefined, %12 : string|number\n sink(x + y);\n\n//CHECK-NEXT: %14 = BinaryOperatorInst '+', \"hi\" : string, %y\n//CHECK-NEXT: %15 = CallInst %x, undefined : undefined, %14 : string\n sink(\"hi\" + y);\n\n//CHECK-NEXT: %16 = CallInst %x, undefined : undefined, 0 : number\n sink(null + null);\n\n//CHECK-NEXT: %17 = AllocObjectInst 0 : number, empty\n//CHECK-NEXT: %18 = AllocObjectInst 0 : number, empty\n//CHECK-NEXT: %19 = BinaryOperatorInst '+', %17 : object, %18 : object\n//CHECK-NEXT: %20 = CallInst %x, undefined : undefined, %19 : string|number\n sink({} + {});\n\n//CHECK-NEXT: %21 = CallInst %x, undefined : undefined, NaN : number\n sink(undefined + undefined);\n//CHECK-NEXT: %22 = ReturnInst undefined : undefined\n}", "function one(a, onecb) {\n console.log(a);\n //Since it is a function\n onecb(a+1,(c,threecb)=>{\n console.log(c);\n threecb(c+1,(e)=>{\n console.log(e);\n console.log(a)\n console.log(c)\n });\n });\n}", "function TStylingTupleSummary() {}", "static fStr3(x) {\nreturn this.fStr(x, 3);\n}", "static fStr3(x) {\nreturn this.fStr(x, 3);\n}", "function Format() {}", "function Format() {}", "function f11(str) {\n const stack = [];\n for (let i = 0; i < str.length; i++) {\n if (str[i] === '(') stack.push(str[i]);\n else if (str[i] === ')') stack.pop();\n }\n return !stack.length;\n}", "function testChaining(val) {\n if (val < 5) return \"Tiny\";\n else if (val < 10) return \"Small\";\n else if (val < 15) return \"Medium\";\n else if (val < 20) return \"Large\";\n else return \"Huge\";\n}", "function test (func, input, expected) { console.log(func.name, \"\\n got:\", applyMaybeCurriedArgs(func, input), \"\\n exp:\", expected) }", "function fifth() {}", "next(num, format) {\n return getOccurrences.call(this, num, format, \"next\")\n }", "function v17(v18,v19) {\n function v23(v24,v25) {\n const v26 = 13.37;\n // v26 = .float\n const v27 = 0;\n // v27 = .integer\n const v28 = 1;\n // v28 = .integer\n const v29 = 13.37;\n // v29 = .float\n const v30 = 0;\n // v30 = .integer\n const v31 = 1;\n // v31 = .integer\n }\n const v33 = [13.37,13.37,13.37,13.37];\n // v33 = .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 v36 = [1337];\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 v37 = [v36,arguments,arguments,\"65535\",arguments,13.37,13.37,1337,v33,1337];\n // v37 = .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 = v23(\"caller\",v37,...v37);\n // v40 = .unknown\n const v42 = [...v3,1337,-1.7976931348623157e+308];\n // v42 = .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 for (let v43 = 0; v43 < 1337; v43 = v43 + 1) {\n }\n}", "function logFive(sequence){\n\n for(var i =0;i<5;i++){\n if(!sequence.next()){\n break;\n \n }\n console.log(sequence.current());\n }\n\n}", "function i(e, t) {\n return e ? t ? 4 : 3 : t ? 3 : 2;\n }", "function TStylingTupleSummary(){}", "function TStylingTupleSummary() { }", "function be(t, n) {\n return t + \" \" + n + (1 === t ? \"\" : \"s\");\n}", "function isFive(input) {\n\n}", "function o0(o1,o2,o3)\n{\n try {\no4.o5(o39 === true + \" index:\" + o2 + \" Object:\" + o3);\n}catch(e){}\n try {\nreturn true;\n}catch(e){}\n}", "function a(n,t){0}", "function logFive(sequence) {\n for (var i = 0; i < 5; i++) {\n if (!sequence.next()) {\n break;\n } else {\n console.log(sequence.current());\n }\n }\n}", "function f(n1,n2,n3)\n{\nif (n1>n2 && n1>n3)\n{\n \n if(n2>n3)\n {\n \t document.write(n1 +\",\"+n2 +\",\"+n3 );\n\n }\n else{\n document.write(n1+ \",\"+n3+ \",\"+n2 );\n }\n}\nelse if (n2>n1 && n2>n3)\n{\n\n if(n1>n3)\n {\n \t document.write(n2+ \",\"+n1 +\",\"+n3 );\n\n }\n else\n {\n document.write(n2 +\",\"+n3+ \",\"+n1);\n }\n \n}\nelse if (n3>n1 && n3>n2) \n{\n if(n2>n1)\n {\n \t document.write(n3 +\",\"+n2+ \",\"+n1);\n\n }\n else\n {\n document.write(n3+ \",\"+n1+ \",\"+n2);\n }\n}\n}", "function fourth() {}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function n(e,t){0}", "function v19(v20,v21,v22) {\n for (let v25 = 0; v25 < 100; v25 = v25 + 3) {\n let v26 = 0;\n function v27(v28,v29,v30,v31,v32) {\n for (let v35 = v26; v35 < 100; v35 = v35 + 1100861557) {\n }\n }\n for (let v39 = 0; v39 < 100; v39 = v39 + 1) {\n const v43 = [NaN,-2987865916,\"flags\"];\n // v43 = .object(ofGroup: Array, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"reduce\", \"map\", \"forEach\", \"find\", \"keys\", \"indexOf\", \"copyWithin\", \"flatMap\", \"join\", \"reverse\", \"reduceRight\", \"unshift\", \"entries\", \"slice\", \"pop\", \"filter\", \"some\", \"lastIndexOf\", \"fill\", \"toLocaleString\", \"concat\", \"every\", \"values\", \"flat\", \"findIndex\", \"shift\", \"push\", \"sort\", \"splice\", \"includes\", \"toString\"])\n const v44 = v43.concat();\n // v44 = .object(ofGroup: Array, withProperties: [\"constructor\", \"__proto__\", \"length\"], withMethods: [\"reduce\", \"map\", \"forEach\", \"find\", \"keys\", \"indexOf\", \"copyWithin\", \"flatMap\", \"join\", \"reverse\", \"reduceRight\", \"unshift\", \"entries\", \"slice\", \"pop\", \"filter\", \"some\", \"lastIndexOf\", \"fill\", \"toLocaleString\", \"concat\", \"every\", \"values\", \"flat\", \"findIndex\", \"shift\", \"push\", \"sort\", \"splice\", \"includes\", \"toString\"])\n const v45 = v27(v26,v27,v27,v26,v27);\n // v45 = .unknown\n }\n }\n}" ]
[ "0.5453178", "0.5412745", "0.5401303", "0.53011155", "0.52496463", "0.5142132", "0.51295114", "0.50904226", "0.49952832", "0.49947372", "0.4975102", "0.49657133", "0.4916076", "0.49160433", "0.49117443", "0.49099278", "0.49099278", "0.49099278", "0.49099278", "0.49099278", "0.49099278", "0.49099278", "0.49099278", "0.49099278", "0.49099278", "0.49099278", "0.49099278", "0.49099278", "0.49099278", "0.49099278", "0.49099278", "0.48764563", "0.48743847", "0.48734418", "0.48516586", "0.48339307", "0.482889", "0.48277843", "0.48146173", "0.48121345", "0.48048168", "0.47988373", "0.47884405", "0.47784528", "0.4759549", "0.4759549", "0.4750859", "0.47503123", "0.4749974", "0.4747864", "0.47453278", "0.4733519", "0.4733519", "0.4726022", "0.4726022", "0.4723007", "0.47147438", "0.47101304", "0.46931425", "0.46872687", "0.4686793", "0.4677717", "0.467771", "0.46696502", "0.46629065", "0.4655086", "0.4648832", "0.46432403", "0.4641015", "0.4637408", "0.46360585", "0.46347693", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46285114", "0.46172306" ]
0.0
-1
supports only 2.0style add(1, 's') or add(duration)
function add$1 (input, value) { return addSubtract$1(this, input, value, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Duration(time) {\n var d = document.createElement('span');\n d.classList.add('duration');\n d.innerText = time;\n return d;\n}", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add(input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function addTwoSeconds(time){\n // Transform time to milliseconds\n var timeInMilliseconds = formattedTimeToMilliseconds(time);\n if (timeInMilliseconds == 0 || isNaN(timeInMilliseconds)){\n return 'ERROR';\n }\n // Add 2000 milliseconds\n var twoSecondsAdded = timeInMilliseconds + 2000;\n // Transform time to formatted time\n return millisecondsToFullTime(twoSecondsAdded);\n}", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "handleDurationChange() {\n this.setState({taskDuration: this.state.taskDuration.add(1, 's')});\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\r\n return duration_add_subtract__addSubtract(this, input, value, 1);\r\n }", "function duration_add_subtract__add (input, value) {\r\n return duration_add_subtract__addSubtract(this, input, value, 1);\r\n }", "setDuration(dur) {\nreturn this.duration = dur;\n}", "function duration_add_subtract__add(input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add(input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add(input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function formatDuration(duration) {\n if (duration < 1000) {\n duration += 'ms';\n } else if (duration > 1000) {\n duration /= 1000;\n duration += 's';\n }\n return duration;\n}", "parseDurationProp(newValue) {\n this.innerDuration = newValue ? newValue : \"2000ms\";\n }", "function add() {\n seconds++;\n if (seconds >= 60) {\n seconds = 0;\n minutes++;\n if (minutes >= 60) {\n minutes = 0;\n hours++;\n }\n }\n h2.textContent = (hours ? (hours > 9 ? hours : \"0\" + hours) : \"00\") + \":\" + (minutes ? (minutes > 9 ? minutes : \"0\" + minutes) : \"00\") + \":\" + (seconds > 9 ? seconds : \"0\" + seconds);\n timer();\n}", "addAttoseconds(value, createNew) {\n return this.addFractionsOfSecond(value, createNew, '_attosecond', '_femtosecond', 'addFemtoseconds');\n }", "function add(a,b) {\n\treturn a + b + new Date().getSeconds();\n}", "function add() {\n seconds++;\n if (seconds >= 60) {\n seconds = 0;\n minutes++;\n if (minutes >= 60) {\n minutes = 0;\n }\n }\n timer.textContent = (minutes ? (minutes > 9 ? minutes : \"0\" + minutes) : \"00\") +\n \":\" + (seconds > 9 ? seconds : \"0\" + seconds);\n startTimer();\n}", "function duration(s) {\n if (typeof(s) == 'number') return s;\n var units = {\n days: { rx:/(\\d+)\\s*d/, mul:86400 },\n hours: { rx:/(\\d+)\\s*h/, mul:3600 },\n minutes: { rx:/(\\d+)\\s*m/, mul:60 },\n seconds: { rx:/(\\d+)\\s*s/, mul:1 }\n };\n var result = 0, unit, match;\n if (typeof(s) == 'string') for (var key in units) {\n unit = units[key];\n match = s.match(unit.rx);\n if (match) result += parseInt(match[1])*unit.mul;\n }\n return result*1000;\n}", "function addOneSec() {\n sec += 1;\n updateTimer();\n waitOneSec();\n}", "function duration_ms(durations) {\n\n durations = durations.toString();\n durations = durations.replace(/ms/g, \"\");\n\n // result\n var duration = 0;\n var ms;\n\n // Is multi durations?\n if (durations.indexOf(\",\") != -1) {\n\n var durationsArray = durations.split(\",\");\n\n for (var i = 0; i < durationsArray.length; i++) {\n\n var val = durationsArray[i];\n\n // Has dot?\n if (val.indexOf(\".\") != -1) {\n\n ms = parseFloat(val).toString().split(\".\")[1].length;\n val = val.replace(\".\", \"\").toString();\n\n if (ms == 2) {\n val = val.replace(/s/g, \"0\");\n } else if (ms == 1) {\n val = val.replace(/s/g, \"00\");\n }\n\n } else {\n val = val.replace(/s/g, \"000\");\n }\n\n duration = parseFloat(duration) + parseFloat(val);\n\n }\n\n return duration;\n\n } else {\n\n // Has dot?\n if (durations.indexOf(\".\") != -1) {\n\n ms = parseFloat(durations).toString().split(\".\")[1].length;\n durations = durations.replace(\".\", \"\").toString();\n\n if (ms == 2) {\n durations = durations.replace(/s/g, \"0\");\n } else if (ms == 1) {\n durations = durations.replace(/s/g, \"00\");\n }\n\n } else {\n durations = durations.replace(/s/g, \"000\");\n }\n\n return durations;\n\n }\n\n }", "function timeAdd(element, start,stop){\n if(typeof(start)!=='number' && typeof(stop)!=='number' || start === stop){\n return;\n }\n start++;\n element.text(start);\n setTimeout(function(){timeAdd(element, start,stop);}, 25);\n}", "function parseDuration(duration) {\n if (!duration) {\n return {second: 1};\n } else if (typeof(duration) == \"string\") {\n var start = 0;\n var isReciprocal = false;\n if (duration.charAt(0) == \"/\") {\n isReciprocal = true;\n start = 1;\n }\n function complete(value) {\n if (isReciprocal)\n value.reciprocal = true;\n return value;\n }\n var type = duration.charAt(duration.length - 1);\n if (/\\d/.test(type)) {\n return complete({milli: Number(type)});\n } else {\n var count;\n if (start == duration.length - 1) {\n count = 1;\n } else {\n count = Number(duration.slice(start, duration.length - 1));\n }\n switch (type) {\n case \"s\":\n return complete({second: count});\n case \"m\":\n return complete({minute: count});\n case \"h\":\n return complete({hour: count});\n default:\n throw new Error(\"Couldn't parse duration \" + duration);\n }\n }\n } else {\n return duration;\n }\n }", "function Seconds() {\r\n}", "function getSecondsTime(duration) {\n if(typeof duration === \"number\") return duration;\n if(typeof duration !== \"string\") return 0;\n\n duration = duration.split(\":\");\n let time = 0;\n\n if(duration.length === 2) {\n time += Number(duration[0]) * 60;\n time += Number(duration[1]);\n } else if(duration.length === 3) {\n time += Number(duration[0]) * 3600;\n time += Number(duration[1]) * 60;\n time += Number(duration[2]);\n }\n\n return time;\n}", "addTime(s){\n if (timer.minutes === 59 && (timer.secondes + s) >= 60){\n timer.hours++\n timer.minutes = 0\n timer.secondes = (timer.secondes + s) - 60\n } else if (timer.secondes + s >= 60){\n timer.minutes++\n timer.secondes = (timer.secondes + s) - 60 \n } else {\n timer.secondes = timer.secondes + s\n }\n }", "set time(value) {}" ]
[ "0.643023", "0.6106225", "0.6106225", "0.6106225", "0.6106225", "0.6106225", "0.6106225", "0.6106225", "0.6106225", "0.6106225", "0.6106225", "0.6106225", "0.6106225", "0.60827976", "0.6059368", "0.6012889", "0.6012889", "0.60102654", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5892436", "0.5886133", "0.5886133", "0.5885011", "0.58435404", "0.58435404", "0.58435404", "0.58147985", "0.5786759", "0.57651365", "0.5760698", "0.5730581", "0.57165253", "0.5649154", "0.563932", "0.5621317", "0.5616228", "0.5607106", "0.5590432", "0.5587914", "0.5558475", "0.54503316" ]
0.0
-1
supports only 2.0style subtract(1, 's') or subtract(duration)
function subtract$1 (input, value) { return addSubtract$1(this, input, value, -1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract(input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, -1);\n\t }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract (input, value) {\r\n return duration_add_subtract__addSubtract(this, input, value, -1);\r\n }", "function duration_add_subtract__subtract (input, value) {\r\n return duration_add_subtract__addSubtract(this, input, value, -1);\r\n }", "function duration_add_subtract__subtract(input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract(input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__subtract(input, value) {\n return duration_add_subtract__addSubtract(this, input, value, -1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add(input, value) {\n\t return duration_add_subtract__addSubtract(this, input, value, 1);\n\t }", "function duration_add_subtract__add (input, value) {\r\n return duration_add_subtract__addSubtract(this, input, value, 1);\r\n }", "function duration_add_subtract__add (input, value) {\r\n return duration_add_subtract__addSubtract(this, input, value, 1);\r\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }", "function duration_add_subtract__add (input, value) {\n return duration_add_subtract__addSubtract(this, input, value, 1);\n }" ]
[ "0.73991525", "0.73991525", "0.73991525", "0.73991525", "0.73991525", "0.73991525", "0.73991525", "0.73991525", "0.73991525", "0.73991525", "0.73991525", "0.73991525", "0.7379139", "0.73621875", "0.73621875", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.72727096", "0.7266979", "0.7266979", "0.7232046", "0.7232046", "0.7232046", "0.66810256", "0.66810256", "0.6674499", "0.6674499", "0.6674499", "0.6674499", "0.6674499", "0.6674499", "0.6674499", "0.6674499", "0.6674499", "0.6674499", "0.6674499", "0.6674499", "0.66109866", "0.6610362", "0.6610362", "0.6587193", "0.6587193" ]
0.0
-1
helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(vf=c)),vf._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(vf=c)),vf._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(vf=c)),vf._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(vf=c)),vf._abbr}", "function formatHuman(value) {\n var time = moment(value).fromNow();\n time = time === 'a few seconds ago' ? 'seconds ago' : time;\n return time;\n }", "labelFunction(date) {\n return moment(date).fromNow();\n }", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function humanizeDuration(duration) {\n const months = duration.months();\n const weeks = duration.weeks();\n let days = duration.days();\n const hours = duration.hours();\n const minutes = duration.minutes();\n const seconds = duration.seconds();\n\n // console.log(duration);\n\n const str = [];\n\n if (weeks > 0) {\n const weekTitle = pluralize('week', weeks);\n str.push(`${weeks} ${weekTitle}`);\n }\n\n if (days > 0) {\n if (weeks > 0) days -= 7 * weeks;\n\n const dayTitle = pluralize('day', days);\n str.push(`${days} ${dayTitle}`);\n }\n\n if (hours > 0 && (weeks < 1 && days < 2)) {\n const hourTitle = pluralize('hour', hours);\n str.push(`${hours} ${hourTitle}`);\n }\n\n if (minutes > 0 && (weeks < 1 && days < 1)) {\n const minuteTitle = pluralize('minute', minutes);\n str.push(`${minutes} ${minuteTitle}`);\n }\n\n if (seconds > 0 && (weeks < 1 && hours < 1)) {\n const secondTitle = pluralize('second', seconds);\n str.push(`${seconds} ${secondTitle}`);\n }\n\n return str.join(' ');\n}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(qf=c)),qf._abbr}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(qf=c)),qf._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\n return a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\n return a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function $a(a,b){var c;\n// moment.duration._locale = moment._locale = data;\n return a&&(c=p(b)?bb(a):_a(a,b),c&&(xe=c)),xe._abbr}", "function T(a,b,c,d,e){var f;// works with moment-pre-2.8\n// Expand localized format strings, like \"LL\" -> \"MMMM D YYYY\"\n// BTW, this is not important for `formatDate` because it is impossible to put custom tokens\n// or non-zero areas in Moment's localized format strings.\nreturn a=Ia.moment.parseZone(a),b=Ia.moment.parseZone(b),f=(a.localeData||a.lang).call(a),c=f.longDateFormat(c)||c,d=d||\" - \",U(a,b,W(c),d,e)}// expose", "dateForHumans(item) {\n if (!item.date) return \"\";\n let startDate = DateTime.fromISO(item.date).toFormat(\"d LLLL yyyy\");\n if (!item.time && !item.enddate) return startDate;\n if (item.time) return `${startDate} at ${item.time}`;\n if (!item.enddate) return startDate;\n\n let endDate = DateTime.fromISO(item.enddate).toFormat(\"d LLLL yyyy\");\n return `${startDate} to ${endDate}`;\n }", "function humanizeStr(nd, s, en, o) {\n var r = Math.round,\n dir = en ? ' ago' : '前',\n pl = function(v, n) {\n return (s === undefined) ? n + (en ? ' ' : '') + v + (n > 1 && en ? 's' : '') + dir : n + v.substring(0, 1)\n },\n ts = Date.now() - new Date(nd).getTime(),\n ii;\n if( ts < 0 )\n {\n ts *= -1;\n dir = en ? ' from now' : '後';\n }\n for (var i in o) {\n if (r(ts) < o[i]) return pl(ii || 'm', r(ts / (o[ii] || 1)))\n ii = i;\n }\n return pl(i, r(ts / o[i]));\n}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}", "function oldMomentFormat(mom,formatStr){return oldMomentProto.format.call(mom,formatStr);// oldMomentProto defined in moment-ext.js\n}", "function relativeTimeWithPlural(number,withoutSuffix,key){var format={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},separator=\" \";return(number%100>=20||number>=100&&number%100===0)&&(separator=\" de \"),number+separator+format[key]}", "function humanizeDate(date) {\n return moment(date).format('lll');\n}", "fromNow(date /* , locale*/) {\n if (typeof date !== 'object') date = new Date(date);\n return moment(date).fromNow();\n }", "changeTimeFormatByTime(time) {\n if(time > moment().subtract(1, 'minutes')) {\n return time.startOf('second').fromNow();\n } else if(time > moment().subtract(1, 'hours')) {\n return time.startOf('minute').fromNow();\n } else if(time > moment().subtract(1, 'days')) {\n return time.format('h:mm:ss a');\n } else if(time > moment().subtract(1, 'years')) {\n return time.format(\"MMM Do\");\n } else {\n return time.format(\"MMM Do YYYY\");\n }\n }", "createdAgo(date) { return moment(date).fromNow() }", "function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture);}", "function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture);}", "function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture);}", "function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture);}", "function Za(a,b){var c;\n// moment.duration._locale = moment._locale = data;\n return a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}", "function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number || 1,!!withoutSuffix,string,isFuture);}", "function relativeTimeWithMutation(number,withoutSuffix,key){var format={'mm':'munutenn','MM':'miz','dd':'devezh'};return number + ' ' + mutation(format[key],number);}", "function relativeTimeWithPlural$2(number,withoutSuffix,key){var format={'ss':'secunde','mm':'minute','hh':'ore','dd':'zile','MM':'luni','yy':'ani'},separator=' ';if(number % 100 >= 20 || number >= 100 && number % 100 === 0){separator = ' de ';}return number + separator + format[key];}", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n\t var result = number + ' ';\n\t switch (key) {\n\t case 's':\n\t return withoutSuffix || isFuture\n\t ? 'nekaj sekund'\n\t : 'nekaj sekundami';\n\t case 'ss':\n\t if (number === 1) {\n\t result += withoutSuffix ? 'sekundo' : 'sekundi';\n\t } else if (number === 2) {\n\t result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n\t } else if (number < 5) {\n\t result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n\t } else {\n\t result += 'sekund';\n\t }\n\t return result;\n\t case 'm':\n\t return withoutSuffix ? 'ena minuta' : 'eno minuto';\n\t case 'mm':\n\t if (number === 1) {\n\t result += withoutSuffix ? 'minuta' : 'minuto';\n\t } else if (number === 2) {\n\t result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n\t } else if (number < 5) {\n\t result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n\t } else {\n\t result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n\t }\n\t return result;\n\t case 'h':\n\t return withoutSuffix ? 'ena ura' : 'eno uro';\n\t case 'hh':\n\t if (number === 1) {\n\t result += withoutSuffix ? 'ura' : 'uro';\n\t } else if (number === 2) {\n\t result += withoutSuffix || isFuture ? 'uri' : 'urama';\n\t } else if (number < 5) {\n\t result += withoutSuffix || isFuture ? 'ure' : 'urami';\n\t } else {\n\t result += withoutSuffix || isFuture ? 'ur' : 'urami';\n\t }\n\t return result;\n\t case 'd':\n\t return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n\t case 'dd':\n\t if (number === 1) {\n\t result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n\t } else if (number === 2) {\n\t result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n\t } else {\n\t result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n\t }\n\t return result;\n\t case 'M':\n\t return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n\t case 'MM':\n\t if (number === 1) {\n\t result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n\t } else if (number === 2) {\n\t result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n\t } else if (number < 5) {\n\t result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n\t } else {\n\t result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n\t }\n\t return result;\n\t case 'y':\n\t return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n\t case 'yy':\n\t if (number === 1) {\n\t result += withoutSuffix || isFuture ? 'leto' : 'letom';\n\t } else if (number === 2) {\n\t result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n\t } else if (number < 5) {\n\t result += withoutSuffix || isFuture ? 'leta' : 'leti';\n\t } else {\n\t result += withoutSuffix || isFuture ? 'let' : 'leti';\n\t }\n\t return result;\n\t }\n\t }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture ?\n 'nekaj sekund' :\n 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;}\n\n }", "function formatMoment(m, inputString) {\n var currentMonth = m.month(),\n currentDate = m.date(),\n currentYear = m.year(),\n currentDay = m.day(),\n currentHours = m.hours(),\n currentMinutes = m.minutes(),\n currentSeconds = m.seconds(),\n currentMilliseconds = m.milliseconds(),\n currentZone = -m.zone(),\n ordinal = moment.ordinal,\n meridiem = moment.meridiem;\n // check if the character is a format\n // return formatted string or non string.\n //\n // uses switch/case instead of an object of named functions (like http://phpjs.org/functions/date:380)\n // for minification and performance\n // see http://jsperf.com/object-of-functions-vs-switch for performance comparison\n function replaceFunction(input) {\n // create a couple variables to be used later inside one of the cases.\n var a, b;\n switch (input) {\n // MONTH\n case 'M' :\n return currentMonth + 1;\n case 'Mo' :\n return (currentMonth + 1) + ordinal(currentMonth + 1);\n case 'MM' :\n return leftZeroFill(currentMonth + 1, 2);\n case 'MMM' :\n return moment.monthsShort[currentMonth];\n case 'MMMM' :\n return moment.months[currentMonth];\n // DAY OF MONTH\n case 'D' :\n return currentDate;\n case 'Do' :\n return currentDate + ordinal(currentDate);\n case 'DD' :\n return leftZeroFill(currentDate, 2);\n // DAY OF YEAR\n case 'DDD' :\n a = new Date(currentYear, currentMonth, currentDate);\n b = new Date(currentYear, 0, 1);\n return ~~ (((a - b) / 864e5) + 1.5);\n case 'DDDo' :\n a = replaceFunction('DDD');\n return a + ordinal(a);\n case 'DDDD' :\n return leftZeroFill(replaceFunction('DDD'), 3);\n // WEEKDAY\n case 'd' :\n return currentDay;\n case 'do' :\n return currentDay + ordinal(currentDay);\n case 'ddd' :\n return moment.weekdaysShort[currentDay];\n case 'dddd' :\n return moment.weekdays[currentDay];\n // WEEK OF YEAR\n case 'w' :\n a = new Date(currentYear, currentMonth, currentDate - currentDay + 5);\n b = new Date(a.getFullYear(), 0, 4);\n return ~~ ((a - b) / 864e5 / 7 + 1.5);\n case 'wo' :\n a = replaceFunction('w');\n return a + ordinal(a);\n case 'ww' :\n return leftZeroFill(replaceFunction('w'), 2);\n // YEAR\n case 'YY' :\n return leftZeroFill(currentYear % 100, 2);\n case 'YYYY' :\n return currentYear;\n // AM / PM\n case 'a' :\n return meridiem ? meridiem(currentHours, currentMinutes, false) : (currentHours > 11 ? 'pm' : 'am');\n case 'A' :\n return meridiem ? meridiem(currentHours, currentMinutes, true) : (currentHours > 11 ? 'PM' : 'AM');\n // 24 HOUR\n case 'H' :\n return currentHours;\n case 'HH' :\n return leftZeroFill(currentHours, 2);\n // 12 HOUR\n case 'h' :\n return currentHours % 12 || 12;\n case 'hh' :\n return leftZeroFill(currentHours % 12 || 12, 2);\n // MINUTE\n case 'm' :\n return currentMinutes;\n case 'mm' :\n return leftZeroFill(currentMinutes, 2);\n // SECOND\n case 's' :\n return currentSeconds;\n case 'ss' :\n return leftZeroFill(currentSeconds, 2);\n // MILLISECONDS\n case 'S' :\n return ~~ (currentMilliseconds / 100);\n case 'SS' :\n return leftZeroFill(~~(currentMilliseconds / 10), 2);\n case 'SSS' :\n return leftZeroFill(currentMilliseconds, 3);\n // TIMEZONE\n case 'Z' :\n return (currentZone < 0 ? '-' : '+') + leftZeroFill(~~(Math.abs(currentZone) / 60), 2) + ':' + leftZeroFill(~~(Math.abs(currentZone) % 60), 2);\n case 'ZZ' :\n return (currentZone < 0 ? '-' : '+') + leftZeroFill(~~(10 * Math.abs(currentZone) / 6), 4);\n // LONG DATES\n case 'L' :\n case 'LL' :\n case 'LLL' :\n case 'LLLL' :\n case 'LT' :\n return formatMoment(m, moment.longDateFormat[input]);\n // DEFAULT\n default :\n return input.replace(/(^\\[)|(\\\\)|\\]$/g, \"\");\n }\n }\n return inputString.replace(formattingTokens, replaceFunction);\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n\n switch (key) {\n case 's':\n return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';\n\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n\n return result;\n\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n\n return result;\n\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n\n return result;\n\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n\n return result;\n\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n\n return result;\n\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function processRelativeTime(number,withoutSuffix,key,isFuture){var format={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return withoutSuffix?format[key][0]:format[key][1]}", "function toAgo(time){\n var strings = {\n suffixAgo: \"ago\",\n suffixFromNow: \"from now\",\n seconds: \"less than a minute\",\n minute: \"about a minute\",\n minutes: \"%d minutes\",\n hour: \"about an hour\",\n hours: \"about %d hours\",\n day: \"a day\",\n days: \"%d days\",\n month: \"about a month\",\n months: \"%d months\",\n year: \"about a year\",\n years: \"%d years\"\n };\n var $l = strings;\n var prefix = $l.prefixAgo;\n var suffix = $l.suffixAgo;\n\n var distanceMillis = new Date().getTime() - time;\n\n var seconds = distanceMillis / 1000;\n var minutes = seconds / 60;\n var hours = minutes / 60;\n var days = hours / 24;\n var years = days / 365;\n\n function substitute(string, number) {\n var value = ($l.numbers && $l.numbers[number]) || number;\n return string.replace(/%d/i, value);\n }\n\n var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) ||\n seconds < 90 && substitute($l.minute, 1) ||\n minutes < 45 && substitute($l.minutes, Math.round(minutes)) ||\n minutes < 90 && substitute($l.hour, 1) ||\n hours < 24 && substitute($l.hours, Math.round(hours)) ||\n hours < 48 && substitute($l.day, 1) ||\n days < 30 && substitute($l.days, Math.floor(days)) ||\n days < 60 && substitute($l.month, 1) ||\n days < 365 && substitute($l.months, Math.floor(days / 30)) ||\n years < 2 && substitute($l.year, 1) ||\n substitute($l.years, Math.floor(years));\n\n return [prefix, words, suffix].join(\" \").trim();\n}", "function formatMoment(m, inputString) {\n var currentMonth = m.month(),\n currentDate = m.date(),\n currentYear = m.year(),\n currentDay = m.day(),\n currentHours = m.hours(),\n currentMinutes = m.minutes(),\n currentSeconds = m.seconds(),\n currentZone = -m.zone(),\n ordinal = moment.ordinal,\n meridiem = moment.meridiem;\n // check if the character is a format\n // return formatted string or non string.\n //\n // uses switch/case instead of an object of named functions (like http://phpjs.org/functions/date:380)\n // for minification and performance\n // see http://jsperf.com/object-of-functions-vs-switch for performance comparison\n function replaceFunction(input) {\n // create a couple variables to be used later inside one of the cases.\n var a, b;\n switch (input) {\n // MONTH\n case 'M' :\n return currentMonth + 1;\n case 'Mo' :\n return (currentMonth + 1) + ordinal(currentMonth + 1);\n case 'MM' :\n return leftZeroFill(currentMonth + 1, 2);\n case 'MMM' :\n return moment.monthsShort[currentMonth];\n case 'MMMM' :\n return moment.months[currentMonth];\n // DAY OF MONTH\n case 'D' :\n return currentDate;\n case 'Do' :\n return currentDate + ordinal(currentDate);\n case 'DD' :\n return leftZeroFill(currentDate, 2);\n // DAY OF YEAR\n case 'DDD' :\n a = new Date(currentYear, currentMonth, currentDate);\n b = new Date(currentYear, 0, 1);\n return ~~ (((a - b) / 864e5) + 1.5);\n case 'DDDo' :\n a = replaceFunction('DDD');\n return a + ordinal(a);\n case 'DDDD' :\n return leftZeroFill(replaceFunction('DDD'), 3);\n // WEEKDAY\n case 'd' :\n return currentDay;\n case 'do' :\n return currentDay + ordinal(currentDay);\n case 'ddd' :\n return moment.weekdaysShort[currentDay];\n case 'dddd' :\n return moment.weekdays[currentDay];\n // WEEK OF YEAR\n case 'w' :\n a = new Date(currentYear, currentMonth, currentDate - currentDay + 5);\n b = new Date(a.getFullYear(), 0, 4);\n return ~~ ((a - b) / 864e5 / 7 + 1.5);\n case 'wo' :\n a = replaceFunction('w');\n return a + ordinal(a);\n case 'ww' :\n return leftZeroFill(replaceFunction('w'), 2);\n // YEAR\n case 'YY' :\n return leftZeroFill(currentYear % 100, 2);\n case 'YYYY' :\n return currentYear;\n // AM / PM\n case 'a' :\n return currentHours > 11 ? meridiem.pm : meridiem.am;\n case 'A' :\n return currentHours > 11 ? meridiem.PM : meridiem.AM;\n // 24 HOUR\n case 'H' :\n return currentHours;\n case 'HH' :\n return leftZeroFill(currentHours, 2);\n // 12 HOUR\n case 'h' :\n return currentHours % 12 || 12;\n case 'hh' :\n return leftZeroFill(currentHours % 12 || 12, 2);\n // MINUTE\n case 'm' :\n return currentMinutes;\n case 'mm' :\n return leftZeroFill(currentMinutes, 2);\n // SECOND\n case 's' :\n return currentSeconds;\n case 'ss' :\n return leftZeroFill(currentSeconds, 2);\n // TIMEZONE\n case 'zz' :\n // depreciating 'zz' fall through to 'z'\n case 'z' :\n return (m._d.toString().match(timezoneRegex) || [''])[0].replace(nonuppercaseLetters, '');\n case 'Z' :\n return (currentZone < 0 ? '-' : '+') + leftZeroFill(~~(Math.abs(currentZone) / 60), 2) + ':' + leftZeroFill(~~(Math.abs(currentZone) % 60), 2);\n case 'ZZ' :\n return (currentZone < 0 ? '-' : '+') + leftZeroFill(~~(10 * Math.abs(currentZone) / 6), 4);\n // LONG DATES\n case 'L' :\n case 'LL' :\n case 'LLL' :\n case 'LLLL' :\n case 'LT' :\n return formatMoment(m, moment.longDateFormat[input]);\n // DEFAULT\n default :\n return input.replace(/(^\\[)|(\\\\)|\\]$/g, \"\");\n }\n }\n return inputString.replace(charactersToReplace, replaceFunction);\n }", "function durationFormat() {\n\n var args = [].slice.call(arguments);\n var settings = extend({}, this.format.defaults);\n\n // Keep a shadow copy of this moment for calculating remainders.\n // Perform all calculations on positive duration value, handle negative\n // sign at the very end.\n var asMilliseconds = this.asMilliseconds();\n var asMonths = this.asMonths();\n\n // Treat invalid durations as having a value of 0 milliseconds.\n if (typeof this.isValid === \"function\" && this.isValid() === false) {\n asMilliseconds = 0;\n asMonths = 0;\n }\n\n var isNegative = asMilliseconds < 0;\n\n // Two shadow copies are needed because of the way moment.js handles\n // duration arithmetic for years/months and for weeks/days/hours/minutes/seconds.\n var remainder = moment.duration(Math.abs(asMilliseconds), \"milliseconds\");\n var remainderMonths = moment.duration(Math.abs(asMonths), \"months\");\n\n // Parse arguments.\n each(args, function (arg) {\n if (typeof arg === \"string\" || typeof arg === \"function\") {\n settings.template = arg;\n return;\n }\n\n if (typeof arg === \"number\") {\n settings.precision = arg;\n return;\n }\n\n if (isObject(arg)) {\n extend(settings, arg);\n }\n });\n\n var momentTokens = {\n years: \"y\",\n months: \"M\",\n weeks: \"w\",\n days: \"d\",\n hours: \"h\",\n minutes: \"m\",\n seconds: \"s\",\n milliseconds: \"S\"\n };\n\n var tokenDefs = {\n escape: /\\[(.+?)\\]/,\n years: /\\*?[Yy]+/,\n months: /\\*?M+/,\n weeks: /\\*?[Ww]+/,\n days: /\\*?[Dd]+/,\n hours: /\\*?[Hh]+/,\n minutes: /\\*?m+/,\n seconds: /\\*?s+/,\n milliseconds: /\\*?S+/,\n general: /.+?/\n };\n\n // Types array is available in the template function.\n settings.types = types;\n\n var typeMap = function (token) {\n return find(types, function (type) {\n return tokenDefs[type].test(token);\n });\n };\n\n var tokenizer = new RegExp(map(types, function (type) {\n return tokenDefs[type].source;\n }).join(\"|\"), \"g\");\n\n // Current duration object is available in the template function.\n settings.duration = this;\n\n // Eval template function and cache template string.\n var template = typeof settings.template === \"function\" ? settings.template.apply(settings) : settings.template;\n\n // outputTypes and returnMomentTypes are settings to support durationsFormat().\n\n // outputTypes is an array of moment token types that determines\n // the tokens returned in formatted output. This option overrides\n // trim, largest, stopTrim, etc.\n var outputTypes = settings.outputTypes;\n\n // returnMomentTypes is a boolean that sets durationFormat to return\n // the processed momentTypes instead of formatted output.\n var returnMomentTypes = settings.returnMomentTypes;\n\n var largest = settings.largest;\n\n // Setup stopTrim array of token types.\n var stopTrim = [];\n\n if (!outputTypes) {\n if (isArray(settings.stopTrim)) {\n settings.stopTrim = settings.stopTrim.join(\"\");\n }\n\n // Parse stopTrim string to create token types array.\n if (settings.stopTrim) {\n each(settings.stopTrim.match(tokenizer), function (token) {\n var type = typeMap(token);\n\n if (type === \"escape\" || type === \"general\") {\n return;\n }\n\n stopTrim.push(type);\n });\n }\n }\n\n // Cache moment's locale data.\n var localeData = moment.localeData();\n\n if (!localeData) {\n localeData = {};\n }\n\n // Fall back to this plugin's `eng` extension.\n each(keys(engLocale), function (key) {\n if (typeof engLocale[key] === \"function\") {\n if (!localeData[key]) {\n localeData[key] = engLocale[key];\n }\n\n return;\n }\n\n if (!localeData[\"_\" + key]) {\n localeData[\"_\" + key] = engLocale[key];\n }\n });\n\n // Replace Duration Time Template strings.\n // For locale `eng`: `_HMS_`, `_HM_`, and `_MS_`.\n each(keys(localeData._durationTimeTemplates), function (item) {\n template = template.replace(\"_\" + item + \"_\", localeData._durationTimeTemplates[item]);\n });\n\n // Determine user's locale.\n var userLocale = settings.userLocale || moment.locale();\n\n var useLeftUnits = settings.useLeftUnits;\n var usePlural = settings.usePlural;\n var precision = settings.precision;\n var forceLength = settings.forceLength;\n var useGrouping = settings.useGrouping;\n var trunc = settings.trunc;\n\n // Use significant digits only when precision is greater than 0.\n var useSignificantDigits = settings.useSignificantDigits && precision > 0;\n var significantDigits = useSignificantDigits ? settings.precision : 0;\n var significantDigitsCache = significantDigits;\n\n var minValue = settings.minValue;\n var isMinValue = false;\n\n var maxValue = settings.maxValue;\n var isMaxValue = false;\n\n // formatNumber fallback options.\n var useToLocaleString = settings.useToLocaleString;\n var groupingSeparator = settings.groupingSeparator;\n var decimalSeparator = settings.decimalSeparator;\n var grouping = settings.grouping;\n\n useToLocaleString = useToLocaleString && (toLocaleStringWorks || intlNumberFormatWorks);\n\n // Trim options.\n var trim = settings.trim;\n\n if (isArray(trim)) {\n trim = trim.join(\" \");\n }\n\n if (trim === null && (largest || maxValue || useSignificantDigits)) {\n trim = \"all\";\n }\n\n if (trim === null || trim === true || trim === \"left\" || trim === \"right\") {\n trim = \"large\";\n }\n\n if (trim === false) {\n trim = \"\";\n }\n\n var trimIncludes = function (item) {\n return item.test(trim);\n };\n\n var rLarge = /large/;\n var rSmall = /small/;\n var rBoth = /both/;\n var rMid = /mid/;\n var rAll = /^all|[^sm]all/;\n var rFinal = /final/;\n\n var trimLarge = largest > 0 || any([rLarge, rBoth, rAll], trimIncludes);\n var trimSmall = any([rSmall, rBoth, rAll], trimIncludes);\n var trimMid = any([rMid, rAll], trimIncludes);\n var trimFinal = any([rFinal, rAll], trimIncludes);\n\n // Parse format string to create raw tokens array.\n var rawTokens = map(template.match(tokenizer), function (token, index) {\n var type = typeMap(token);\n\n if (token.slice(0, 1) === \"*\") {\n token = token.slice(1);\n\n if (type !== \"escape\" && type !== \"general\") {\n stopTrim.push(type);\n }\n }\n\n return {\n index: index,\n length: token.length,\n text: \"\",\n\n // Replace escaped tokens with the non-escaped token text.\n token: (type === \"escape\" ? token.replace(tokenDefs.escape, \"$1\") : token),\n\n // Ignore type on non-moment tokens.\n type: ((type === \"escape\" || type === \"general\") ? null : type)\n };\n });\n\n // Associate text tokens with moment tokens.\n var currentToken = {\n index: 0,\n length: 0,\n token: \"\",\n text: \"\",\n type: null\n };\n\n var tokens = [];\n\n if (useLeftUnits) {\n rawTokens.reverse();\n }\n\n each(rawTokens, function (token) {\n if (token.type) {\n if (currentToken.type || currentToken.text) {\n tokens.push(currentToken);\n }\n\n currentToken = token;\n\n return;\n }\n\n if (useLeftUnits) {\n currentToken.text = token.token + currentToken.text;\n } else {\n currentToken.text += token.token;\n }\n });\n\n if (currentToken.type || currentToken.text) {\n tokens.push(currentToken);\n }\n\n if (useLeftUnits) {\n tokens.reverse();\n }\n\n // Find unique moment token types in the template in order of\n // descending magnitude.\n var momentTypes = intersection(types, unique(compact(pluck(tokens, \"type\"))));\n\n // Exit early if there are no moment token types.\n if (!momentTypes.length) {\n return pluck(tokens, \"text\").join(\"\");\n }\n\n // Calculate values for each moment type in the template.\n // For processing the settings, values are associated with moment types.\n // Values will be assigned to tokens at the last step in order to\n // assume nothing about frequency or order of tokens in the template.\n momentTypes = map(momentTypes, function (momentType, index) {\n // Is this the least-magnitude moment token found?\n var isSmallest = ((index + 1) === momentTypes.length);\n\n // Is this the greatest-magnitude moment token found?\n var isLargest = (!index);\n\n // Get the raw value in the current units.\n var rawValue;\n\n if (momentType === \"years\" || momentType === \"months\") {\n rawValue = remainderMonths.as(momentType);\n } else {\n rawValue = remainder.as(momentType);\n }\n\n var wholeValue = Math.floor(rawValue);\n var decimalValue = rawValue - wholeValue;\n\n var token = find(tokens, function (token) {\n return momentType === token.type;\n });\n\n if (isLargest && maxValue && rawValue > maxValue) {\n isMaxValue = true;\n }\n\n if (isSmallest && minValue && Math.abs(settings.duration.as(momentType)) < minValue) {\n isMinValue = true;\n }\n\n // Note the length of the largest-magnitude moment token:\n // if it is greater than one and forceLength is not set,\n // then default forceLength to `true`.\n //\n // Rationale is this: If the template is \"h:mm:ss\" and the\n // moment value is 5 minutes, the user-friendly output is\n // \"5:00\", not \"05:00\". We shouldn't pad the `minutes` token\n // even though it has length of two if the template is \"h:mm:ss\";\n //\n // If the minutes output should always include the leading zero\n // even when the hour is trimmed then set `{ forceLength: true }`\n // to output \"05:00\". If the template is \"hh:mm:ss\", the user\n // clearly wanted everything padded so we should output \"05:00\";\n //\n // If the user wants the full padded output, they can use\n // template \"hh:mm:ss\" and set `{ trim: false }` to output\n // \"00:05:00\".\n if (isLargest && forceLength === null && token.length > 1) {\n forceLength = true;\n }\n\n // Update remainder.\n remainder.subtract(wholeValue, momentType);\n remainderMonths.subtract(wholeValue, momentType);\n\n return {\n rawValue: rawValue,\n wholeValue: wholeValue,\n // Decimal value is only retained for the least-magnitude\n // moment type in the format template.\n decimalValue: isSmallest ? decimalValue : 0,\n isSmallest: isSmallest,\n isLargest: isLargest,\n type: momentType,\n // Tokens can appear multiple times in a template string,\n // but all instances must share the same length.\n tokenLength: token.length\n };\n });\n\n var truncMethod = trunc ? Math.floor : Math.round;\n var truncate = function (value, places) {\n var factor = Math.pow(10, places);\n return truncMethod(value * factor) / factor;\n };\n\n var foundFirst = false;\n var bubbled = false;\n\n var formatValue = function (momentType, index) {\n var formatOptions = {\n useGrouping: useGrouping,\n groupingSeparator: groupingSeparator,\n decimalSeparator: decimalSeparator,\n grouping: grouping,\n useToLocaleString: useToLocaleString\n };\n\n if (useSignificantDigits) {\n if (significantDigits <= 0) {\n momentType.rawValue = 0;\n momentType.wholeValue = 0;\n momentType.decimalValue = 0;\n } else {\n formatOptions.maximumSignificantDigits = significantDigits;\n momentType.significantDigits = significantDigits;\n }\n }\n\n if (isMaxValue && !bubbled) {\n if (momentType.isLargest) {\n momentType.wholeValue = maxValue;\n momentType.decimalValue = 0;\n } else {\n momentType.wholeValue = 0;\n momentType.decimalValue = 0;\n }\n }\n\n if (isMinValue && !bubbled) {\n if (momentType.isSmallest) {\n momentType.wholeValue = minValue;\n momentType.decimalValue = 0;\n } else {\n momentType.wholeValue = 0;\n momentType.decimalValue = 0;\n }\n }\n\n if (momentType.isSmallest || momentType.significantDigits && momentType.significantDigits - momentType.wholeValue.toString().length <= 0) {\n // Apply precision to least significant token value.\n if (precision < 0) {\n momentType.value = truncate(momentType.wholeValue, precision);\n } else if (precision === 0) {\n momentType.value = truncMethod(momentType.wholeValue + momentType.decimalValue);\n } else { // precision > 0\n if (useSignificantDigits) {\n if (trunc) {\n momentType.value = truncate(momentType.rawValue, significantDigits - momentType.wholeValue.toString().length);\n } else {\n momentType.value = momentType.rawValue;\n }\n\n if (momentType.wholeValue) {\n significantDigits -= momentType.wholeValue.toString().length;\n }\n } else {\n formatOptions.fractionDigits = precision;\n\n if (trunc) {\n momentType.value = momentType.wholeValue + truncate(momentType.decimalValue, precision);\n } else {\n momentType.value = momentType.wholeValue + momentType.decimalValue;\n }\n }\n }\n } else {\n if (useSignificantDigits && momentType.wholeValue) {\n // Outer Math.round required here to handle floating point errors.\n momentType.value = Math.round(truncate(momentType.wholeValue, momentType.significantDigits - momentType.wholeValue.toString().length));\n\n significantDigits -= momentType.wholeValue.toString().length;\n } else {\n momentType.value = momentType.wholeValue;\n }\n }\n\n if (momentType.tokenLength > 1 && (forceLength || foundFirst)) {\n formatOptions.minimumIntegerDigits = momentType.tokenLength;\n\n if (bubbled && formatOptions.maximumSignificantDigits < momentType.tokenLength) {\n delete formatOptions.maximumSignificantDigits;\n }\n }\n\n if (!foundFirst && (momentType.value > 0 || trim === \"\" /* trim: false */ || find(stopTrim, momentType.type) || find(outputTypes, momentType.type))) {\n foundFirst = true;\n }\n\n momentType.formattedValue = formatNumber(momentType.value, formatOptions, userLocale);\n\n formatOptions.useGrouping = false;\n formatOptions.decimalSeparator = \".\";\n momentType.formattedValueEn = formatNumber(momentType.value, formatOptions, \"en\");\n\n if (momentType.tokenLength === 2 && momentType.type === \"milliseconds\") {\n momentType.formattedValueMS = formatNumber(momentType.value, {\n minimumIntegerDigits: 3,\n useGrouping: false\n }, \"en\").slice(0, 2);\n }\n\n return momentType;\n };\n\n // Calculate formatted values.\n momentTypes = map(momentTypes, formatValue);\n momentTypes = compact(momentTypes);\n\n // Bubble rounded values.\n if (momentTypes.length > 1) {\n var findType = function (type) {\n return find(momentTypes, function (momentType) {\n return momentType.type === type;\n });\n };\n\n var bubbleTypes = function (bubble) {\n var bubbleMomentType = findType(bubble.type);\n\n if (!bubbleMomentType) {\n return;\n }\n\n each(bubble.targets, function (target) {\n var targetMomentType = findType(target.type);\n\n if (!targetMomentType) {\n return;\n }\n\n if (parseInt(bubbleMomentType.formattedValueEn, 10) === target.value) {\n bubbleMomentType.rawValue = 0;\n bubbleMomentType.wholeValue = 0;\n bubbleMomentType.decimalValue = 0;\n targetMomentType.rawValue += 1;\n targetMomentType.wholeValue += 1;\n targetMomentType.decimalValue = 0;\n targetMomentType.formattedValueEn = targetMomentType.wholeValue.toString();\n bubbled = true;\n }\n });\n };\n\n each(bubbles, bubbleTypes);\n }\n\n // Recalculate formatted values.\n if (bubbled) {\n foundFirst = false;\n significantDigits = significantDigitsCache;\n momentTypes = map(momentTypes, formatValue);\n momentTypes = compact(momentTypes);\n }\n\n if (outputTypes && !(isMaxValue && !settings.trim)) {\n momentTypes = map(momentTypes, function (momentType) {\n if (find(outputTypes, function (outputType) {\n return momentType.type === outputType;\n })) {\n return momentType;\n }\n\n return null;\n });\n\n momentTypes = compact(momentTypes);\n } else {\n // Trim Large.\n if (trimLarge) {\n momentTypes = rest(momentTypes, function (momentType) {\n // Stop trimming on:\n // - the smallest moment type\n // - a type marked for stopTrim\n // - a type that has a whole value\n return !momentType.isSmallest && !momentType.wholeValue && !find(stopTrim, momentType.type);\n });\n }\n\n // Largest.\n if (largest && momentTypes.length) {\n momentTypes = momentTypes.slice(0, largest);\n }\n\n // Trim Small.\n if (trimSmall && momentTypes.length > 1) {\n momentTypes = initial(momentTypes, function (momentType) {\n // Stop trimming on:\n // - a type marked for stopTrim\n // - a type that has a whole value\n // - the largest momentType\n return !momentType.wholeValue && !find(stopTrim, momentType.type) && !momentType.isLargest;\n });\n }\n\n // Trim Mid.\n if (trimMid) {\n momentTypes = map(momentTypes, function (momentType, index) {\n if (index > 0 && index < momentTypes.length - 1 && !momentType.wholeValue) {\n return null;\n }\n\n return momentType;\n });\n\n momentTypes = compact(momentTypes);\n }\n\n // Trim Final.\n if (trimFinal && momentTypes.length === 1 && !momentTypes[0].wholeValue && !(!trunc && momentTypes[0].isSmallest && momentTypes[0].rawValue < minValue)) {\n momentTypes = [];\n }\n }\n\n if (returnMomentTypes) {\n return momentTypes;\n }\n\n // Localize and pluralize unit labels.\n each(tokens, function (token) {\n var key = momentTokens[token.type];\n\n var momentType = find(momentTypes, function (momentType) {\n return momentType.type === token.type;\n });\n\n if (!key || !momentType) {\n return;\n }\n\n var values = momentType.formattedValueEn.split(\".\");\n\n values[0] = parseInt(values[0], 10);\n\n if (values[1]) {\n values[1] = parseFloat(\"0.\" + values[1], 10);\n } else {\n values[1] = null;\n }\n\n var pluralKey = localeData.durationPluralKey(key, values[0], values[1]);\n\n var labels = durationGetLabels(key, localeData);\n\n var autoLocalized = false;\n\n var pluralizedLabels = {};\n\n // Auto-Localized unit labels.\n each(localeData._durationLabelTypes, function (labelType) {\n var label = find(labels, function (label) {\n return label.type === labelType.type && label.key === pluralKey;\n });\n\n if (label) {\n pluralizedLabels[label.type] = label.label;\n\n if (stringIncludes(token.text, labelType.string)) {\n token.text = token.text.replace(labelType.string, label.label);\n autoLocalized = true;\n }\n }\n });\n\n // Auto-pluralized unit labels.\n if (usePlural && !autoLocalized) {\n labels.sort(durationLabelCompare);\n\n each(labels, function (label) {\n if (pluralizedLabels[label.type] === label.label) {\n if (stringIncludes(token.text, label.label)) {\n // Stop checking this token if its label is already\n // correctly pluralized.\n return false;\n }\n\n // Skip this label if it is correct, but not present in\n // the token's text.\n return;\n }\n\n if (stringIncludes(token.text, label.label)) {\n // Replece this token's label and stop checking.\n token.text = token.text.replace(label.label, pluralizedLabels[label.type]);\n return false;\n }\n });\n }\n });\n\n // Build ouptut.\n tokens = map(tokens, function (token) {\n if (!token.type) {\n return token.text;\n }\n\n var momentType = find(momentTypes, function (momentType) {\n return momentType.type === token.type;\n });\n\n if (!momentType) {\n return \"\";\n }\n\n var out = \"\";\n\n if (useLeftUnits) {\n out += token.text;\n }\n\n if (isNegative && isMaxValue || !isNegative && isMinValue) {\n out += \"< \";\n isMaxValue = false;\n isMinValue = false;\n }\n\n if (isNegative && isMinValue || !isNegative && isMaxValue) {\n out += \"> \";\n isMaxValue = false;\n isMinValue = false;\n }\n\n if (isNegative && (momentType.value > 0 || trim === \"\" || find(stopTrim, momentType.type) || find(outputTypes, momentType.type))) {\n out += \"-\";\n isNegative = false;\n }\n\n if (token.type === \"milliseconds\" && momentType.formattedValueMS) {\n out += momentType.formattedValueMS;\n } else {\n out += momentType.formattedValue;\n }\n\n if (!useLeftUnits) {\n out += token.text;\n }\n\n return out;\n });\n\n // Trim leading and trailing comma, space, colon, and dot.\n return tokens.join(\"\").replace(/(,| |:|\\.)*$/, \"\").replace(/^(,| |:|\\.)*/, \"\");\n }", "function millisecondsToStr(a){\"use strict\";function b(a){return a>1?\"s ago\":\" ago\"}var c=Math.floor(a/1e3),d=Math.floor(c/31536e3);if(d)return d+\" year\"+b(d);var e=Math.floor((c%=31536e3)/2592e3);if(e)return e+\" month\"+b(e);var f=Math.floor((c%=2592e3)/86400);if(f)return f+\" day\"+b(f);var g=Math.floor((c%=86400)/3600);if(g)return\"about \"+g+\" hour\"+b(g);var h=Math.floor((c%=3600)/60);if(h)return h+\" minute\"+b(h);var i=c%60;return i?i+\" second\"+b(i):\"just now\"}", "function processRelativeTime$5(number,withoutSuffix,key,isFuture){var format={'m':['eng Minutt','enger Minutt'],'h':['eng Stonn','enger Stonn'],'d':['een Dag','engem Dag'],'M':['ee Mount','engem Mount'],'y':['ee Joer','engem Joer']};return withoutSuffix?format[key][0]:format[key][1];}", "function relativeTimeWithMutation(number,withoutSuffix,key){var format={mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"};return number+\" \"+mutation(format[key],number)}", "function processRelativeTime(number,withoutSuffix,key,isFuture){var format={s:[\"mõne sekundi\",\"mõni sekund\",\"paar sekundit\"],ss:[number+\"sekundi\",number+\"sekundit\"],m:[\"ühe minuti\",\"üks minut\"],mm:[number+\" minuti\",number+\" minutit\"],h:[\"ühe tunni\",\"tund aega\",\"üks tund\"],hh:[number+\" tunni\",number+\" tundi\"],d:[\"ühe päeva\",\"üks päev\"],M:[\"kuu aja\",\"kuu aega\",\"üks kuu\"],MM:[number+\" kuu\",number+\" kuud\"],y:[\"ühe aasta\",\"aasta\",\"üks aasta\"],yy:[number+\" aasta\",number+\" aastat\"]};return withoutSuffix?format[key][2]?format[key][2]:format[key][1]:isFuture?format[key][0]:format[key][1]}", "function humanizer(passedOptions) {\n\n var result = function humanizer(ms, humanizerOptions) {\n var options = extend({}, result, humanizerOptions || {});\n return doHumanization(ms, options);\n };\n\n return extend(result, {\n language: \"en\",\n delimiter: \", \",\n spacer: \" \",\n units: [\"year\", \"month\", \"week\", \"day\", \"hour\", \"minute\", \"second\"],\n languages: {},\n halfUnit: true,\n round: false\n }, passedOptions);\n\n }", "function processRelativeTime$6(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += withoutSuffix || isFuture ? 'sekund' : 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }", "function momentify(value, options) {\n\t\tvar parser = options.parser;\n\t\tvar format = options.parser || options.format;\n\n\t\tif (typeof parser === 'function') {\n\t\t\treturn parser(value);\n\t\t}\n\n\t\tif (typeof value === 'string' && typeof format === 'string') {\n\t\t\treturn moment(value, format);\n\t\t}\n\n\t\tif (!(value instanceof moment)) {\n\t\t\tvalue = moment(value);\n\t\t}\n\n\t\tif (value.isValid()) {\n\t\t\treturn value;\n\t\t}\n\n\t\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t\t// The user might still use the deprecated `format` option to convert his inputs.\n\t\tif (typeof format === 'function') {\n\t\t\treturn format(value);\n\t\t}\n\n\t\treturn value;\n\t}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}", "function momentify(value, options) {\n\tvar parser = options.parser;\n\tvar format = options.parser || options.format;\n\n\tif (typeof parser === 'function') {\n\t\treturn parser(value);\n\t}\n\n\tif (typeof value === 'string' && typeof format === 'string') {\n\t\treturn moment(value, format);\n\t}\n\n\tif (!(value instanceof moment)) {\n\t\tvalue = moment(value);\n\t}\n\n\tif (value.isValid()) {\n\t\treturn value;\n\t}\n\n\t// Labels are in an incompatible moment format and no `parser` has been provided.\n\t// The user might still use the deprecated `format` option to convert his inputs.\n\tif (typeof format === 'function') {\n\t\treturn format(value);\n\t}\n\n\treturn value;\n}" ]
[ "0.6559185", "0.6559185", "0.6559185", "0.6559185", "0.6476999", "0.6382618", "0.6326723", "0.6326723", "0.6326723", "0.6326723", "0.6326723", "0.6326723", "0.6326723", "0.6326723", "0.6326723", "0.621574", "0.61228406", "0.61228406", "0.6096944", "0.6096944", "0.6096944", "0.60871017", "0.60326475", "0.60223645", "0.60120004", "0.60120004", "0.60120004", "0.60120004", "0.60120004", "0.60069245", "0.5951224", "0.58958185", "0.58831024", "0.5864821", "0.5839914", "0.58151567", "0.58151567", "0.58151567", "0.58151567", "0.5811169", "0.578024", "0.5767969", "0.5764426", "0.57336396", "0.57203925", "0.5695833", "0.5689689", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5683308", "0.5679458", "0.5647192", "0.56228465", "0.56221175", "0.5607855", "0.5601976", "0.5575313", "0.55630493", "0.5538045", "0.5537919", "0.55223835", "0.55207485", "0.55207485", "0.55207485", "0.55207485", "0.55207485", "0.55207485", "0.55207485", "0.55207485", "0.55207485", "0.55207485", "0.55207485", "0.55207485" ]
0.0
-1
This function allows you to set the rounding function for relative time strings
function getSetRelativeTimeRounding (roundingFunction) { if (roundingFunction === undefined) { return round; } if (typeof(roundingFunction) === 'function') { round = roundingFunction; return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function duration_humanize__getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding (roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof(roundingFunction) === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t}", "function getSetRelativeTimeRounding(roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof roundingFunction === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function getSetRelativeTimeRounding(roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof roundingFunction === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function getSetRelativeTimeRounding(roundingFunction) {\n\t if (roundingFunction === undefined) {\n\t return round;\n\t }\n\t if (typeof roundingFunction === 'function') {\n\t round = roundingFunction;\n\t return true;\n\t }\n\t return false;\n\t }", "function getSetRelativeTimeRounding (roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function getSetRelativeTimeRounding (roundingFunction) {\n\tif (roundingFunction === undefined) {\n\t\treturn round;\n\t}\n\tif (typeof(roundingFunction) === 'function') {\n\t\tround = roundingFunction;\n\t\treturn true;\n\t}\n\treturn false;\n}", "function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof(roundingFunction) === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function getSetRelativeTimeRounding (roundingFunction) {\r\n if (roundingFunction === undefined) {\r\n return round;\r\n }\r\n if (typeof(roundingFunction) === 'function') {\r\n round = roundingFunction;\r\n return true;\r\n }\r\n return false;\r\n }", "function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }", "function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }" ]
[ "0.72622484", "0.72409254", "0.72409254", "0.72409254", "0.72409254", "0.72409254", "0.72409254", "0.72409254", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70998174", "0.70316243", "0.6977638", "0.6977638", "0.6977638", "0.6977638", "0.6977638", "0.6977638", "0.69598234", "0.6958744", "0.6947806", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6909664", "0.6895281", "0.6895281", "0.6895281", "0.68885976", "0.6886316", "0.68665904", "0.6859235", "0.6822068", "0.6822068" ]
0.0
-1
This function allows you to set a threshold for relative time strings
function getSetRelativeTimeThreshold (threshold, limit) { if (thresholds[threshold] === undefined) { return false; } if (limit === undefined) { return thresholds[threshold]; } thresholds[threshold] = limit; if (threshold === 's') { thresholds.ss = limit - 1; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t}", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t}", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t}", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t}", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t}", "function getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t}", "function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n return true;\n }", "function getSetRelativeTimeThreshold (threshold, limit) {\n\tif (thresholds[threshold] === undefined) {\n\t\treturn false;\n\t}\n\tif (limit === undefined) {\n\t\treturn thresholds[threshold];\n\t}\n\tthresholds[threshold] = limit;\n\tif (threshold === 's') {\n\t\tthresholds.ss = limit - 1;\n\t}\n\treturn true;\n}", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t return true;\n\t }", "function getSetRelativeTimeThreshold(threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold(threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold(threshold, limit) {\n\t if (thresholds[threshold] === undefined) {\n\t return false;\n\t }\n\t if (limit === undefined) {\n\t return thresholds[threshold];\n\t }\n\t thresholds[threshold] = limit;\n\t if (threshold === 's') {\n\t thresholds.ss = limit - 1;\n\t }\n\t return true;\n\t }", "function getSetRelativeTimeThreshold (threshold, limit) {\r\n if (thresholds[threshold] === undefined) {\r\n return false;\r\n }\r\n if (limit === undefined) {\r\n return thresholds[threshold];\r\n }\r\n thresholds[threshold] = limit;\r\n if (threshold === 's') {\r\n thresholds.ss = limit - 1;\r\n }\r\n return true;\r\n }", "function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }", "function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }" ]
[ "0.6977598", "0.69336283", "0.6906506", "0.6906506", "0.6906506", "0.6906506", "0.6906506", "0.6906506", "0.6900698", "0.6900698", "0.6900698", "0.6900698", "0.6900698", "0.6900698", "0.6894468", "0.6885829", "0.6872021", "0.68407196", "0.68244886", "0.68244886", "0.68244886", "0.68244886", "0.68244886", "0.68244886", "0.68244886", "0.68244886", "0.68244886", "0.68244886", "0.68244886", "0.68244886", "0.6819936", "0.6819936", "0.6819936", "0.68147737", "0.6811937", "0.68001795", "0.68001795" ]
0.0
-1
Expose a method for transforming tokens into the path function.
function tokensToFunction (tokens, options) { // Compile all the tokens into regexps. var matches = new Array(tokens.length) // Compile all the patterns before compilation. for (var i = 0; i < tokens.length; i++) { if (typeof tokens[i] === 'object') { matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options)) } } return function (obj, opts) { var path = '' var data = obj || {} var options = opts || {} var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent for (var i = 0; i < tokens.length; i++) { var token = tokens[i] if (typeof token === 'string') { path += token continue } var value = data[token.name] var segment if (value == null) { if (token.optional) { // Prepend partial segment prefixes. if (token.partial) { path += token.prefix } continue } else { throw new TypeError('Expected "' + token.name + '" to be defined') } } if (isarray(value)) { if (!token.repeat) { throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`') } if (value.length === 0) { if (token.optional) { continue } else { throw new TypeError('Expected "' + token.name + '" to not be empty') } } for (var j = 0; j < value.length; j++) { segment = encode(value[j]) if (!matches[i].test(segment)) { throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`') } path += (j === 0 ? token.prefix : token.delimiter) + segment } continue } segment = token.asterisk ? encodeAsterisk(value) : encode(value) if (!matches[i].test(segment)) { throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"') } path += token.prefix + segment } return path } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n const matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (let i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (data, options) {\n let path = ''\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n continue\n }\n\n const value = data ? data[token.name] : undefined\n var segment\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array')\n }\n\n if (value.length === 0) {\n if (token.optional) continue\n\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n\n for (let j = 0; j < value.length; j++) {\n path += (j === 0 ? token.prefix : token.delimiter) + value[j]\n }\n\n continue\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n path += token.prefix + String(value)\n continue\n }\n\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) path += token.prefix\n\n continue\n }\n\n throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'))\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n \n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^' + tokens[i].pattern + '$')\n }\n }\n \n return function (obj) {\n var path = ''\n var data = obj || {}\n \n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n \n if (typeof token === 'string') {\n path += token\n \n continue\n }\n \n var value = data[token.name]\n var segment\n \n if (value == null) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n \n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received \"' + value + '\"')\n }\n \n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n \n for (var j = 0; j < value.length; j++) {\n segment = encodeURIComponent(value[j])\n \n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n \n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n \n continue\n }\n \n segment = encodeURIComponent(value)\n \n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n \n path += token.prefix + segment\n }\n \n return path\n }\n }", "function tokensToFunction(tokens) {\n var matches = new Array(tokens.length)\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function(data, options) {\n var path = ''\n var encode = (options && options.encode) || encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n continue\n }\n\n var value = data ? data[token.name] : undefined\n var segment\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array')\n }\n\n if (value.length === 0) {\n if (token.optional) continue\n\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j], token)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n segment = encode(String(value), token)\n\n if (!matches[i].test(segment)) {\n throw new TypeError(\n 'Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"'\n )\n }\n\n path += token.prefix + segment\n continue\n }\n\n if (token.optional) {\n if (token.partial) path += token.prefix\n\n continue\n }\n\n throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'))\n }\n\n return path\n }\n }", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (data, options) {\n var path = ''\n var encode = (options && options.encode) || encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n continue\n }\n\n var value = data ? data[token.name] : undefined\n var segment\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array')\n }\n\n if (value.length === 0) {\n if (token.optional) continue\n\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j], token)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n segment = encode(String(value), token)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n continue\n }\n\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) path += token.prefix\n\n continue\n }\n\n throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'))\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (data, options) {\n var path = ''\n var encode = (options && options.encode) || encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n continue\n }\n\n var value = data ? data[token.name] : undefined\n var segment\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array')\n }\n\n if (value.length === 0) {\n if (token.optional) continue\n\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j], token)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n segment = encode(String(value), token)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n continue\n }\n\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) path += token.prefix\n\n continue\n }\n\n throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'))\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (data, options) {\n var path = ''\n var encode = (options && options.encode) || encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n continue\n }\n\n var value = data ? data[token.name] : undefined\n var segment\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array')\n }\n\n if (value.length === 0) {\n if (token.optional) continue\n\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j], token)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n segment = encode(String(value), token)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n continue\n }\n\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) path += token.prefix\n\n continue\n }\n\n throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'))\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (data, options) {\n var path = ''\n var encode = (options && options.encode) || encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n continue\n }\n\n var value = data ? data[token.name] : undefined\n var segment\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array')\n }\n\n if (value.length === 0) {\n if (token.optional) continue\n\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j], token)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n segment = encode(String(value), token)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n continue\n }\n\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) path += token.prefix\n\n continue\n }\n\n throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'))\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (data, options) {\n var path = ''\n var encode = (options && options.encode) || encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n continue\n }\n\n var value = data ? data[token.name] : undefined\n var segment\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array')\n }\n\n if (value.length === 0) {\n if (token.optional) continue\n\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j], token)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n segment = encode(String(value), token)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n continue\n }\n\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) path += token.prefix\n\n continue\n }\n\n throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'))\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (data, options) {\n var path = ''\n var encode = (options && options.encode) || encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n continue\n }\n\n var value = data ? data[token.name] : undefined\n var segment\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array')\n }\n\n if (value.length === 0) {\n if (token.optional) continue\n\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j], token)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n segment = encode(String(value), token)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n continue\n }\n\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) path += token.prefix\n\n continue\n }\n\n throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'))\n }\n\n return path\n }\n}", "function tokensToFunction(tokens, options) {\n // Compile all the tokens into regexps.\n const matches = new Array(tokens.length); // Compile all the patterns before compilation.\n\n for (let i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options));\n }\n }\n\n return function (obj, opts) {\n let path = '';\n const data = obj || {};\n const options = opts || {};\n const encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n\n const value = data[token.name || 'pathMatch'];\n let segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (let j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens, options) {\n // Compile all the tokens into regexps.\n const matches = new Array(tokens.length); // Compile all the patterns before compilation.\n\n for (let i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options));\n }\n }\n\n return function (obj, opts) {\n let path = '';\n const data = obj || {};\n const options = opts || {};\n const encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n\n const value = data[token.name || 'pathMatch'];\n let segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (let j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens, options) {\n // Compile all the tokens into regexps.\n const matches = new Array(tokens.length); // Compile all the patterns before compilation.\n\n for (let i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options));\n }\n }\n\n return function (obj, opts) {\n let path = '';\n const data = obj || {};\n const options = opts || {};\n const encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n\n const value = data[token.name || 'pathMatch'];\n let segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (let j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens, options) {\n // Compile all the tokens into regexps.\n const matches = new Array(tokens.length); // Compile all the patterns before compilation.\n\n for (let i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options));\n }\n }\n\n return function (obj, opts) {\n let path = '';\n const data = obj || {};\n const options = opts || {};\n const encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n\n const value = data[token.name || 'pathMatch'];\n let segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (let j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens, options) {\n // Compile all the tokens into regexps.\n const matches = new Array(tokens.length); // Compile all the patterns before compilation.\n\n for (let i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options));\n }\n }\n\n return function (obj, opts) {\n let path = '';\n const data = obj || {};\n const options = opts || {};\n const encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n\n const value = data[token.name || 'pathMatch'];\n let segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n\n for (let j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens, options = {}) {\n const reFlags = flags(options);\n const { encode = (x) => x, validate = true } = options;\n // Compile all the tokens into regexps.\n const matches = tokens.map(token => {\n if (typeof token === 'object') {\n return new RegExp(`^(?:${token.pattern})$`, reFlags);\n }\n });\n return (data) => {\n let path = '';\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n const value = data ? data[token.name] : undefined;\n const optional = token.modifier === '?' || token.modifier === '*';\n const repeat = token.modifier === '*' || token.modifier === '+';\n if (Array.isArray(value)) {\n if (!repeat) {\n throw new TypeError(`Expected \"${token.name}\" to not repeat, but got an array`);\n }\n if (value.length === 0) {\n if (optional)\n continue;\n throw new TypeError(`Expected \"${token.name}\" to not be empty`);\n }\n for (let j = 0; j < value.length; j++) {\n const segment = encode(value[j], token);\n if (validate && !matches[i].test(segment)) {\n throw new TypeError(`Expected all \"${token.name}\" to match \"${token.pattern}\", but got \"${segment}\"`);\n }\n path += token.prefix + segment + token.suffix;\n }\n continue;\n }\n if (typeof value === 'string' || typeof value === 'number') {\n const segment = encode(String(value), token);\n if (validate && !matches[i].test(segment)) {\n throw new TypeError(`Expected \"${token.name}\" to match \"${token.pattern}\", but got \"${segment}\"`);\n }\n path += token.prefix + segment + token.suffix;\n continue;\n }\n if (optional)\n continue;\n const typeOfMessage = repeat ? 'an array' : 'a string';\n throw new TypeError(`Expected \"${token.name}\" to be ${typeOfMessage}`);\n }\n return path;\n };\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (data, options) {\n var path = '';\n var encode = (options && options.encode) || encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n continue\n }\n\n var value = data ? data[token.name] : undefined;\n var segment;\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array')\n }\n\n if (value.length === 0) {\n if (token.optional) continue\n\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j], token);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n segment = encode(String(value), token);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n continue\n }\n\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) path += token.prefix;\n\n continue\n }\n\n throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'))\n }\n\n return path\n }\n }", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length)\n\t\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^' + tokens[i].pattern + '$')\n\t }\n\t }\n\t\n\t return function (obj) {\n\t var path = ''\n\t var data = obj || {}\n\t\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i]\n\t\n\t if (typeof token === 'string') {\n\t path += token\n\t\n\t continue\n\t }\n\t\n\t var value = data[token.name]\n\t var segment\n\t\n\t if (value == null) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\t\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received \"' + value + '\"')\n\t }\n\t\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\t\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encodeURIComponent(value[j])\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\t\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment\n\t }\n\t\n\t continue\n\t }\n\t\n\t segment = encodeURIComponent(value)\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\t\n\t path += token.prefix + segment\n\t }\n\t\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^' + tokens[i].pattern + '$')\n }\n }\n\n return function (obj) {\n var path = ''\n var data = obj || {}\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received \"' + value + '\"')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encodeURIComponent(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = encodeURIComponent(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^' + tokens[i].pattern + '$')\n }\n }\n\n return function (obj) {\n var path = ''\n var data = obj || {}\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received \"' + value + '\"')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encodeURIComponent(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = encodeURIComponent(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^' + tokens[i].pattern + '$')\n }\n }\n\n return function (obj) {\n var path = ''\n var data = obj || {}\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received \"' + value + '\"')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encodeURIComponent(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = encodeURIComponent(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^' + tokens[i].pattern + '$')\n }\n }\n\n return function (obj) {\n var path = ''\n var data = obj || {}\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received \"' + value + '\"')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encodeURIComponent(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = encodeURIComponent(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^' + tokens[i].pattern + '$')\n }\n }\n\n return function (obj) {\n var path = ''\n var data = obj || {}\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received \"' + value + '\"')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encodeURIComponent(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = encodeURIComponent(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^' + tokens[i].pattern + '$')\n }\n }\n\n return function (obj) {\n var path = ''\n var data = obj || {}\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received \"' + value + '\"')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encodeURIComponent(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = encodeURIComponent(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (data, options) {\n var path = '';\n var encode = (options && options.encode) || encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n continue\n }\n\n var value = data ? data[token.name] : undefined;\n var segment;\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array')\n }\n\n if (value.length === 0) {\n if (token.optional) continue\n\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j], token);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n segment = encode(String(value), token);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n continue\n }\n\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) path += token.prefix;\n\n continue\n }\n\n throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'))\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n\t\t // Compile all the tokens into regexps.\n\t\t var matches = new Array(tokens.length)\n\t\n\t\t // Compile all the patterns before compilation.\n\t\t for (var i = 0; i < tokens.length; i++) {\n\t\t if (typeof tokens[i] === 'object') {\n\t\t matches[i] = new RegExp('^' + tokens[i].pattern + '$')\n\t\t }\n\t\t }\n\t\n\t\t return function (obj) {\n\t\t var path = ''\n\t\t var data = obj || {}\n\t\n\t\t for (var i = 0; i < tokens.length; i++) {\n\t\t var token = tokens[i]\n\t\n\t\t if (typeof token === 'string') {\n\t\t path += token\n\t\n\t\t continue\n\t\t }\n\t\n\t\t var value = data[token.name]\n\t\t var segment\n\t\n\t\t if (value == null) {\n\t\t if (token.optional) {\n\t\t continue\n\t\t } else {\n\t\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t\t }\n\t\t }\n\t\n\t\t if (isarray(value)) {\n\t\t if (!token.repeat) {\n\t\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received \"' + value + '\"')\n\t\t }\n\t\n\t\t if (value.length === 0) {\n\t\t if (token.optional) {\n\t\t continue\n\t\t } else {\n\t\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t\t }\n\t\t }\n\t\n\t\t for (var j = 0; j < value.length; j++) {\n\t\t segment = encodeURIComponent(value[j])\n\t\n\t\t if (!matches[i].test(segment)) {\n\t\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t\t }\n\t\n\t\t path += (j === 0 ? token.prefix : token.delimiter) + segment\n\t\t }\n\t\n\t\t continue\n\t\t }\n\t\n\t\t segment = encodeURIComponent(value)\n\t\n\t\t if (!matches[i].test(segment)) {\n\t\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t\t }\n\t\n\t\t path += token.prefix + segment\n\t\t }\n\t\n\t\t return path\n\t\t }\n\t\t}", "function tokensToFunction(tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === \"object\") {\n matches[i] = new RegExp(\"^(?:\" + tokens[i].pattern + \")$\");\n }\n }\n\n return function(data, options) {\n var path = \"\";\n var encode = (options && options.encode) || encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === \"string\") {\n path += token;\n continue;\n }\n\n var value = data ? data[token.name] : undefined;\n var segment;\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError(\n 'Expected \"' + token.name + '\" to not repeat, but got array'\n );\n }\n\n if (value.length === 0) {\n if (token.optional) continue;\n\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j], token);\n\n if (!matches[i].test(segment)) {\n throw new TypeError(\n 'Expected all \"' +\n token.name +\n '\" to match \"' +\n token.pattern +\n '\"'\n );\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n if (\n typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\"\n ) {\n segment = encode(String(value), token);\n\n if (!matches[i].test(segment)) {\n throw new TypeError(\n 'Expected \"' +\n token.name +\n '\" to match \"' +\n token.pattern +\n '\", but got \"' +\n segment +\n '\"'\n );\n }\n\n path += token.prefix + segment;\n continue;\n }\n\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) path += token.prefix;\n\n continue;\n }\n\n throw new TypeError(\n 'Expected \"' +\n token.name +\n '\" to be ' +\n (token.repeat ? \"an array\" : \"a string\")\n );\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens) {\r\n // Compile all the tokens into regexps.\r\n var matches = new Array(tokens.length);\r\n\r\n // Compile all the patterns before compilation.\r\n for (var i = 0; i < tokens.length; i++) {\r\n if (_typeof(tokens[i]) === 'object') {\r\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\r\n }\r\n }\r\n\r\n return function (obj, opts) {\r\n var path = '';\r\n var data = obj || {};\r\n var options = opts || {};\r\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\r\n\r\n for (var i = 0; i < tokens.length; i++) {\r\n var token = tokens[i];\r\n\r\n if (typeof token === 'string') {\r\n path += token;\r\n\r\n continue;\r\n }\r\n\r\n var value = data[token.name];\r\n var segment;\r\n\r\n if (value == null) {\r\n if (token.optional) {\r\n // Prepend partial segment prefixes.\r\n if (token.partial) {\r\n path += token.prefix;\r\n }\r\n\r\n continue;\r\n } else {\r\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\r\n }\r\n }\r\n\r\n if (isarray(value)) {\r\n if (!token.repeat) {\r\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\r\n }\r\n\r\n if (value.length === 0) {\r\n if (token.optional) {\r\n continue;\r\n } else {\r\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\r\n }\r\n }\r\n\r\n for (var j = 0; j < value.length; j++) {\r\n segment = encode(value[j]);\r\n\r\n if (!matches[i].test(segment)) {\r\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\r\n }\r\n\r\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\r\n }\r\n\r\n continue;\r\n }\r\n\r\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\r\n\r\n if (!matches[i].test(segment)) {\r\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\r\n }\r\n\r\n path += token.prefix + segment;\r\n }\r\n\r\n return path;\r\n };\r\n }", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length)\n\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n\t }\n\t }\n\n\t return function (data, options) {\n\t var path = ''\n\t var encode = (options && options.encode) || encodeURIComponent\n\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i]\n\n\t if (typeof token === 'string') {\n\t path += token\n\t continue\n\t }\n\n\t var value = data ? data[token.name] : undefined\n\t var segment\n\n\t if (Array.isArray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array')\n\t }\n\n\t if (value.length === 0) {\n\t if (token.optional) continue\n\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j], token)\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\"')\n\t }\n\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment\n\t }\n\n\t continue\n\t }\n\n\t if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n\t segment = encode(String(value), token)\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"')\n\t }\n\n\t path += token.prefix + segment\n\t continue\n\t }\n\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) path += token.prefix\n\n\t continue\n\t }\n\n\t throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'))\n\t }\n\n\t return path\n\t }\n\t}", "function tokensToFunction(tokens, options) {\n if (options === void 0) { options = {}; }\n var reFlags = flags(options);\n var _a = options.encode, encode = _a === void 0 ? function (x) { return x; } : _a, _b = options.validate, validate = _b === void 0 ? true : _b;\n // Compile all the tokens into regexps.\n var matches = tokens.map(function (token) {\n if (typeof token === \"object\") {\n return new RegExp(\"^(?:\" + token.pattern + \")$\", reFlags);\n }\n });\n return function (data) {\n var path = \"\";\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n if (typeof token === \"string\") {\n path += token;\n continue;\n }\n var value = data ? data[token.name] : undefined;\n var optional = token.modifier === \"?\" || token.modifier === \"*\";\n var repeat = token.modifier === \"*\" || token.modifier === \"+\";\n if (Array.isArray(value)) {\n if (!repeat) {\n throw new TypeError(\"Expected \\\"\" + token.name + \"\\\" to not repeat, but got an array\");\n }\n if (value.length === 0) {\n if (optional)\n continue;\n throw new TypeError(\"Expected \\\"\" + token.name + \"\\\" to not be empty\");\n }\n for (var j = 0; j < value.length; j++) {\n var segment = encode(value[j], token);\n if (validate && !matches[i].test(segment)) {\n throw new TypeError(\"Expected all \\\"\" + token.name + \"\\\" to match \\\"\" + token.pattern + \"\\\", but got \\\"\" + segment + \"\\\"\");\n }\n path += token.prefix + segment + token.suffix;\n }\n continue;\n }\n if (typeof value === \"string\" || typeof value === \"number\") {\n var segment = encode(String(value), token);\n if (validate && !matches[i].test(segment)) {\n throw new TypeError(\"Expected \\\"\" + token.name + \"\\\" to match \\\"\" + token.pattern + \"\\\", but got \\\"\" + segment + \"\\\"\");\n }\n path += token.prefix + segment + token.suffix;\n continue;\n }\n if (optional)\n continue;\n var typeOfMessage = repeat ? \"an array\" : \"a string\";\n throw new TypeError(\"Expected \\\"\" + token.name + \"\\\" to be \" + typeOfMessage);\n }\n return path;\n };\n }", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^' + tokens[i].pattern + '$');\n }\n }\n\n return function (obj) {\n var path = '';\n var data = obj || {};\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received \"' + value + '\"')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encodeURIComponent(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = encodeURIComponent(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^' + tokens[i].pattern + '$');\n }\n }\n\n return function (obj) {\n var path = '';\n var data = obj || {};\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received \"' + value + '\"')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encodeURIComponent(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = encodeURIComponent(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^' + tokens[i].pattern + '$');\n }\n }\n\n return function (obj) {\n var path = '';\n var data = obj || {};\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received \"' + value + '\"')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encodeURIComponent(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = encodeURIComponent(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^' + tokens[i].pattern + '$');\n }\n }\n\n return function (obj) {\n var path = '';\n var data = obj || {};\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received \"' + value + '\"')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encodeURIComponent(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = encodeURIComponent(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}", "function tokensToFunction(tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (_typeof(tokens[i]) === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (data, options) {\n var path = '';\n var encode = options && options.encode || encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n\n var value = data ? data[token.name] : undefined;\n var segment;\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array');\n }\n\n if (value.length === 0) {\n if (token.optional) continue;\n\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\"');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n segment = encode(String(value));\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n continue;\n }\n\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) path += token.prefix;\n\n continue;\n }\n\n throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'));\n }\n\n return path;\n };\n}", "function tokensToFunction(tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length); // Compile all the patterns before compilation.\n\n for (var i = 0; i < tokens.length; i++) {\n if (_typeof(tokens[i]) === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n }\n }\n\n return function (data, options) {\n var path = '';\n var encode = options && options.encode || encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n\n var value = data ? data[token.name] : undefined;\n var segment;\n\n if (Array.isArray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array');\n }\n\n if (value.length === 0) {\n if (token.optional) continue;\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j], token);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\"');\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue;\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n segment = encode(String(value), token);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"');\n }\n\n path += token.prefix + segment;\n continue;\n }\n\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) path += token.prefix;\n continue;\n }\n\n throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'));\n }\n\n return path;\n };\n}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length)\n\t\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n\t }\n\t }\n\t\n\t return function (obj, opts) {\n\t var path = ''\n\t var data = obj || {}\n\t var options = opts || {}\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\t\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i]\n\t\n\t if (typeof token === 'string') {\n\t path += token\n\t\n\t continue\n\t }\n\t\n\t var value = data[token.name]\n\t var segment\n\t\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix\n\t }\n\t\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\t\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\t\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\t\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j])\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\t\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment\n\t }\n\t\n\t continue\n\t }\n\t\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\t\n\t path += token.prefix + segment\n\t }\n\t\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length)\n\t\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n\t }\n\t }\n\t\n\t return function (obj, opts) {\n\t var path = ''\n\t var data = obj || {}\n\t var options = opts || {}\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\t\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i]\n\t\n\t if (typeof token === 'string') {\n\t path += token\n\t\n\t continue\n\t }\n\t\n\t var value = data[token.name]\n\t var segment\n\t\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix\n\t }\n\t\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\t\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\t\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\t\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j])\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\t\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment\n\t }\n\t\n\t continue\n\t }\n\t\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\t\n\t path += token.prefix + segment\n\t }\n\t\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length)\n\t\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n\t }\n\t }\n\t\n\t return function (obj, opts) {\n\t var path = ''\n\t var data = obj || {}\n\t var options = opts || {}\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\t\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i]\n\t\n\t if (typeof token === 'string') {\n\t path += token\n\t\n\t continue\n\t }\n\t\n\t var value = data[token.name]\n\t var segment\n\t\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix\n\t }\n\t\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\t\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\t\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\t\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j])\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\t\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment\n\t }\n\t\n\t continue\n\t }\n\t\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\t\n\t path += token.prefix + segment\n\t }\n\t\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\r\n // Compile all the tokens into regexps.\r\n var matches = new Array(tokens.length);\r\n\r\n // Compile all the patterns before compilation.\r\n for (var i = 0; i < tokens.length; i++) {\r\n if (typeof tokens[i] === 'object') {\r\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\r\n }\r\n }\r\n\r\n return function (obj, opts) {\r\n var path = '';\r\n var data = obj || {};\r\n var options = opts || {};\r\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\r\n\r\n for (var i = 0; i < tokens.length; i++) {\r\n var token = tokens[i];\r\n\r\n if (typeof token === 'string') {\r\n path += token;\r\n\r\n continue\r\n }\r\n\r\n var value = data[token.name];\r\n var segment;\r\n\r\n if (value == null) {\r\n if (token.optional) {\r\n // Prepend partial segment prefixes.\r\n if (token.partial) {\r\n path += token.prefix;\r\n }\r\n\r\n continue\r\n } else {\r\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\r\n }\r\n }\r\n\r\n if (isarray(value)) {\r\n if (!token.repeat) {\r\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\r\n }\r\n\r\n if (value.length === 0) {\r\n if (token.optional) {\r\n continue\r\n } else {\r\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\r\n }\r\n }\r\n\r\n for (var j = 0; j < value.length; j++) {\r\n segment = encode(value[j]);\r\n\r\n if (!matches[i].test(segment)) {\r\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\r\n }\r\n\r\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\r\n }\r\n\r\n continue\r\n }\r\n\r\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\r\n\r\n if (!matches[i].test(segment)) {\r\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\r\n }\r\n\r\n path += token.prefix + segment;\r\n }\r\n\r\n return path\r\n }\r\n}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length);\n\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n\t }\n\t }\n\n\t return function (data, options) {\n\t var path = '';\n\t var encode = (options && options.encode) || encodeURIComponent;\n\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i];\n\n\t if (typeof token === 'string') {\n\t path += token;\n\t continue\n\t }\n\n\t var value = data ? data[token.name] : undefined;\n\t var segment;\n\n\t if (Array.isArray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but got array')\n\t }\n\n\t if (value.length === 0) {\n\t if (token.optional) continue\n\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j], token);\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\"')\n\t }\n\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment;\n\t }\n\n\t continue\n\t }\n\n\t if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n\t segment = encode(String(value), token);\n\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but got \"' + segment + '\"')\n\t }\n\n\t path += token.prefix + segment;\n\t continue\n\t }\n\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) path += token.prefix;\n\n\t continue\n\t }\n\n\t throw new TypeError('Expected \"' + token.name + '\" to be ' + (token.repeat ? 'an array' : 'a string'))\n\t }\n\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length);\n\t\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n\t }\n\t }\n\t\n\t return function (obj, opts) {\n\t var path = '';\n\t var data = obj || {};\n\t var options = opts || {};\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\t\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i];\n\t\n\t if (typeof token === 'string') {\n\t path += token;\n\t\n\t continue\n\t }\n\t\n\t var value = data[token.name];\n\t var segment;\n\t\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix;\n\t }\n\t\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\t\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\t\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\t\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j]);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\t\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment;\n\t }\n\t\n\t continue\n\t }\n\t\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\t\n\t path += token.prefix + segment;\n\t }\n\t\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length);\n\t\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n\t }\n\t }\n\t\n\t return function (obj, opts) {\n\t var path = '';\n\t var data = obj || {};\n\t var options = opts || {};\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\t\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i];\n\t\n\t if (typeof token === 'string') {\n\t path += token;\n\t\n\t continue\n\t }\n\t\n\t var value = data[token.name];\n\t var segment;\n\t\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix;\n\t }\n\t\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\t\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\t\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\t\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j]);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\t\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment;\n\t }\n\t\n\t continue\n\t }\n\t\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\t\n\t path += token.prefix + segment;\n\t }\n\t\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length);\n\t\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n\t }\n\t }\n\t\n\t return function (obj, opts) {\n\t var path = '';\n\t var data = obj || {};\n\t var options = opts || {};\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\t\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i];\n\t\n\t if (typeof token === 'string') {\n\t path += token;\n\t\n\t continue\n\t }\n\t\n\t var value = data[token.name];\n\t var segment;\n\t\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix;\n\t }\n\t\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\t\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\t\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\t\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j]);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\t\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment;\n\t }\n\t\n\t continue\n\t }\n\t\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\t\n\t path += token.prefix + segment;\n\t }\n\t\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length);\n\t\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n\t }\n\t }\n\t\n\t return function (obj, opts) {\n\t var path = '';\n\t var data = obj || {};\n\t var options = opts || {};\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\t\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i];\n\t\n\t if (typeof token === 'string') {\n\t path += token;\n\t\n\t continue\n\t }\n\t\n\t var value = data[token.name];\n\t var segment;\n\t\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix;\n\t }\n\t\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\t\n\t if (isarray(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\t\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\t\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j]);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\t\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment;\n\t }\n\t\n\t continue\n\t }\n\t\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\t\n\t path += token.prefix + segment;\n\t }\n\t\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n\t // Compile all the tokens into regexps.\n\t var matches = new Array(tokens.length);\n\t\n\t // Compile all the patterns before compilation.\n\t for (var i = 0; i < tokens.length; i++) {\n\t if (typeof tokens[i] === 'object') {\n\t matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$');\n\t }\n\t }\n\t\n\t return function (obj, opts) {\n\t var path = '';\n\t var data = obj || {};\n\t var options = opts || {};\n\t var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\t\n\t for (var i = 0; i < tokens.length; i++) {\n\t var token = tokens[i];\n\t\n\t if (typeof token === 'string') {\n\t path += token;\n\t\n\t continue\n\t }\n\t\n\t var value = data[token.name];\n\t var segment;\n\t\n\t if (value == null) {\n\t if (token.optional) {\n\t // Prepend partial segment prefixes.\n\t if (token.partial) {\n\t path += token.prefix;\n\t }\n\t\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to be defined')\n\t }\n\t }\n\t\n\t if (index$1(value)) {\n\t if (!token.repeat) {\n\t throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n\t }\n\t\n\t if (value.length === 0) {\n\t if (token.optional) {\n\t continue\n\t } else {\n\t throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n\t }\n\t }\n\t\n\t for (var j = 0; j < value.length; j++) {\n\t segment = encode(value[j]);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n\t }\n\t\n\t path += (j === 0 ? token.prefix : token.delimiter) + segment;\n\t }\n\t\n\t continue\n\t }\n\t\n\t segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\t\n\t if (!matches[i].test(segment)) {\n\t throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n\t }\n\t\n\t path += token.prefix + segment;\n\t }\n\t\n\t return path\n\t }\n\t}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}", "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}" ]
[ "0.6188158", "0.6012426", "0.59892875", "0.5987317", "0.5987317", "0.5987317", "0.5987317", "0.5987317", "0.5987317", "0.5960351", "0.5960351", "0.5960351", "0.5960351", "0.5960351", "0.59280986", "0.59222007", "0.5903951", "0.5897069", "0.5897069", "0.5897069", "0.5897069", "0.5897069", "0.5897069", "0.5876152", "0.58696526", "0.5860332", "0.58572894", "0.584637", "0.58424944", "0.5841555", "0.5841555", "0.5841555", "0.5841555", "0.5840524", "0.5839633", "0.58164024", "0.58164024", "0.58164024", "0.5815971", "0.581595", "0.58088887", "0.58088887", "0.58088887", "0.58088887", "0.5802235", "0.5788376", "0.5788376", "0.5788376", "0.5788376", "0.5788376", "0.5788376", "0.5788376", "0.5788376", "0.5788376", "0.5788376", "0.5788376", "0.5788376", "0.5788376", "0.5788376", "0.5788376", "0.5788376", "0.5788376", "0.5788376", "0.5788376", "0.5788376" ]
0.5796183
76
Updates the position of the popper, computing the new offsets and applying the new style. Prefer `scheduleUpdate` over `update` because of performance reasons.
function update() { // if popper is destroyed, don't perform any further update if (this.state.isDestroyed) { return; } var data = { instance: this, styles: {}, arrowStyles: {}, attributes: {}, flipped: false, offsets: {} }; // compute reference element offsets data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed // and refer to originalPlacement to know the original value data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement` data.originalPlacement = data.placement; data.positionFixed = this.options.positionFixed; // compute the popper offsets data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement); data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback // the other ones will call `onUpdate` callback if (!this.state.isCreated) { this.state.isCreated = true; this.options.onCreate(data); } else { this.options.onUpdate(data); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update() {\n\t // if popper is destroyed, don't perform any further update\n\t if (this.state.isDestroyed) {\n\t return;\n\t }\n\t\n\t var data = {\n\t instance: this,\n\t styles: {},\n\t arrowStyles: {},\n\t attributes: {},\n\t flipped: false,\n\t offsets: {}\n\t };\n\t\n\t // compute reference element offsets\n\t data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\t\n\t // compute auto placement, store placement inside the data object,\n\t // modifiers will be able to edit `placement` if needed\n\t // and refer to originalPlacement to know the original value\n\t data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\t\n\t // store the computed placement inside `originalPlacement`\n\t data.originalPlacement = data.placement;\n\t\n\t data.positionFixed = this.options.positionFixed;\n\t\n\t // compute the popper offsets\n\t data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\t\n\t data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\t\n\t // run the modifiers\n\t data = runModifiers(this.modifiers, data);\n\t\n\t // the first `update` will call `onCreate` callback\n\t // the other ones will call `onUpdate` callback\n\t if (!this.state.isCreated) {\n\t this.state.isCreated = true;\n\t this.options.onCreate(data);\n\t } else {\n\t this.options.onUpdate(data);\n\t }\n\t}", "function update() {\n\t // if popper is destroyed, don't perform any further update\n\t if (this.state.isDestroyed) {\n\t return;\n\t }\n\t\n\t var data = {\n\t instance: this,\n\t styles: {},\n\t arrowStyles: {},\n\t attributes: {},\n\t flipped: false,\n\t offsets: {}\n\t };\n\t\n\t // compute reference element offsets\n\t data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\t\n\t // compute auto placement, store placement inside the data object,\n\t // modifiers will be able to edit `placement` if needed\n\t // and refer to originalPlacement to know the original value\n\t data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\t\n\t // store the computed placement inside `originalPlacement`\n\t data.originalPlacement = data.placement;\n\t\n\t // compute the popper offsets\n\t data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\t data.offsets.popper.position = 'absolute';\n\t\n\t // run the modifiers\n\t data = runModifiers(this.modifiers, data);\n\t\n\t // the first `update` will call `onCreate` callback\n\t // the other ones will call `onUpdate` callback\n\t if (!this.state.isCreated) {\n\t this.state.isCreated = true;\n\t this.options.onCreate(data);\n\t } else {\n\t this.options.onUpdate(data);\n\t }\n\t}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n\t // if popper is destroyed, don't perform any further update\n\t if (this.state.isDestroyed) {\n\t return;\n\t }\n\n\t var data = {\n\t instance: this,\n\t styles: {},\n\t arrowStyles: {},\n\t attributes: {},\n\t flipped: false,\n\t offsets: {}\n\t };\n\n\t // compute reference element offsets\n\t data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n\t // compute auto placement, store placement inside the data object,\n\t // modifiers will be able to edit `placement` if needed\n\t // and refer to originalPlacement to know the original value\n\t data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n\t // store the computed placement inside `originalPlacement`\n\t data.originalPlacement = data.placement;\n\n\t // compute the popper offsets\n\t data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\t data.offsets.popper.position = 'absolute';\n\n\t // run the modifiers\n\t data = runModifiers(this.modifiers, data);\n\n\t // the first `update` will call `onCreate` callback\n\t // the other ones will call `onUpdate` callback\n\t if (!this.state.isCreated) {\n\t this.state.isCreated = true;\n\t this.options.onCreate(data);\n\t } else {\n\t this.options.onUpdate(data);\n\t }\n\t}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }" ]
[ "0.812336", "0.8095888", "0.80919594", "0.80919594", "0.80919594", "0.80919594", "0.8074055", "0.8074055", "0.8074055", "0.8074055", "0.8074055", "0.8074055", "0.8074055", "0.8074055", "0.8074055", "0.8074055", "0.8074055", "0.8074055", "0.8074055", "0.8074055", "0.8074055", "0.8074055", "0.80413634", "0.80383795" ]
0.0
-1
Setup needed event listeners used to update the popper position
function setupEventListeners(reference, options, state, updateBound) { // Resize event listener on window state.updateBound = updateBound; getWindow(reference).addEventListener('resize', state.updateBound, { passive: true }); // Scroll event listener on scroll parents var scrollElement = getScrollParent(reference); attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents); state.scrollElement = scrollElement; state.eventsEnabled = true; return state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function g(e){if(Q.popperInstance?(y()||Q.popperInstance.scheduleUpdate(),Q.props.livePlacement&&!y()&&Q.popperInstance.enableEventListeners()):(Q.popperInstance=v(),Q.props.livePlacement||Q.popperInstance.disableEventListeners())\n/**\n * If the instance previously had followCursor behavior, it will be\n * positioned incorrectly if triggered by `focus` afterwards.\n * Update the reference back to the real DOM element\n */,Q.popperInstance.reference=Q.reference,y()){Q.popperChildren.arrow&&(Q.popperChildren.arrow.style.margin=\"\");var t=Qe(Q.props.delay,0,de.delay);M.type&&i(t&&H?H:M)}kt(Q.popperInstance,e),Q.props.appendTo.contains(Q.popper)||(Q.props.appendTo.appendChild(Q.popper),Q.props.onMount(Q),Q.state.isMounted=!0)}", "function setupListeners() {\n // handle mouse down and mouse move\n el.on('mousedown touchstart', handleMouseDown);\n\n // handle mouse up\n pEl.on('mouseup touchend', handleMouseUp);\n\n // handle window resize\n $(win).resize(handleWindowResize);\n\n $('body').on(opts['namespace'] + '-neighbour-resized', function(e) {\n if (e.target !== el[0]) {\n handleNeighbourSplitter();\n }\n });\n\n // destory, cleanup listeners\n scope.$on('$destroy', function() {\n el.off('mousedown touchstart', handleMouseDown);\n pEl.off('mouseup touchend', handleMouseUp);\n $(win).off('resize', handleWindowResize);\n });\n }", "setListeners() {\n $(document).on( \"cart-lower-third:opened\", this.createModal.bind(this))\n $(document).on( \"cart-lower-third:closed\", this.destroyModal.bind(this))\n }", "setEvents() {\n\t\t$('.fa-bars').click(() => {\n\t\t\t$('.top-nav').addClass('-active');\n\t\t});\n\n\t\tthis.$navToggle.on('click', (e) => {\n\t\t\te.preventDefault();\n\n\t\t\tthis.$navMenu.toggleClass('-active');\n\t\t\tthis.$navToggle.toggleClass('-close');\n\t\t});\n\n\t\t$(document).on('click', this.$countryToggle.selector, (e) => {\n\t\t\te.preventDefault();\n\n\t\t\tif (this.$countryMenu.hasClass('-active')) {\n\t\t\t\tthis.$countryToggle.removeClass('-close');\n\t\t\t\tthis.$countryMenu.removeClass('-active');\n\t\t\t} else {\n\t\t\t\tthis.$countryToggle.addClass('-close');\n\t\t\t\tthis.$countryMenu.addClass('-active');\n\t\t\t}\n\t\t});\n\n\t\t$(document).on('click', (e) => {\n\t\t\t// Closes country dropdown on desktop if clicked outside the dropdown\n\t\t\tif (!$(e.target).closest('.country-container').length && (e.target.className !== 'header-site-links' && !$(e.target).closest('.header-site-links').length)) {\n\t\t\t\t$('.country-dropdown').removeClass('-active');\n\t\t\t}\n\n\t\t\t// Closes country dropdown menu on mobile-only if clicked anywhere but one of the actual links\n\t\t\tif ((e.target.className !== 'country-dropdown-list' && !$(e.target).closest('.header-site-links').length) && (this.$countryMenu.hasClass('-active') && this.$navToggle.is(':visible'))) {\n\t\t\t\t$('.country-dropdown').removeClass('-active');\n\t\t\t}\n\t\t});\n\t}", "function setupEventListeners(reference,options,state,updateBound){ // Resize event listener on window\nstate.updateBound = updateBound;getWindow(reference).addEventListener('resize',state.updateBound,{passive:true}); // Scroll event listener on scroll parents\nvar scrollElement=getScrollParent(reference);attachToScrollParents(scrollElement,'scroll',state.updateBound,state.scrollParents);state.scrollElement = scrollElement;state.eventsEnabled = true;return state;}", "function setupEventListeners(dropdown, container) {\n container.hover(function() {\n position(dropdown, container);\n dropdown.show();\n });\n\n container.mouseleave(function() {\n dropdown.hide();\n });\n\n scope.$on('$destroy', function() {\n container.off('hover');\n container.off('mouseleave')\n });\n }", "function update(){ // if popper is destroyed, don't perform any further update\nif(this.state.isDestroyed){return;}var data={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:false,offsets:{}}; // compute reference element offsets\ndata.offsets.reference = getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed); // compute auto placement, store placement inside the data object,\n// modifiers will be able to edit `placement` if needed\n// and refer to originalPlacement to know the original value\ndata.placement = computeAutoPlacement(this.options.placement,data.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement`\ndata.originalPlacement = data.placement;data.positionFixed = this.options.positionFixed; // compute the popper offsets\ndata.offsets.popper = getPopperOffsets(this.popper,data.offsets.reference,data.placement);data.offsets.popper.position = this.options.positionFixed?'fixed':'absolute'; // run the modifiers\ndata = runModifiers(this.modifiers,data); // the first `update` will call `onCreate` callback\n// the other ones will call `onUpdate` callback\nif(!this.state.isCreated){this.state.isCreated = true;this.options.onCreate(data);}else {this.options.onUpdate(data);}}", "update() {\n if (this._popper) {\n this._popper.update();\n }\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "addListeners() {\n // Event listener for watching window width and disabling our parent toggles\n window.addEventListener('resize', debounce(() => {\n this.handleDisablingToggles();\n }));\n\n // Event listener for toggling active class on menu\n this.menuToggle.addEventListener('click', () => {\n this.toggleMenuActiveClass();\n });\n\n // Event Listener for parent nav links to open their child list\n this.parentToggles.forEach(toggle => {\n toggle.addEventListener('click', e => {\n this.constructor.toggleParentActiveClass(e);\n });\n });\n }", "function popupHookListeners() {\n\tdocument.addEventListener(\"click\", function (event) {\n\t\t// saves last clicked element\n\t\t// currently used for shift-click select functionality\n\t\tpop.last_clicked_el = event.target;\n\t});\n}", "function initTooltips(){\n let tooltipData = document.querySelectorAll(\"[data-toggle='tooltip']\");\n for (var index = 0; index < tooltipData.length; index++) {\n tooltipData[index].addEventListener(\"mouseenter\",togglePopper);\n tooltipData[index].addEventListener(\"mouseleave\",togglePopper);\n }\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n window.addEventListener('resize', state.updateBound, {passive: true});\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupListeners() {\n setupAppHomeOpenedListener();\n setupClearGoalsButtonListener();\n}", "addMenuListeners() {\n this.htmlData.menuParents.forEach(el => {\n el.addEventListener(\"click\", () => this.submenuListener(event));\n });\n window.addEventListener(\"resize\", () => this.checkScreenSize(event));\n this.addOutsideListener();\n }", "setVariationListeners() {\n\t\tVariations.on('variation:detected:sho', (event, data) => {\n\t\t\t// console.log('|global_nav| sticky variations ready');\n\t\t\t\tif (data && data.sticky_global_navigation) {\n\t\t\t\tthis.setStickyGlobalNavListner();\n\t\t\t\t}\n\t\t});\n }", "function initPopovers(){\n let popoverData = document.querySelectorAll(\"[data-toggle='popover']\");\n for (var index = 0; index < popoverData.length; index++) {\n popoverData[index].addEventListener(\"click\",togglePopper);\n }\n}", "setupResizeListeners() {\n window.addEventListener('resize', () => {\n this.calculateButtonVisibility();\n this.updateDOM();\n });\n }", "setupResizeListeners() {\n window.addEventListener('resize', () => {\n this.calculateButtonVisibility();\n this.updateDOM();\n });\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n }", "function setupEventListeners(reference, options, state, updateBound) {\n\t // Resize event listener on window\n\t state.updateBound = updateBound;\n\t getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\t\n\t // Scroll event listener on scroll parents\n\t var scrollElement = getScrollParent(reference);\n\t attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n\t state.scrollElement = scrollElement;\n\t state.eventsEnabled = true;\n\t\n\t return state;\n\t}", "function setupEventListeners(reference, options, state, updateBound) {\n\t // Resize event listener on window\n\t state.updateBound = updateBound;\n\t getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\t\n\t // Scroll event listener on scroll parents\n\t var scrollElement = getScrollParent(reference);\n\t attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n\t state.scrollElement = scrollElement;\n\t state.eventsEnabled = true;\n\t\n\t return state;\n\t}", "setEventListeners() {\n $('body').on('touchend click','.menu__option--mode',this.onModeToggleClick.bind(this));\n $('body').on('touchend',this.onTouchEnd.bind(this));\n this.app.on('change:mode',this.onModeChange.bind(this));\n this.app.on('show:menu',this.show.bind(this));\n this.book.on('load:book',this.setTitleBar.bind(this));\n this.book.on('pageSet',this.onPageSet.bind(this));\n this.tutorial.on('done',this.onTutorialDone.bind(this));\n }", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}", "function setupEventListeners(reference, options, state, updateBound) {\n\t // Resize event listener on window\n\t state.updateBound = updateBound;\n\t getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n\t // Scroll event listener on scroll parents\n\t var scrollElement = getScrollParent(reference);\n\t attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n\t state.scrollElement = scrollElement;\n\t state.eventsEnabled = true;\n\n\t return state;\n\t}", "function update() {\n\t // if popper is destroyed, don't perform any further update\n\t if (this.state.isDestroyed) {\n\t return;\n\t }\n\t\n\t var data = {\n\t instance: this,\n\t styles: {},\n\t arrowStyles: {},\n\t attributes: {},\n\t flipped: false,\n\t offsets: {}\n\t };\n\t\n\t // compute reference element offsets\n\t data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\t\n\t // compute auto placement, store placement inside the data object,\n\t // modifiers will be able to edit `placement` if needed\n\t // and refer to originalPlacement to know the original value\n\t data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\t\n\t // store the computed placement inside `originalPlacement`\n\t data.originalPlacement = data.placement;\n\t\n\t data.positionFixed = this.options.positionFixed;\n\t\n\t // compute the popper offsets\n\t data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\t\n\t data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\t\n\t // run the modifiers\n\t data = runModifiers(this.modifiers, data);\n\t\n\t // the first `update` will call `onCreate` callback\n\t // the other ones will call `onUpdate` callback\n\t if (!this.state.isCreated) {\n\t this.state.isCreated = true;\n\t this.options.onCreate(data);\n\t } else {\n\t this.options.onUpdate(data);\n\t }\n\t}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function setupListeners(){\n const $amount = document.getElementById(\"amount\");\n const $sentOrder = document.getElementById(\"enviar-venda\");\n const $addProduct = document.getElementById(\"btn-add\");\n const $openCart = document.getElementById(\"btn-prod\");\n const $btnProduct = document.getElementById(\"btn-newOrder\");\n const $selectProduct = document.getElementById(\"select-products\");\n const $signOut = document.querySelector(\"#signOut\");\n\n $amount.onchange = resetMessages;\n $selectProduct.onchange = resetMessages;\n $openCart.onclick = resetMessages;\n $btnProduct.onclick = newOrder;\n $addProduct.onclick = addProductToCart;\n $sentOrder.onclick = sendNewOrder;\n $signOut.onclick = signOut;\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n }; // compute reference element offsets\n\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n }; // compute reference element offsets\n\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n }; // compute reference element offsets\n\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n }; // compute reference element offsets\n\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n }; // compute reference element offsets\n\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n }; // compute reference element offsets\n\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n }; // compute reference element offsets\n\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n }; // compute reference element offsets\n\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n }; // compute reference element offsets\n\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n }; // compute reference element offsets\n\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "calculateAndSetPopupPosition() {\n this.measureDOMNodes();\n\n const { selfWidth, selfHeight, targetWidth, targetHeight, targetLeft, targetTop, viewportWidth, viewportHeight } = this;\n\n const newPositions = this.props.positionFunction(\n selfWidth,\n selfHeight,\n targetWidth,\n targetHeight,\n targetLeft,\n targetTop,\n viewportWidth,\n viewportHeight\n );\n\n const { newLeft, newTop } = newPositions;\n\n this.movePopover(newLeft, newTop);\n this.positioningValid = true;\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "_registerEvents() {\n if(this.options.scrollTop){\n this._bindHandler = this._scrollTop.bind(this);\n this.$element.on('open.zf.drilldown hide.zf.drilldown closed.zf.drilldown',this._bindHandler);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}" ]
[ "0.67695594", "0.6420096", "0.6403713", "0.6225101", "0.6185677", "0.6182807", "0.61679745", "0.61568534", "0.6139762", "0.6105795", "0.6095973", "0.607976", "0.6069184", "0.60660064", "0.60343856", "0.60328144", "0.60272366", "0.6027115", "0.6025439", "0.60178673", "0.60178673", "0.60178673", "0.60178673", "0.60178673", "0.60178673", "0.60178673", "0.60178673", "0.60178673", "0.60178673", "0.60178673", "0.60178673", "0.60178673", "0.60178673", "0.60178673", "0.60178673", "0.60126275", "0.60126275", "0.60018927", "0.5997592", "0.5997592", "0.5997592", "0.5997592", "0.5997592", "0.5997592", "0.5997592", "0.5997592", "0.5997592", "0.5997592", "0.5990851", "0.59906095", "0.5971645", "0.5971645", "0.5971645", "0.5971645", "0.5971645", "0.5971645", "0.5971645", "0.5971645", "0.5971645", "0.5971645", "0.5971645", "0.5971645", "0.5971645", "0.5971645", "0.5971645", "0.5971645", "0.59651107", "0.5958431", "0.5958431", "0.5958431", "0.5958431", "0.5958431", "0.5958431", "0.5958431", "0.5958431", "0.5958431", "0.5958431", "0.59480757", "0.59406316", "0.5933286", "0.59329814", "0.59247965", "0.59247965", "0.59247965", "0.59247965", "0.59247965", "0.59247965", "0.59247965", "0.59247965", "0.59247965", "0.59247965", "0.59247965", "0.59247965", "0.59247965", "0.59247965", "0.59247965", "0.59247965", "0.59247965", "0.59247965", "0.59247965", "0.59247965" ]
0.0
-1
It will add resize/scroll events and start recalculating position of the popper element when they are triggered.
function enableEventListeners() { if (!this.state.eventsEnabled) { this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "adoptPositionOnResize() {\n if (this.adoptOnResize) {\n\n /**\n * Get app event manager\n * @type {ApplicationEventManager|{subscribe, eventList}}\n */\n const appEventManager = this.view.controller.root().eventManager;\n\n appEventManager.subscribe({\n event: {name: appEventManager.eventList.resizeWindow},\n callback() {\n this.setPosition({\n $container: this.$container,\n $item: this.$,\n position: this.position\n });\n }\n }, false);\n }\n }", "_events() {\n $(window).on('resize.zf.interchange', Foundation.util.throttle(() => {\n this._reflow();\n }, 50));\n }", "function update(){ // if popper is destroyed, don't perform any further update\nif(this.state.isDestroyed){return;}var data={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:false,offsets:{}}; // compute reference element offsets\ndata.offsets.reference = getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed); // compute auto placement, store placement inside the data object,\n// modifiers will be able to edit `placement` if needed\n// and refer to originalPlacement to know the original value\ndata.placement = computeAutoPlacement(this.options.placement,data.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement`\ndata.originalPlacement = data.placement;data.positionFixed = this.options.positionFixed; // compute the popper offsets\ndata.offsets.popper = getPopperOffsets(this.popper,data.offsets.reference,data.placement);data.offsets.popper.position = this.options.positionFixed?'fixed':'absolute'; // run the modifiers\ndata = runModifiers(this.modifiers,data); // the first `update` will call `onCreate` callback\n// the other ones will call `onUpdate` callback\nif(!this.state.isCreated){this.state.isCreated = true;this.options.onCreate(data);}else {this.options.onUpdate(data);}}", "function g(e){if(Q.popperInstance?(y()||Q.popperInstance.scheduleUpdate(),Q.props.livePlacement&&!y()&&Q.popperInstance.enableEventListeners()):(Q.popperInstance=v(),Q.props.livePlacement||Q.popperInstance.disableEventListeners())\n/**\n * If the instance previously had followCursor behavior, it will be\n * positioned incorrectly if triggered by `focus` afterwards.\n * Update the reference back to the real DOM element\n */,Q.popperInstance.reference=Q.reference,y()){Q.popperChildren.arrow&&(Q.popperChildren.arrow.style.margin=\"\");var t=Qe(Q.props.delay,0,de.delay);M.type&&i(t&&H?H:M)}kt(Q.popperInstance,e),Q.props.appendTo.contains(Q.popper)||(Q.props.appendTo.appendChild(Q.popper),Q.props.onMount(Q),Q.state.isMounted=!0)}", "function update() {\n\t // if popper is destroyed, don't perform any further update\n\t if (this.state.isDestroyed) {\n\t return;\n\t }\n\t\n\t var data = {\n\t instance: this,\n\t styles: {},\n\t arrowStyles: {},\n\t attributes: {},\n\t flipped: false,\n\t offsets: {}\n\t };\n\t\n\t // compute reference element offsets\n\t data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\t\n\t // compute auto placement, store placement inside the data object,\n\t // modifiers will be able to edit `placement` if needed\n\t // and refer to originalPlacement to know the original value\n\t data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\t\n\t // store the computed placement inside `originalPlacement`\n\t data.originalPlacement = data.placement;\n\t\n\t data.positionFixed = this.options.positionFixed;\n\t\n\t // compute the popper offsets\n\t data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\t\n\t data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\t\n\t // run the modifiers\n\t data = runModifiers(this.modifiers, data);\n\t\n\t // the first `update` will call `onCreate` callback\n\t // the other ones will call `onUpdate` callback\n\t if (!this.state.isCreated) {\n\t this.state.isCreated = true;\n\t this.options.onCreate(data);\n\t } else {\n\t this.options.onUpdate(data);\n\t }\n\t}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function startRepositioningOnResize() {\n\n var repositionMenu = (function(target, options) {\n return $$rAF.throttle(function() {\n if (opts.isRemoved) return;\n var position = calculateMenuPosition(target, options);\n\n target.css(animator.toCss(position));\n });\n })(element, opts);\n\n $window.addEventListener('resize', repositionMenu);\n $window.addEventListener('orientationchange', repositionMenu);\n\n return function stopRepositioningOnResize() {\n\n // Disable resizing handlers\n $window.removeEventListener('resize', repositionMenu);\n $window.removeEventListener('orientationchange', repositionMenu);\n\n };\n }", "function startRepositioningOnResize() {\n\n var repositionMenu = (function(target, options) {\n return $$rAF.throttle(function() {\n if (opts.isRemoved) return;\n var position = calculateMenuPosition(target, options);\n\n target.css(animator.toCss(position));\n });\n })(element, opts);\n\n $window.addEventListener('resize', repositionMenu);\n $window.addEventListener('orientationchange', repositionMenu);\n\n return function stopRepositioningOnResize() {\n\n // Disable resizing handlers\n $window.removeEventListener('resize', repositionMenu);\n $window.removeEventListener('orientationchange', repositionMenu);\n\n };\n }", "function startRepositioningOnResize() {\n\n var repositionMenu = (function(target, options) {\n return $$rAF.throttle(function() {\n if (opts.isRemoved) return;\n var position = calculateMenuPosition(target, options);\n\n target.css(animator.toCss(position));\n });\n })(element, opts);\n\n $window.addEventListener('resize', repositionMenu);\n $window.addEventListener('orientationchange', repositionMenu);\n\n return function stopRepositioningOnResize() {\n\n // Disable resizing handlers\n $window.removeEventListener('resize', repositionMenu);\n $window.removeEventListener('orientationchange', repositionMenu);\n\n }\n }", "function startRepositioningOnResize() {\n\n var repositionMenu = (function(target, options) {\n return $$rAF.throttle(function() {\n if (opts.isRemoved) return;\n var position = calculateMenuPosition(target, options);\n\n target.css(animator.toCss(position));\n });\n })(element, opts);\n\n $window.addEventListener('resize', repositionMenu);\n $window.addEventListener('orientationchange', repositionMenu);\n\n return function stopRepositioningOnResize() {\n\n // Disable resizing handlers\n $window.removeEventListener('resize', repositionMenu);\n $window.removeEventListener('orientationchange', repositionMenu);\n\n }\n }", "function startRepositioningOnResize() {\n\n var repositionMenu = (function(target, options) {\n return $$rAF.throttle(function() {\n if (opts.isRemoved) return;\n var position = calculateMenuPosition(target, options);\n\n target.css(animator.toCss(position));\n });\n })(element, opts);\n\n $window.addEventListener('resize', repositionMenu);\n $window.addEventListener('orientationchange', repositionMenu);\n\n return function stopRepositioningOnResize() {\n\n // Disable resizing handlers\n $window.removeEventListener('resize', repositionMenu);\n $window.removeEventListener('orientationchange', repositionMenu);\n\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n }", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function setupEventListeners(reference,options,state,updateBound){ // Resize event listener on window\nstate.updateBound = updateBound;getWindow(reference).addEventListener('resize',state.updateBound,{passive:true}); // Scroll event listener on scroll parents\nvar scrollElement=getScrollParent(reference);attachToScrollParents(scrollElement,'scroll',state.updateBound,state.scrollParents);state.scrollElement = scrollElement;state.eventsEnabled = true;return state;}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}" ]
[ "0.6574355", "0.6568465", "0.65395826", "0.64589787", "0.64420676", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.63995796", "0.63995796", "0.6395972", "0.6395972", "0.6395972", "0.63947153", "0.638203", "0.6354244", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029", "0.6353029" ]
0.0
-1
Remove event listeners used to update the popper position
function removeEventListeners(reference, state) { // Remove resize event listener on window getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents state.scrollParents.forEach(function (target) { target.removeEventListener('scroll', state.updateBound); }); // Reset state state.updateBound = null; state.scrollParents = []; state.scrollElement = null; state.eventsEnabled = false; return state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_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 }", "_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 this.$button_.off(app.InputEvent.START, this.onDropClick);\n }", "function removeListeners() {\r\n gameOverModal.btn.removeEventListener(\"click\", backToMenu);\r\n }", "removeEventListeners() {\n const $hubblePlot = d3Select(this.svgEl.current);\n const $allPoints = d3Select(this.svgEl.current).selectAll('.data-point');\n\n $hubblePlot\n .on('click', null)\n .on('mousemove', null)\n .on('mouseout', null);\n $allPoints\n .on('mouseover', null)\n .on('mouseout', null)\n .on('click', null)\n .on('drag', null);\n }", "function removeListeners() {\r\n modal.yes.removeEventListener(\"click\", backToMenu);\r\n modal.no.removeEventListener(\"click\", backToGame);\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 }", "_removeEventListeners() {\n this.currentEventListeners.forEach(listener => {\n this.domElement.removeEventListener(listener.event, listener.callBack);\n });\n this.currentEventListeners = null;\n }", "function g(e){if(Q.popperInstance?(y()||Q.popperInstance.scheduleUpdate(),Q.props.livePlacement&&!y()&&Q.popperInstance.enableEventListeners()):(Q.popperInstance=v(),Q.props.livePlacement||Q.popperInstance.disableEventListeners())\n/**\n * If the instance previously had followCursor behavior, it will be\n * positioned incorrectly if triggered by `focus` afterwards.\n * Update the reference back to the real DOM element\n */,Q.popperInstance.reference=Q.reference,y()){Q.popperChildren.arrow&&(Q.popperChildren.arrow.style.margin=\"\");var t=Qe(Q.props.delay,0,de.delay);M.type&&i(t&&H?H:M)}kt(Q.popperInstance,e),Q.props.appendTo.contains(Q.popper)||(Q.props.appendTo.appendChild(Q.popper),Q.props.onMount(Q),Q.state.isMounted=!0)}", "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 }", "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}", "_removeEventListeners() {\n this.el.removeEventListener('click', this._onClickBound);\n this.el.removeEventListener('keydown', this._onKeydownBound);\n }", "manageActiveListeners() {\n if (this.state.isDropdownOpen) {\n document.addEventListener('keydown', this.handleKeyboardEvents);\n document.addEventListener('mousedown', this.handleClickOutside);\n } else {\n document.removeEventListener('keydown', this.handleKeyboardEvents);\n document.removeEventListener('mousedown', this.handleClickOutside);\n }\n }", "removeEventListeners() {\n // Empty in base class.\n }", "function removeEventListeners(reference,state){ // Remove resize event listener on window\ngetWindow(reference).removeEventListener('resize',state.updateBound); // Remove scroll event listener on scroll parents\nstate.scrollParents.forEach(function(target){target.removeEventListener('scroll',state.updateBound);}); // Reset state\nstate.updateBound = null;state.scrollParents = [];state.scrollElement = null;state.eventsEnabled = false;return state;}", "function removeListeners() {\n $(\"#controls\").off(\"click\");\n $(\"#sequence\").off(\"click\");\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 }", "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 }", "removeHooks(): void {\n super.removeHooks();\n\n if (this._map) {\n if (this._marker) {\n this._marker.off('click', this._onClick, this);\n this._map\n .off('click', this._onClick, this)\n .off('click', this._onTouch, this)\n .removeLayer(this._marker);\n delete this._marker;\n }\n\n this._mouseMarker.off('click', this._onClick, this);\n this._map.removeLayer(this._mouseMarker);\n delete this._mouseMarker;\n\n this._map.off('mousemove', this._onMouseMove, this);\n }\n }", "detachHandlers() {\n this.templateNext.removeEventListener('click', this.handleNext);\n this.templatePrev.removeEventListener('click', this.handlePrev);\n window.removeEventListener('keydown', this.handleKeyDown);\n window.removeEventListener('resize', this.handleResize)\n }", "destroy () {\n // unbind event handlers and clear elements created\n }", "detachPointerEvents() {\n var paneElement = this._pane.getContentElement();\n paneElement.removeListener(\"pointerdown\", this.handlePointerDown, this);\n paneElement.removeListener(\"tap\", this.handleTap, this);\n paneElement.removeListener(\"pointerover\", this.handlePointerOver, this);\n paneElement.removeListener(\"pointermove\", this.handlePointerMove, this);\n paneElement.removeListener(\"losecapture\", this.handleLoseCapture, this);\n }", "removeAllEventListeners () {\n this.eventListeners = [];\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 }", "unlisten() {\n EventManager.off('resize', this.onResize)\n }", "function removeEventListeners(){\n _.forEach(unlistenCallbacks, function(unlisten){\n unlisten();\n });\n unlistenCallbacks = [];\n }", "_detachScrollSpy() {\n this._scrollCarrier.removeEventListener('scroll', this._scrollSpy);\n this._scrollCarrier.removeEventListener('resize', this._scrollSpy);\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 }", "destroy () {\n const mapElement = this._mapElement\n const isScrollElementEnabled = this._isScrollElementEnabled\n\n this._mutationObserver.disconnect()\n this._mutationObserver = null\n\n /* eslint-disable-next-line */\n mapElement.removeEventListener('click', DomVerticalMiniMap.scrollDocumentTo.bind(event))\n window.removeEventListener('resize', this._setMapPointStyles.bind(this))\n\n if (isScrollElementEnabled) {\n window.removeEventListener('scroll', this._setScrollElementStyle.bind(this))\n window.removeEventListener('resize', this._setScrollElementStyle.bind(this))\n\n this._scrollElement.remove()\n this._scrollElement = null\n }\n\n const mapPoints = this._mapPoints\n for (let i = 0, length = mapPoints.length; i < length; ++i) {\n const mapPoint = mapPoints[i]\n mapPoint['marker'].remove()\n }\n this._mapPoints = []\n\n mapElement.remove()\n this._mapElement = null\n }", "__unregisterEventListener() {\n qx.event.Registration.removeListener(\n window,\n \"resize\",\n this._updateSize,\n this\n );\n\n qx.event.Registration.removeListener(\n window,\n \"scroll\",\n this._onScroll,\n this\n );\n\n this.removeListener(\"pointerdown\", qx.bom.Event.preventDefault, this);\n this.removeListener(\"pointerup\", qx.bom.Event.preventDefault, this);\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 }", "function unwireEvents() {\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'keydown', maskInputKeyDownHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'keypress', maskInputKeyPressHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'keyup', maskInputKeyUpHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'input', maskInputHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'focus', maskInputFocusHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'blur', maskInputBlurHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'paste', maskInputPasteHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'cut', maskInputCutHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'mousedown', maskInputMouseDownHandler);\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.element, 'mouseup', maskInputMouseUpHandler);\n if (this.formElement) {\n _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"EventHandler\"].remove(this.formElement, 'reset', resetFormHandler);\n }\n}", "_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 }", "detach() {\n if (this.overlayRef) {\n this.overlayRef.detach();\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n this.unsubscribeFromClickEvents();\n if (this.closeSubscription) {\n this.closeSubscription.unsubscribe();\n this.closeSubscription = null;\n }\n if (this.positionChangesSubscription) {\n this.positionChangesSubscription.unsubscribe();\n this.positionChangesSubscription = null;\n }\n this.popover = null;\n }", "function cleanup () {\n angular.element($window).off('resize', positionDropdown);\n if ( elements ){\n var items = 'ul scroller scrollContainer input'.split(' ');\n angular.forEach(items, function(key){\n elements.$[key].remove();\n });\n }\n }", "removeDragListeners() {}", "removeDragListeners() {}", "removeEvents() {\n }", "removeClickAwayEvent() {\n $('main').off('click.atkPanel');\n $(document).off('keyup.atkPanel');\n }", "unMount() {\n this.removeListeners();\n SimpleBar.instances.delete(this.el);\n }", "manageActiveListeners() {\n if (ExecutionEnvironment.canUseDOM) {\n if (this.state.showAccountPopOver) {\n document.addEventListener('mousedown', this.handleClickOutside);\n } else {\n document.removeEventListener('mousedown', this.handleClickOutside);\n }\n }\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\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 }", "unMount() {\n this.removeListeners();\n SimpleBar.instances.delete(this.el);\n }", "destroy () {\n\t\tthis.options.element.removeEventListener('click', this.onClickToElement);\n\t\tthis.options.element.removeChild(this.options.element.querySelector('.pollsr'));\n\t}", "function removeButtonClickHandler(e) {\n removeTrigger(e.target.closest('.trigger'));\n }", "_removeTrackListeners() {\n var interactionRects = Px.d3.selectAll(Polymer.dom(this.$$('#sliderSVG')).querySelectorAll('.sliderTrack'));\n\n interactionRects.on('click', null);\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 debug(\"removeListeners\");\n cards().forEach(function(card) {\n card.removeEventListener('click', cardMagic)\n })\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "destroy() {\n this.removeDomListeners()\n // 238-4\n this.unsubscribers.forEach(unsub => unsub())\n }", "function removeListeners() {\n\t\t$(document).off(EVENT_NAME_KEYPRESS);\n\t\t$(document).off(EVENT_NAME_KEYUP);\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 }", "__removeBroadcastEventListeners() {\n let bindEvents = this._bindBroadcastEvents;\n /* istanbul ignore next */\n if (!bindEvents) {\n return;\n }\n\n bindEvents.forEach(item => eventCenter.off(item[0], item[1]));\n this._bindBroadcastEvents = [];\n }", "function destroy() {\n $(config.popoverClass).remove();\n\n // Unbind all events.\n $.each(config.events, function(index, event) {\n $(document).unbind(event);\n });\n\n $(document).trigger(config.events.destroyed);\n }", "_destroy() {\n this.$element.off('click.zf.smoothScrollWithLinks', 'a[href*=\"#\"]', this._linkClickListener);\n }", "_events() {\n this.$element.off('.zf.reveal').on({\n 'open.zf.reveal': this.open.bind(this),\n 'closed.zf.reveal': this.close.bind(this)\n });\n\n this.$insert.off('click').on({\n 'click': this.insert.bind(this)\n });\n\n this.$menu.off('click', '[data-name]').on({\n 'click': this._loadShortcode.bind(this)\n }, '[data-name]');\n\n this.$form.off('input change', ':input').on({\n 'input': this._loadPreview.bind(this),\n 'change': this._loadPreview.bind(this)\n }, ':input');\n }", "update() {\n if (this._popper) {\n this._popper.update();\n }\n }", "function onRemove() {\n $(PanelManager).off(\"editorAreaResize\", _onEditorAreaResize);\n $(DocumentManager).off(\"fileNameChange\", _onFileNameChange);\n $(\"#img\").off(\"mousemove\", \"#img-preview\", _showImageTip)\n .off(\"mouseleave\", \"#img-preview\", _hideImageTip);\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\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 removeEventHandlers() {\n $this.off('click.collapse', '> li > .collapsible-header');\n }", "function removeEventHandlers() {\n $this.off('click.collapse', '> li > .collapsible-header');\n }", "function removeEventHandlers() {\n $this.off('click.collapse', '> li > .collapsible-header');\n }", "function cleanup () {\n if(!ctrl.hidden) {\n $mdUtil.enableScrolling();\n }\n\n angular.element($window).off('resize', positionDropdown);\n if ( elements ){\n var items = 'ul scroller scrollContainer input'.split(' ');\n angular.forEach(items, function(key){\n elements.$[key].remove();\n });\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}", "detachKeyboardZoomEvents() {\n fabric.util.removeListener(document, KEY_DOWN, this._listeners.keydown);\n fabric.util.removeListener(document, KEY_UP, this._listeners.keyup);\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 }", "destroy() {\n\t\tdocument.removeEventListener( 'click', this.onDocumentClick, true );\n\t\tthis.el.removeEventListener( 'click', this.onSubmenuToggleClick, false );\n\t\tthis.el.removeEventListener( 'mouseover', this.onMenuItemMouseEnter, false );\n\t\tthis.el.removeEventListener( 'mouseout', this.onMenuItemMouseLeave, false );\n\t\tthis.el.removeEventListener( 'focus', this.onMenuLinkFocus, true );\n\t\tthis.el.removeEventListener( 'blur', this.onMenuLinkBlur, true );\n\t}", "function removeEventHandlers() {\r\n $this.off('click.collapse', '> li > .collapsible-header');\r\n }", "undelegateEvents() {\n this.delegatedEventListeners.forEach(({ type, listener }) => {\n this.el.removeEventListener(type, listener);\n });\n\n this.delegatedEventListeners = [];\n }", "detach() {\n const that = this;\n that._removeEventListeners();\n }", "dettachListeners(){\n $(\".card-container\").find(\".card:first()\").off(\"click\");\n $(\".card-container\").find(\".card:nth-child(2)\").off(\"click\");\n $(\".card-container\").find(\".card:last()\").off(\"click\");\n $(\".center-info\").find(\"p:first()\").off(\"click\");\n $(\".center-info\").find(\"p:eq(1)\").off(\"click\");\n }", "destroy() {\n if(this.options.scrollTop) this.$element.off('.zf.drilldown',this._bindHandler);\n this._hideAll();\n\t this.$element.off('mutateme.zf.trigger');\n Foundation.Nest.Burn(this.$element, 'drilldown');\n this.$element.unwrap()\n .find('.js-drilldown-back, .is-submenu-parent-item').remove()\n .end().find('.is-active, .is-closing, .is-drilldown-submenu').removeClass('is-active is-closing is-drilldown-submenu')\n .end().find('[data-submenu]').removeAttr('aria-hidden tabindex role');\n this.$submenuAnchors.each(function() {\n $(this).off('.zf.drilldown');\n });\n\n this.$submenus.removeClass('drilldown-submenu-cover-previous');\n\n this.$element.find('a').each(function(){\n var $link = $(this);\n $link.removeAttr('tabindex');\n if($link.data('savedHref')){\n $link.attr('href', $link.data('savedHref')).removeData('savedHref');\n }else{ return; }\n });\n Foundation.unregisterPlugin(this);\n }", "destroy() {\n //this.unobserve(this.slider.selector);\n this.unobserve(window);\n const tx = document.documentElement;\n tx.removeEventListener(\"pointermove\", this.onpointermove);\n tx.removeEventListener(\"mousemove\", this.mousemoveUpdater);\n /*this.slider.selector.removeEventListener(\"touchend\", this.mtimerUpdater);\n this.slider.selector.removeEventListener(\"mouseup\", this.mtimerUpdater);\n this.slider.selector.removeEventListener(\"mousedown\", this.mtimerUpdater);\n this.slider.selector.removeEventListener(\"mousemove\", this.mousemoveHandler);*/\n\n this.coordinator = null;\n }", "_detachMapMoveHandlers() {\n this._maps.forEach((map, index) => {\n map.events.remove('move', this._syncEvents[index]);\n });\n }", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents\n\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n }); // Reset state\n\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents\n\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n }); // Reset state\n\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents\n\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n }); // Reset state\n\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents\n\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n }); // Reset state\n\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents\n\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n }); // Reset state\n\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents\n\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n }); // Reset state\n\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}", "function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents\n\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n }); // Reset state\n\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}" ]
[ "0.6902162", "0.6785765", "0.6785765", "0.6785765", "0.6770545", "0.6743059", "0.6592434", "0.6507296", "0.6457278", "0.6452451", "0.6450113", "0.64127916", "0.63347775", "0.629248", "0.62742007", "0.62729037", "0.6259061", "0.62421805", "0.6237802", "0.62315637", "0.62195307", "0.62161916", "0.6199336", "0.6191355", "0.6177142", "0.6163619", "0.61624604", "0.6126676", "0.6117929", "0.61017114", "0.610114", "0.60997236", "0.60964173", "0.609053", "0.60865563", "0.6086161", "0.6075624", "0.60666543", "0.60666543", "0.60612535", "0.60607105", "0.6052495", "0.6028583", "0.6014693", "0.601379", "0.60137475", "0.6010497", "0.60104406", "0.60012054", "0.59996915", "0.59996915", "0.5999169", "0.5995357", "0.5985078", "0.5977093", "0.59751725", "0.5971537", "0.5969978", "0.59592795", "0.5954293", "0.5936196", "0.59333825", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5929358", "0.5926295", "0.591468", "0.591468", "0.591468", "0.5913537", "0.5910617", "0.5903993", "0.5903651", "0.59033126", "0.59011763", "0.5900217", "0.5899949", "0.5898291", "0.5897141", "0.5893345", "0.58921355", "0.5891942", "0.5891942", "0.5891942", "0.5891942", "0.5891942", "0.5891942", "0.5891942" ]
0.0
-1
It will remove resize/scroll events and won't recalculate popper position when they are triggered. It also won't trigger `onUpdate` callback anymore, unless you call `update` method manually.
function disableEventListeners() { if (this.state.eventsEnabled) { cancelAnimationFrame(this.scheduleUpdate); this.state = removeEventListeners(this.reference, this.state); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update(){ // if popper is destroyed, don't perform any further update\nif(this.state.isDestroyed){return;}var data={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:false,offsets:{}}; // compute reference element offsets\ndata.offsets.reference = getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed); // compute auto placement, store placement inside the data object,\n// modifiers will be able to edit `placement` if needed\n// and refer to originalPlacement to know the original value\ndata.placement = computeAutoPlacement(this.options.placement,data.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement`\ndata.originalPlacement = data.placement;data.positionFixed = this.options.positionFixed; // compute the popper offsets\ndata.offsets.popper = getPopperOffsets(this.popper,data.offsets.reference,data.placement);data.offsets.popper.position = this.options.positionFixed?'fixed':'absolute'; // run the modifiers\ndata = runModifiers(this.modifiers,data); // the first `update` will call `onCreate` callback\n// the other ones will call `onUpdate` callback\nif(!this.state.isCreated){this.state.isCreated = true;this.options.onCreate(data);}else {this.options.onUpdate(data);}}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}", "function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}" ]
[ "0.7489982", "0.73384917", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538", "0.7307538" ]
0.0
-1
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
Copyright 2013present, Facebook, Inc. All rights reserved. This source code is licensed under the BSDstyle license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory. Mostly taken from ReactPropTypes.
function createChainableTypeChecker(validate) { function checkType(isRequired, props, propName, componentName, location, propFullName) { var componentNameSafe = componentName || '<<anonymous>>'; var propFullNameSafe = propFullName || propName; if (props[propName] == null) { if (isRequired) { return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.')); } return null; } for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) { args[_key - 6] = arguments[_key]; } return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args)); } var chainedCheckType = checkType.bind(null, false); chainedCheckType.isRequired = checkType.bind(null, true); return chainedCheckType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get propTypes() {\n return {\n config: React.PropTypes.object,\n test: React.PropTypes.string,\n };\n }", "function isReactPropTypes(path) {\n return (\n (path.node.object.type === 'MemberExpression' &&\n path.node.object.object &&\n path.node.object.object.name === 'PropTypes') || (\n path.node.object.name === 'PropTypes' && !path.node.object.object)\n );\n}", "function shim() {\n\t\t\t\t\t\tinvariant(false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');\n\t\t\t\t\t}", "static get propTypes() { \n return {\n error: PropTypes.bool,\n title: PropTypes.string,\n stats: PropTypes.number,\n statsSymbol: PropTypes.string,\n footerInfo: PropTypes.object,\n }; \n }", "function shim() {\n invariant(false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');\n }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t }", "function shim() {\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n }", "function shim() {\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n }", "function shim() {\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n }", "function shim() {\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n }", "function shim() {\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n }", "function shim() {\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n }", "function shim() {\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n }", "function shim() {\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\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 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 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) {\r\n\t var propType = typeof propValue;\r\n\t if (Array.isArray(propValue)) {\r\n\t return 'array';\r\n\t }\r\n\t if (propValue instanceof RegExp) {\r\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\r\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\r\n\t // passes PropTypes.object.\r\n\t return 'object';\r\n\t }\r\n\t if (isSymbol(propType, propValue)) {\r\n\t return 'symbol';\r\n\t }\r\n\t return propType;\r\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 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\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\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\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\t var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof$1(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\t\t\t\tvar propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);\n\t\t\t\t\t\tif (Array.isArray(propValue)) {\n\t\t\t\t\t\t\treturn 'array';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (propValue instanceof RegExp) {\n\t\t\t\t\t\t\t// Old webkits (at least until Android 4.0) return 'function' rather than\n\t\t\t\t\t\t\t// 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t\t\t\t\t\t\t// passes PropTypes.object.\n\t\t\t\t\t\t\treturn 'object';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (isSymbol(propType, propValue)) {\n\t\t\t\t\t\t\treturn 'symbol';\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn propType;\n\t\t\t\t\t}" ]
[ "0.69605863", "0.67468566", "0.6628833", "0.6464124", "0.6229379", "0.6206012", "0.6206012", "0.6206012", "0.6206012", "0.6206012", "0.6206012", "0.6206012", "0.6206012", "0.6206012", "0.6206012", "0.60928804", "0.60928804", "0.60928804", "0.60928804", "0.60928804", "0.60928804", "0.60928804", "0.60928804", "0.58008", "0.57621074", "0.5722716", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712969", "0.5712488", "0.5712488", "0.56921947", "0.56921947", "0.56921947", "0.5673137", "0.5673137", "0.5673137", "0.5673137", "0.5673137", "0.5673137", "0.5673137", "0.5673137", "0.5673137", "0.5673137", "0.5673137", "0.5673137", "0.5673137", "0.5673137", "0.5673137", "0.5673137", "0.5673137", "0.5673137", "0.5673137", "0.5673137", "0.5661958", "0.56552327" ]
0.0
-1
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 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 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 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}", "function utilIsIterable(obj) {\n\t\treturn obj != null && typeof obj[Symbol.iterator] === 'function'; // lazy equality for null\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 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 objectHasEnumerableKeys(value) {\n for (const _ in value) return true;\n return false;\n}", "function isObject(x) {\n return x != null && typeof x === 'object';\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(value) {\n return typeof value === 'object' && !!value;\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(x) {\n return typeof x === \"object\" && x !== null;\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 isPlainObject(obj){return _toString.call(obj)==='[object Object]';}" ]
[ "0.6730523", "0.66329944", "0.6610388", "0.6600516", "0.6599237", "0.65664077", "0.65055287", "0.6468159", "0.64624006", "0.641155", "0.63705426", "0.63652676", "0.63652676", "0.63652676", "0.63652676", "0.6357186", "0.632667", "0.6322181", "0.63220984", "0.62959194", "0.62959194", "0.62959194", "0.62921923", "0.6291251", "0.62852335", "0.62852335", "0.62852335", "0.62852335", "0.62852335", "0.62852335", "0.62852335", "0.62707984", "0.6250603", "0.6245454", "0.62412614", "0.62412614", "0.62412614", "0.62412614", "0.62412614", "0.62412614", "0.62412614", "0.62412614", "0.62412614", "0.62412614", "0.62412614", "0.62412614", "0.6238925", "0.6238518", "0.6237073", "0.6233319", "0.62309206", "0.62309206", "0.62298065", "0.6219494", "0.6198976", "0.6194182", "0.61900187", "0.61900187", "0.61900187", "0.61900187", "0.61900187", "0.61854386", "0.61554354", "0.6152452", "0.6145086", "0.6141647", "0.6136263", "0.6125853", "0.61256796", "0.6111271", "0.6107105", "0.60988694", "0.6086644", "0.60839134", "0.6082911", "0.6082911", "0.60827816", "0.6078251", "0.60763615", "0.6066205", "0.60600376", "0.60600376", "0.605657", "0.60538083", "0.60538083", "0.60538083", "0.60538083", "0.60538083", "0.60538083", "0.60538083", "0.6050913", "0.6048795", "0.6048795", "0.6048795", "0.6042897", "0.60407317", "0.60407317", "0.6039218", "0.60347265", "0.60347265", "0.6033532" ]
0.0
-1
Equivalent of `typeof` but with special handling for array and regexp.
function getPropType(propValue) { var propType = 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 $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 getType(data) {\n return typeof data;\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.6911626", "0.67766434", "0.66100645", "0.654038", "0.6495285", "0.6489846", "0.6489846", "0.64507556", "0.64507556", "0.6431194", "0.64299774", "0.64064825", "0.64064825", "0.63977975", "0.63977975", "0.63977975", "0.63977975", "0.63977975", "0.63977975", "0.63977975", "0.63977975", "0.63977975", "0.63977975", "0.63977975", "0.63977975", "0.63977975", "0.63977975", "0.63977975", "0.63977975", "0.6378231", "0.6375056", "0.6372039", "0.63517195", "0.6308509", "0.6308509", "0.6308509", "0.6308509", "0.6308509", "0.6308509", "0.6308509", "0.6308509", "0.6308509", "0.6308509", "0.6308509", "0.6308509", "0.6308509", "0.6308509", "0.6308509", "0.6308509", "0.6308509", "0.6304372", "0.6300259", "0.62904423", "0.6284862", "0.62608224", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.62560356", "0.6248749", "0.6235721", "0.62323165", "0.6225753", "0.6223114", "0.62102616", "0.6197064", "0.61723334", "0.61712027" ]
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.6876261", "0.6852896", "0.6852896", "0.6852896", "0.6852896", "0.6851662", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.68460876", "0.6837455", "0.6837455", "0.6835792", "0.6817392", "0.6814297", "0.6814297", "0.6814297", "0.6814297", "0.6814297", "0.67997193", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806", "0.67803806" ]
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.6599482", "0.65679044", "0.65622234", "0.65622234", "0.65622234", "0.65622234", "0.6525046", "0.65242517", "0.65087306", "0.65087306", "0.65087306", "0.65087306", "0.65087306", "0.65039986", "0.6492512", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518", "0.6480518" ]
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
Iterates through children that are typically specified as `props.children`, but only maps over children that are "valid elements". The mapFunction provided index will be normalised to the components mapped, so an invalid component would not increase the index.
function map(children, func) { var index = 0; return react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.map(children, function (child) { return react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(child) ? func(child, index++) : child; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function map(children, func) {\n var index = 0;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.map(children, function (child) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child) ? func(child, index++) : child;\n });\n}", "function map(children, func) {\n var index = 0;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.map(children, function (child) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child) ? func(child, index++) : child;\n });\n}", "function map(children, func) {\n let index = 0;\n return React.Children.map(children, child => /*#__PURE__*/React.isValidElement(child) ? func(child, index++) : child);\n}", "function map(children, func) {\n var index = 0;\n return react.Children.map(children, function (child) {\n return /*#__PURE__*/react.isValidElement(child) ? func(child, index++) : child;\n });\n}", "function map(children, func) {\n var index = 0;\n return react__WEBPACK_IMPORTED_MODULE_0__.Children.map(children, function (child) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(child) ? func(child, index++) : child;\n });\n}", "function forEach(children, func) {\n var index = 0;\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) {\n if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) func(child, index++);\n });\n}", "function forEach(children, func) {\n var index = 0;\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) {\n if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) func(child, index++);\n });\n}", "function forEach(children, func) {\n var index = 0;\n react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.forEach(children, function (child) {\n if (react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(child)) func(child, index++);\n });\n}", "function forEach(children, func) {\n var index = 0;\n react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.forEach(children, function (child) {\n if (react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(child)) func(child, index++);\n });\n}", "function forEach(children, func) {\n var index = 0;\n react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.forEach(children, function (child) {\n if (react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(child)) func(child, index++);\n });\n}", "function forEach(children, func) {\n var index = 0;\n react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.forEach(children, function (child) {\n if (react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(child)) func(child, index++);\n });\n}", "function forEach(children, func) {\n var index = 0;\n react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.forEach(children, function (child) {\n if (react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(child)) func(child, index++);\n });\n}", "function forEach(children, func) {\n var index = 0;\n react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.forEach(children, function (child) {\n if (react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(child)) func(child, index++);\n });\n}", "function forEach(children, func) {\n var index = 0;\n react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.forEach(children, function (child) {\n if (react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(child)) func(child, index++);\n });\n}", "function forEach(children, func) {\n var index = 0;\n react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.forEach(children, function (child) {\n if (react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(child)) func(child, index++);\n });\n}", "function forEach(children, func) {\n let index = 0;\n React.Children.forEach(children, child => {\n if ( /*#__PURE__*/React.isValidElement(child)) func(child, index++);\n });\n}", "function forEach(children, func) {\n var index = 0;\n react__WEBPACK_IMPORTED_MODULE_0__.Children.forEach(children, function (child) {\n if ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(child)) func(child, index++);\n });\n}", "function forEach(children, func) {\n var index = 0;\n react.Children.forEach(children, function (child) {\n if ( /*#__PURE__*/react.isValidElement(child)) func(child, index++);\n });\n}", "function mapChildren(children, func) {\n var list = Object(__WEBPACK_IMPORTED_MODULE_1_rc_util_es_Children_toArray__[\"a\" /* default */])(children).map(func);\n if (list.length === 1) {\n return list[0];\n }\n return list;\n}", "function mapChildren(children, func) {\n var list = Object(__WEBPACK_IMPORTED_MODULE_1_rc_util_es_Children_toArray__[\"a\" /* default */])(children).map(func);\n\n if (list.length === 1) {\n return list[0];\n }\n\n return list;\n}", "function mapChildren(children, func) {\n var list = (0, _toArray.default)(children).map(func);\n\n if (list.length === 1) {\n return list[0];\n }\n\n return list;\n}", "function mapChildren(children, func) {\n var list = (0, _toArray.default)(children).map(func);\n\n if (list.length === 1) {\n return list[0];\n }\n\n return list;\n}", "function mapChildren(children, func) {\n var list = (0, _toArray.default)(children).map(func);\n\n if (list.length === 1) {\n return list[0];\n }\n\n return list;\n}", "function mapChildren(children, func) {\n var list = (0, _toArray2['default'])(children).map(func);\n if (list.length === 1) {\n return list[0];\n }\n return list;\n}", "childrenIteration(_processFunc) {\n return this.children.map(_processFunc);\n }", "function mapChildren(children, func) {\n var list = Object(rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(children).map(func);\n\n if (list.length === 1) {\n return list[0];\n }\n\n return list;\n}", "function mapChildren() {\n var children = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var func = arguments.length > 1 ? arguments[1] : undefined;\n var list = children.map(func);\n\n if (list.length === 1) {\n return list[0];\n }\n\n return list;\n}", "function mapChildren() {\n var children = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var func = arguments.length > 1 ? arguments[1] : undefined;\n var list = children.map(func);\n\n if (list.length === 1) {\n return list[0];\n }\n\n return list;\n}", "function mapChildren() {\n var children = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var func = arguments.length > 1 ? arguments[1] : undefined;\n var list = children.map(func);\n\n if (list.length === 1) {\n return list[0];\n }\n\n return list;\n}", "wrapChildren(){\n const { children, title } = this.props;\n if (!children) return null;\n\n function wrap(child, idx = 0){\n return (\n <div className=\"indicator-item\" title={title || null} key={child.key || idx}>\n { child }\n </div>\n );\n }\n\n if (Array.isArray(children)){\n return React.Children.map(children, wrap);\n } else {\n return wrap(children);\n }\n }", "renderChildren() {\n const { children } = this.props;\n\n if (!children) return;\n\n return React.Children.map(children, c => {\n if (!c) return;\n return React.cloneElement(c, {\n map: this.map,\n google: this.props.google,\n mapCenter: this.state.currentLocation\n });\n });\n }", "renderChildren() {\n const {children} = this.props;\n if (!children) return(null);\n return React.Children.map(children, c => {\n return React.cloneElement(c, {\n map: this.map,\n google: this.props.google,\n zoom:this.props.zoom,\n position: this.props.currentLocation,\n boxes: this.props.boxes,\n boxesLength: this.props.boxesLength,\n update: this.props.updatePositionMarker,\n newBinLocation:this.props.newBoxLocation,\n addNew: this.props.addNewLocation,\n newBoxLocationDraggable:this.props.newBoxLocationDraggable,\n confirmed: this.props.confirmedNewLocation,\n newLocationSubmitted: this.props.newLocationSubmitted,\n getNewBoxLocation: this.props.getNewBoxLocation,\n onGetNewBoxAddress: this.props.onGetNewBoxAddress\n });\n })\n }", "function ClassicGrid({ children }) {\n if (children.length !== 5) {\n console.log(children)\n throw 'There should be 5 child components.'\n }\n\n const children_ordering = [\n 'classic-grid-parent__header',\n 'classic-grid-parent__left-sidebar',\n 'classic-grid-parent__main-content',\n 'classic-grid-parent__right-sidebar',\n 'classic-grid-parent__footer'\n ]\n\n const newChildren = children.map((child, idx) => {\n return styleInjector(child, children_ordering[idx])\n })\n\n console.log(children, newChildren)\n\n return <div className='classic-grid-parent'>{newChildren}</div>\n}", "function mapFunction(element, index) {\n return <li key={index}>{element}</li>;\n }", "function elementChildren(children, predicate = () => true) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"Children\"].toArray(children).filter(child => /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"isValidElement\"])(child) && predicate(child));\n}", "adjustChildren(){\n var { context, href, schemas, children, windowWidth } = this.props;\n if (!context) return children;\n // We shouldn't ever receive a single Child.\n return React.Children.map(children, (child)=>\n React.cloneElement(child, { context, href, windowWidth, schemas })\n );\n }", "renderChildrenWithTabsApiAsProps() {\n return React.Children.map(this.props.children, (child, index) => {\n return React.cloneElement(child, {\n onClick : this.handleTabClick,\n tabIndex: index,\n isActive: index === this.state.activeTabIndex\n });\n });\n }", "renderChildren() {\n\t\t\t\tlet children = []\n\n\t\t\t\t// split children into Label and not Label arrays\n\t\t\t\tlet components = spliceChildren(this.props.children, Label);\n\n\t\t\t\t// labeled is consumed by the parent button\n\t\t\t\tlet { labeled, ...other } = this.props;\n\n\t\t\t\tother.className = classNames(this.props.className, this.getClasses());\n\n\t\t\t\tlet icon = (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t{...other}\n\t\t\t\t\t\t\t\tkey=\"icon\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{components.remaining}\n\t\t\t\t\t\t</div>\n\t\t\t\t);\n\n\t\t\t\t// if Label was spliced at index 0, put it first\n\t\t\t\tif (components.index == 0) {\n\t\t\t\t\t\tchildren.push(components.component);\n\t\t\t\t\t\tchildren.push(icon);\n\t\t\t\t// otherwise last\n\t\t\t\t} else {\n\t\t\t\t\t\tchildren.push(icon);\n\t\t\t\t\t\tchildren.push(components.component);\n\t\t\t\t}\n\n\t\t\t\treturn children;\n\t\t}", "renderChildren(children, refName) {\n\n\t\t// First we make sure that the refName parameter passed is a String\n\t\trefName = String(refName);\n\n\t\t// Iterating through the children of the repeatable component\n\t\treturn React.Children.map(children, (child, j) => {\n\n\t\t\t// First, we check if this child is NOT the defaultRef child\n\t\t\tif(typeof child.props.defaultRef === 'undefined') {\n\n\t\t\t\t// Now we check if the refName prop for this child is defined\n\t\t\t\tif(typeof child.props.refName !== 'undefined') {\n\t\t\t\t\trefName = child.props.refName+refName;\n\t\t\t\t}\n\n\t\t\t\t// Then, if the refName is not defined, we must check if\n\t\t\t\t// this is the only child element inside the Repeatable component\n\t\t\t\telse {\n\n\t\t\t\t\t// If this is not the only child, we must set its ref to null\n\t\t\t\t\t// in order to avoid ref names conflict.\n\t\t\t\t\tif(children instanceof Array) {\n\t\t\t\t\t\trefName = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn React.cloneElement(child, { ref: refName });\n\t\t});\n\t}", "configureChildren() {\n this.children = this.props.children\n .map(x => ({\n ...x,\n props: {\n ...x.props,\n setValue: this.setValueOf(x.props.name),\n registerValidator: this.registerValidator(x.props.name),\n unregisterValidator: this.unregisterValidator(x.props.name),\n },\n }))\n }", "function mapElements(containerElement, func)\n {\n // TODO: This heuristic breaks for elements that contain a mixture of\n // inline and block elements.\n var nestedBlockElements = arrays.toArray(containerElement.children).filter(elementHelpers.isBlockElement);\n if (nestedBlockElements.length)\n {\n nestedBlockElements.forEach(function (nestedBlockElement)\n {\n // Map the nested block elements\n mapElements(nestedBlockElement, func);\n });\n } else\n {\n mapTextNodes(containerElement, func);\n }\n }", "renderChildrenOnly() {\n this.children.forEach(child => child.render(this.$element));\n }", "function markAsDynamicChildren(children) {\n FromIteration.set(children, 1);\n }", "function markAsDynamicChildren(children) {\n FromIteration.set(children, 1);\n }", "render() {\n const { children } = this.props;\n return (\n <div className=\"tabs\">\n {Children.map(children, this._addChildRefs, this)}\n </div>\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 }", "renderTabs() {\n return React.Children.map(this.props.children, (child, index) => {\n if (!child) return null;\n\n return React.cloneElement(child, {\n index,\n onClick: this.onTabClick,\n isActive: index === this.state.activeTab\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 }", "renderChildren(){ // this is how props and state are passed as props to children\n return React.Children.map(this.props.children, child =>{\n var newProps= Object.assign({}, \n this.props,\n this.state \n );\n delete newProps.children; // be careful not to make the child it's child\n return React.cloneElement(child, newProps, child.props.children)\n });\n }", "function recursiveCloneChildren(children) {\n var cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (ch) {\n return ch;\n };\n\n // return React.Children.map(children, child => {\n return Array.from(children).map(function (child) {\n var newChild = cb(child);\n if (newChild && newChild.props && newChild.props.children) {\n return _react2.default.cloneElement(newChild, {}, recursiveCloneChildren(newChild.props.children, cb));\n }\n return newChild;\n });\n}", "function markAsDynamicChildren$1(children) {\n FromIteration$1.set(children, 1);\n }", "maybeChild(index) {\n return this.content.maybeChild(index);\n }", "function mapVisit(nodes, fn) {\n var len = nodes.length;\n var idx = -1;\n while (++idx < len) {\n visit(nodes[idx], fn);\n }\n }", "function mapVisit(nodes, fn) {\n var len = nodes.length;\n var idx = -1;\n while (++idx < len) {\n visit(nodes[idx], fn);\n }\n }", "function mapVisit(nodes, fn) {\n var len = nodes.length;\n var idx = -1;\n\n while (++idx < len) {\n visit(nodes[idx], fn);\n }\n }", "function mapVisit(nodes, fn) {\n var len = nodes.length;\n var idx = -1;\n\n while (++idx < len) {\n visit(nodes[idx], fn);\n }\n }", "addChildrenJSX(children){\n this.children.push(children.map(c => ReactDOMServer.renderToStaticMarkup(c)));\n this.isLeaf = true;\n }", "function normalizeChildren(children){return isPrimitive(children)?[createTextVNode(children)]:Array.isArray(children)?normalizeArrayChildren(children):undefined;}", "function normalizeChildren(children){return isPrimitive(children)?[createTextVNode(children)]:Array.isArray(children)?normalizeArrayChildren(children):undefined;}", "function normalizeChildren(children){return isPrimitive(children)?[createTextVNode(children)]:Array.isArray(children)?normalizeArrayChildren(children):undefined;}", "function PageIndex(props)\n{\n const { page, indexStyles } = props;\n const indexClass = page.smallIndex ? \"halfscreen\" : \"fullscreen\";\n\n return (\n <div className={indexClass}>\n { page.index.map((item, itemIndex) => \n <PageIndexElement \n key={itemIndex} \n onFadeOut={props.onFadeOut}\n onClick={props.onClick} \n index={itemIndex} \n item={item} \n style={indexStyles[itemIndex]} />)}\n </div>\n )\n\n}", "function mapVisit(nodes, fn) {\n var len = nodes.length;\n var idx = -1;\n while (++idx < len) {\n visit(nodes[idx], fn);\n }\n}", "function recursiveCloneChildren(children) {\n var cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (ch) {\n return ch;\n };\n\n // return React.Children.map(children, child => {\n return Array.from(children).map(function (child) {\n var newChild = cb(child);\n if (newChild && newChild.props && newChild.props.children) {\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.cloneElement(newChild, {}, recursiveCloneChildren(newChild.props.children, cb));\n }\n return newChild;\n });\n}", "function recursiveCloneChildren(children) {\n var cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (ch) {\n return ch;\n };\n\n // return React.Children.map(children, child => {\n return Array.from(children).map(function (child) {\n var newChild = cb(child);\n if (newChild && newChild.props && newChild.props.children) {\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.cloneElement(newChild, {}, recursiveCloneChildren(newChild.props.children, cb));\n }\n return newChild;\n });\n}", "function mapVisit(nodes, fn) {\n var len = nodes.length;\n var idx = -1;\n\n while (++idx < len) {\n visit(nodes[idx], fn);\n }\n}", "function mapVisit(nodes, fn) {\n var len = nodes.length;\n var idx = -1;\n\n while (++idx < len) {\n visit(nodes[idx], fn);\n }\n}", "setChildrenJSX(children){\n this.children = children.map(c => ReactDOMServer.renderToStaticMarkup(c));\n this.isLeaf = true;\n }", "decorateChildren() {\n this.forEachChild(aChild => {\n var element = this.getDomHelper().getElement(aChild.getId());\n if (element) {\n aChild.decorate(element);\n }\n });\n }", "childrenValidation() {\n const isChildren = Array.isArray(this.props.children);\n if (isChildren) {\n throw new Error('<Hello> component doen not support multiple children');\n } else if (!this.props.children) {\n throw new Error('<Hello> component cannot ben empty');\n }\n }", "getFields() {\n const count = this.state.expand ? 10 : 6;\n const { getFieldDecorator } = this.props.form\n const children = [];\n for (let i = 0; i < 10; i++) {\n children.push(\n <Col span={8} key={i} style={{ display: i < count ? 'block' : 'none' }}>\n <Form.Item label={`Field${i}`}>\n {getFieldDecorator(`field-${i}`, {\n rules: [{ required: true, message: 'Input something' }]\n })(\n <Input placeholder='placeholder'></Input>\n )}\n </Form.Item>\n </Col>\n )\n }\n return children;\n }", "function makeChildNodes(reactData, stateData, getState) {\n\n return reactData.map(function (obj, i) {\n\n return obj.children.length === 0 ? _react2.default.createElement(obj.tag, (0, _passReactState2.default)(obj, stateData, getState), obj.props.textContent) : _react2.default.createElement(obj.tag, obj.props, (0, _extractData2.default)(obj.children).mappedData.map(function (obj) {\n return makeChildNodes([obj], stateData, getState);\n }));\n });\n}", "children() {\n return new ChildrenIterator(this, this.keys);\n }", "function mapVisit$1(nodes, fn) {\n var len = nodes.length;\n var idx = -1;\n while (++idx < len) {\n visit(nodes[idx], fn);\n }\n}", "function wrapChildren() {\n const arr = [];\n const count = React.Children.count(children);\n const arrChildren = React.Children.toArray(children);\n if (count > 0) {\n arr.push(\n <Pane key=\"pane-0\" vertical={vertical}>\n {arrChildren[0]}\n </Pane>\n );\n if (count > 1) {\n // add divider\n const sty = {};\n if (vertical) sty.height = `${DIVIDER_SIZE}px`;\n else sty.width = `${DIVIDER_SIZE}px`;\n arr.push(\n <div\n key=\"divider\"\n className={resizing ? \"divider resizing\" : \"divider\"}\n onMouseDown={() => setResizing(true)}\n style={sty}\n >\n <div />\n </div>\n );\n // and set the second pane size via css flex-basis\n const secondPaneStyle = { flexBasis };\n arr.push(\n <Pane key=\"pane-1\" vertical={vertical} style={secondPaneStyle}>\n {arrChildren[1]}\n </Pane>\n );\n }\n }\n return arr;\n }", "getFields() {\n //const count = this.state.LocusKit.length\n const { getFieldDecorator } = this.props.form\n const children = []\n for (let i = 0; i < this.state.LocusKit.length; i++) {\n children.push(\n <Col span={2} key={this.state.LocusKit[i]}>\n <FormItem label={`${this.state.LocusKit[i]}`}>\n {getFieldDecorator(`${this.state.LocusKit[i]}`, {\n rules: [{ required: true, message: 'Input allele' }]\n })(<Input placeholder={this.state.LocusKit[i]} />)}\n </FormItem>\n </Col>\n )\n }\n return children\n }", "function createRoutesFromChildren(children, parentRoute, namedRoutes) {\n var routes = [];\n\n React.Children.forEach(children, function (child) {\n // Exclude <DefaultRoute>s and <NotFoundRoute>s.\n if (child = createRoute(child, parentRoute, namedRoutes))\n routes.push(child);\n });\n\n return routes;\n}", "function map(i, fnMap) {\n function* fn(i, fnMap) {\n for (const v of i) {\n yield fnMap(v);\n }\n }\n return fn(i, fnMap);\n}", "getFields() {\n const count = this.state.expand ? 10 : 6;\n const { getFieldDecorator } = this.props.form;\n const children = [];\n for (let i = 0; i < 10; i++) {\n children.push(\n <Col span={8} key={i} style={{ display: i < count ? 'block' : 'none' }}>\n <Form.Item label={`Field ${i}`}>\n {getFieldDecorator(`field-${i}`, {\n rules: [{\n required: true,\n message: 'Input something!',\n }],\n })(\n <Input placeholder=\"placeholder\" />\n )}\n </Form.Item>\n </Col>\n );\n }\n return children;\n }", "function normalizeChildren(children) {\n return isPrimitive(children) ? [createTextVNode(children)] : Array.isArray(children) ? normalizeArrayChildren(children) : undefined;\n}", "function normalizeChildren(children) {\n return isPrimitive(children) ? [createTextVNode(children)] : Array.isArray(children) ? normalizeArrayChildren(children) : undefined;\n}", "function normalizeChildren(children) {\n return isPrimitive(children) ? [createTextVNode(children)] : Array.isArray(children) ? normalizeArrayChildren(children) : undefined;\n}", "function normalizeChildren(children) {\n return isPrimitive(children) ? [createTextVNode(children)] : Array.isArray(children) ? normalizeArrayChildren(children) : undefined;\n}", "function normalizeChildren(children) {\n return isPrimitive(children) ? [createTextVNode(children)] : Array.isArray(children) ? normalizeArrayChildren(children) : undefined;\n}", "function normalizeChildren(children) {\n return isPrimitive(children) ? [createTextVNode(children)] : Array.isArray(children) ? normalizeArrayChildren(children) : undefined;\n}", "function normalizeChildren(children) {\n return isPrimitive(children) ? [createTextVNode(children)] : Array.isArray(children) ? normalizeArrayChildren(children) : undefined;\n}", "function normalizeChildren(children) {\n return isPrimitive(children) ? [createTextVNode(children)] : Array.isArray(children) ? normalizeArrayChildren(children) : undefined;\n}", "function normalizeChildren(children) {\n return isPrimitive(children) ? [createTextVNode(children)] : Array.isArray(children) ? normalizeArrayChildren(children) : undefined;\n}", "function normalizeChildren(children) {\n return isPrimitive(children) ? [createTextVNode(children)] : Array.isArray(children) ? normalizeArrayChildren(children) : undefined;\n}", "function normalizeChildren(children) {\n return isPrimitive(children) ? [createTextVNode(children)] : Array.isArray(children) ? normalizeArrayChildren(children) : undefined;\n}", "function normalizeChildren(children) {\n return isPrimitive(children) ? [createTextVNode(children)] : Array.isArray(children) ? normalizeArrayChildren(children) : undefined;\n}", "function normalizeChildren(children) {\n return isPrimitive(children) ? [createTextVNode(children)] : Array.isArray(children) ? normalizeArrayChildren(children) : undefined;\n}", "function normalizeChildren(children) {\n return isPrimitive(children) ? [createTextVNode(children)] :\n Array.isArray(children) ?\n normalizeArrayChildren(children) :\n undefined\n }", "function normalizeChildren(children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined;\n }" ]
[ "0.8085546", "0.8085546", "0.8000892", "0.79522616", "0.78987634", "0.6855412", "0.6855412", "0.6821118", "0.6821118", "0.6821118", "0.6821118", "0.6821118", "0.6821118", "0.6821118", "0.6821118", "0.6807006", "0.6803972", "0.68027747", "0.6395794", "0.6358235", "0.6332384", "0.6332384", "0.6332384", "0.63254833", "0.63178295", "0.62688357", "0.5981354", "0.5981354", "0.5981354", "0.5853968", "0.57085407", "0.5636765", "0.5600289", "0.5563363", "0.5493543", "0.54016227", "0.5367833", "0.53656626", "0.5353746", "0.5284718", "0.5279085", "0.5272582", "0.52705497", "0.52705497", "0.5269765", "0.5229721", "0.52100384", "0.5101722", "0.50870967", "0.50453055", "0.5037235", "0.5036576", "0.50335956", "0.50335956", "0.5026366", "0.5026366", "0.5001576", "0.49863485", "0.49863485", "0.49863485", "0.49549285", "0.49500167", "0.49475926", "0.49475926", "0.49469864", "0.49469864", "0.4929575", "0.49091238", "0.4904618", "0.4902204", "0.4901725", "0.48986208", "0.48966116", "0.48671797", "0.48526773", "0.48464665", "0.4841856", "0.48404795", "0.48379952", "0.48379952", "0.48379952", "0.48379952", "0.48379952", "0.48379952", "0.48379952", "0.48379952", "0.48379952", "0.48379952", "0.48379952", "0.48379952", "0.48379952", "0.4834986", "0.4827308" ]
0.8055414
9
Iterates through children that are "valid elements". The provided forEachFunc(child, index) will be called for each leaf child with the index reflecting the position relative to "valid components".
function forEach(children, func) { var index = 0; react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.forEach(children, function (child) { if (react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(child)) func(child, index++); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function forEach(children, func) {\n let index = 0;\n React.Children.forEach(children, child => {\n if ( /*#__PURE__*/React.isValidElement(child)) func(child, index++);\n });\n}", "function forEach(children, func) {\n var index = 0;\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) {\n if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) func(child, index++);\n });\n}", "function forEach(children, func) {\n var index = 0;\n __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) {\n if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) func(child, index++);\n });\n}", "function forEach(children, func) {\n var index = 0;\n react.Children.forEach(children, function (child) {\n if ( /*#__PURE__*/react.isValidElement(child)) func(child, index++);\n });\n}", "function forEach(children, func) {\n var index = 0;\n react__WEBPACK_IMPORTED_MODULE_0__.Children.forEach(children, function (child) {\n if ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(child)) func(child, index++);\n });\n}", "forEach(callback) {\n callback(this);\n for (const child of this.children) {\n child.forEach(callback);\n }\n }", "eachChild(func) {\r\n\t\t\t\t\tvar attr, child, j, k, len1, len2, ref1, ref2;\r\n\t\t\t\t\tif (!this.children) {\r\n\t\t\t\t\t\treturn this;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tref1 = this.children;\r\n\t\t\t\t\tfor (j = 0, len1 = ref1.length; j < len1; j++) {\r\n\t\t\t\t\t\tattr = ref1[j];\r\n\t\t\t\t\t\tif (this[attr]) {\r\n\t\t\t\t\t\t\tref2 = flatten([this[attr]]);\r\n\t\t\t\t\t\t\tfor (k = 0, len2 = ref2.length; k < len2; k++) {\r\n\t\t\t\t\t\t\t\tchild = ref2[k];\r\n\t\t\t\t\t\t\t\tif (func(child) === false) {\r\n\t\t\t\t\t\t\t\t\treturn this;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}", "forEach(f) {\n for (let i = 0, p = 0; i < this.content.length; i++) {\n let child = this.content[i];\n f(child, p, i);\n p += child.nodeSize;\n }\n }", "function tree_forEach(tree, f) {\n var scan = function(n) {\n if (!n) return\n\n f(n)\n\n if (n.forEach) n.forEach(scan)\n if (n.children) n.children.forEach(scan)\n if (n.funDecls) n.funDecls.forEach(scan)\n if (n.catchClauses) n.catchClauses.forEach(scan)\n if (n.cases) n.cases.forEach(scan)\n \n if (n.initializer) scan(n.initializer)\n if (n.body) scan(n.body)\n if (n.expression) scan(n.expression)\n if (n.condition) scan(n.condition)\n if (n.thenPart) scan(n.thenPart)\n if (n.elsePart) scan(n.elsePart)\n if (n.value) scan(n.value)\n if (n.block) scan(n.block)\n if (n.tryBlock) scan(n.tryBlock)\n if (n.exception) scan(n.exception)\n if (n.discriminant) scan(n.discriminant)\n if (n.caseLabel) scan(n.caseLabel)\n if (n.statements) scan(n.statements)\n if (n.setup) scan(n.setup)\n if (n.update) scan(n.update)\n if (n.varDecl) scan(n.varDecl)\n if (n.object) scan(n.object)\n if (n.iterator) scan(n.iterator)\n \n }\n scan(tree)\n}", "function doForChildren(element, f) {\n if ($(element).children().length > 0) {\n $(element).children().each(function() {f(this)});\n }\n}", "function forEach(node, callback) {\n if (!node) {\n return;\n }\n if (isLeafNode(node)) {\n forEachLeaf(node, callback);\n }\n else {\n //manually visit the children\n var inner = node;\n inner.forEach(function (i) { return forEach(i, callback); });\n }\n}", "everyChildren(callback) {\n return this.childElements.every(visit);\n function visit(node) {\n if (!callback(node)) {\n return false;\n }\n return node.childElements.every(visit);\n }\n }", "traverse(fn) {\n fn(this)\n\n const children = this._children\n for (let i = 0, l = children.length; i < l; i++) {\n children[i].traverse(fn)\n }\n }", "function sparseSnapshotTreeForEachChild(sparseSnapshotTree, func) {\n sparseSnapshotTree.children.forEach(function (tree, key) {\n func(key, tree);\n });\n}", "traverseBF(fn) {\n //will give us some element within our root node, inside an array\n const arr = [this.root]\n\n //while-loop, works as long as array has something in it, is TRUTHY\n while (arr.length) {\n //remove first element out of array, with shift() method\n const node = arr.shift()\n //then take all node's children and push them into our array\n // CAN'T do node.children, would create a nested array\n // use spread operator to take all elements out, and push them into the array\n arr.push(...node.children) //TODO:For-loop, would have been more code!!!\n\n //take node AND pass in to our iterator func\n fn(node)\n }\n }", "function traverseElements(elem, callback) {\n callback(elem);\n const children = elem.children;\n for (let i = 0; i < children.length; ++i) {\n traverseElements(children.item(i), callback);\n }\n }", "function forEachNode(func) {\n var depthLimit = 4;\n var nodesLimit = 50;\n var nodesCount = 0;\n\n executeForNode(thoughtsTree.root, func);\n\n function executeForNode(node, func, currentDepth) {\n if (!currentDepth) currentDepth = 0;\n\n if (isRecursionLimitReached(currentDepth, nodesCount)) return;\n\n func(node, currentDepth);\n if (node.children) {\n _.each(node.children, function (node) {\n executeForNode(node, func, currentDepth + 1);\n });\n }\n }\n\n function isRecursionLimitReached(currentDepth, nodesCount) {\n var limitReached = (nodesCount > nodesLimit || currentDepth > depthLimit);\n if (limitReached) {\n console.warn('Traversing tree: reached depth/nodes limit, exiting');\n console.warn('Traversing tree: currentDepth: ', currentDepth);\n console.warn('Traversing tree: nodesCount: ', nodesCount);\n }\n\n return limitReached;\n }\n}", "function forEachNode(func) {\n const depthLimit = 4;\n const nodesLimit = 50;\n const nodesCount = 0;\n\n executeForNode(notesTree.root, func);\n\n function executeForNode(node, func, currentDepth) {\n if (!currentDepth) currentDepth = 0;\n\n if (isRecursionLimitReached(currentDepth, nodesCount)) return;\n\n func(node, currentDepth);\n if (node.children) {\n _.each(node.children, function (node) {\n executeForNode(node, func, currentDepth + 1);\n });\n }\n }\n\n function isRecursionLimitReached(currentDepth, nodesCount) {\n const limitReached = (nodesCount > nodesLimit || currentDepth > depthLimit);\n if (limitReached) {\n console.warn('Traversing tree: reached depth/nodes limit, exiting');\n console.warn('Traversing tree: currentDepth: ', currentDepth);\n console.warn('Traversing tree: nodesCount: ', nodesCount);\n }\n\n return limitReached;\n }\n}", "function visitChildren (node, lamdba, optionalNodeTypeRestriction) {\n var nodeList = node.childNodes\n eachInNodeList(nodeList, lamdba, optionalNodeTypeRestriction)\n}", "function map(children, func) {\n let index = 0;\n return React.Children.map(children, child => /*#__PURE__*/React.isValidElement(child) ? func(child, index++) : child);\n}", "function forEachChild(node, cbNode, cbNodeArray) {\n if (!node) {\n return;\n }\n // The visitXXX functions could be written as local functions that close over the cbNode and cbNodeArray\n // callback parameters, but that causes a closure allocation for each invocation with noticeable effects\n // on performance.\n var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode;\n var cbNodes = cbNodeArray || cbNode;\n switch (node.kind) {\n case 139 /* QualifiedName */:\n return visitNode(cbNode, node.left) ||\n visitNode(cbNode, node.right);\n case 141 /* TypeParameter */:\n return visitNode(cbNode, node.name) ||\n visitNode(cbNode, node.constraint) ||\n visitNode(cbNode, node.expression);\n case 254 /* ShorthandPropertyAssignment */:\n return visitNodes(cbNodes, node.decorators) ||\n visitNodes(cbNodes, node.modifiers) ||\n visitNode(cbNode, node.name) ||\n visitNode(cbNode, node.questionToken) ||\n visitNode(cbNode, node.equalsToken) ||\n visitNode(cbNode, node.objectAssignmentInitializer);\n case 142 /* Parameter */:\n case 145 /* PropertyDeclaration */:\n case 144 /* PropertySignature */:\n case 253 /* PropertyAssignment */:\n case 218 /* VariableDeclaration */:\n case 169 /* BindingElement */:\n return visitNodes(cbNodes, node.decorators) ||\n visitNodes(cbNodes, node.modifiers) ||\n visitNode(cbNode, node.propertyName) ||\n visitNode(cbNode, node.dotDotDotToken) ||\n visitNode(cbNode, node.name) ||\n visitNode(cbNode, node.questionToken) ||\n visitNode(cbNode, node.type) ||\n visitNode(cbNode, node.initializer);\n case 156 /* FunctionType */:\n case 157 /* ConstructorType */:\n case 151 /* CallSignature */:\n case 152 /* ConstructSignature */:\n case 153 /* IndexSignature */:\n return visitNodes(cbNodes, node.decorators) ||\n visitNodes(cbNodes, node.modifiers) ||\n visitNodes(cbNodes, node.typeParameters) ||\n visitNodes(cbNodes, node.parameters) ||\n visitNode(cbNode, node.type);\n case 147 /* MethodDeclaration */:\n case 146 /* MethodSignature */:\n case 148 /* Constructor */:\n case 149 /* GetAccessor */:\n case 150 /* SetAccessor */:\n case 179 /* FunctionExpression */:\n case 220 /* FunctionDeclaration */:\n case 180 /* ArrowFunction */:\n return visitNodes(cbNodes, node.decorators) ||\n visitNodes(cbNodes, node.modifiers) ||\n visitNode(cbNode, node.asteriskToken) ||\n visitNode(cbNode, node.name) ||\n visitNode(cbNode, node.questionToken) ||\n visitNodes(cbNodes, node.typeParameters) ||\n visitNodes(cbNodes, node.parameters) ||\n visitNode(cbNode, node.type) ||\n visitNode(cbNode, node.equalsGreaterThanToken) ||\n visitNode(cbNode, node.body);\n case 155 /* TypeReference */:\n return visitNode(cbNode, node.typeName) ||\n visitNodes(cbNodes, node.typeArguments);\n case 154 /* TypePredicate */:\n return visitNode(cbNode, node.parameterName) ||\n visitNode(cbNode, node.type);\n case 158 /* TypeQuery */:\n return visitNode(cbNode, node.exprName);\n case 159 /* TypeLiteral */:\n return visitNodes(cbNodes, node.members);\n case 160 /* ArrayType */:\n return visitNode(cbNode, node.elementType);\n case 161 /* TupleType */:\n return visitNodes(cbNodes, node.elementTypes);\n case 162 /* UnionType */:\n case 163 /* IntersectionType */:\n return visitNodes(cbNodes, node.types);\n case 164 /* ParenthesizedType */:\n return visitNode(cbNode, node.type);\n case 166 /* LiteralType */:\n return visitNode(cbNode, node.literal);\n case 167 /* ObjectBindingPattern */:\n case 168 /* ArrayBindingPattern */:\n return visitNodes(cbNodes, node.elements);\n case 170 /* ArrayLiteralExpression */:\n return visitNodes(cbNodes, node.elements);\n case 171 /* ObjectLiteralExpression */:\n return visitNodes(cbNodes, node.properties);\n case 172 /* PropertyAccessExpression */:\n return visitNode(cbNode, node.expression) ||\n visitNode(cbNode, node.name);\n case 173 /* ElementAccessExpression */:\n return visitNode(cbNode, node.expression) ||\n visitNode(cbNode, node.argumentExpression);\n case 174 /* CallExpression */:\n case 175 /* NewExpression */:\n return visitNode(cbNode, node.expression) ||\n visitNodes(cbNodes, node.typeArguments) ||\n visitNodes(cbNodes, node.arguments);\n case 176 /* TaggedTemplateExpression */:\n return visitNode(cbNode, node.tag) ||\n visitNode(cbNode, node.template);\n case 177 /* TypeAssertionExpression */:\n return visitNode(cbNode, node.type) ||\n visitNode(cbNode, node.expression);\n case 178 /* ParenthesizedExpression */:\n return visitNode(cbNode, node.expression);\n case 181 /* DeleteExpression */:\n return visitNode(cbNode, node.expression);\n case 182 /* TypeOfExpression */:\n return visitNode(cbNode, node.expression);\n case 183 /* VoidExpression */:\n return visitNode(cbNode, node.expression);\n case 185 /* PrefixUnaryExpression */:\n return visitNode(cbNode, node.operand);\n case 190 /* YieldExpression */:\n return visitNode(cbNode, node.asteriskToken) ||\n visitNode(cbNode, node.expression);\n case 184 /* AwaitExpression */:\n return visitNode(cbNode, node.expression);\n case 186 /* PostfixUnaryExpression */:\n return visitNode(cbNode, node.operand);\n case 187 /* BinaryExpression */:\n return visitNode(cbNode, node.left) ||\n visitNode(cbNode, node.operatorToken) ||\n visitNode(cbNode, node.right);\n case 195 /* AsExpression */:\n return visitNode(cbNode, node.expression) ||\n visitNode(cbNode, node.type);\n case 196 /* NonNullExpression */:\n return visitNode(cbNode, node.expression);\n case 188 /* ConditionalExpression */:\n return visitNode(cbNode, node.condition) ||\n visitNode(cbNode, node.questionToken) ||\n visitNode(cbNode, node.whenTrue) ||\n visitNode(cbNode, node.colonToken) ||\n visitNode(cbNode, node.whenFalse);\n case 191 /* SpreadElementExpression */:\n return visitNode(cbNode, node.expression);\n case 199 /* Block */:\n case 226 /* ModuleBlock */:\n return visitNodes(cbNodes, node.statements);\n case 256 /* SourceFile */:\n return visitNodes(cbNodes, node.statements) ||\n visitNode(cbNode, node.endOfFileToken);\n case 200 /* VariableStatement */:\n return visitNodes(cbNodes, node.decorators) ||\n visitNodes(cbNodes, node.modifiers) ||\n visitNode(cbNode, node.declarationList);\n case 219 /* VariableDeclarationList */:\n return visitNodes(cbNodes, node.declarations);\n case 202 /* ExpressionStatement */:\n return visitNode(cbNode, node.expression);\n case 203 /* IfStatement */:\n return visitNode(cbNode, node.expression) ||\n visitNode(cbNode, node.thenStatement) ||\n visitNode(cbNode, node.elseStatement);\n case 204 /* DoStatement */:\n return visitNode(cbNode, node.statement) ||\n visitNode(cbNode, node.expression);\n case 205 /* WhileStatement */:\n return visitNode(cbNode, node.expression) ||\n visitNode(cbNode, node.statement);\n case 206 /* ForStatement */:\n return visitNode(cbNode, node.initializer) ||\n visitNode(cbNode, node.condition) ||\n visitNode(cbNode, node.incrementor) ||\n visitNode(cbNode, node.statement);\n case 207 /* ForInStatement */:\n return visitNode(cbNode, node.initializer) ||\n visitNode(cbNode, node.expression) ||\n visitNode(cbNode, node.statement);\n case 208 /* ForOfStatement */:\n return visitNode(cbNode, node.initializer) ||\n visitNode(cbNode, node.expression) ||\n visitNode(cbNode, node.statement);\n case 209 /* ContinueStatement */:\n case 210 /* BreakStatement */:\n return visitNode(cbNode, node.label);\n case 211 /* ReturnStatement */:\n return visitNode(cbNode, node.expression);\n case 212 /* WithStatement */:\n return visitNode(cbNode, node.expression) ||\n visitNode(cbNode, node.statement);\n case 213 /* SwitchStatement */:\n return visitNode(cbNode, node.expression) ||\n visitNode(cbNode, node.caseBlock);\n case 227 /* CaseBlock */:\n return visitNodes(cbNodes, node.clauses);\n case 249 /* CaseClause */:\n return visitNode(cbNode, node.expression) ||\n visitNodes(cbNodes, node.statements);\n case 250 /* DefaultClause */:\n return visitNodes(cbNodes, node.statements);\n case 214 /* LabeledStatement */:\n return visitNode(cbNode, node.label) ||\n visitNode(cbNode, node.statement);\n case 215 /* ThrowStatement */:\n return visitNode(cbNode, node.expression);\n case 216 /* TryStatement */:\n return visitNode(cbNode, node.tryBlock) ||\n visitNode(cbNode, node.catchClause) ||\n visitNode(cbNode, node.finallyBlock);\n case 252 /* CatchClause */:\n return visitNode(cbNode, node.variableDeclaration) ||\n visitNode(cbNode, node.block);\n case 143 /* Decorator */:\n return visitNode(cbNode, node.expression);\n case 221 /* ClassDeclaration */:\n case 192 /* ClassExpression */:\n return visitNodes(cbNodes, node.decorators) ||\n visitNodes(cbNodes, node.modifiers) ||\n visitNode(cbNode, node.name) ||\n visitNodes(cbNodes, node.typeParameters) ||\n visitNodes(cbNodes, node.heritageClauses) ||\n visitNodes(cbNodes, node.members);\n case 222 /* InterfaceDeclaration */:\n return visitNodes(cbNodes, node.decorators) ||\n visitNodes(cbNodes, node.modifiers) ||\n visitNode(cbNode, node.name) ||\n visitNodes(cbNodes, node.typeParameters) ||\n visitNodes(cbNodes, node.heritageClauses) ||\n visitNodes(cbNodes, node.members);\n case 223 /* TypeAliasDeclaration */:\n return visitNodes(cbNodes, node.decorators) ||\n visitNodes(cbNodes, node.modifiers) ||\n visitNode(cbNode, node.name) ||\n visitNodes(cbNodes, node.typeParameters) ||\n visitNode(cbNode, node.type);\n case 224 /* EnumDeclaration */:\n return visitNodes(cbNodes, node.decorators) ||\n visitNodes(cbNodes, node.modifiers) ||\n visitNode(cbNode, node.name) ||\n visitNodes(cbNodes, node.members);\n case 255 /* EnumMember */:\n return visitNode(cbNode, node.name) ||\n visitNode(cbNode, node.initializer);\n case 225 /* ModuleDeclaration */:\n return visitNodes(cbNodes, node.decorators) ||\n visitNodes(cbNodes, node.modifiers) ||\n visitNode(cbNode, node.name) ||\n visitNode(cbNode, node.body);\n case 229 /* ImportEqualsDeclaration */:\n return visitNodes(cbNodes, node.decorators) ||\n visitNodes(cbNodes, node.modifiers) ||\n visitNode(cbNode, node.name) ||\n visitNode(cbNode, node.moduleReference);\n case 230 /* ImportDeclaration */:\n return visitNodes(cbNodes, node.decorators) ||\n visitNodes(cbNodes, node.modifiers) ||\n visitNode(cbNode, node.importClause) ||\n visitNode(cbNode, node.moduleSpecifier);\n case 231 /* ImportClause */:\n return visitNode(cbNode, node.name) ||\n visitNode(cbNode, node.namedBindings);\n case 228 /* NamespaceExportDeclaration */:\n return visitNode(cbNode, node.name);\n case 232 /* NamespaceImport */:\n return visitNode(cbNode, node.name);\n case 233 /* NamedImports */:\n case 237 /* NamedExports */:\n return visitNodes(cbNodes, node.elements);\n case 236 /* ExportDeclaration */:\n return visitNodes(cbNodes, node.decorators) ||\n visitNodes(cbNodes, node.modifiers) ||\n visitNode(cbNode, node.exportClause) ||\n visitNode(cbNode, node.moduleSpecifier);\n case 234 /* ImportSpecifier */:\n case 238 /* ExportSpecifier */:\n return visitNode(cbNode, node.propertyName) ||\n visitNode(cbNode, node.name);\n case 235 /* ExportAssignment */:\n return visitNodes(cbNodes, node.decorators) ||\n visitNodes(cbNodes, node.modifiers) ||\n visitNode(cbNode, node.expression);\n case 189 /* TemplateExpression */:\n return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans);\n case 197 /* TemplateSpan */:\n return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal);\n case 140 /* ComputedPropertyName */:\n return visitNode(cbNode, node.expression);\n case 251 /* HeritageClause */:\n return visitNodes(cbNodes, node.types);\n case 194 /* ExpressionWithTypeArguments */:\n return visitNode(cbNode, node.expression) ||\n visitNodes(cbNodes, node.typeArguments);\n case 240 /* ExternalModuleReference */:\n return visitNode(cbNode, node.expression);\n case 239 /* MissingDeclaration */:\n return visitNodes(cbNodes, node.decorators);\n case 241 /* JsxElement */:\n return visitNode(cbNode, node.openingElement) ||\n visitNodes(cbNodes, node.children) ||\n visitNode(cbNode, node.closingElement);\n case 242 /* JsxSelfClosingElement */:\n case 243 /* JsxOpeningElement */:\n return visitNode(cbNode, node.tagName) ||\n visitNodes(cbNodes, node.attributes);\n case 246 /* JsxAttribute */:\n return visitNode(cbNode, node.name) ||\n visitNode(cbNode, node.initializer);\n case 247 /* JsxSpreadAttribute */:\n return visitNode(cbNode, node.expression);\n case 248 /* JsxExpression */:\n return visitNode(cbNode, node.expression);\n case 245 /* JsxClosingElement */:\n return visitNode(cbNode, node.tagName);\n case 257 /* JSDocTypeExpression */:\n return visitNode(cbNode, node.type);\n case 261 /* JSDocUnionType */:\n return visitNodes(cbNodes, node.types);\n case 262 /* JSDocTupleType */:\n return visitNodes(cbNodes, node.types);\n case 260 /* JSDocArrayType */:\n return visitNode(cbNode, node.elementType);\n case 264 /* JSDocNonNullableType */:\n return visitNode(cbNode, node.type);\n case 263 /* JSDocNullableType */:\n return visitNode(cbNode, node.type);\n case 265 /* JSDocRecordType */:\n return visitNodes(cbNodes, node.members);\n case 267 /* JSDocTypeReference */:\n return visitNode(cbNode, node.name) ||\n visitNodes(cbNodes, node.typeArguments);\n case 268 /* JSDocOptionalType */:\n return visitNode(cbNode, node.type);\n case 269 /* JSDocFunctionType */:\n return visitNodes(cbNodes, node.parameters) ||\n visitNode(cbNode, node.type);\n case 270 /* JSDocVariadicType */:\n return visitNode(cbNode, node.type);\n case 271 /* JSDocConstructorType */:\n return visitNode(cbNode, node.type);\n case 272 /* JSDocThisType */:\n return visitNode(cbNode, node.type);\n case 266 /* JSDocRecordMember */:\n return visitNode(cbNode, node.name) ||\n visitNode(cbNode, node.type);\n case 273 /* JSDocComment */:\n return visitNodes(cbNodes, node.tags);\n case 275 /* JSDocParameterTag */:\n return visitNode(cbNode, node.preParameterName) ||\n visitNode(cbNode, node.typeExpression) ||\n visitNode(cbNode, node.postParameterName);\n case 276 /* JSDocReturnTag */:\n return visitNode(cbNode, node.typeExpression);\n case 277 /* JSDocTypeTag */:\n return visitNode(cbNode, node.typeExpression);\n case 278 /* JSDocTemplateTag */:\n return visitNodes(cbNodes, node.typeParameters);\n case 279 /* JSDocTypedefTag */:\n return visitNode(cbNode, node.typeExpression) ||\n visitNode(cbNode, node.name) ||\n visitNode(cbNode, node.jsDocTypeLiteral);\n case 281 /* JSDocTypeLiteral */:\n return visitNodes(cbNodes, node.jsDocPropertyTags);\n case 280 /* JSDocPropertyTag */:\n return visitNode(cbNode, node.typeExpression) ||\n visitNode(cbNode, node.name);\n case 282 /* JSDocLiteralType */:\n return visitNode(cbNode, node.literal);\n }\n }", "function traverseElements(elem, callback) {\n callback(elem);\n const children = elem.children;\n for (var i = 0; i < children.length; ++i) {\n\t traverseElements(children.item(i), callback);\n }\n}", "function map(children, func) {\n var index = 0;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.map(children, function (child) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(child) ? func(child, index++) : child;\n });\n}", "function map(children, func) {\n var index = 0;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.map(children, function (child) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(child) ? func(child, index++) : child;\n });\n}", "function map(children, func) {\n var index = 0;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.map(children, function (child) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(child) ? func(child, index++) : child;\n });\n}", "function map(children, func) {\n var index = 0;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.map(children, function (child) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(child) ? func(child, index++) : child;\n });\n}", "function map(children, func) {\n var index = 0;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.map(children, function (child) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(child) ? func(child, index++) : child;\n });\n}", "function map(children, func) {\n var index = 0;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.map(children, function (child) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(child) ? func(child, index++) : child;\n });\n}", "function map(children, func) {\n var index = 0;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.map(children, function (child) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(child) ? func(child, index++) : child;\n });\n}", "function map(children, func) {\n var index = 0;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.map(children, function (child) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.isValidElement(child) ? func(child, index++) : child;\n });\n}", "function map(children, func) {\n var index = 0;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.map(children, function (child) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child) ? func(child, index++) : child;\n });\n}", "function map(children, func) {\n var index = 0;\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.map(children, function (child) {\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child) ? func(child, index++) : child;\n });\n}", "function forEachMatch(path, f, root) {\r\n\tvar el;\r\n\tvar root = (root == null) ? document : root;\r\n\tvar matches = root.evaluate(\r\n\t\tpath, root, null,\r\n\t\tXPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);\r\n\tfor (var i = 0; el=matches.snapshotItem(i); i++)\r\n\t\tf(el);\r\n}", "traverse(fn, skipSelf = false) {\n const {\n children\n } = this;\n\n if (!skipSelf) {\n fn.call(this, this);\n } // Simply testing whether there is non-zero children length\n // is 10x faster than using this.isLoaded\n\n for (let i = 0, l = children && children.length; i < l; i++) {\n children[i].traverse(fn);\n }\n }", "childrenIteration(_processFunc) {\n return this.children.map(_processFunc);\n }", "function map(children, func) {\n var index = 0;\n return react.Children.map(children, function (child) {\n return /*#__PURE__*/react.isValidElement(child) ? func(child, index++) : child;\n });\n}", "function visit(parent, visitFn, childrenFn) {\n if (!parent) return;\n\n visitFn(parent);\n\n var children = childrenFn(parent);\n var count = children.length;\n for (var i = 0; i < count; i++) {\n visit(children[i], visitFn, childrenFn);\n }\n }", "forEach(callback) {\n let i = this._cursor;\n let node = this._front;\n let elements = node._elements;\n while (i !== elements.length || node._next !== undefined) {\n if (i === elements.length) {\n node = node._next;\n elements = node._elements;\n i = 0;\n if (elements.length === 0) {\n break;\n }\n }\n callback(elements[i]);\n ++i;\n }\n }", "forEach(callback) {\n let i = this._cursor;\n let node = this._front;\n let elements = node._elements;\n while (i !== elements.length || node._next !== undefined) {\n if (i === elements.length) {\n node = node._next;\n elements = node._elements;\n i = 0;\n if (elements.length === 0) {\n break;\n }\n }\n callback(elements[i]);\n ++i;\n }\n }", "function map(children, func) {\n var index = 0;\n return react__WEBPACK_IMPORTED_MODULE_0__.Children.map(children, function (child) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(child) ? func(child, index++) : child;\n });\n}", "function visit(parent, visitFn, childrenFn) {\n if (!parent) return;\n\n visitFn(parent);\n\n var children = childrenFn(parent);\n if (children) {\n var count = children.length;\n for (var i = 0; i < count; i++) {\n visit(children[i], visitFn, childrenFn);\n }\n }\n }", "function forEachNode(parsed, func, state, options) {\n // note: func can get called with the same node for different\n // visitor callbacks!\n // func args: node, state, depth, type\n options = options || {};\n var traversal = options.traversal || 'preorder'; // also: postorder\n\n var visitors = lively_lang.obj.clone(options.visitors ? options.visitors : walk.make(walk.visitors.withMemberExpression));\n var iterator = traversal === 'preorder' ? function (orig, type, node, depth, cont) {\n func(node, state, depth, type);return orig(node, depth + 1, cont);\n } : function (orig, type, node, depth, cont) {\n var result = orig(node, depth + 1, cont);func(node, state, depth, type);return result;\n };\n Object.keys(visitors).forEach(function (type) {\n var orig = visitors[type];\n visitors[type] = function (node, depth, cont) {\n return iterator(orig, type, node, depth, cont);\n };\n });\n walk.recursive(parsed, 0, null, visitors);\n return parsed;\n}", "function applyToChildren($element, func) {\n var children = $element.children();\n for (var i = 0; i < children.length; i++) {\n func(angular.element(children[i]));\n }\n}", "function visit(parent, visitFn, childrenFn) {\n if (!parent) return;\n\n visitFn(parent);\n\n var children = childrenFn(parent);\n if (children) {\n var count = children.length;\n for (var i = 0; i < count; i++) {\n visit(children[i], visitFn, childrenFn);\n }\n }\n }", "function visit(parent, visitFn, childrenFn) {\n if (!parent) return;\n\n visitFn(parent);\n\n var children = childrenFn(parent);\n if (children) {\n var count = children.length;\n for (var i = 0; i < count; i++) {\n visit(children[i], visitFn, childrenFn);\n }\n }\n }", "function visit(parent, visitFn, childrenFn) {\n if (!parent) return;\n\n visitFn(parent);\n\n var children = childrenFn(parent);\n if (children) {\n var count = children.length;\n for (var i = 0; i < count; i++) {\n visit(children[i], visitFn, childrenFn);\n }\n }\n }", "someChildren(callback) {\n return this.childElements.some(visit);\n function visit(node) {\n if (callback(node)) {\n return true;\n }\n else {\n return node.childElements.some(visit);\n }\n }\n }", "function scanChildren(element){var found;if(element){for(var i=0,len=element.length;i<len;i++){var target=element[i];if(!found){for(var j=0,numChild=target.childNodes.length;j<numChild;j++){found=found||scanTree([target.childNodes[j]]);}}}}return found;}", "function visit(parent, visitFn, childrenFn) {\n if (!parent) return;\n\n visitFn(parent);\n\n var children = childrenFn(parent);\n if (children) {\n var count = children.length;\n for (var i = 0; i < count; i++) {\n visit(children[i], visitFn, childrenFn);\n }\n }\n }", "function _bfs(obj, cb) {\n\tconst htmlNode = [obj];\n\n\tlet node;\n\n while (htmlNode.length > 0) {\n\n htmlNode.forEach(() => {\n node = htmlNode.shift();\n // Run callback\n cb(node);\n // Destructure to get children\n const {\n \tchildren\n } = node;\n\n if (children) {\n children.forEach(e => {\n htmlNode.push(e);\n });\n }\n });\n }\n}", "function ForEach(nodeList, callback, scope) {\r\n for (var i = 0; i < nodeList.length; i++) {\r\n\t callback(nodeList[i]); // passes back stuff we need\r\n }\r\n}", "depthFirstForEach(cb) {\n function dfs(fn, node) {\n if (node) {\n if (fn) {\n fn(node.value);\n }\n dfs(fn, node.left);\n dfs(fn, node.right);\n }\n }\n dfs(cb, this);\n }", "function forEach(iter, f) {\n if (iter.next) {\n try {while (true) {f(iter.next());}}\n catch (e) {if (e != StopIteration) {throw e;}}\n }\n else {\n for (var i = 0; i < iter.length; i++) {\n f(iter[i]);\n }\n }\n}", "_each(fn)\n {\n // Execute the function on this game object\n fn(this);\n\n // Execute the function on its children\n for (let gameObject of this.gameObjects)\n gameObject._each(fn);\n }", "decorateChildren() {\n this.forEachChild(aChild => {\n var element = this.getDomHelper().getElement(aChild.getId());\n if (element) {\n aChild.decorate(element);\n }\n });\n }", "eachCheck(elements, checkFunc, expected, isFilterMask = false) {\n const diffs = {};\n if (util_1.isArray(expected) && expected.length !== elements.length) {\n throw new Error(\n // tslint:disable-next-line:prefer-template\n `${this.constructor.name}: ` +\n `Length of expected (${expected.length}) did not match length of list (${elements.length})\\n` +\n `( ${this._selector} )`);\n }\n for (let i = 0; i < elements.length; ++i) {\n const _expected = util_1.isArray(expected) ? expected[i] : expected;\n const element = elements[i];\n if (isFilterMask) {\n if (helpers_1.isNullOrUndefined(expected) || this._includedInFilter(_expected)) {\n if (!checkFunc(element, _expected)) {\n diffs[`[${i + 1}]`] = element.__lastDiff;\n }\n }\n }\n else {\n if (typeof _expected !== 'undefined') {\n if (!checkFunc(element, _expected)) {\n diffs[`[${i + 1}]`] = element.__lastDiff;\n }\n }\n }\n }\n this._lastDiff = {\n tree: diffs,\n };\n return Object.keys(diffs).length === 0;\n }", "function eachInNodeList (nodeList, lambda, optionalNodeTypeRestriction) {\n for (var i=0; i!=nodeList.length; ++i) {\n if ( optionalNodeTypeRestriction && \n nodeList[i].nodeType!=optionalNodeTypeRestriction) \n {\n continue\n }\n lambda (nodeList[i])\n }\n\n}", "forEach(fn) {\n let node = this.head;\n while (node) {\n fn(node.value);\n node = node.next;\n }\n }", "function children(element, callback) {\n\t\tconst childNodes = element.childNodes || [];\n\t\tconst l = childNodes.length;\n\n\t\tfor (let i = 0; i < l; i++) {\n\t\t\tlet child = childNodes[i];\n\n\t\t\tcallback(child);\n\t\t\tchildren(child, callback); // recursive\n\t\t}\n\t}", "function _fnApplyToChildren( fn, an1, an2 )\n\t\t{\n\t\t\tfor ( var i=0, iLen=an1.length ; i<iLen ; i++ )\n\t\t\t{\n\t\t\t\tfor ( var j=0, jLen=an1[i].childNodes.length ; j<jLen ; j++ )\n\t\t\t\t{\n\t\t\t\t\tif ( an1[i].childNodes[j].nodeType == 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( typeof an2 != 'undefined' )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfn( an1[i].childNodes[j], an2[i].childNodes[j] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfn( an1[i].childNodes[j] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "static validateOrder(children, rules, cb) {\n if (!rules) {\n return true;\n }\n let i = 0;\n let prev = null;\n for (const node of children) {\n const old = i;\n while (rules[i] && !Validator.validatePermittedCategory(node, rules[i], true)) {\n i++;\n }\n if (i >= rules.length) {\n /* Second check is if the order is specified for this element at all. It\n * will be unspecified in two cases:\n * - disallowed elements\n * - elements where the order doesn't matter\n * In both of these cases no error should be reported. */\n const orderSpecified = rules.find((cur) => Validator.validatePermittedCategory(node, cur, true));\n if (orderSpecified) {\n cb(node, prev);\n return false;\n }\n /* if this element has unspecified order the index is restored so new\n * elements of the same type can be specified again */\n i = old;\n }\n prev = node;\n }\n return true;\n }", "function visit(parent, visitFn, childrenFn) {\n if (!parent) return;\n\n visitFn(parent);\n\n var children = childrenFn(parent);\n if (children) {\n var count = children.length;\n for (var i = 0; i < count; i++) {\n\t visit(children[i], visitFn, childrenFn);\n }\n }\n}", "function forEachNodeList(els, fn) {\n Array.prototype.forEach.call(els, fn);\n}", "function _fnApplyToChildren(fn, an1, an2) {\n\t\t\tfor (var i = 0, iLen = an1.length; i < iLen; i++) {\n\t\t\t\tfor (var j = 0, jLen = an1[i].childNodes.length; j < jLen; j++) {\n\t\t\t\t\tif (an1[i].childNodes[j].nodeType == 1) {\n\t\t\t\t\t\tif (typeof an2 != 'undefined') {\n\t\t\t\t\t\t\tfn(an1[i].childNodes[j], an2[i].childNodes[j]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfn(an1[i].childNodes[j]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "static validateOrder(children, rules, cb) {\n if (!rules) {\n return true;\n }\n let i = 0;\n let prev = null;\n for (const node of children) {\n const old = i;\n while (rules[i] && !Validator.validatePermittedCategory(node, rules[i])) {\n i++;\n }\n if (i >= rules.length) {\n /* Second check is if the order is specified for this element at all. It\n * will be unspecified in two cases:\n * - disallowed elements\n * - elements where the order doesn't matter\n * In both of these cases no error should be reported. */\n const orderSpecified = rules.find((cur) => Validator.validatePermittedCategory(node, cur));\n if (orderSpecified) {\n cb(node, prev);\n return false;\n }\n /* if this element has unspecified order the index is restored so new\n * elements of the same type can be specified again */\n i = old;\n }\n prev = node;\n }\n return true;\n }", "function forEach(callback, scope) {\n /*jshint newcap:false*/\n var elements, length, index;\n\n // convert elements to object\n elements = Object(this);\n\n // make sure callback is a function\n requireFunction(callback);\n\n // convert length to unsigned 32 bit integer\n length = elements.length >>> 0;\n\n // iterate over elements\n for (index = 0; index < length; ++index) {\n\n // current index exists\n if (index in elements) {\n\n // execute callback\n callback.call(scope, elements[index], index, elements);\n }\n }\n }", "function scanChildren(element) {\n var found;\n if ( element ) {\n for (var i = 0, len = element.length; i < len; i++) {\n var target = element[i];\n if ( !found ) {\n for (var j = 0, numChild = target.childNodes.length; j < numChild; j++) {\n found = found || scanTree([target.childNodes[j]]);\n }\n }\n }\n }\n return found;\n }", "function scanChildren(element) {\n var found;\n if ( element ) {\n for (var i = 0, len = element.length; i < len; i++) {\n var target = element[i];\n if ( !found ) {\n for (var j = 0, numChild = target.childNodes.length; j < numChild; j++) {\n found = found || scanTree([target.childNodes[j]]);\n }\n }\n }\n }\n return found;\n }", "function scanChildren(element) {\n var found;\n if ( element ) {\n for (var i = 0, len = element.length; i < len; i++) {\n var target = element[i];\n if ( !found ) {\n for (var j = 0, numChild = target.childNodes.length; j < numChild; j++) {\n found = found || scanTree([target.childNodes[j]]);\n }\n }\n }\n }\n return found;\n }", "function every(callback, scope) {\n /*jshint newcap:false*/\n var elements, length, index;\n\n // convert elements to object\n elements = Object(this);\n\n // make sure callback is a function\n requireFunction(callback);\n\n // convert length to unsigned 32 bit integer\n length = elements.length >>> 0;\n\n // iterate over elements\n for (index = 0; index < length; ++index) {\n\n // current index exists\n if (index in elements &&\n\n // callback returns false\n !callback.call(scope, elements[index], index, elements)) {\n\n // break loop, test failed\n return false;\n }\n }\n // test passed, controversy began..\n return true;\n }", "function scanChildren(element) {\n var found;\n if (element) {\n for (var i = 0, len = element.length; i < len; i++) {\n var target = element[i];\n if (!found) {\n for (var j = 0, numChild = target.childNodes.length; j < numChild; j++) {\n found = found || scanTree([target.childNodes[j]]);\n }\n }\n }\n }\n return found;\n }", "function scanChildren(element) {\n var found;\n if ( element ) {\n for (var i = 0, len = element.length; i < len; i++) {\n var target = element[i];\n if ( !found ) {\n for (var j = 0, numChild = target.childNodes.length; j < numChild; j++) {\n found = found || scanTree([target.childNodes[j]]);\n }\n }\n }\n }\n return found;\n }", "function domEach(array, fn) {\n var len = array.length;\n for (var i = 0; i < len && fn(i, array[i]) !== false; i++)\n ;\n return array;\n}", "function findChildren(node, test, emit) {\n if (!node)\n return;\n if (test(node)) {\n emit(node);\n }\n node.forEachChild(function (child) { return findChildren(child, test, emit); });\n}", "hasValidChildren() {\n const children = this.children;\n if (children.length <= 1) {\n return true;\n }\n // There are more 2 or more children - they must have conditions\n for (const child of children) {\n if (!child.condition) {\n return false;\n }\n }\n return true;\n }", "function nodeListForEach (nodes, callback) {\n if (window.NodeList.prototype.forEach) {\n return nodes.forEach(callback)\n }\n for (var i = 0; i < nodes.length; i++) {\n callback.call(window, nodes[i], i, nodes);\n }\n}", "traverseDF(fn) {\n //Same: Create an array for traversing with only the root\n const nodeToProcess = [this.root];\n //Same: as long as the array has something in it loop through it\n while (nodeToProcess.length) {\n //Same: Take out the first thing in the array\n const childToProcess = nodeToProcess.shift();\n //DIFFERENT: put all the children of the shifted data into the front of the array for processing in the same order as above.\n nodeToProcess.unshift(...childToProcess.children);\n //Same: recursion part, put shifted node into the argument function for processing.\n fn(childToProcess);\n }\n }", "function treeForEachChild(tree, action) {\n each(tree.node.children, function (child, childTree) {\n action(new Tree(child, tree, childTree));\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 }", "function changedDescendants(old, cur, offset, f) {\n var oldSize = old.childCount, curSize = cur.childCount\n outer: for (var i = 0, j = 0; i < curSize; i++) {\n var child = cur.child(i)\n for (var scan = j, e = Math.min(oldSize, i + 3); scan < e; scan++) {\n if (old.child(scan) == child) {\n j = scan + 1\n offset += child.nodeSize\n continue outer\n }\n }\n f(child, offset)\n if (j < oldSize && old.child(j).sameMarkup(child))\n { changedDescendants(old.child(j), child, offset + 1, f) }\n else\n { child.nodesBetween(0, child.content.size, f, offset + 1) }\n offset += child.nodeSize\n }\n}", "function updateChildren(DOMElement, changes, dispatch, context) {\n // Create a clone of the children so we can reference them later\n // using their original position even if they move around\n if (!DOMElement) return;\n let childNodes = toArray(DOMElement.childNodes)\n\n // changes.forEach(change => {\n // Actions.case({\n // insertChild: (vnode, index, path) => {\n // var placeHolder = createPlaceHolderAtIndex(DOMElement, childNodes, index)\n // change.placeHolder = placeHolder\n // },\n // moveChild: (vnode, index, actions) => {\n // var placeHolder = createPlaceHolderAtIndex(DOMElement, childNodes, index)\n // change.placeHolder = placeHolder\n //\n //\n // },\n // removeChild: (index) => {\n //\n // },\n // updateChild: (index, actions) => {\n // let _update = updateElement(dispatch, context)\n // actions.forEach(action => _update(childNodes[index], action))\n // }\n // }, change)\n // })\n\n changes.forEach(change => {\n Actions.case({\n insertChild: (vnode, index, path) => {\n insertAtIndex(DOMElement, index, createElement(vnode, path, dispatch, context), change.placeHolder)\n mountElement(vnode)\n },\n moveChild: (index, newVnode, oldVnode, actions, path) => {\n var el = (oldVnode.nativeNode || createElement(newVnode, path, dispatch, context))\n insertAtIndex(DOMElement, index, el, change.placeHolder)\n let _update = updateElement(dispatch, context)\n actions.forEach(action => _update(el, action))\n },\n removeChild: (index, vnode) => {\n var child = childNodes[index];\n if (child && child.parentNode == DOMElement) {\n DOMElement.removeChild(child)\n removeThunks(vnode)\n }\n },\n updateChild: (index, actions) => {\n let _update = updateElement(dispatch, context)\n actions.forEach(action => _update(childNodes[index], action))\n }\n }, change)\n })\n}", "function processNode(node){\n processChild(node);\n for( i in node.children )\n processNode(node.children[i]);\n }", "function changedDescendants(old, cur, offset, f) {\n var oldSize = old.childCount, curSize = cur.childCount;\n outer: for (var i = 0, j = 0; i < curSize; i++) {\n var child = cur.child(i);\n for (var scan = j, e = Math.min(oldSize, i + 3); scan < e; scan++) {\n if (old.child(scan) == child) {\n j = scan + 1;\n offset += child.nodeSize;\n continue outer\n }\n }\n f(child, offset);\n if (j < oldSize && old.child(j).sameMarkup(child))\n { changedDescendants(old.child(j), child, offset + 1, f); }\n else\n { child.nodesBetween(0, child.content.size, f, offset + 1); }\n offset += child.nodeSize;\n }\n}", "preTraverseSceneGraph(rootNode, func) {\n func(rootNode);\n if (!this.gameObjects.has(rootNode)) return; //might have been deleted during execution\n\n let nodeQueue = new Set(this.childrenOf(rootNode)); //shallow copy\n for (let child of nodeQueue) {\n this.preTraverseSceneGraph(child, func);\n }\n }", "function elementChildren(children, predicate) {\n if (predicate === void 0) { predicate = function () { return true; }; }\n return Children.toArray(children).filter(function (child) { return isValidElement(child) && predicate(child); });\n}", "function forEach(arr, fun) { return HTMLCollection.prototype.each.call(arr, fun); }", "function nodeLoop(fn, nodes) {\n\t\tvar i;\n\t\t// Good idea to walk up the DOM\n\t\tfor (i = nodes.length - 1; i >= 0; i -= 1) {\n\t\t\tfn(nodes[i]);\n\t\t}\n\t}", "forEach(visitor) {\n this.tree_walk(this.root, (node) => visitor(node.item.key, node.item.value));\n }", "function __for_each(arr, Fn) {\n\t\tArray.prototype.slice.call((typeof arr === 'string' ? document.querySelectorAll(arr) : arr), 0).forEach(Fn);\n\t}", "traverse(fn, skipSelf = false) {\n const me = this;\n\n if (!skipSelf) {\n fn.call(me, me);\n }\n if (me.isLoaded) me.children.forEach((child) => child.traverse(fn));\n }", "function eachElement (elements, callback) {\n if (elements.nodeType) {\n elements = [elements];\n } else if (typeof elements === 'string') {\n elements = document.querySelectorAll(selector(elements));\n }\n\n for (var a = 0; a < elements.length; a++) {\n if (elements[a].nodeType === 1) {\n callback(elements[a], a);\n }\n }\n }", "function validateTree(root) {\n const errors = new Array();\n visit(root, 'pre', construct => {\n for (const message of construct.onValidate()) {\n errors.push({ message, source: construct });\n }\n });\n if (errors.length > 0) {\n const errorList = errors.map(e => `[${e.source.node.path}] ${e.message}`).join('\\n ');\n throw new Error(`Validation failed with the following errors:\\n ${errorList}`);\n }\n}", "forEach(fn) {\n let node = this.head;\n let counter = 0;\n while (node) {\n fn(node, counter);\n node = node.next;\n counter++;\n }\n }" ]
[ "0.75489044", "0.75472116", "0.75472116", "0.7534625", "0.7462396", "0.61719793", "0.61454564", "0.60228586", "0.6020845", "0.596845", "0.585655", "0.58508164", "0.5779022", "0.5706016", "0.567445", "0.55288815", "0.5502953", "0.5458454", "0.5440849", "0.5391554", "0.5366952", "0.5363623", "0.5355249", "0.5355249", "0.5355249", "0.5355249", "0.5355249", "0.5355249", "0.5355249", "0.5355249", "0.53484327", "0.53484327", "0.53217095", "0.53119594", "0.5301267", "0.5274645", "0.518516", "0.5154408", "0.5154408", "0.50848514", "0.50646085", "0.5057698", "0.5050665", "0.504079", "0.504079", "0.504079", "0.5033789", "0.5021655", "0.5013507", "0.5011611", "0.49958628", "0.4984221", "0.49774528", "0.49515504", "0.4943185", "0.4936912", "0.4920451", "0.49199793", "0.49127385", "0.49119967", "0.49042898", "0.49034315", "0.48973286", "0.4884115", "0.48804867", "0.487946", "0.48725298", "0.48725298", "0.48725298", "0.48724222", "0.48598558", "0.48340416", "0.48259747", "0.48244074", "0.4822187", "0.48113996", "0.48083258", "0.48013788", "0.47920945", "0.47780198", "0.4771382", "0.47558457", "0.47556105", "0.47514018", "0.47338724", "0.4724846", "0.47134405", "0.47134125", "0.47128627", "0.47124466", "0.47011638", "0.46998432", "0.4692357" ]
0.7503897
11
React's built version is broken: for cases when the trigger is disabled and mouseOut/Over can cause flicker moving from one child element to another.
function handleMouseOverOut(handler, args, relatedNative) { var e = args[0]; var target = e.currentTarget; var related = e.relatedTarget || e.nativeEvent[relatedNative]; if ((!related || related !== target) && !Object(dom_helpers_contains__WEBPACK_IMPORTED_MODULE_3__["default"])(target, related)) { handler.apply(void 0, args); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateTrigger$2(PortalComponent) {\n var Trigger = /*#__PURE__*/function (_React$Component) {\n (0, _inherits2.default)(Trigger, _React$Component);\n\n var _super = (0, _createSuper2.default)(Trigger);\n\n function Trigger(props) {\n var _this;\n\n (0, _classCallCheck2.default)(this, Trigger);\n _this = _super.call(this, props);\n _this.popupRef = /*#__PURE__*/React.createRef();\n _this.triggerRef = /*#__PURE__*/React.createRef();\n\n _this.onMouseEnter = function (e) {\n var mouseEnterDelay = _this.props.mouseEnterDelay;\n\n _this.fireEvents('onMouseEnter', e);\n\n _this.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e);\n };\n\n _this.onMouseMove = function (e) {\n _this.fireEvents('onMouseMove', e);\n\n _this.setPoint(e);\n };\n\n _this.onMouseLeave = function (e) {\n _this.fireEvents('onMouseLeave', e);\n\n _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n };\n\n _this.onPopupMouseEnter = function () {\n _this.clearDelayTimer();\n };\n\n _this.onPopupMouseLeave = function (e) {\n var _this$popupRef$curren; // https://github.com/react-component/trigger/pull/13\n // react bug?\n\n\n if (e.relatedTarget && !e.relatedTarget.setTimeout && contains$1((_this$popupRef$curren = _this.popupRef.current) === null || _this$popupRef$curren === void 0 ? void 0 : _this$popupRef$curren.getElement(), e.relatedTarget)) {\n return;\n }\n\n _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n };\n\n _this.onFocus = function (e) {\n _this.fireEvents('onFocus', e); // incase focusin and focusout\n\n\n _this.clearDelayTimer();\n\n if (_this.isFocusToShow()) {\n _this.focusTime = Date.now();\n\n _this.delaySetPopupVisible(true, _this.props.focusDelay);\n }\n };\n\n _this.onMouseDown = function (e) {\n _this.fireEvents('onMouseDown', e);\n\n _this.preClickTime = Date.now();\n };\n\n _this.onTouchStart = function (e) {\n _this.fireEvents('onTouchStart', e);\n\n _this.preTouchTime = Date.now();\n };\n\n _this.onBlur = function (e) {\n _this.fireEvents('onBlur', e);\n\n _this.clearDelayTimer();\n\n if (_this.isBlurToHide()) {\n _this.delaySetPopupVisible(false, _this.props.blurDelay);\n }\n };\n\n _this.onContextMenu = function (e) {\n e.preventDefault();\n\n _this.fireEvents('onContextMenu', e);\n\n _this.setPopupVisible(true, e);\n };\n\n _this.onContextMenuClose = function () {\n if (_this.isContextMenuToShow()) {\n _this.close();\n }\n };\n\n _this.onClick = function (event) {\n _this.fireEvents('onClick', event); // focus will trigger click\n\n\n if (_this.focusTime) {\n var preTime;\n\n if (_this.preClickTime && _this.preTouchTime) {\n preTime = Math.min(_this.preClickTime, _this.preTouchTime);\n } else if (_this.preClickTime) {\n preTime = _this.preClickTime;\n } else if (_this.preTouchTime) {\n preTime = _this.preTouchTime;\n }\n\n if (Math.abs(preTime - _this.focusTime) < 20) {\n return;\n }\n\n _this.focusTime = 0;\n }\n\n _this.preClickTime = 0;\n _this.preTouchTime = 0; // Only prevent default when all the action is click.\n // https://github.com/ant-design/ant-design/issues/17043\n // https://github.com/ant-design/ant-design/issues/17291\n\n if (_this.isClickToShow() && (_this.isClickToHide() || _this.isBlurToHide()) && event && event.preventDefault) {\n event.preventDefault();\n }\n\n var nextVisible = !_this.state.popupVisible;\n\n if (_this.isClickToHide() && !nextVisible || nextVisible && _this.isClickToShow()) {\n _this.setPopupVisible(!_this.state.popupVisible, event);\n }\n };\n\n _this.onPopupMouseDown = function () {\n _this.hasPopupMouseDown = true;\n clearTimeout(_this.mouseDownTimeout);\n _this.mouseDownTimeout = window.setTimeout(function () {\n _this.hasPopupMouseDown = false;\n }, 0);\n\n if (_this.context) {\n var _this$context;\n\n (_this$context = _this.context).onPopupMouseDown.apply(_this$context, arguments);\n }\n };\n\n _this.onDocumentClick = function (event) {\n if (_this.props.mask && !_this.props.maskClosable) {\n return;\n }\n\n var target = event.target;\n\n var root = _this.getRootDomNode();\n\n var popupNode = _this.getPopupDomNode();\n\n if ( // mousedown on the target should also close popup when action is contextMenu.\n // https://github.com/ant-design/ant-design/issues/29853\n (!contains$1(root, target) || _this.isContextMenuOnly()) && !contains$1(popupNode, target) && !_this.hasPopupMouseDown) {\n _this.close();\n }\n };\n\n _this.getRootDomNode = function () {\n var getTriggerDOMNode = _this.props.getTriggerDOMNode;\n\n if (getTriggerDOMNode) {\n return getTriggerDOMNode(_this.triggerRef.current);\n }\n\n try {\n var domNode = findDOMNode$2(_this.triggerRef.current);\n\n if (domNode) {\n return domNode;\n }\n } catch (err) {// Do nothing\n }\n\n return ReactDOM.default.findDOMNode((0, _assertThisInitialized2.default)(_this));\n };\n\n _this.getPopupClassNameFromAlign = function (align) {\n var className = [];\n var _this$props = _this.props,\n popupPlacement = _this$props.popupPlacement,\n builtinPlacements = _this$props.builtinPlacements,\n prefixCls = _this$props.prefixCls,\n alignPoint = _this$props.alignPoint,\n getPopupClassNameFromAlign = _this$props.getPopupClassNameFromAlign;\n\n if (popupPlacement && builtinPlacements) {\n className.push(getAlignPopupClassName$2(builtinPlacements, prefixCls, align, alignPoint));\n }\n\n if (getPopupClassNameFromAlign) {\n className.push(getPopupClassNameFromAlign(align));\n }\n\n return className.join(' ');\n };\n\n _this.getComponent = function () {\n var _this$props2 = _this.props,\n prefixCls = _this$props2.prefixCls,\n destroyPopupOnHide = _this$props2.destroyPopupOnHide,\n popupClassName = _this$props2.popupClassName,\n onPopupAlign = _this$props2.onPopupAlign,\n popupMotion = _this$props2.popupMotion,\n popupAnimation = _this$props2.popupAnimation,\n popupTransitionName = _this$props2.popupTransitionName,\n popupStyle = _this$props2.popupStyle,\n mask = _this$props2.mask,\n maskAnimation = _this$props2.maskAnimation,\n maskTransitionName = _this$props2.maskTransitionName,\n maskMotion = _this$props2.maskMotion,\n zIndex = _this$props2.zIndex,\n popup = _this$props2.popup,\n stretch = _this$props2.stretch,\n alignPoint = _this$props2.alignPoint,\n mobile = _this$props2.mobile,\n forceRender = _this$props2.forceRender;\n var _this$state = _this.state,\n popupVisible = _this$state.popupVisible,\n point = _this$state.point;\n\n var align = _this.getPopupAlign();\n\n var mouseProps = {};\n\n if (_this.isMouseEnterToShow()) {\n mouseProps.onMouseEnter = _this.onPopupMouseEnter;\n }\n\n if (_this.isMouseLeaveToHide()) {\n mouseProps.onMouseLeave = _this.onPopupMouseLeave;\n }\n\n mouseProps.onMouseDown = _this.onPopupMouseDown;\n mouseProps.onTouchStart = _this.onPopupMouseDown;\n return /*#__PURE__*/React.createElement(Popup$2, (0, _extends3.default)({\n prefixCls: prefixCls,\n destroyPopupOnHide: destroyPopupOnHide,\n visible: popupVisible,\n point: alignPoint && point,\n className: popupClassName,\n align: align,\n onAlign: onPopupAlign,\n animation: popupAnimation,\n getClassNameFromAlign: _this.getPopupClassNameFromAlign\n }, mouseProps, {\n stretch: stretch,\n getRootDomNode: _this.getRootDomNode,\n style: popupStyle,\n mask: mask,\n zIndex: zIndex,\n transitionName: popupTransitionName,\n maskAnimation: maskAnimation,\n maskTransitionName: maskTransitionName,\n maskMotion: maskMotion,\n ref: _this.popupRef,\n motion: popupMotion,\n mobile: mobile,\n forceRender: forceRender\n }), typeof popup === 'function' ? popup() : popup);\n };\n\n _this.attachParent = function (popupContainer) {\n wrapperRaf$2.cancel(_this.attachId);\n var _this$props3 = _this.props,\n getPopupContainer = _this$props3.getPopupContainer,\n getDocument = _this$props3.getDocument;\n\n var domNode = _this.getRootDomNode();\n\n var mountNode;\n\n if (!getPopupContainer) {\n mountNode = getDocument(_this.getRootDomNode()).body;\n } else if (domNode || getPopupContainer.length === 0) {\n // Compatible for legacy getPopupContainer with domNode argument.\n // If no need `domNode` argument, will call directly.\n // https://codesandbox.io/s/eloquent-mclean-ss93m?file=/src/App.js\n mountNode = getPopupContainer(domNode);\n }\n\n if (mountNode) {\n mountNode.appendChild(popupContainer);\n } else {\n // Retry after frame render in case parent not ready\n _this.attachId = wrapperRaf$2(function () {\n _this.attachParent(popupContainer);\n });\n }\n };\n\n _this.getContainer = function () {\n var getDocument = _this.props.getDocument;\n var popupContainer = getDocument(_this.getRootDomNode()).createElement('div'); // Make sure default popup container will never cause scrollbar appearing\n // https://github.com/react-component/trigger/issues/41\n\n popupContainer.style.position = 'absolute';\n popupContainer.style.top = '0';\n popupContainer.style.left = '0';\n popupContainer.style.width = '100%';\n\n _this.attachParent(popupContainer);\n\n return popupContainer;\n };\n\n _this.setPoint = function (point) {\n var alignPoint = _this.props.alignPoint;\n if (!alignPoint || !point) return;\n\n _this.setState({\n point: {\n pageX: point.pageX,\n pageY: point.pageY\n }\n });\n };\n\n _this.handlePortalUpdate = function () {\n if (_this.state.prevPopupVisible !== _this.state.popupVisible) {\n _this.props.afterPopupVisibleChange(_this.state.popupVisible);\n }\n };\n\n _this.triggerContextValue = {\n onPopupMouseDown: _this.onPopupMouseDown\n };\n var popupVisible;\n\n if ('popupVisible' in props) {\n popupVisible = !!props.popupVisible;\n } else {\n popupVisible = !!props.defaultPopupVisible;\n }\n\n _this.state = {\n prevPopupVisible: popupVisible,\n popupVisible: popupVisible\n };\n ALL_HANDLERS$2.forEach(function (h) {\n _this[\"fire\".concat(h)] = function (e) {\n _this.fireEvents(h, e);\n };\n });\n return _this;\n }\n\n (0, _createClass2.default)(Trigger, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.componentDidUpdate();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n var props = this.props;\n var state = this.state; // We must listen to `mousedown` or `touchstart`, edge case:\n // https://github.com/ant-design/ant-design/issues/5804\n // https://github.com/react-component/calendar/issues/250\n // https://github.com/react-component/trigger/issues/50\n\n if (state.popupVisible) {\n var currentDocument;\n\n if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {\n currentDocument = props.getDocument(this.getRootDomNode());\n this.clickOutsideHandler = addEventListenerWrap$1(currentDocument, 'mousedown', this.onDocumentClick);\n } // always hide on mobile\n\n\n if (!this.touchOutsideHandler) {\n currentDocument = currentDocument || props.getDocument(this.getRootDomNode());\n this.touchOutsideHandler = addEventListenerWrap$1(currentDocument, 'touchstart', this.onDocumentClick);\n } // close popup when trigger type contains 'onContextMenu' and document is scrolling.\n\n\n if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) {\n currentDocument = currentDocument || props.getDocument(this.getRootDomNode());\n this.contextMenuOutsideHandler1 = addEventListenerWrap$1(currentDocument, 'scroll', this.onContextMenuClose);\n } // close popup when trigger type contains 'onContextMenu' and window is blur.\n\n\n if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) {\n this.contextMenuOutsideHandler2 = addEventListenerWrap$1(window, 'blur', this.onContextMenuClose);\n }\n\n return;\n }\n\n this.clearOutsideHandler();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.clearDelayTimer();\n this.clearOutsideHandler();\n clearTimeout(this.mouseDownTimeout);\n wrapperRaf$2.cancel(this.attachId);\n }\n }, {\n key: \"getPopupDomNode\",\n value: function getPopupDomNode() {\n var _this$popupRef$curren2; // for test\n\n\n return ((_this$popupRef$curren2 = this.popupRef.current) === null || _this$popupRef$curren2 === void 0 ? void 0 : _this$popupRef$curren2.getElement()) || null;\n }\n }, {\n key: \"getPopupAlign\",\n value: function getPopupAlign() {\n var props = this.props;\n var popupPlacement = props.popupPlacement,\n popupAlign = props.popupAlign,\n builtinPlacements = props.builtinPlacements;\n\n if (popupPlacement && builtinPlacements) {\n return getAlignFromPlacement$2(builtinPlacements, popupPlacement, popupAlign);\n }\n\n return popupAlign;\n }\n /**\n * @param popupVisible Show or not the popup element\n * @param event SyntheticEvent, used for `pointAlign`\n */\n\n }, {\n key: \"setPopupVisible\",\n value: function setPopupVisible(popupVisible, event) {\n var alignPoint = this.props.alignPoint;\n var prevPopupVisible = this.state.popupVisible;\n this.clearDelayTimer();\n\n if (prevPopupVisible !== popupVisible) {\n if (!('popupVisible' in this.props)) {\n this.setState({\n popupVisible: popupVisible,\n prevPopupVisible: prevPopupVisible\n });\n }\n\n this.props.onPopupVisibleChange(popupVisible);\n } // Always record the point position since mouseEnterDelay will delay the show\n\n\n if (alignPoint && event && popupVisible) {\n this.setPoint(event);\n }\n }\n }, {\n key: \"delaySetPopupVisible\",\n value: function delaySetPopupVisible(visible, delayS, event) {\n var _this2 = this;\n\n var delay = delayS * 1000;\n this.clearDelayTimer();\n\n if (delay) {\n var point = event ? {\n pageX: event.pageX,\n pageY: event.pageY\n } : null;\n this.delayTimer = window.setTimeout(function () {\n _this2.setPopupVisible(visible, point);\n\n _this2.clearDelayTimer();\n }, delay);\n } else {\n this.setPopupVisible(visible, event);\n }\n }\n }, {\n key: \"clearDelayTimer\",\n value: function clearDelayTimer() {\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n }\n }, {\n key: \"clearOutsideHandler\",\n value: function clearOutsideHandler() {\n if (this.clickOutsideHandler) {\n this.clickOutsideHandler.remove();\n this.clickOutsideHandler = null;\n }\n\n if (this.contextMenuOutsideHandler1) {\n this.contextMenuOutsideHandler1.remove();\n this.contextMenuOutsideHandler1 = null;\n }\n\n if (this.contextMenuOutsideHandler2) {\n this.contextMenuOutsideHandler2.remove();\n this.contextMenuOutsideHandler2 = null;\n }\n\n if (this.touchOutsideHandler) {\n this.touchOutsideHandler.remove();\n this.touchOutsideHandler = null;\n }\n }\n }, {\n key: \"createTwoChains\",\n value: function createTwoChains(event) {\n var childPros = this.props.children.props;\n var props = this.props;\n\n if (childPros[event] && props[event]) {\n return this[\"fire\".concat(event)];\n }\n\n return childPros[event] || props[event];\n }\n }, {\n key: \"isClickToShow\",\n value: function isClickToShow() {\n var _this$props4 = this.props,\n action = _this$props4.action,\n showAction = _this$props4.showAction;\n return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1;\n }\n }, {\n key: \"isContextMenuOnly\",\n value: function isContextMenuOnly() {\n var action = this.props.action;\n return action === 'contextMenu' || action.length === 1 && action[0] === 'contextMenu';\n }\n }, {\n key: \"isContextMenuToShow\",\n value: function isContextMenuToShow() {\n var _this$props5 = this.props,\n action = _this$props5.action,\n showAction = _this$props5.showAction;\n return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1;\n }\n }, {\n key: \"isClickToHide\",\n value: function isClickToHide() {\n var _this$props6 = this.props,\n action = _this$props6.action,\n hideAction = _this$props6.hideAction;\n return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1;\n }\n }, {\n key: \"isMouseEnterToShow\",\n value: function isMouseEnterToShow() {\n var _this$props7 = this.props,\n action = _this$props7.action,\n showAction = _this$props7.showAction;\n return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1;\n }\n }, {\n key: \"isMouseLeaveToHide\",\n value: function isMouseLeaveToHide() {\n var _this$props8 = this.props,\n action = _this$props8.action,\n hideAction = _this$props8.hideAction;\n return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1;\n }\n }, {\n key: \"isFocusToShow\",\n value: function isFocusToShow() {\n var _this$props9 = this.props,\n action = _this$props9.action,\n showAction = _this$props9.showAction;\n return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1;\n }\n }, {\n key: \"isBlurToHide\",\n value: function isBlurToHide() {\n var _this$props10 = this.props,\n action = _this$props10.action,\n hideAction = _this$props10.hideAction;\n return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1;\n }\n }, {\n key: \"forcePopupAlign\",\n value: function forcePopupAlign() {\n if (this.state.popupVisible) {\n var _this$popupRef$curren3;\n\n (_this$popupRef$curren3 = this.popupRef.current) === null || _this$popupRef$curren3 === void 0 ? void 0 : _this$popupRef$curren3.forceAlign();\n }\n }\n }, {\n key: \"fireEvents\",\n value: function fireEvents(type, e) {\n var childCallback = this.props.children.props[type];\n\n if (childCallback) {\n childCallback(e);\n }\n\n var callback = this.props[type];\n\n if (callback) {\n callback(e);\n }\n }\n }, {\n key: \"close\",\n value: function close() {\n this.setPopupVisible(false);\n }\n }, {\n key: \"render\",\n value: function render() {\n var popupVisible = this.state.popupVisible;\n var _this$props11 = this.props,\n children = _this$props11.children,\n forceRender = _this$props11.forceRender,\n alignPoint = _this$props11.alignPoint,\n className = _this$props11.className,\n autoDestroy = _this$props11.autoDestroy;\n var child = React.Children.only(children);\n var newChildProps = {\n key: 'trigger'\n }; // ============================== Visible Handlers ==============================\n // >>> ContextMenu\n\n if (this.isContextMenuToShow()) {\n newChildProps.onContextMenu = this.onContextMenu;\n } else {\n newChildProps.onContextMenu = this.createTwoChains('onContextMenu');\n } // >>> Click\n\n\n if (this.isClickToHide() || this.isClickToShow()) {\n newChildProps.onClick = this.onClick;\n newChildProps.onMouseDown = this.onMouseDown;\n newChildProps.onTouchStart = this.onTouchStart;\n } else {\n newChildProps.onClick = this.createTwoChains('onClick');\n newChildProps.onMouseDown = this.createTwoChains('onMouseDown');\n newChildProps.onTouchStart = this.createTwoChains('onTouchStart');\n } // >>> Hover(enter)\n\n\n if (this.isMouseEnterToShow()) {\n newChildProps.onMouseEnter = this.onMouseEnter; // Point align\n\n if (alignPoint) {\n newChildProps.onMouseMove = this.onMouseMove;\n }\n } else {\n newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter');\n } // >>> Hover(leave)\n\n\n if (this.isMouseLeaveToHide()) {\n newChildProps.onMouseLeave = this.onMouseLeave;\n } else {\n newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave');\n } // >>> Focus\n\n\n if (this.isFocusToShow() || this.isBlurToHide()) {\n newChildProps.onFocus = this.onFocus;\n newChildProps.onBlur = this.onBlur;\n } else {\n newChildProps.onFocus = this.createTwoChains('onFocus');\n newChildProps.onBlur = this.createTwoChains('onBlur');\n } // =================================== Render ===================================\n\n\n var childrenClassName = (0, _classnames2.default)(child && child.props && child.props.className, className);\n\n if (childrenClassName) {\n newChildProps.className = childrenClassName;\n }\n\n var cloneProps = (0, _objectSpread5.default)({}, newChildProps);\n\n if (supportRef$1(child)) {\n cloneProps.ref = composeRef$2(this.triggerRef, child.ref);\n }\n\n var trigger = /*#__PURE__*/React.cloneElement(child, cloneProps);\n var portal; // prevent unmounting after it's rendered\n\n if (popupVisible || this.popupRef.current || forceRender) {\n portal = /*#__PURE__*/React.createElement(PortalComponent, {\n key: \"portal\",\n getContainer: this.getContainer,\n didUpdate: this.handlePortalUpdate\n }, this.getComponent());\n }\n\n if (!popupVisible && autoDestroy) {\n portal = null;\n }\n\n return /*#__PURE__*/React.createElement(TriggerContext$2.Provider, {\n value: this.triggerContextValue\n }, trigger, portal);\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(_ref, prevState) {\n var popupVisible = _ref.popupVisible;\n var newState = {};\n\n if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {\n newState.popupVisible = popupVisible;\n newState.prevPopupVisible = prevState.popupVisible;\n }\n\n return newState;\n }\n }]);\n return Trigger;\n }(React.Component);\n\n Trigger.contextType = TriggerContext$2;\n Trigger.defaultProps = {\n prefixCls: 'rc-trigger-popup',\n getPopupClassNameFromAlign: returnEmptyString$2,\n getDocument: returnDocument$2,\n onPopupVisibleChange: noop$4,\n afterPopupVisibleChange: noop$4,\n onPopupAlign: noop$4,\n popupClassName: '',\n mouseEnterDelay: 0,\n mouseLeaveDelay: 0.1,\n focusDelay: 0,\n blurDelay: 0.15,\n popupStyle: {},\n destroyPopupOnHide: false,\n popupAlign: {},\n defaultPopupVisible: false,\n mask: false,\n maskClosable: true,\n action: [],\n showAction: [],\n hideAction: [],\n autoDestroy: false\n };\n return Trigger;\n}", "handleMouseOut() {\n this.IsHover = false;\n }", "function generateTrigger(PortalComponent) {\n var Trigger = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(Trigger, _React$Component);\n\n var _super = _createSuper(Trigger);\n\n function Trigger(props) {\n var _this;\n\n Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, Trigger);\n\n _this = _super.call(this, props);\n _this.popupRef = react__WEBPACK_IMPORTED_MODULE_7___default.a.createRef();\n _this.triggerRef = react__WEBPACK_IMPORTED_MODULE_7___default.a.createRef();\n\n _this.onMouseEnter = function (e) {\n var mouseEnterDelay = _this.props.mouseEnterDelay;\n\n _this.fireEvents('onMouseEnter', e);\n\n _this.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e);\n };\n\n _this.onMouseMove = function (e) {\n _this.fireEvents('onMouseMove', e);\n\n _this.setPoint(e);\n };\n\n _this.onMouseLeave = function (e) {\n _this.fireEvents('onMouseLeave', e);\n\n _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n };\n\n _this.onPopupMouseEnter = function () {\n _this.clearDelayTimer();\n };\n\n _this.onPopupMouseLeave = function (e) {\n // https://github.com/react-component/trigger/pull/13\n // react bug?\n if (e.relatedTarget && !e.relatedTarget.setTimeout && _this.popupRef.current && _this.popupRef.current.popupRef.current && Object(rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_this.popupRef.current.popupRef.current, e.relatedTarget)) {\n return;\n }\n\n _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n };\n\n _this.onFocus = function (e) {\n _this.fireEvents('onFocus', e); // incase focusin and focusout\n\n\n _this.clearDelayTimer();\n\n if (_this.isFocusToShow()) {\n _this.focusTime = Date.now();\n\n _this.delaySetPopupVisible(true, _this.props.focusDelay);\n }\n };\n\n _this.onMouseDown = function (e) {\n _this.fireEvents('onMouseDown', e);\n\n _this.preClickTime = Date.now();\n };\n\n _this.onTouchStart = function (e) {\n _this.fireEvents('onTouchStart', e);\n\n _this.preTouchTime = Date.now();\n };\n\n _this.onBlur = function (e) {\n _this.fireEvents('onBlur', e);\n\n _this.clearDelayTimer();\n\n if (_this.isBlurToHide()) {\n _this.delaySetPopupVisible(false, _this.props.blurDelay);\n }\n };\n\n _this.onContextMenu = function (e) {\n e.preventDefault();\n\n _this.fireEvents('onContextMenu', e);\n\n _this.setPopupVisible(true, e);\n };\n\n _this.onContextMenuClose = function () {\n if (_this.isContextMenuToShow()) {\n _this.close();\n }\n };\n\n _this.onClick = function (event) {\n _this.fireEvents('onClick', event); // focus will trigger click\n\n\n if (_this.focusTime) {\n var preTime;\n\n if (_this.preClickTime && _this.preTouchTime) {\n preTime = Math.min(_this.preClickTime, _this.preTouchTime);\n } else if (_this.preClickTime) {\n preTime = _this.preClickTime;\n } else if (_this.preTouchTime) {\n preTime = _this.preTouchTime;\n }\n\n if (Math.abs(preTime - _this.focusTime) < 20) {\n return;\n }\n\n _this.focusTime = 0;\n }\n\n _this.preClickTime = 0;\n _this.preTouchTime = 0; // Only prevent default when all the action is click.\n // https://github.com/ant-design/ant-design/issues/17043\n // https://github.com/ant-design/ant-design/issues/17291\n\n if (_this.isClickToShow() && (_this.isClickToHide() || _this.isBlurToHide()) && event && event.preventDefault) {\n event.preventDefault();\n }\n\n var nextVisible = !_this.state.popupVisible;\n\n if (_this.isClickToHide() && !nextVisible || nextVisible && _this.isClickToShow()) {\n _this.setPopupVisible(!_this.state.popupVisible, event);\n }\n };\n\n _this.onPopupMouseDown = function () {\n _this.hasPopupMouseDown = true;\n clearTimeout(_this.mouseDownTimeout);\n _this.mouseDownTimeout = window.setTimeout(function () {\n _this.hasPopupMouseDown = false;\n }, 0);\n\n if (_this.context) {\n var _this$context;\n\n (_this$context = _this.context).onPopupMouseDown.apply(_this$context, arguments);\n }\n };\n\n _this.onDocumentClick = function (event) {\n if (_this.props.mask && !_this.props.maskClosable) {\n return;\n }\n\n var target = event.target;\n\n var root = _this.getRootDomNode();\n\n var popupNode = _this.getPopupDomNode();\n\n if (!Object(rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(root, target) && !Object(rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(popupNode, target) && !_this.hasPopupMouseDown) {\n _this.close();\n }\n };\n\n _this.getRootDomNode = function () {\n var getTriggerDOMNode = _this.props.getTriggerDOMNode;\n\n if (getTriggerDOMNode) {\n return getTriggerDOMNode(_this.triggerRef.current);\n }\n\n try {\n var domNode = Object(rc_util_es_Dom_findDOMNode__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(_this.triggerRef.current);\n\n if (domNode) {\n return domNode;\n }\n } catch (err) {// Do nothing\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_8___default.a.findDOMNode(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_this));\n };\n\n _this.getPopupClassNameFromAlign = function (align) {\n var className = [];\n var _this$props = _this.props,\n popupPlacement = _this$props.popupPlacement,\n builtinPlacements = _this$props.builtinPlacements,\n prefixCls = _this$props.prefixCls,\n alignPoint = _this$props.alignPoint,\n getPopupClassNameFromAlign = _this$props.getPopupClassNameFromAlign;\n\n if (popupPlacement && builtinPlacements) {\n className.push(Object(_utils_alignUtil__WEBPACK_IMPORTED_MODULE_15__[\"getAlignPopupClassName\"])(builtinPlacements, prefixCls, align, alignPoint));\n }\n\n if (getPopupClassNameFromAlign) {\n className.push(getPopupClassNameFromAlign(align));\n }\n\n return className.join(' ');\n };\n\n _this.getComponent = function () {\n var _this$props2 = _this.props,\n prefixCls = _this$props2.prefixCls,\n destroyPopupOnHide = _this$props2.destroyPopupOnHide,\n popupClassName = _this$props2.popupClassName,\n onPopupAlign = _this$props2.onPopupAlign,\n popupMotion = _this$props2.popupMotion,\n popupAnimation = _this$props2.popupAnimation,\n popupTransitionName = _this$props2.popupTransitionName,\n popupStyle = _this$props2.popupStyle,\n mask = _this$props2.mask,\n maskAnimation = _this$props2.maskAnimation,\n maskTransitionName = _this$props2.maskTransitionName,\n maskMotion = _this$props2.maskMotion,\n zIndex = _this$props2.zIndex,\n popup = _this$props2.popup,\n stretch = _this$props2.stretch,\n alignPoint = _this$props2.alignPoint;\n var _this$state = _this.state,\n popupVisible = _this$state.popupVisible,\n point = _this$state.point;\n\n var align = _this.getPopupAlign();\n\n var mouseProps = {};\n\n if (_this.isMouseEnterToShow()) {\n mouseProps.onMouseEnter = _this.onPopupMouseEnter;\n }\n\n if (_this.isMouseLeaveToHide()) {\n mouseProps.onMouseLeave = _this.onPopupMouseLeave;\n }\n\n mouseProps.onMouseDown = _this.onPopupMouseDown;\n mouseProps.onTouchStart = _this.onPopupMouseDown;\n return react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_Popup__WEBPACK_IMPORTED_MODULE_16__[\"default\"], Object.assign({\n prefixCls: prefixCls,\n destroyPopupOnHide: destroyPopupOnHide,\n visible: popupVisible,\n point: alignPoint && point,\n className: popupClassName,\n align: align,\n onAlign: onPopupAlign,\n animation: popupAnimation,\n getClassNameFromAlign: _this.getPopupClassNameFromAlign\n }, mouseProps, {\n stretch: stretch,\n getRootDomNode: _this.getRootDomNode,\n style: popupStyle,\n mask: mask,\n zIndex: zIndex,\n transitionName: popupTransitionName,\n maskAnimation: maskAnimation,\n maskTransitionName: maskTransitionName,\n maskMotion: maskMotion,\n ref: _this.popupRef,\n motion: popupMotion\n }), typeof popup === 'function' ? popup() : popup);\n };\n\n _this.getContainer = function () {\n var _assertThisInitialize = Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_this),\n props = _assertThisInitialize.props;\n\n var popupContainer = document.createElement('div'); // Make sure default popup container will never cause scrollbar appearing\n // https://github.com/react-component/trigger/issues/41\n\n popupContainer.style.position = 'absolute';\n popupContainer.style.top = '0';\n popupContainer.style.left = '0';\n popupContainer.style.width = '100%';\n var mountNode = props.getPopupContainer ? props.getPopupContainer(_this.getRootDomNode()) : props.getDocument().body;\n mountNode.appendChild(popupContainer);\n return popupContainer;\n };\n\n _this.setPoint = function (point) {\n var alignPoint = _this.props.alignPoint;\n if (!alignPoint || !point) return;\n\n _this.setState({\n point: {\n pageX: point.pageX,\n pageY: point.pageY\n }\n });\n };\n\n _this.handlePortalUpdate = function () {\n if (_this.state.prevPopupVisible !== _this.state.popupVisible) {\n _this.props.afterPopupVisibleChange(_this.state.popupVisible);\n }\n };\n\n var popupVisible;\n\n if ('popupVisible' in props) {\n popupVisible = !!props.popupVisible;\n } else {\n popupVisible = !!props.defaultPopupVisible;\n }\n\n _this.state = {\n prevPopupVisible: popupVisible,\n popupVisible: popupVisible\n };\n ALL_HANDLERS.forEach(function (h) {\n _this[\"fire\".concat(h)] = function (e) {\n _this.fireEvents(h, e);\n };\n });\n return _this;\n }\n\n Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Trigger, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.componentDidUpdate();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n var props = this.props;\n var state = this.state; // We must listen to `mousedown` or `touchstart`, edge case:\n // https://github.com/ant-design/ant-design/issues/5804\n // https://github.com/react-component/calendar/issues/250\n // https://github.com/react-component/trigger/issues/50\n\n if (state.popupVisible) {\n var currentDocument;\n\n if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {\n currentDocument = props.getDocument();\n this.clickOutsideHandler = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(currentDocument, 'mousedown', this.onDocumentClick);\n } // always hide on mobile\n\n\n if (!this.touchOutsideHandler) {\n currentDocument = currentDocument || props.getDocument();\n this.touchOutsideHandler = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(currentDocument, 'touchstart', this.onDocumentClick);\n } // close popup when trigger type contains 'onContextMenu' and document is scrolling.\n\n\n if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) {\n currentDocument = currentDocument || props.getDocument();\n this.contextMenuOutsideHandler1 = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(currentDocument, 'scroll', this.onContextMenuClose);\n } // close popup when trigger type contains 'onContextMenu' and window is blur.\n\n\n if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) {\n this.contextMenuOutsideHandler2 = Object(rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(window, 'blur', this.onContextMenuClose);\n }\n\n return;\n }\n\n this.clearOutsideHandler();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.clearDelayTimer();\n this.clearOutsideHandler();\n clearTimeout(this.mouseDownTimeout);\n }\n }, {\n key: \"getPopupDomNode\",\n value: function getPopupDomNode() {\n // for test\n if (this.popupRef.current && this.popupRef.current.popupRef.current) {\n return this.popupRef.current.popupRef.current;\n }\n\n return null;\n }\n }, {\n key: \"getPopupAlign\",\n value: function getPopupAlign() {\n var props = this.props;\n var popupPlacement = props.popupPlacement,\n popupAlign = props.popupAlign,\n builtinPlacements = props.builtinPlacements;\n\n if (popupPlacement && builtinPlacements) {\n return Object(_utils_alignUtil__WEBPACK_IMPORTED_MODULE_15__[\"getAlignFromPlacement\"])(builtinPlacements, popupPlacement, popupAlign);\n }\n\n return popupAlign;\n }\n /**\n * @param popupVisible Show or not the popup element\n * @param event SyntheticEvent, used for `pointAlign`\n */\n\n }, {\n key: \"setPopupVisible\",\n value: function setPopupVisible(popupVisible, event) {\n var alignPoint = this.props.alignPoint;\n var prevPopupVisible = this.state.popupVisible;\n this.clearDelayTimer();\n\n if (prevPopupVisible !== popupVisible) {\n if (!('popupVisible' in this.props)) {\n this.setState({\n popupVisible: popupVisible,\n prevPopupVisible: prevPopupVisible\n });\n }\n\n this.props.onPopupVisibleChange(popupVisible);\n } // Always record the point position since mouseEnterDelay will delay the show\n\n\n if (alignPoint && event) {\n this.setPoint(event);\n }\n }\n }, {\n key: \"delaySetPopupVisible\",\n value: function delaySetPopupVisible(visible, delayS, event) {\n var _this2 = this;\n\n var delay = delayS * 1000;\n this.clearDelayTimer();\n\n if (delay) {\n var point = event ? {\n pageX: event.pageX,\n pageY: event.pageY\n } : null;\n this.delayTimer = window.setTimeout(function () {\n _this2.setPopupVisible(visible, point);\n\n _this2.clearDelayTimer();\n }, delay);\n } else {\n this.setPopupVisible(visible, event);\n }\n }\n }, {\n key: \"clearDelayTimer\",\n value: function clearDelayTimer() {\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n }\n }, {\n key: \"clearOutsideHandler\",\n value: function clearOutsideHandler() {\n if (this.clickOutsideHandler) {\n this.clickOutsideHandler.remove();\n this.clickOutsideHandler = null;\n }\n\n if (this.contextMenuOutsideHandler1) {\n this.contextMenuOutsideHandler1.remove();\n this.contextMenuOutsideHandler1 = null;\n }\n\n if (this.contextMenuOutsideHandler2) {\n this.contextMenuOutsideHandler2.remove();\n this.contextMenuOutsideHandler2 = null;\n }\n\n if (this.touchOutsideHandler) {\n this.touchOutsideHandler.remove();\n this.touchOutsideHandler = null;\n }\n }\n }, {\n key: \"createTwoChains\",\n value: function createTwoChains(event) {\n var childPros = this.props.children.props;\n var props = this.props;\n\n if (childPros[event] && props[event]) {\n return this[\"fire\".concat(event)];\n }\n\n return childPros[event] || props[event];\n }\n }, {\n key: \"isClickToShow\",\n value: function isClickToShow() {\n var _this$props3 = this.props,\n action = _this$props3.action,\n showAction = _this$props3.showAction;\n return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1;\n }\n }, {\n key: \"isContextMenuToShow\",\n value: function isContextMenuToShow() {\n var _this$props4 = this.props,\n action = _this$props4.action,\n showAction = _this$props4.showAction;\n return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1;\n }\n }, {\n key: \"isClickToHide\",\n value: function isClickToHide() {\n var _this$props5 = this.props,\n action = _this$props5.action,\n hideAction = _this$props5.hideAction;\n return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1;\n }\n }, {\n key: \"isMouseEnterToShow\",\n value: function isMouseEnterToShow() {\n var _this$props6 = this.props,\n action = _this$props6.action,\n showAction = _this$props6.showAction;\n return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1;\n }\n }, {\n key: \"isMouseLeaveToHide\",\n value: function isMouseLeaveToHide() {\n var _this$props7 = this.props,\n action = _this$props7.action,\n hideAction = _this$props7.hideAction;\n return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1;\n }\n }, {\n key: \"isFocusToShow\",\n value: function isFocusToShow() {\n var _this$props8 = this.props,\n action = _this$props8.action,\n showAction = _this$props8.showAction;\n return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1;\n }\n }, {\n key: \"isBlurToHide\",\n value: function isBlurToHide() {\n var _this$props9 = this.props,\n action = _this$props9.action,\n hideAction = _this$props9.hideAction;\n return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1;\n }\n }, {\n key: \"forcePopupAlign\",\n value: function forcePopupAlign() {\n if (this.state.popupVisible && this.popupRef.current && this.popupRef.current.alignRef.current) {\n this.popupRef.current.alignRef.current.forceAlign();\n }\n }\n }, {\n key: \"fireEvents\",\n value: function fireEvents(type, e) {\n var childCallback = this.props.children.props[type];\n\n if (childCallback) {\n childCallback(e);\n }\n\n var callback = this.props[type];\n\n if (callback) {\n callback(e);\n }\n }\n }, {\n key: \"close\",\n value: function close() {\n this.setPopupVisible(false);\n }\n }, {\n key: \"render\",\n value: function render() {\n var popupVisible = this.state.popupVisible;\n var _this$props10 = this.props,\n children = _this$props10.children,\n forceRender = _this$props10.forceRender,\n alignPoint = _this$props10.alignPoint,\n className = _this$props10.className,\n autoDestroy = _this$props10.autoDestroy;\n var child = react__WEBPACK_IMPORTED_MODULE_7___default.a.Children.only(children);\n var newChildProps = {\n key: 'trigger'\n };\n\n if (this.isContextMenuToShow()) {\n newChildProps.onContextMenu = this.onContextMenu;\n } else {\n newChildProps.onContextMenu = this.createTwoChains('onContextMenu');\n }\n\n if (this.isClickToHide() || this.isClickToShow()) {\n newChildProps.onClick = this.onClick;\n newChildProps.onMouseDown = this.onMouseDown;\n newChildProps.onTouchStart = this.onTouchStart;\n } else {\n newChildProps.onClick = this.createTwoChains('onClick');\n newChildProps.onMouseDown = this.createTwoChains('onMouseDown');\n newChildProps.onTouchStart = this.createTwoChains('onTouchStart');\n }\n\n if (this.isMouseEnterToShow()) {\n newChildProps.onMouseEnter = this.onMouseEnter;\n\n if (alignPoint) {\n newChildProps.onMouseMove = this.onMouseMove;\n }\n } else {\n newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter');\n }\n\n if (this.isMouseLeaveToHide()) {\n newChildProps.onMouseLeave = this.onMouseLeave;\n } else {\n newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave');\n }\n\n if (this.isFocusToShow() || this.isBlurToHide()) {\n newChildProps.onFocus = this.onFocus;\n newChildProps.onBlur = this.onBlur;\n } else {\n newChildProps.onFocus = this.createTwoChains('onFocus');\n newChildProps.onBlur = this.createTwoChains('onBlur');\n }\n\n var childrenClassName = classnames__WEBPACK_IMPORTED_MODULE_14___default()(child && child.props && child.props.className, className);\n\n if (childrenClassName) {\n newChildProps.className = childrenClassName;\n }\n\n var cloneProps = _objectSpread({}, newChildProps);\n\n if (Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_11__[\"supportRef\"])(child)) {\n cloneProps.ref = Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_11__[\"composeRef\"])(this.triggerRef, child.ref);\n }\n\n var trigger = react__WEBPACK_IMPORTED_MODULE_7___default.a.cloneElement(child, cloneProps);\n var portal; // prevent unmounting after it's rendered\n\n if (popupVisible || this.popupRef.current || forceRender) {\n portal = react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(PortalComponent, {\n key: \"portal\",\n getContainer: this.getContainer,\n didUpdate: this.handlePortalUpdate\n }, this.getComponent());\n }\n\n if (!popupVisible && autoDestroy) {\n portal = null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_context__WEBPACK_IMPORTED_MODULE_17__[\"default\"].Provider, {\n value: {\n onPopupMouseDown: this.onPopupMouseDown\n }\n }, trigger, portal);\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(_ref, prevState) {\n var popupVisible = _ref.popupVisible;\n var newState = {};\n\n if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {\n newState.popupVisible = popupVisible;\n newState.prevPopupVisible = prevState.popupVisible;\n }\n\n return newState;\n }\n }]);\n\n return Trigger;\n }(react__WEBPACK_IMPORTED_MODULE_7___default.a.Component);\n\n Trigger.contextType = _context__WEBPACK_IMPORTED_MODULE_17__[\"default\"];\n Trigger.defaultProps = {\n prefixCls: 'rc-trigger-popup',\n getPopupClassNameFromAlign: returnEmptyString,\n getDocument: returnDocument,\n onPopupVisibleChange: noop,\n afterPopupVisibleChange: noop,\n onPopupAlign: noop,\n popupClassName: '',\n mouseEnterDelay: 0,\n mouseLeaveDelay: 0.1,\n focusDelay: 0,\n blurDelay: 0.15,\n popupStyle: {},\n destroyPopupOnHide: false,\n popupAlign: {},\n defaultPopupVisible: false,\n mask: false,\n maskClosable: true,\n action: [],\n showAction: [],\n hideAction: [],\n autoDestroy: false\n };\n return Trigger;\n}", "function generateTrigger$1(PortalComponent) {\n var Trigger = /*#__PURE__*/function (_React$Component) {\n (0, _inherits2.default)(Trigger, _React$Component);\n\n var _super = (0, _createSuper2.default)(Trigger);\n\n function Trigger(props) {\n var _this;\n\n (0, _classCallCheck2.default)(this, Trigger);\n _this = _super.call(this, props);\n _this.popupRef = /*#__PURE__*/React.createRef();\n _this.triggerRef = /*#__PURE__*/React.createRef();\n\n _this.onMouseEnter = function (e) {\n var mouseEnterDelay = _this.props.mouseEnterDelay;\n\n _this.fireEvents('onMouseEnter', e);\n\n _this.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e);\n };\n\n _this.onMouseMove = function (e) {\n _this.fireEvents('onMouseMove', e);\n\n _this.setPoint(e);\n };\n\n _this.onMouseLeave = function (e) {\n _this.fireEvents('onMouseLeave', e);\n\n _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n };\n\n _this.onPopupMouseEnter = function () {\n _this.clearDelayTimer();\n };\n\n _this.onPopupMouseLeave = function (e) {\n var _this$popupRef$curren; // https://github.com/react-component/trigger/pull/13\n // react bug?\n\n\n if (e.relatedTarget && !e.relatedTarget.setTimeout && contains$1((_this$popupRef$curren = _this.popupRef.current) === null || _this$popupRef$curren === void 0 ? void 0 : _this$popupRef$curren.getElement(), e.relatedTarget)) {\n return;\n }\n\n _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n };\n\n _this.onFocus = function (e) {\n _this.fireEvents('onFocus', e); // incase focusin and focusout\n\n\n _this.clearDelayTimer();\n\n if (_this.isFocusToShow()) {\n _this.focusTime = Date.now();\n\n _this.delaySetPopupVisible(true, _this.props.focusDelay);\n }\n };\n\n _this.onMouseDown = function (e) {\n _this.fireEvents('onMouseDown', e);\n\n _this.preClickTime = Date.now();\n };\n\n _this.onTouchStart = function (e) {\n _this.fireEvents('onTouchStart', e);\n\n _this.preTouchTime = Date.now();\n };\n\n _this.onBlur = function (e) {\n _this.fireEvents('onBlur', e);\n\n _this.clearDelayTimer();\n\n if (_this.isBlurToHide()) {\n _this.delaySetPopupVisible(false, _this.props.blurDelay);\n }\n };\n\n _this.onContextMenu = function (e) {\n e.preventDefault();\n\n _this.fireEvents('onContextMenu', e);\n\n _this.setPopupVisible(true, e);\n };\n\n _this.onContextMenuClose = function () {\n if (_this.isContextMenuToShow()) {\n _this.close();\n }\n };\n\n _this.onClick = function (event) {\n _this.fireEvents('onClick', event); // focus will trigger click\n\n\n if (_this.focusTime) {\n var preTime;\n\n if (_this.preClickTime && _this.preTouchTime) {\n preTime = Math.min(_this.preClickTime, _this.preTouchTime);\n } else if (_this.preClickTime) {\n preTime = _this.preClickTime;\n } else if (_this.preTouchTime) {\n preTime = _this.preTouchTime;\n }\n\n if (Math.abs(preTime - _this.focusTime) < 20) {\n return;\n }\n\n _this.focusTime = 0;\n }\n\n _this.preClickTime = 0;\n _this.preTouchTime = 0; // Only prevent default when all the action is click.\n // https://github.com/ant-design/ant-design/issues/17043\n // https://github.com/ant-design/ant-design/issues/17291\n\n if (_this.isClickToShow() && (_this.isClickToHide() || _this.isBlurToHide()) && event && event.preventDefault) {\n event.preventDefault();\n }\n\n var nextVisible = !_this.state.popupVisible;\n\n if (_this.isClickToHide() && !nextVisible || nextVisible && _this.isClickToShow()) {\n _this.setPopupVisible(!_this.state.popupVisible, event);\n }\n };\n\n _this.onPopupMouseDown = function () {\n _this.hasPopupMouseDown = true;\n clearTimeout(_this.mouseDownTimeout);\n _this.mouseDownTimeout = window.setTimeout(function () {\n _this.hasPopupMouseDown = false;\n }, 0);\n\n if (_this.context) {\n var _this$context;\n\n (_this$context = _this.context).onPopupMouseDown.apply(_this$context, arguments);\n }\n };\n\n _this.onDocumentClick = function (event) {\n if (_this.props.mask && !_this.props.maskClosable) {\n return;\n }\n\n var target = event.target;\n\n var root = _this.getRootDomNode();\n\n var popupNode = _this.getPopupDomNode();\n\n if ( // mousedown on the target should also close popup when action is contextMenu.\n // https://github.com/ant-design/ant-design/issues/29853\n (!contains$1(root, target) || _this.isContextMenuOnly()) && !contains$1(popupNode, target) && !_this.hasPopupMouseDown) {\n _this.close();\n }\n };\n\n _this.getRootDomNode = function () {\n var getTriggerDOMNode = _this.props.getTriggerDOMNode;\n\n if (getTriggerDOMNode) {\n return getTriggerDOMNode(_this.triggerRef.current);\n }\n\n try {\n var domNode = findDOMNode$2(_this.triggerRef.current);\n\n if (domNode) {\n return domNode;\n }\n } catch (err) {// Do nothing\n }\n\n return ReactDOM.default.findDOMNode((0, _assertThisInitialized2.default)(_this));\n };\n\n _this.getPopupClassNameFromAlign = function (align) {\n var className = [];\n var _this$props = _this.props,\n popupPlacement = _this$props.popupPlacement,\n builtinPlacements = _this$props.builtinPlacements,\n prefixCls = _this$props.prefixCls,\n alignPoint = _this$props.alignPoint,\n getPopupClassNameFromAlign = _this$props.getPopupClassNameFromAlign;\n\n if (popupPlacement && builtinPlacements) {\n className.push(getAlignPopupClassName$1(builtinPlacements, prefixCls, align, alignPoint));\n }\n\n if (getPopupClassNameFromAlign) {\n className.push(getPopupClassNameFromAlign(align));\n }\n\n return className.join(' ');\n };\n\n _this.getComponent = function () {\n var _this$props2 = _this.props,\n prefixCls = _this$props2.prefixCls,\n destroyPopupOnHide = _this$props2.destroyPopupOnHide,\n popupClassName = _this$props2.popupClassName,\n onPopupAlign = _this$props2.onPopupAlign,\n popupMotion = _this$props2.popupMotion,\n popupAnimation = _this$props2.popupAnimation,\n popupTransitionName = _this$props2.popupTransitionName,\n popupStyle = _this$props2.popupStyle,\n mask = _this$props2.mask,\n maskAnimation = _this$props2.maskAnimation,\n maskTransitionName = _this$props2.maskTransitionName,\n maskMotion = _this$props2.maskMotion,\n zIndex = _this$props2.zIndex,\n popup = _this$props2.popup,\n stretch = _this$props2.stretch,\n alignPoint = _this$props2.alignPoint,\n mobile = _this$props2.mobile,\n forceRender = _this$props2.forceRender;\n var _this$state = _this.state,\n popupVisible = _this$state.popupVisible,\n point = _this$state.point;\n\n var align = _this.getPopupAlign();\n\n var mouseProps = {};\n\n if (_this.isMouseEnterToShow()) {\n mouseProps.onMouseEnter = _this.onPopupMouseEnter;\n }\n\n if (_this.isMouseLeaveToHide()) {\n mouseProps.onMouseLeave = _this.onPopupMouseLeave;\n }\n\n mouseProps.onMouseDown = _this.onPopupMouseDown;\n mouseProps.onTouchStart = _this.onPopupMouseDown;\n return /*#__PURE__*/React.createElement(Popup$1, (0, _extends3.default)({\n prefixCls: prefixCls,\n destroyPopupOnHide: destroyPopupOnHide,\n visible: popupVisible,\n point: alignPoint && point,\n className: popupClassName,\n align: align,\n onAlign: onPopupAlign,\n animation: popupAnimation,\n getClassNameFromAlign: _this.getPopupClassNameFromAlign\n }, mouseProps, {\n stretch: stretch,\n getRootDomNode: _this.getRootDomNode,\n style: popupStyle,\n mask: mask,\n zIndex: zIndex,\n transitionName: popupTransitionName,\n maskAnimation: maskAnimation,\n maskTransitionName: maskTransitionName,\n maskMotion: maskMotion,\n ref: _this.popupRef,\n motion: popupMotion,\n mobile: mobile,\n forceRender: forceRender\n }), typeof popup === 'function' ? popup() : popup);\n };\n\n _this.attachParent = function (popupContainer) {\n wrapperRaf$2.cancel(_this.attachId);\n var _this$props3 = _this.props,\n getPopupContainer = _this$props3.getPopupContainer,\n getDocument = _this$props3.getDocument;\n\n var domNode = _this.getRootDomNode();\n\n var mountNode;\n\n if (!getPopupContainer) {\n mountNode = getDocument(_this.getRootDomNode()).body;\n } else if (domNode || getPopupContainer.length === 0) {\n // Compatible for legacy getPopupContainer with domNode argument.\n // If no need `domNode` argument, will call directly.\n // https://codesandbox.io/s/eloquent-mclean-ss93m?file=/src/App.js\n mountNode = getPopupContainer(domNode);\n }\n\n if (mountNode) {\n mountNode.appendChild(popupContainer);\n } else {\n // Retry after frame render in case parent not ready\n _this.attachId = wrapperRaf$2(function () {\n _this.attachParent(popupContainer);\n });\n }\n };\n\n _this.getContainer = function () {\n var getDocument = _this.props.getDocument;\n var popupContainer = getDocument(_this.getRootDomNode()).createElement('div'); // Make sure default popup container will never cause scrollbar appearing\n // https://github.com/react-component/trigger/issues/41\n\n popupContainer.style.position = 'absolute';\n popupContainer.style.top = '0';\n popupContainer.style.left = '0';\n popupContainer.style.width = '100%';\n\n _this.attachParent(popupContainer);\n\n return popupContainer;\n };\n\n _this.setPoint = function (point) {\n var alignPoint = _this.props.alignPoint;\n if (!alignPoint || !point) return;\n\n _this.setState({\n point: {\n pageX: point.pageX,\n pageY: point.pageY\n }\n });\n };\n\n _this.handlePortalUpdate = function () {\n if (_this.state.prevPopupVisible !== _this.state.popupVisible) {\n _this.props.afterPopupVisibleChange(_this.state.popupVisible);\n }\n };\n\n _this.triggerContextValue = {\n onPopupMouseDown: _this.onPopupMouseDown\n };\n var popupVisible;\n\n if ('popupVisible' in props) {\n popupVisible = !!props.popupVisible;\n } else {\n popupVisible = !!props.defaultPopupVisible;\n }\n\n _this.state = {\n prevPopupVisible: popupVisible,\n popupVisible: popupVisible\n };\n ALL_HANDLERS$1.forEach(function (h) {\n _this[\"fire\".concat(h)] = function (e) {\n _this.fireEvents(h, e);\n };\n });\n return _this;\n }\n\n (0, _createClass2.default)(Trigger, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.componentDidUpdate();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n var props = this.props;\n var state = this.state; // We must listen to `mousedown` or `touchstart`, edge case:\n // https://github.com/ant-design/ant-design/issues/5804\n // https://github.com/react-component/calendar/issues/250\n // https://github.com/react-component/trigger/issues/50\n\n if (state.popupVisible) {\n var currentDocument;\n\n if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {\n currentDocument = props.getDocument(this.getRootDomNode());\n this.clickOutsideHandler = addEventListenerWrap$1(currentDocument, 'mousedown', this.onDocumentClick);\n } // always hide on mobile\n\n\n if (!this.touchOutsideHandler) {\n currentDocument = currentDocument || props.getDocument(this.getRootDomNode());\n this.touchOutsideHandler = addEventListenerWrap$1(currentDocument, 'touchstart', this.onDocumentClick);\n } // close popup when trigger type contains 'onContextMenu' and document is scrolling.\n\n\n if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) {\n currentDocument = currentDocument || props.getDocument(this.getRootDomNode());\n this.contextMenuOutsideHandler1 = addEventListenerWrap$1(currentDocument, 'scroll', this.onContextMenuClose);\n } // close popup when trigger type contains 'onContextMenu' and window is blur.\n\n\n if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) {\n this.contextMenuOutsideHandler2 = addEventListenerWrap$1(window, 'blur', this.onContextMenuClose);\n }\n\n return;\n }\n\n this.clearOutsideHandler();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.clearDelayTimer();\n this.clearOutsideHandler();\n clearTimeout(this.mouseDownTimeout);\n wrapperRaf$2.cancel(this.attachId);\n }\n }, {\n key: \"getPopupDomNode\",\n value: function getPopupDomNode() {\n var _this$popupRef$curren2; // for test\n\n\n return ((_this$popupRef$curren2 = this.popupRef.current) === null || _this$popupRef$curren2 === void 0 ? void 0 : _this$popupRef$curren2.getElement()) || null;\n }\n }, {\n key: \"getPopupAlign\",\n value: function getPopupAlign() {\n var props = this.props;\n var popupPlacement = props.popupPlacement,\n popupAlign = props.popupAlign,\n builtinPlacements = props.builtinPlacements;\n\n if (popupPlacement && builtinPlacements) {\n return getAlignFromPlacement$1(builtinPlacements, popupPlacement, popupAlign);\n }\n\n return popupAlign;\n }\n /**\n * @param popupVisible Show or not the popup element\n * @param event SyntheticEvent, used for `pointAlign`\n */\n\n }, {\n key: \"setPopupVisible\",\n value: function setPopupVisible(popupVisible, event) {\n var alignPoint = this.props.alignPoint;\n var prevPopupVisible = this.state.popupVisible;\n this.clearDelayTimer();\n\n if (prevPopupVisible !== popupVisible) {\n if (!('popupVisible' in this.props)) {\n this.setState({\n popupVisible: popupVisible,\n prevPopupVisible: prevPopupVisible\n });\n }\n\n this.props.onPopupVisibleChange(popupVisible);\n } // Always record the point position since mouseEnterDelay will delay the show\n\n\n if (alignPoint && event && popupVisible) {\n this.setPoint(event);\n }\n }\n }, {\n key: \"delaySetPopupVisible\",\n value: function delaySetPopupVisible(visible, delayS, event) {\n var _this2 = this;\n\n var delay = delayS * 1000;\n this.clearDelayTimer();\n\n if (delay) {\n var point = event ? {\n pageX: event.pageX,\n pageY: event.pageY\n } : null;\n this.delayTimer = window.setTimeout(function () {\n _this2.setPopupVisible(visible, point);\n\n _this2.clearDelayTimer();\n }, delay);\n } else {\n this.setPopupVisible(visible, event);\n }\n }\n }, {\n key: \"clearDelayTimer\",\n value: function clearDelayTimer() {\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n }\n }, {\n key: \"clearOutsideHandler\",\n value: function clearOutsideHandler() {\n if (this.clickOutsideHandler) {\n this.clickOutsideHandler.remove();\n this.clickOutsideHandler = null;\n }\n\n if (this.contextMenuOutsideHandler1) {\n this.contextMenuOutsideHandler1.remove();\n this.contextMenuOutsideHandler1 = null;\n }\n\n if (this.contextMenuOutsideHandler2) {\n this.contextMenuOutsideHandler2.remove();\n this.contextMenuOutsideHandler2 = null;\n }\n\n if (this.touchOutsideHandler) {\n this.touchOutsideHandler.remove();\n this.touchOutsideHandler = null;\n }\n }\n }, {\n key: \"createTwoChains\",\n value: function createTwoChains(event) {\n var childPros = this.props.children.props;\n var props = this.props;\n\n if (childPros[event] && props[event]) {\n return this[\"fire\".concat(event)];\n }\n\n return childPros[event] || props[event];\n }\n }, {\n key: \"isClickToShow\",\n value: function isClickToShow() {\n var _this$props4 = this.props,\n action = _this$props4.action,\n showAction = _this$props4.showAction;\n return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1;\n }\n }, {\n key: \"isContextMenuOnly\",\n value: function isContextMenuOnly() {\n var action = this.props.action;\n return action === 'contextMenu' || action.length === 1 && action[0] === 'contextMenu';\n }\n }, {\n key: \"isContextMenuToShow\",\n value: function isContextMenuToShow() {\n var _this$props5 = this.props,\n action = _this$props5.action,\n showAction = _this$props5.showAction;\n return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1;\n }\n }, {\n key: \"isClickToHide\",\n value: function isClickToHide() {\n var _this$props6 = this.props,\n action = _this$props6.action,\n hideAction = _this$props6.hideAction;\n return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1;\n }\n }, {\n key: \"isMouseEnterToShow\",\n value: function isMouseEnterToShow() {\n var _this$props7 = this.props,\n action = _this$props7.action,\n showAction = _this$props7.showAction;\n return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1;\n }\n }, {\n key: \"isMouseLeaveToHide\",\n value: function isMouseLeaveToHide() {\n var _this$props8 = this.props,\n action = _this$props8.action,\n hideAction = _this$props8.hideAction;\n return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1;\n }\n }, {\n key: \"isFocusToShow\",\n value: function isFocusToShow() {\n var _this$props9 = this.props,\n action = _this$props9.action,\n showAction = _this$props9.showAction;\n return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1;\n }\n }, {\n key: \"isBlurToHide\",\n value: function isBlurToHide() {\n var _this$props10 = this.props,\n action = _this$props10.action,\n hideAction = _this$props10.hideAction;\n return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1;\n }\n }, {\n key: \"forcePopupAlign\",\n value: function forcePopupAlign() {\n if (this.state.popupVisible) {\n var _this$popupRef$curren3;\n\n (_this$popupRef$curren3 = this.popupRef.current) === null || _this$popupRef$curren3 === void 0 ? void 0 : _this$popupRef$curren3.forceAlign();\n }\n }\n }, {\n key: \"fireEvents\",\n value: function fireEvents(type, e) {\n var childCallback = this.props.children.props[type];\n\n if (childCallback) {\n childCallback(e);\n }\n\n var callback = this.props[type];\n\n if (callback) {\n callback(e);\n }\n }\n }, {\n key: \"close\",\n value: function close() {\n this.setPopupVisible(false);\n }\n }, {\n key: \"render\",\n value: function render() {\n var popupVisible = this.state.popupVisible;\n var _this$props11 = this.props,\n children = _this$props11.children,\n forceRender = _this$props11.forceRender,\n alignPoint = _this$props11.alignPoint,\n className = _this$props11.className,\n autoDestroy = _this$props11.autoDestroy;\n var child = React.Children.only(children);\n var newChildProps = {\n key: 'trigger'\n }; // ============================== Visible Handlers ==============================\n // >>> ContextMenu\n\n if (this.isContextMenuToShow()) {\n newChildProps.onContextMenu = this.onContextMenu;\n } else {\n newChildProps.onContextMenu = this.createTwoChains('onContextMenu');\n } // >>> Click\n\n\n if (this.isClickToHide() || this.isClickToShow()) {\n newChildProps.onClick = this.onClick;\n newChildProps.onMouseDown = this.onMouseDown;\n newChildProps.onTouchStart = this.onTouchStart;\n } else {\n newChildProps.onClick = this.createTwoChains('onClick');\n newChildProps.onMouseDown = this.createTwoChains('onMouseDown');\n newChildProps.onTouchStart = this.createTwoChains('onTouchStart');\n } // >>> Hover(enter)\n\n\n if (this.isMouseEnterToShow()) {\n newChildProps.onMouseEnter = this.onMouseEnter; // Point align\n\n if (alignPoint) {\n newChildProps.onMouseMove = this.onMouseMove;\n }\n } else {\n newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter');\n } // >>> Hover(leave)\n\n\n if (this.isMouseLeaveToHide()) {\n newChildProps.onMouseLeave = this.onMouseLeave;\n } else {\n newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave');\n } // >>> Focus\n\n\n if (this.isFocusToShow() || this.isBlurToHide()) {\n newChildProps.onFocus = this.onFocus;\n newChildProps.onBlur = this.onBlur;\n } else {\n newChildProps.onFocus = this.createTwoChains('onFocus');\n newChildProps.onBlur = this.createTwoChains('onBlur');\n } // =================================== Render ===================================\n\n\n var childrenClassName = (0, _classnames2.default)(child && child.props && child.props.className, className);\n\n if (childrenClassName) {\n newChildProps.className = childrenClassName;\n }\n\n var cloneProps = (0, _objectSpread5.default)({}, newChildProps);\n\n if (supportRef$1(child)) {\n cloneProps.ref = composeRef$2(this.triggerRef, child.ref);\n }\n\n var trigger = /*#__PURE__*/React.cloneElement(child, cloneProps);\n var portal; // prevent unmounting after it's rendered\n\n if (popupVisible || this.popupRef.current || forceRender) {\n portal = /*#__PURE__*/React.createElement(PortalComponent, {\n key: \"portal\",\n getContainer: this.getContainer,\n didUpdate: this.handlePortalUpdate\n }, this.getComponent());\n }\n\n if (!popupVisible && autoDestroy) {\n portal = null;\n }\n\n return /*#__PURE__*/React.createElement(TriggerContext$1.Provider, {\n value: this.triggerContextValue\n }, trigger, portal);\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(_ref, prevState) {\n var popupVisible = _ref.popupVisible;\n var newState = {};\n\n if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {\n newState.popupVisible = popupVisible;\n newState.prevPopupVisible = prevState.popupVisible;\n }\n\n return newState;\n }\n }]);\n return Trigger;\n }(React.Component);\n\n Trigger.contextType = TriggerContext$1;\n Trigger.defaultProps = {\n prefixCls: 'rc-trigger-popup',\n getPopupClassNameFromAlign: returnEmptyString$1,\n getDocument: returnDocument$1,\n onPopupVisibleChange: noop$3,\n afterPopupVisibleChange: noop$3,\n onPopupAlign: noop$3,\n popupClassName: '',\n mouseEnterDelay: 0,\n mouseLeaveDelay: 0.1,\n focusDelay: 0,\n blurDelay: 0.15,\n popupStyle: {},\n destroyPopupOnHide: false,\n popupAlign: {},\n defaultPopupVisible: false,\n mask: false,\n maskClosable: true,\n action: [],\n showAction: [],\n hideAction: [],\n autoDestroy: false\n };\n return Trigger;\n}", "function generateTrigger(PortalComponent) {\n var Trigger = /*#__PURE__*/function (_React$Component) {\n (0, _inherits2.default)(Trigger, _React$Component);\n\n var _super = (0, _createSuper2.default)(Trigger);\n\n function Trigger(props) {\n var _this;\n\n (0, _classCallCheck2.default)(this, Trigger);\n _this = _super.call(this, props);\n _this.popupRef = /*#__PURE__*/React.createRef();\n _this.triggerRef = /*#__PURE__*/React.createRef();\n\n _this.onMouseEnter = function (e) {\n var mouseEnterDelay = _this.props.mouseEnterDelay;\n\n _this.fireEvents('onMouseEnter', e);\n\n _this.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e);\n };\n\n _this.onMouseMove = function (e) {\n _this.fireEvents('onMouseMove', e);\n\n _this.setPoint(e);\n };\n\n _this.onMouseLeave = function (e) {\n _this.fireEvents('onMouseLeave', e);\n\n _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n };\n\n _this.onPopupMouseEnter = function () {\n _this.clearDelayTimer();\n };\n\n _this.onPopupMouseLeave = function (e) {\n var _this$popupRef$curren; // https://github.com/react-component/trigger/pull/13\n // react bug?\n\n\n if (e.relatedTarget && !e.relatedTarget.setTimeout && contains$1((_this$popupRef$curren = _this.popupRef.current) === null || _this$popupRef$curren === void 0 ? void 0 : _this$popupRef$curren.getElement(), e.relatedTarget)) {\n return;\n }\n\n _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n };\n\n _this.onFocus = function (e) {\n _this.fireEvents('onFocus', e); // incase focusin and focusout\n\n\n _this.clearDelayTimer();\n\n if (_this.isFocusToShow()) {\n _this.focusTime = Date.now();\n\n _this.delaySetPopupVisible(true, _this.props.focusDelay);\n }\n };\n\n _this.onMouseDown = function (e) {\n _this.fireEvents('onMouseDown', e);\n\n _this.preClickTime = Date.now();\n };\n\n _this.onTouchStart = function (e) {\n _this.fireEvents('onTouchStart', e);\n\n _this.preTouchTime = Date.now();\n };\n\n _this.onBlur = function (e) {\n _this.fireEvents('onBlur', e);\n\n _this.clearDelayTimer();\n\n if (_this.isBlurToHide()) {\n _this.delaySetPopupVisible(false, _this.props.blurDelay);\n }\n };\n\n _this.onContextMenu = function (e) {\n e.preventDefault();\n\n _this.fireEvents('onContextMenu', e);\n\n _this.setPopupVisible(true, e);\n };\n\n _this.onContextMenuClose = function () {\n if (_this.isContextMenuToShow()) {\n _this.close();\n }\n };\n\n _this.onClick = function (event) {\n _this.fireEvents('onClick', event); // focus will trigger click\n\n\n if (_this.focusTime) {\n var preTime;\n\n if (_this.preClickTime && _this.preTouchTime) {\n preTime = Math.min(_this.preClickTime, _this.preTouchTime);\n } else if (_this.preClickTime) {\n preTime = _this.preClickTime;\n } else if (_this.preTouchTime) {\n preTime = _this.preTouchTime;\n }\n\n if (Math.abs(preTime - _this.focusTime) < 20) {\n return;\n }\n\n _this.focusTime = 0;\n }\n\n _this.preClickTime = 0;\n _this.preTouchTime = 0; // Only prevent default when all the action is click.\n // https://github.com/ant-design/ant-design/issues/17043\n // https://github.com/ant-design/ant-design/issues/17291\n\n if (_this.isClickToShow() && (_this.isClickToHide() || _this.isBlurToHide()) && event && event.preventDefault) {\n event.preventDefault();\n }\n\n var nextVisible = !_this.state.popupVisible;\n\n if (_this.isClickToHide() && !nextVisible || nextVisible && _this.isClickToShow()) {\n _this.setPopupVisible(!_this.state.popupVisible, event);\n }\n };\n\n _this.onPopupMouseDown = function () {\n _this.hasPopupMouseDown = true;\n clearTimeout(_this.mouseDownTimeout);\n _this.mouseDownTimeout = window.setTimeout(function () {\n _this.hasPopupMouseDown = false;\n }, 0);\n\n if (_this.context) {\n var _this$context;\n\n (_this$context = _this.context).onPopupMouseDown.apply(_this$context, arguments);\n }\n };\n\n _this.onDocumentClick = function (event) {\n if (_this.props.mask && !_this.props.maskClosable) {\n return;\n }\n\n var target = event.target;\n\n var root = _this.getRootDomNode();\n\n var popupNode = _this.getPopupDomNode();\n\n if ( // mousedown on the target should also close popup when action is contextMenu.\n // https://github.com/ant-design/ant-design/issues/29853\n (!contains$1(root, target) || _this.isContextMenuOnly()) && !contains$1(popupNode, target) && !_this.hasPopupMouseDown) {\n _this.close();\n }\n };\n\n _this.getRootDomNode = function () {\n var getTriggerDOMNode = _this.props.getTriggerDOMNode;\n\n if (getTriggerDOMNode) {\n return getTriggerDOMNode(_this.triggerRef.current);\n }\n\n try {\n var domNode = findDOMNode$2(_this.triggerRef.current);\n\n if (domNode) {\n return domNode;\n }\n } catch (err) {// Do nothing\n }\n\n return ReactDOM.default.findDOMNode((0, _assertThisInitialized2.default)(_this));\n };\n\n _this.getPopupClassNameFromAlign = function (align) {\n var className = [];\n var _this$props = _this.props,\n popupPlacement = _this$props.popupPlacement,\n builtinPlacements = _this$props.builtinPlacements,\n prefixCls = _this$props.prefixCls,\n alignPoint = _this$props.alignPoint,\n getPopupClassNameFromAlign = _this$props.getPopupClassNameFromAlign;\n\n if (popupPlacement && builtinPlacements) {\n className.push(getAlignPopupClassName(builtinPlacements, prefixCls, align, alignPoint));\n }\n\n if (getPopupClassNameFromAlign) {\n className.push(getPopupClassNameFromAlign(align));\n }\n\n return className.join(' ');\n };\n\n _this.getComponent = function () {\n var _this$props2 = _this.props,\n prefixCls = _this$props2.prefixCls,\n destroyPopupOnHide = _this$props2.destroyPopupOnHide,\n popupClassName = _this$props2.popupClassName,\n onPopupAlign = _this$props2.onPopupAlign,\n popupMotion = _this$props2.popupMotion,\n popupAnimation = _this$props2.popupAnimation,\n popupTransitionName = _this$props2.popupTransitionName,\n popupStyle = _this$props2.popupStyle,\n mask = _this$props2.mask,\n maskAnimation = _this$props2.maskAnimation,\n maskTransitionName = _this$props2.maskTransitionName,\n maskMotion = _this$props2.maskMotion,\n zIndex = _this$props2.zIndex,\n popup = _this$props2.popup,\n stretch = _this$props2.stretch,\n alignPoint = _this$props2.alignPoint,\n mobile = _this$props2.mobile,\n forceRender = _this$props2.forceRender;\n var _this$state = _this.state,\n popupVisible = _this$state.popupVisible,\n point = _this$state.point;\n\n var align = _this.getPopupAlign();\n\n var mouseProps = {};\n\n if (_this.isMouseEnterToShow()) {\n mouseProps.onMouseEnter = _this.onPopupMouseEnter;\n }\n\n if (_this.isMouseLeaveToHide()) {\n mouseProps.onMouseLeave = _this.onPopupMouseLeave;\n }\n\n mouseProps.onMouseDown = _this.onPopupMouseDown;\n mouseProps.onTouchStart = _this.onPopupMouseDown;\n return /*#__PURE__*/React.createElement(Popup, (0, _extends3.default)({\n prefixCls: prefixCls,\n destroyPopupOnHide: destroyPopupOnHide,\n visible: popupVisible,\n point: alignPoint && point,\n className: popupClassName,\n align: align,\n onAlign: onPopupAlign,\n animation: popupAnimation,\n getClassNameFromAlign: _this.getPopupClassNameFromAlign\n }, mouseProps, {\n stretch: stretch,\n getRootDomNode: _this.getRootDomNode,\n style: popupStyle,\n mask: mask,\n zIndex: zIndex,\n transitionName: popupTransitionName,\n maskAnimation: maskAnimation,\n maskTransitionName: maskTransitionName,\n maskMotion: maskMotion,\n ref: _this.popupRef,\n motion: popupMotion,\n mobile: mobile,\n forceRender: forceRender\n }), typeof popup === 'function' ? popup() : popup);\n };\n\n _this.attachParent = function (popupContainer) {\n wrapperRaf$2.cancel(_this.attachId);\n var _this$props3 = _this.props,\n getPopupContainer = _this$props3.getPopupContainer,\n getDocument = _this$props3.getDocument;\n\n var domNode = _this.getRootDomNode();\n\n var mountNode;\n\n if (!getPopupContainer) {\n mountNode = getDocument(_this.getRootDomNode()).body;\n } else if (domNode || getPopupContainer.length === 0) {\n // Compatible for legacy getPopupContainer with domNode argument.\n // If no need `domNode` argument, will call directly.\n // https://codesandbox.io/s/eloquent-mclean-ss93m?file=/src/App.js\n mountNode = getPopupContainer(domNode);\n }\n\n if (mountNode) {\n mountNode.appendChild(popupContainer);\n } else {\n // Retry after frame render in case parent not ready\n _this.attachId = wrapperRaf$2(function () {\n _this.attachParent(popupContainer);\n });\n }\n };\n\n _this.getContainer = function () {\n var getDocument = _this.props.getDocument;\n var popupContainer = getDocument(_this.getRootDomNode()).createElement('div'); // Make sure default popup container will never cause scrollbar appearing\n // https://github.com/react-component/trigger/issues/41\n\n popupContainer.style.position = 'absolute';\n popupContainer.style.top = '0';\n popupContainer.style.left = '0';\n popupContainer.style.width = '100%';\n\n _this.attachParent(popupContainer);\n\n return popupContainer;\n };\n\n _this.setPoint = function (point) {\n var alignPoint = _this.props.alignPoint;\n if (!alignPoint || !point) return;\n\n _this.setState({\n point: {\n pageX: point.pageX,\n pageY: point.pageY\n }\n });\n };\n\n _this.handlePortalUpdate = function () {\n if (_this.state.prevPopupVisible !== _this.state.popupVisible) {\n _this.props.afterPopupVisibleChange(_this.state.popupVisible);\n }\n };\n\n _this.triggerContextValue = {\n onPopupMouseDown: _this.onPopupMouseDown\n };\n var popupVisible;\n\n if ('popupVisible' in props) {\n popupVisible = !!props.popupVisible;\n } else {\n popupVisible = !!props.defaultPopupVisible;\n }\n\n _this.state = {\n prevPopupVisible: popupVisible,\n popupVisible: popupVisible\n };\n ALL_HANDLERS.forEach(function (h) {\n _this[\"fire\".concat(h)] = function (e) {\n _this.fireEvents(h, e);\n };\n });\n return _this;\n }\n\n (0, _createClass2.default)(Trigger, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.componentDidUpdate();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n var props = this.props;\n var state = this.state; // We must listen to `mousedown` or `touchstart`, edge case:\n // https://github.com/ant-design/ant-design/issues/5804\n // https://github.com/react-component/calendar/issues/250\n // https://github.com/react-component/trigger/issues/50\n\n if (state.popupVisible) {\n var currentDocument;\n\n if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {\n currentDocument = props.getDocument(this.getRootDomNode());\n this.clickOutsideHandler = addEventListenerWrap$1(currentDocument, 'mousedown', this.onDocumentClick);\n } // always hide on mobile\n\n\n if (!this.touchOutsideHandler) {\n currentDocument = currentDocument || props.getDocument(this.getRootDomNode());\n this.touchOutsideHandler = addEventListenerWrap$1(currentDocument, 'touchstart', this.onDocumentClick);\n } // close popup when trigger type contains 'onContextMenu' and document is scrolling.\n\n\n if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) {\n currentDocument = currentDocument || props.getDocument(this.getRootDomNode());\n this.contextMenuOutsideHandler1 = addEventListenerWrap$1(currentDocument, 'scroll', this.onContextMenuClose);\n } // close popup when trigger type contains 'onContextMenu' and window is blur.\n\n\n if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) {\n this.contextMenuOutsideHandler2 = addEventListenerWrap$1(window, 'blur', this.onContextMenuClose);\n }\n\n return;\n }\n\n this.clearOutsideHandler();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.clearDelayTimer();\n this.clearOutsideHandler();\n clearTimeout(this.mouseDownTimeout);\n wrapperRaf$2.cancel(this.attachId);\n }\n }, {\n key: \"getPopupDomNode\",\n value: function getPopupDomNode() {\n var _this$popupRef$curren2; // for test\n\n\n return ((_this$popupRef$curren2 = this.popupRef.current) === null || _this$popupRef$curren2 === void 0 ? void 0 : _this$popupRef$curren2.getElement()) || null;\n }\n }, {\n key: \"getPopupAlign\",\n value: function getPopupAlign() {\n var props = this.props;\n var popupPlacement = props.popupPlacement,\n popupAlign = props.popupAlign,\n builtinPlacements = props.builtinPlacements;\n\n if (popupPlacement && builtinPlacements) {\n return getAlignFromPlacement(builtinPlacements, popupPlacement, popupAlign);\n }\n\n return popupAlign;\n }\n /**\n * @param popupVisible Show or not the popup element\n * @param event SyntheticEvent, used for `pointAlign`\n */\n\n }, {\n key: \"setPopupVisible\",\n value: function setPopupVisible(popupVisible, event) {\n var alignPoint = this.props.alignPoint;\n var prevPopupVisible = this.state.popupVisible;\n this.clearDelayTimer();\n\n if (prevPopupVisible !== popupVisible) {\n if (!('popupVisible' in this.props)) {\n this.setState({\n popupVisible: popupVisible,\n prevPopupVisible: prevPopupVisible\n });\n }\n\n this.props.onPopupVisibleChange(popupVisible);\n } // Always record the point position since mouseEnterDelay will delay the show\n\n\n if (alignPoint && event && popupVisible) {\n this.setPoint(event);\n }\n }\n }, {\n key: \"delaySetPopupVisible\",\n value: function delaySetPopupVisible(visible, delayS, event) {\n var _this2 = this;\n\n var delay = delayS * 1000;\n this.clearDelayTimer();\n\n if (delay) {\n var point = event ? {\n pageX: event.pageX,\n pageY: event.pageY\n } : null;\n this.delayTimer = window.setTimeout(function () {\n _this2.setPopupVisible(visible, point);\n\n _this2.clearDelayTimer();\n }, delay);\n } else {\n this.setPopupVisible(visible, event);\n }\n }\n }, {\n key: \"clearDelayTimer\",\n value: function clearDelayTimer() {\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n }\n }, {\n key: \"clearOutsideHandler\",\n value: function clearOutsideHandler() {\n if (this.clickOutsideHandler) {\n this.clickOutsideHandler.remove();\n this.clickOutsideHandler = null;\n }\n\n if (this.contextMenuOutsideHandler1) {\n this.contextMenuOutsideHandler1.remove();\n this.contextMenuOutsideHandler1 = null;\n }\n\n if (this.contextMenuOutsideHandler2) {\n this.contextMenuOutsideHandler2.remove();\n this.contextMenuOutsideHandler2 = null;\n }\n\n if (this.touchOutsideHandler) {\n this.touchOutsideHandler.remove();\n this.touchOutsideHandler = null;\n }\n }\n }, {\n key: \"createTwoChains\",\n value: function createTwoChains(event) {\n var childPros = this.props.children.props;\n var props = this.props;\n\n if (childPros[event] && props[event]) {\n return this[\"fire\".concat(event)];\n }\n\n return childPros[event] || props[event];\n }\n }, {\n key: \"isClickToShow\",\n value: function isClickToShow() {\n var _this$props4 = this.props,\n action = _this$props4.action,\n showAction = _this$props4.showAction;\n return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1;\n }\n }, {\n key: \"isContextMenuOnly\",\n value: function isContextMenuOnly() {\n var action = this.props.action;\n return action === 'contextMenu' || action.length === 1 && action[0] === 'contextMenu';\n }\n }, {\n key: \"isContextMenuToShow\",\n value: function isContextMenuToShow() {\n var _this$props5 = this.props,\n action = _this$props5.action,\n showAction = _this$props5.showAction;\n return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1;\n }\n }, {\n key: \"isClickToHide\",\n value: function isClickToHide() {\n var _this$props6 = this.props,\n action = _this$props6.action,\n hideAction = _this$props6.hideAction;\n return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1;\n }\n }, {\n key: \"isMouseEnterToShow\",\n value: function isMouseEnterToShow() {\n var _this$props7 = this.props,\n action = _this$props7.action,\n showAction = _this$props7.showAction;\n return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1;\n }\n }, {\n key: \"isMouseLeaveToHide\",\n value: function isMouseLeaveToHide() {\n var _this$props8 = this.props,\n action = _this$props8.action,\n hideAction = _this$props8.hideAction;\n return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1;\n }\n }, {\n key: \"isFocusToShow\",\n value: function isFocusToShow() {\n var _this$props9 = this.props,\n action = _this$props9.action,\n showAction = _this$props9.showAction;\n return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1;\n }\n }, {\n key: \"isBlurToHide\",\n value: function isBlurToHide() {\n var _this$props10 = this.props,\n action = _this$props10.action,\n hideAction = _this$props10.hideAction;\n return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1;\n }\n }, {\n key: \"forcePopupAlign\",\n value: function forcePopupAlign() {\n if (this.state.popupVisible) {\n var _this$popupRef$curren3;\n\n (_this$popupRef$curren3 = this.popupRef.current) === null || _this$popupRef$curren3 === void 0 ? void 0 : _this$popupRef$curren3.forceAlign();\n }\n }\n }, {\n key: \"fireEvents\",\n value: function fireEvents(type, e) {\n var childCallback = this.props.children.props[type];\n\n if (childCallback) {\n childCallback(e);\n }\n\n var callback = this.props[type];\n\n if (callback) {\n callback(e);\n }\n }\n }, {\n key: \"close\",\n value: function close() {\n this.setPopupVisible(false);\n }\n }, {\n key: \"render\",\n value: function render() {\n var popupVisible = this.state.popupVisible;\n var _this$props11 = this.props,\n children = _this$props11.children,\n forceRender = _this$props11.forceRender,\n alignPoint = _this$props11.alignPoint,\n className = _this$props11.className,\n autoDestroy = _this$props11.autoDestroy;\n var child = React.Children.only(children);\n var newChildProps = {\n key: 'trigger'\n }; // ============================== Visible Handlers ==============================\n // >>> ContextMenu\n\n if (this.isContextMenuToShow()) {\n newChildProps.onContextMenu = this.onContextMenu;\n } else {\n newChildProps.onContextMenu = this.createTwoChains('onContextMenu');\n } // >>> Click\n\n\n if (this.isClickToHide() || this.isClickToShow()) {\n newChildProps.onClick = this.onClick;\n newChildProps.onMouseDown = this.onMouseDown;\n newChildProps.onTouchStart = this.onTouchStart;\n } else {\n newChildProps.onClick = this.createTwoChains('onClick');\n newChildProps.onMouseDown = this.createTwoChains('onMouseDown');\n newChildProps.onTouchStart = this.createTwoChains('onTouchStart');\n } // >>> Hover(enter)\n\n\n if (this.isMouseEnterToShow()) {\n newChildProps.onMouseEnter = this.onMouseEnter; // Point align\n\n if (alignPoint) {\n newChildProps.onMouseMove = this.onMouseMove;\n }\n } else {\n newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter');\n } // >>> Hover(leave)\n\n\n if (this.isMouseLeaveToHide()) {\n newChildProps.onMouseLeave = this.onMouseLeave;\n } else {\n newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave');\n } // >>> Focus\n\n\n if (this.isFocusToShow() || this.isBlurToHide()) {\n newChildProps.onFocus = this.onFocus;\n newChildProps.onBlur = this.onBlur;\n } else {\n newChildProps.onFocus = this.createTwoChains('onFocus');\n newChildProps.onBlur = this.createTwoChains('onBlur');\n } // =================================== Render ===================================\n\n\n var childrenClassName = (0, _classnames2.default)(child && child.props && child.props.className, className);\n\n if (childrenClassName) {\n newChildProps.className = childrenClassName;\n }\n\n var cloneProps = (0, _objectSpread5.default)({}, newChildProps);\n\n if (supportRef$1(child)) {\n cloneProps.ref = composeRef$2(this.triggerRef, child.ref);\n }\n\n var trigger = /*#__PURE__*/React.cloneElement(child, cloneProps);\n var portal; // prevent unmounting after it's rendered\n\n if (popupVisible || this.popupRef.current || forceRender) {\n portal = /*#__PURE__*/React.createElement(PortalComponent, {\n key: \"portal\",\n getContainer: this.getContainer,\n didUpdate: this.handlePortalUpdate\n }, this.getComponent());\n }\n\n if (!popupVisible && autoDestroy) {\n portal = null;\n }\n\n return /*#__PURE__*/React.createElement(TriggerContext.Provider, {\n value: this.triggerContextValue\n }, trigger, portal);\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(_ref, prevState) {\n var popupVisible = _ref.popupVisible;\n var newState = {};\n\n if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {\n newState.popupVisible = popupVisible;\n newState.prevPopupVisible = prevState.popupVisible;\n }\n\n return newState;\n }\n }]);\n return Trigger;\n }(React.Component);\n\n Trigger.contextType = TriggerContext;\n Trigger.defaultProps = {\n prefixCls: 'rc-trigger-popup',\n getPopupClassNameFromAlign: returnEmptyString,\n getDocument: returnDocument,\n onPopupVisibleChange: noop$2,\n afterPopupVisibleChange: noop$2,\n onPopupAlign: noop$2,\n popupClassName: '',\n mouseEnterDelay: 0,\n mouseLeaveDelay: 0.1,\n focusDelay: 0,\n blurDelay: 0.15,\n popupStyle: {},\n destroyPopupOnHide: false,\n popupAlign: {},\n defaultPopupVisible: false,\n mask: false,\n maskClosable: true,\n action: [],\n showAction: [],\n hideAction: [],\n autoDestroy: false\n };\n return Trigger;\n}", "handleMouseOut() {\n this.setState({ hover: false });\n }", "mouseOut() {\n this.setState({ hover: false });\n }", "handleMouseOver() {\n this.setState({ hover: true });\n }", "handleMouseOver() {\n this.IsHover = true;\n }", "function Unstable_TrapFocus(props) {\n var children = props.children,\n _props$disableAutoFoc = props.disableAutoFocus,\n disableAutoFocus = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc,\n _props$disableEnforce = props.disableEnforceFocus,\n disableEnforceFocus = _props$disableEnforce === void 0 ? false : _props$disableEnforce,\n _props$disableRestore = props.disableRestoreFocus,\n disableRestoreFocus = _props$disableRestore === void 0 ? false : _props$disableRestore,\n getDoc = props.getDoc,\n isEnabled = props.isEnabled,\n open = props.open;\n var ignoreNextEnforceFocus = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"]();\n var sentinelStart = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](null);\n var sentinelEnd = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](null);\n var nodeToRestore = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"]();\n var rootRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](null); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useCallback\"](function (instance) {\n // #StrictMode ready\n rootRef.current = react_dom__WEBPACK_IMPORTED_MODULE_1__[\"findDOMNode\"](instance);\n }, []);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(children.ref, handleOwnRef);\n var prevOpenRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"]();\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n prevOpenRef.current = open;\n }, [open]);\n\n if (!prevOpenRef.current && open && typeof window !== 'undefined') {\n // WARNING: Potentially unsafe in concurrent mode.\n // The way the read on `nodeToRestore` is setup could make this actually safe.\n // Say we render `open={false}` -> `open={true}` but never commit.\n // We have now written a state that wasn't committed. But no committed effect\n // will read this wrong value. We only read from `nodeToRestore` in effects\n // that were committed on `open={true}`\n // WARNING: Prevents the instance from being garbage collected. Should only\n // hold a weak ref.\n nodeToRestore.current = getDoc().activeElement;\n }\n\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n if (!open) {\n return;\n }\n\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(rootRef.current); // We might render an empty child.\n\n if (!disableAutoFocus && rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n if (false) {}\n\n rootRef.current.setAttribute('tabIndex', -1);\n }\n\n rootRef.current.focus();\n }\n\n var contain = function contain() {\n if (!doc.hasFocus() || disableEnforceFocus || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n if (rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n rootRef.current.focus();\n }\n };\n\n var loopFocus = function loopFocus(event) {\n // 9 = Tab\n if (disableEnforceFocus || !isEnabled() || event.keyCode !== 9) {\n return;\n } // Make sure the next tab starts from the right place.\n\n\n if (doc.activeElement === rootRef.current) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n\n if (event.shiftKey) {\n sentinelEnd.current.focus();\n } else {\n sentinelStart.current.focus();\n }\n }\n };\n\n doc.addEventListener('focus', contain, true);\n doc.addEventListener('keydown', loopFocus, true); // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n\n var interval = setInterval(function () {\n contain();\n }, 50);\n return function () {\n clearInterval(interval);\n doc.removeEventListener('focus', contain, true);\n doc.removeEventListener('keydown', loopFocus, true); // restoreLastFocus()\n\n if (!disableRestoreFocus) {\n // In IE 11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE 11 have a focus method.\n // Once IE 11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n nodeToRestore.current.focus();\n }\n\n nodeToRestore.current = null;\n }\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n tabIndex: 0,\n ref: sentinelStart,\n \"data-test\": \"sentinelStart\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"cloneElement\"](children, {\n ref: handleRef\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n tabIndex: 0,\n ref: sentinelEnd,\n \"data-test\": \"sentinelEnd\"\n }));\n}", "function Unstable_TrapFocus(props) {\n var children = props.children,\n _props$disableAutoFoc = props.disableAutoFocus,\n disableAutoFocus = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc,\n _props$disableEnforce = props.disableEnforceFocus,\n disableEnforceFocus = _props$disableEnforce === void 0 ? false : _props$disableEnforce,\n _props$disableRestore = props.disableRestoreFocus,\n disableRestoreFocus = _props$disableRestore === void 0 ? false : _props$disableRestore,\n getDoc = props.getDoc,\n isEnabled = props.isEnabled,\n open = props.open;\n var ignoreNextEnforceFocus = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"]();\n var sentinelStart = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](null);\n var sentinelEnd = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](null);\n var nodeToRestore = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"]();\n var rootRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](null); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useCallback\"](function (instance) {\n // #StrictMode ready\n rootRef.current = react_dom__WEBPACK_IMPORTED_MODULE_1__[\"findDOMNode\"](instance);\n }, []);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(children.ref, handleOwnRef);\n var prevOpenRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"]();\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n prevOpenRef.current = open;\n }, [open]);\n\n if (!prevOpenRef.current && open && typeof window !== 'undefined') {\n // WARNING: Potentially unsafe in concurrent mode.\n // The way the read on `nodeToRestore` is setup could make this actually safe.\n // Say we render `open={false}` -> `open={true}` but never commit.\n // We have now written a state that wasn't committed. But no committed effect\n // will read this wrong value. We only read from `nodeToRestore` in effects\n // that were committed on `open={true}`\n // WARNING: Prevents the instance from being garbage collected. Should only\n // hold a weak ref.\n nodeToRestore.current = getDoc().activeElement;\n }\n\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n if (!open) {\n return;\n }\n\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(rootRef.current); // We might render an empty child.\n\n if (!disableAutoFocus && rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n if (true) {\n console.error(['Material-UI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to \"-1\".'].join('\\n'));\n }\n\n rootRef.current.setAttribute('tabIndex', -1);\n }\n\n rootRef.current.focus();\n }\n\n var contain = function contain() {\n var rootElement = rootRef.current; // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n\n if (rootElement === null) {\n return;\n }\n\n if (!doc.hasFocus() || disableEnforceFocus || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n if (rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n rootRef.current.focus();\n }\n };\n\n var loopFocus = function loopFocus(event) {\n // 9 = Tab\n if (disableEnforceFocus || !isEnabled() || event.keyCode !== 9) {\n return;\n } // Make sure the next tab starts from the right place.\n\n\n if (doc.activeElement === rootRef.current) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n\n if (event.shiftKey) {\n sentinelEnd.current.focus();\n } else {\n sentinelStart.current.focus();\n }\n }\n };\n\n doc.addEventListener('focus', contain, true);\n doc.addEventListener('keydown', loopFocus, true); // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n\n var interval = setInterval(function () {\n contain();\n }, 50);\n return function () {\n clearInterval(interval);\n doc.removeEventListener('focus', contain, true);\n doc.removeEventListener('keydown', loopFocus, true); // restoreLastFocus()\n\n if (!disableRestoreFocus) {\n // In IE 11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE 11 have a focus method.\n // Once IE 11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n nodeToRestore.current.focus();\n }\n\n nodeToRestore.current = null;\n }\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n tabIndex: 0,\n ref: sentinelStart,\n \"data-test\": \"sentinelStart\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"cloneElement\"](children, {\n ref: handleRef\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n tabIndex: 0,\n ref: sentinelEnd,\n \"data-test\": \"sentinelEnd\"\n }));\n}", "mouseOver(e) {\n this.setState({hover: true});\n }", "function ClickAwayListener(props) {\n var children = props.children,\n _props$disableReactTr = props.disableReactTree,\n disableReactTree = _props$disableReactTr === void 0 ? false : _props$disableReactTr,\n _props$mouseEvent = props.mouseEvent,\n mouseEvent = _props$mouseEvent === void 0 ? 'onClick' : _props$mouseEvent,\n onClickAway = props.onClickAway,\n _props$touchEvent = props.touchEvent,\n touchEvent = _props$touchEvent === void 0 ? 'onTouchEnd' : _props$touchEvent;\n var movedRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](false);\n var nodeRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](null);\n var activatedRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](false);\n var syntheticEventRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](false);\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n // Ensure that this component is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n setTimeout(function () {\n activatedRef.current = true;\n }, 0);\n return function () {\n activatedRef.current = false;\n };\n }, []); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useCallback\"](function (instance) {\n // #StrictMode ready\n nodeRef.current = react_dom__WEBPACK_IMPORTED_MODULE_1__[\"findDOMNode\"](instance);\n }, []);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(children.ref, handleOwnRef); // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviours like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n\n var handleClickAway = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (event) {\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n var insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false; // 1. IE 11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n\n if (!activatedRef.current || !nodeRef.current || clickedRootScrollbar(event)) {\n return;\n } // Do not act if user performed touchmove\n\n\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n\n var insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n // TODO v6 remove dead logic https://caniuse.com/#search=composedPath.\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(nodeRef.current);\n insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target);\n }\n\n if (!insideDOM && (disableReactTree || !insideReactTree)) {\n onClickAway(event);\n }\n }); // Keep track of mouse/touch events that bubbled up through the portal.\n\n var createHandleSynthetic = function createHandleSynthetic(handlerName) {\n return function (event) {\n syntheticEventRef.current = true;\n var childrenPropsHandler = children.props[handlerName];\n\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n };\n\n var childrenProps = {\n ref: handleRef\n };\n\n if (touchEvent !== false) {\n childrenProps[touchEvent] = createHandleSynthetic(touchEvent);\n }\n\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n if (touchEvent !== false) {\n var mappedTouchEvent = mapEventPropToEvent(touchEvent);\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(nodeRef.current);\n\n var handleTouchMove = function handleTouchMove() {\n movedRef.current = true;\n };\n\n doc.addEventListener(mappedTouchEvent, handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return function () {\n doc.removeEventListener(mappedTouchEvent, handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n\n return undefined;\n }, [handleClickAway, touchEvent]);\n\n if (mouseEvent !== false) {\n childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);\n }\n\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n if (mouseEvent !== false) {\n var mappedMouseEvent = mapEventPropToEvent(mouseEvent);\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(nodeRef.current);\n doc.addEventListener(mappedMouseEvent, handleClickAway);\n return function () {\n doc.removeEventListener(mappedMouseEvent, handleClickAway);\n };\n }\n\n return undefined;\n }, [handleClickAway, mouseEvent]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"cloneElement\"](children, childrenProps));\n}", "onElementMouseOver(event) {\n super.onElementMouseOver(event);\n\n const me = this,\n target = event.target;\n\n // We must be over the event bar\n if (target.closest(me.eventInnerSelector)) {\n const eventElement = target.closest(me.eventSelector);\n\n eventElement.classList.add(me.overScheduledEventClass);\n\n if (eventElement !== me.hoveredEventNode && !me.preventOverCls) {\n me.hoveredEventNode = eventElement;\n\n const params = me.getTimeSpanMouseEventParams(eventElement, event);\n if (params) {\n // do not fire this event if model cannot be found\n // this can be the case for \"b-sch-dragcreator-proxy\" elements for example\n me.trigger(me.scheduledEventName + 'MouseEnter', params);\n }\n }\n } else {\n me.hoveredEventNode = null;\n }\n }", "function ClickAwayListener(props) {\n var children = props.children,\n _props$disableReactTr = props.disableReactTree,\n disableReactTree = _props$disableReactTr === void 0 ? false : _props$disableReactTr,\n _props$mouseEvent = props.mouseEvent,\n mouseEvent = _props$mouseEvent === void 0 ? 'onClick' : _props$mouseEvent,\n onClickAway = props.onClickAway,\n _props$touchEvent = props.touchEvent,\n touchEvent = _props$touchEvent === void 0 ? 'onTouchEnd' : _props$touchEvent;\n var movedRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n var nodeRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n var activatedRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n var syntheticEventRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n // Ensure that this component is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n setTimeout(function () {\n activatedRef.current = true;\n }, 0);\n return function () {\n activatedRef.current = false;\n };\n }, []); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (instance) {\n // #StrictMode ready\n nodeRef.current = react_dom__WEBPACK_IMPORTED_MODULE_1__.findDOMNode(instance);\n }, []);\n var handleRef = (0,_utils_useForkRef__WEBPACK_IMPORTED_MODULE_3__.default)(children.ref, handleOwnRef); // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviours like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n\n var handleClickAway = (0,_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_4__.default)(function (event) {\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n var insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false; // 1. IE 11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n\n if (!activatedRef.current || !nodeRef.current || clickedRootScrollbar(event)) {\n return;\n } // Do not act if user performed touchmove\n\n\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n\n var insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n // TODO v6 remove dead logic https://caniuse.com/#search=composedPath.\n var doc = (0,_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_5__.default)(nodeRef.current);\n insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target);\n }\n\n if (!insideDOM && (disableReactTree || !insideReactTree)) {\n onClickAway(event);\n }\n }); // Keep track of mouse/touch events that bubbled up through the portal.\n\n var createHandleSynthetic = function createHandleSynthetic(handlerName) {\n return function (event) {\n syntheticEventRef.current = true;\n var childrenPropsHandler = children.props[handlerName];\n\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n };\n\n var childrenProps = {\n ref: handleRef\n };\n\n if (touchEvent !== false) {\n childrenProps[touchEvent] = createHandleSynthetic(touchEvent);\n }\n\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n if (touchEvent !== false) {\n var mappedTouchEvent = mapEventPropToEvent(touchEvent);\n var doc = (0,_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_5__.default)(nodeRef.current);\n\n var handleTouchMove = function handleTouchMove() {\n movedRef.current = true;\n };\n\n doc.addEventListener(mappedTouchEvent, handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return function () {\n doc.removeEventListener(mappedTouchEvent, handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n\n return undefined;\n }, [handleClickAway, touchEvent]);\n\n if (mouseEvent !== false) {\n childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);\n }\n\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n if (mouseEvent !== false) {\n var mappedMouseEvent = mapEventPropToEvent(mouseEvent);\n var doc = (0,_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_5__.default)(nodeRef.current);\n doc.addEventListener(mappedMouseEvent, handleClickAway);\n return function () {\n doc.removeEventListener(mappedMouseEvent, handleClickAway);\n };\n }\n\n return undefined;\n }, [handleClickAway, mouseEvent]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(children, childrenProps));\n}", "function ClickAwayListener(props) {\n var children = props.children,\n _props$disableReactTr = props.disableReactTree,\n disableReactTree = _props$disableReactTr === void 0 ? false : _props$disableReactTr,\n _props$mouseEvent = props.mouseEvent,\n mouseEvent = _props$mouseEvent === void 0 ? 'onClick' : _props$mouseEvent,\n onClickAway = props.onClickAway,\n _props$touchEvent = props.touchEvent,\n touchEvent = _props$touchEvent === void 0 ? 'onTouchEnd' : _props$touchEvent;\n var movedRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n var nodeRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n var activatedRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n var syntheticEventRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n // Ensure that this component is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n setTimeout(function () {\n activatedRef.current = true;\n }, 0);\n return function () {\n activatedRef.current = false;\n };\n }, []); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (instance) {\n // #StrictMode ready\n nodeRef.current = react_dom__WEBPACK_IMPORTED_MODULE_1__.findDOMNode(instance);\n }, []);\n var handleRef = (0,_utils_useForkRef__WEBPACK_IMPORTED_MODULE_3__.default)(children.ref, handleOwnRef); // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviours like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n\n var handleClickAway = (0,_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_4__.default)(function (event) {\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n var insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false; // 1. IE 11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n\n if (!activatedRef.current || !nodeRef.current || clickedRootScrollbar(event)) {\n return;\n } // Do not act if user performed touchmove\n\n\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n\n var insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n // TODO v6 remove dead logic https://caniuse.com/#search=composedPath.\n var doc = (0,_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_5__.default)(nodeRef.current);\n insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target);\n }\n\n if (!insideDOM && (disableReactTree || !insideReactTree)) {\n onClickAway(event);\n }\n }); // Keep track of mouse/touch events that bubbled up through the portal.\n\n var createHandleSynthetic = function createHandleSynthetic(handlerName) {\n return function (event) {\n syntheticEventRef.current = true;\n var childrenPropsHandler = children.props[handlerName];\n\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n };\n\n var childrenProps = {\n ref: handleRef\n };\n\n if (touchEvent !== false) {\n childrenProps[touchEvent] = createHandleSynthetic(touchEvent);\n }\n\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n if (touchEvent !== false) {\n var mappedTouchEvent = mapEventPropToEvent(touchEvent);\n var doc = (0,_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_5__.default)(nodeRef.current);\n\n var handleTouchMove = function handleTouchMove() {\n movedRef.current = true;\n };\n\n doc.addEventListener(mappedTouchEvent, handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return function () {\n doc.removeEventListener(mappedTouchEvent, handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n\n return undefined;\n }, [handleClickAway, touchEvent]);\n\n if (mouseEvent !== false) {\n childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);\n }\n\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n if (mouseEvent !== false) {\n var mappedMouseEvent = mapEventPropToEvent(mouseEvent);\n var doc = (0,_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_5__.default)(nodeRef.current);\n doc.addEventListener(mappedMouseEvent, handleClickAway);\n return function () {\n doc.removeEventListener(mappedMouseEvent, handleClickAway);\n };\n }\n\n return undefined;\n }, [handleClickAway, mouseEvent]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(children, childrenProps));\n}", "onElementMouseOver(event) {\n super.onElementMouseOver(event);\n const me = this,\n target = event.target; // We must be over the event bar\n\n if (target.closest(me.eventInnerSelector)) {\n const eventElement = target.closest(me.eventSelector);\n eventElement.classList.add(me.overScheduledEventClass);\n\n if (eventElement !== me.hoveredEventNode && !me.preventOverCls) {\n me.hoveredEventNode = eventElement;\n const params = me.getTimeSpanMouseEventParams(eventElement, event);\n\n if (params) {\n // do not fire this event if model cannot be found\n // this can be the case for \"b-sch-dragcreator-proxy\" elements for example\n me.trigger(me.scheduledEventName + 'MouseEnter', params);\n }\n }\n } else {\n me.hoveredEventNode = null;\n }\n }", "function Unstable_TrapFocus(props) {\n var children = props.children,\n _props$disableAutoFoc = props.disableAutoFocus,\n disableAutoFocus = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc,\n _props$disableEnforce = props.disableEnforceFocus,\n disableEnforceFocus = _props$disableEnforce === void 0 ? false : _props$disableEnforce,\n _props$disableRestore = props.disableRestoreFocus,\n disableRestoreFocus = _props$disableRestore === void 0 ? false : _props$disableRestore,\n getDoc = props.getDoc,\n isEnabled = props.isEnabled,\n open = props.open;\n var ignoreNextEnforceFocus = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n var sentinelStart = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n var sentinelEnd = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n var nodeToRestore = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n var rootRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (instance) {\n // #StrictMode ready\n rootRef.current = react_dom__WEBPACK_IMPORTED_MODULE_1__.findDOMNode(instance);\n }, []);\n var handleRef = (0,_utils_useForkRef__WEBPACK_IMPORTED_MODULE_4__.default)(children.ref, handleOwnRef);\n var prevOpenRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n prevOpenRef.current = open;\n }, [open]);\n\n if (!prevOpenRef.current && open && typeof window !== 'undefined') {\n // WARNING: Potentially unsafe in concurrent mode.\n // The way the read on `nodeToRestore` is setup could make this actually safe.\n // Say we render `open={false}` -> `open={true}` but never commit.\n // We have now written a state that wasn't committed. But no committed effect\n // will read this wrong value. We only read from `nodeToRestore` in effects\n // that were committed on `open={true}`\n // WARNING: Prevents the instance from being garbage collected. Should only\n // hold a weak ref.\n nodeToRestore.current = getDoc().activeElement;\n }\n\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n if (!open) {\n return;\n }\n\n var doc = (0,_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_5__.default)(rootRef.current); // We might render an empty child.\n\n if (!disableAutoFocus && rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n if (true) {\n console.error(['Material-UI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to \"-1\".'].join('\\n'));\n }\n\n rootRef.current.setAttribute('tabIndex', -1);\n }\n\n rootRef.current.focus();\n }\n\n var contain = function contain() {\n var rootElement = rootRef.current; // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n\n if (rootElement === null) {\n return;\n }\n\n if (!doc.hasFocus() || disableEnforceFocus || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n if (rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n rootRef.current.focus();\n }\n };\n\n var loopFocus = function loopFocus(event) {\n // 9 = Tab\n if (disableEnforceFocus || !isEnabled() || event.keyCode !== 9) {\n return;\n } // Make sure the next tab starts from the right place.\n\n\n if (doc.activeElement === rootRef.current) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n\n if (event.shiftKey) {\n sentinelEnd.current.focus();\n } else {\n sentinelStart.current.focus();\n }\n }\n };\n\n doc.addEventListener('focus', contain, true);\n doc.addEventListener('keydown', loopFocus, true); // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n\n var interval = setInterval(function () {\n contain();\n }, 50);\n return function () {\n clearInterval(interval);\n doc.removeEventListener('focus', contain, true);\n doc.removeEventListener('keydown', loopFocus, true); // restoreLastFocus()\n\n if (!disableRestoreFocus) {\n // In IE 11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE 11 have a focus method.\n // Once IE 11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n nodeToRestore.current.focus();\n }\n\n nodeToRestore.current = null;\n }\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelStart,\n \"data-test\": \"sentinelStart\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(children, {\n ref: handleRef\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelEnd,\n \"data-test\": \"sentinelEnd\"\n }));\n}", "function Unstable_TrapFocus(props) {\n var children = props.children,\n _props$disableAutoFoc = props.disableAutoFocus,\n disableAutoFocus = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc,\n _props$disableEnforce = props.disableEnforceFocus,\n disableEnforceFocus = _props$disableEnforce === void 0 ? false : _props$disableEnforce,\n _props$disableRestore = props.disableRestoreFocus,\n disableRestoreFocus = _props$disableRestore === void 0 ? false : _props$disableRestore,\n getDoc = props.getDoc,\n isEnabled = props.isEnabled,\n open = props.open;\n var ignoreNextEnforceFocus = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n var sentinelStart = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n var sentinelEnd = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n var nodeToRestore = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n var rootRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (instance) {\n // #StrictMode ready\n rootRef.current = react_dom__WEBPACK_IMPORTED_MODULE_1__.findDOMNode(instance);\n }, []);\n var handleRef = (0,_utils_useForkRef__WEBPACK_IMPORTED_MODULE_3__.default)(children.ref, handleOwnRef);\n var prevOpenRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n prevOpenRef.current = open;\n }, [open]);\n\n if (!prevOpenRef.current && open && typeof window !== 'undefined') {\n // WARNING: Potentially unsafe in concurrent mode.\n // The way the read on `nodeToRestore` is setup could make this actually safe.\n // Say we render `open={false}` -> `open={true}` but never commit.\n // We have now written a state that wasn't committed. But no committed effect\n // will read this wrong value. We only read from `nodeToRestore` in effects\n // that were committed on `open={true}`\n // WARNING: Prevents the instance from being garbage collected. Should only\n // hold a weak ref.\n nodeToRestore.current = getDoc().activeElement;\n }\n\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n if (!open) {\n return;\n }\n\n var doc = (0,_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_4__.default)(rootRef.current); // We might render an empty child.\n\n if (!disableAutoFocus && rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n if (true) {\n console.error(['Material-UI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to \"-1\".'].join('\\n'));\n }\n\n rootRef.current.setAttribute('tabIndex', -1);\n }\n\n rootRef.current.focus();\n }\n\n var contain = function contain() {\n var rootElement = rootRef.current; // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n\n if (rootElement === null) {\n return;\n }\n\n if (!doc.hasFocus() || disableEnforceFocus || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n if (rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n rootRef.current.focus();\n }\n };\n\n var loopFocus = function loopFocus(event) {\n // 9 = Tab\n if (disableEnforceFocus || !isEnabled() || event.keyCode !== 9) {\n return;\n } // Make sure the next tab starts from the right place.\n\n\n if (doc.activeElement === rootRef.current) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n\n if (event.shiftKey) {\n sentinelEnd.current.focus();\n } else {\n sentinelStart.current.focus();\n }\n }\n };\n\n doc.addEventListener('focus', contain, true);\n doc.addEventListener('keydown', loopFocus, true); // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n\n var interval = setInterval(function () {\n contain();\n }, 50);\n return function () {\n clearInterval(interval);\n doc.removeEventListener('focus', contain, true);\n doc.removeEventListener('keydown', loopFocus, true); // restoreLastFocus()\n\n if (!disableRestoreFocus) {\n // In IE 11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE 11 have a focus method.\n // Once IE 11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n nodeToRestore.current.focus();\n }\n\n nodeToRestore.current = null;\n }\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelStart,\n \"data-test\": \"sentinelStart\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(children, {\n ref: handleRef\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelEnd,\n \"data-test\": \"sentinelEnd\"\n }));\n}", "handleMouseOver() {\n this.setState({\n canDrag: true,\n cursor: 'grab'\n });\n window.addEventListener('wheel', this.handleWheel, {passive: false} );\n }", "function generateTrigger(PortalComponent) {\n var Trigger = /*#__PURE__*/function (_React$Component) {\n (0,_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__.default)(Trigger, _React$Component);\n\n var _super = (0,_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_6__.default)(Trigger);\n\n function Trigger(props) {\n var _this;\n\n (0,_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__.default)(this, Trigger);\n\n _this = _super.call(this, props);\n _this.popupRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__.createRef();\n _this.triggerRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__.createRef();\n\n _this.onMouseEnter = function (e) {\n var mouseEnterDelay = _this.props.mouseEnterDelay;\n\n _this.fireEvents('onMouseEnter', e);\n\n _this.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e);\n };\n\n _this.onMouseMove = function (e) {\n _this.fireEvents('onMouseMove', e);\n\n _this.setPoint(e);\n };\n\n _this.onMouseLeave = function (e) {\n _this.fireEvents('onMouseLeave', e);\n\n _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n };\n\n _this.onPopupMouseEnter = function () {\n _this.clearDelayTimer();\n };\n\n _this.onPopupMouseLeave = function (e) {\n var _this$popupRef$curren;\n\n // https://github.com/react-component/trigger/pull/13\n // react bug?\n if (e.relatedTarget && !e.relatedTarget.setTimeout && (0,rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_10__.default)((_this$popupRef$curren = _this.popupRef.current) === null || _this$popupRef$curren === void 0 ? void 0 : _this$popupRef$curren.getElement(), e.relatedTarget)) {\n return;\n }\n\n _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n };\n\n _this.onFocus = function (e) {\n _this.fireEvents('onFocus', e); // incase focusin and focusout\n\n\n _this.clearDelayTimer();\n\n if (_this.isFocusToShow()) {\n _this.focusTime = Date.now();\n\n _this.delaySetPopupVisible(true, _this.props.focusDelay);\n }\n };\n\n _this.onMouseDown = function (e) {\n _this.fireEvents('onMouseDown', e);\n\n _this.preClickTime = Date.now();\n };\n\n _this.onTouchStart = function (e) {\n _this.fireEvents('onTouchStart', e);\n\n _this.preTouchTime = Date.now();\n };\n\n _this.onBlur = function (e) {\n _this.fireEvents('onBlur', e);\n\n _this.clearDelayTimer();\n\n if (_this.isBlurToHide()) {\n _this.delaySetPopupVisible(false, _this.props.blurDelay);\n }\n };\n\n _this.onContextMenu = function (e) {\n e.preventDefault();\n\n _this.fireEvents('onContextMenu', e);\n\n _this.setPopupVisible(true, e);\n };\n\n _this.onContextMenuClose = function () {\n if (_this.isContextMenuToShow()) {\n _this.close();\n }\n };\n\n _this.onClick = function (event) {\n _this.fireEvents('onClick', event); // focus will trigger click\n\n\n if (_this.focusTime) {\n var preTime;\n\n if (_this.preClickTime && _this.preTouchTime) {\n preTime = Math.min(_this.preClickTime, _this.preTouchTime);\n } else if (_this.preClickTime) {\n preTime = _this.preClickTime;\n } else if (_this.preTouchTime) {\n preTime = _this.preTouchTime;\n }\n\n if (Math.abs(preTime - _this.focusTime) < 20) {\n return;\n }\n\n _this.focusTime = 0;\n }\n\n _this.preClickTime = 0;\n _this.preTouchTime = 0; // Only prevent default when all the action is click.\n // https://github.com/ant-design/ant-design/issues/17043\n // https://github.com/ant-design/ant-design/issues/17291\n\n if (_this.isClickToShow() && (_this.isClickToHide() || _this.isBlurToHide()) && event && event.preventDefault) {\n event.preventDefault();\n }\n\n var nextVisible = !_this.state.popupVisible;\n\n if (_this.isClickToHide() && !nextVisible || nextVisible && _this.isClickToShow()) {\n _this.setPopupVisible(!_this.state.popupVisible, event);\n }\n };\n\n _this.onPopupMouseDown = function () {\n _this.hasPopupMouseDown = true;\n clearTimeout(_this.mouseDownTimeout);\n _this.mouseDownTimeout = window.setTimeout(function () {\n _this.hasPopupMouseDown = false;\n }, 0);\n\n if (_this.context) {\n var _this$context;\n\n (_this$context = _this.context).onPopupMouseDown.apply(_this$context, arguments);\n }\n };\n\n _this.onDocumentClick = function (event) {\n if (_this.props.mask && !_this.props.maskClosable) {\n return;\n }\n\n var target = event.target;\n\n var root = _this.getRootDomNode();\n\n var popupNode = _this.getPopupDomNode();\n\n if (!(0,rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_10__.default)(root, target) && !(0,rc_util_es_Dom_contains__WEBPACK_IMPORTED_MODULE_10__.default)(popupNode, target) && !_this.hasPopupMouseDown) {\n _this.close();\n }\n };\n\n _this.getRootDomNode = function () {\n var getTriggerDOMNode = _this.props.getTriggerDOMNode;\n\n if (getTriggerDOMNode) {\n return getTriggerDOMNode(_this.triggerRef.current);\n }\n\n try {\n var domNode = (0,rc_util_es_Dom_findDOMNode__WEBPACK_IMPORTED_MODULE_11__.default)(_this.triggerRef.current);\n\n if (domNode) {\n return domNode;\n }\n } catch (err) {// Do nothing\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_8__.findDOMNode((0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__.default)(_this));\n };\n\n _this.getPopupClassNameFromAlign = function (align) {\n var className = [];\n var _this$props = _this.props,\n popupPlacement = _this$props.popupPlacement,\n builtinPlacements = _this$props.builtinPlacements,\n prefixCls = _this$props.prefixCls,\n alignPoint = _this$props.alignPoint,\n getPopupClassNameFromAlign = _this$props.getPopupClassNameFromAlign;\n\n if (popupPlacement && builtinPlacements) {\n className.push((0,_utils_alignUtil__WEBPACK_IMPORTED_MODULE_16__.getAlignPopupClassName)(builtinPlacements, prefixCls, align, alignPoint));\n }\n\n if (getPopupClassNameFromAlign) {\n className.push(getPopupClassNameFromAlign(align));\n }\n\n return className.join(' ');\n };\n\n _this.getComponent = function () {\n var _this$props2 = _this.props,\n prefixCls = _this$props2.prefixCls,\n destroyPopupOnHide = _this$props2.destroyPopupOnHide,\n popupClassName = _this$props2.popupClassName,\n onPopupAlign = _this$props2.onPopupAlign,\n popupMotion = _this$props2.popupMotion,\n popupAnimation = _this$props2.popupAnimation,\n popupTransitionName = _this$props2.popupTransitionName,\n popupStyle = _this$props2.popupStyle,\n mask = _this$props2.mask,\n maskAnimation = _this$props2.maskAnimation,\n maskTransitionName = _this$props2.maskTransitionName,\n maskMotion = _this$props2.maskMotion,\n zIndex = _this$props2.zIndex,\n popup = _this$props2.popup,\n stretch = _this$props2.stretch,\n alignPoint = _this$props2.alignPoint,\n mobile = _this$props2.mobile;\n var _this$state = _this.state,\n popupVisible = _this$state.popupVisible,\n point = _this$state.point;\n\n var align = _this.getPopupAlign();\n\n var mouseProps = {};\n\n if (_this.isMouseEnterToShow()) {\n mouseProps.onMouseEnter = _this.onPopupMouseEnter;\n }\n\n if (_this.isMouseLeaveToHide()) {\n mouseProps.onMouseLeave = _this.onPopupMouseLeave;\n }\n\n mouseProps.onMouseDown = _this.onPopupMouseDown;\n mouseProps.onTouchStart = _this.onPopupMouseDown;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__.createElement(_Popup__WEBPACK_IMPORTED_MODULE_17__.default, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__.default)({\n prefixCls: prefixCls,\n destroyPopupOnHide: destroyPopupOnHide,\n visible: popupVisible,\n point: alignPoint && point,\n className: popupClassName,\n align: align,\n onAlign: onPopupAlign,\n animation: popupAnimation,\n getClassNameFromAlign: _this.getPopupClassNameFromAlign\n }, mouseProps, {\n stretch: stretch,\n getRootDomNode: _this.getRootDomNode,\n style: popupStyle,\n mask: mask,\n zIndex: zIndex,\n transitionName: popupTransitionName,\n maskAnimation: maskAnimation,\n maskTransitionName: maskTransitionName,\n maskMotion: maskMotion,\n ref: _this.popupRef,\n motion: popupMotion,\n mobile: mobile\n }), typeof popup === 'function' ? popup() : popup);\n };\n\n _this.attachParent = function (popupContainer) {\n rc_util_es_raf__WEBPACK_IMPORTED_MODULE_9__.default.cancel(_this.attachId);\n var _this$props3 = _this.props,\n getPopupContainer = _this$props3.getPopupContainer,\n getDocument = _this$props3.getDocument;\n\n var domNode = _this.getRootDomNode();\n\n var mountNode;\n\n if (!getPopupContainer) {\n mountNode = getDocument(_this.getRootDomNode()).body;\n } else if (domNode || getPopupContainer.length === 0) {\n // Compatible for legacy getPopupContainer with domNode argument.\n // If no need `domNode` argument, will call directly.\n // https://codesandbox.io/s/eloquent-mclean-ss93m?file=/src/App.js\n mountNode = getPopupContainer(domNode);\n }\n\n if (mountNode) {\n mountNode.appendChild(popupContainer);\n } else {\n // Retry after frame render in case parent not ready\n _this.attachId = (0,rc_util_es_raf__WEBPACK_IMPORTED_MODULE_9__.default)(function () {\n _this.attachParent(popupContainer);\n });\n }\n };\n\n _this.getContainer = function () {\n var getDocument = _this.props.getDocument;\n var popupContainer = getDocument(_this.getRootDomNode()).createElement('div'); // Make sure default popup container will never cause scrollbar appearing\n // https://github.com/react-component/trigger/issues/41\n\n popupContainer.style.position = 'absolute';\n popupContainer.style.top = '0';\n popupContainer.style.left = '0';\n popupContainer.style.width = '100%';\n\n _this.attachParent(popupContainer);\n\n return popupContainer;\n };\n\n _this.setPoint = function (point) {\n var alignPoint = _this.props.alignPoint;\n if (!alignPoint || !point) return;\n\n _this.setState({\n point: {\n pageX: point.pageX,\n pageY: point.pageY\n }\n });\n };\n\n _this.handlePortalUpdate = function () {\n if (_this.state.prevPopupVisible !== _this.state.popupVisible) {\n _this.props.afterPopupVisibleChange(_this.state.popupVisible);\n }\n };\n\n var popupVisible;\n\n if ('popupVisible' in props) {\n popupVisible = !!props.popupVisible;\n } else {\n popupVisible = !!props.defaultPopupVisible;\n }\n\n _this.state = {\n prevPopupVisible: popupVisible,\n popupVisible: popupVisible\n };\n ALL_HANDLERS.forEach(function (h) {\n _this[\"fire\".concat(h)] = function (e) {\n _this.fireEvents(h, e);\n };\n });\n return _this;\n }\n\n (0,_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__.default)(Trigger, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.componentDidUpdate();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n var props = this.props;\n var state = this.state; // We must listen to `mousedown` or `touchstart`, edge case:\n // https://github.com/ant-design/ant-design/issues/5804\n // https://github.com/react-component/calendar/issues/250\n // https://github.com/react-component/trigger/issues/50\n\n if (state.popupVisible) {\n var currentDocument;\n\n if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {\n currentDocument = props.getDocument(this.getRootDomNode());\n this.clickOutsideHandler = (0,rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_13__.default)(currentDocument, 'mousedown', this.onDocumentClick);\n } // always hide on mobile\n\n\n if (!this.touchOutsideHandler) {\n currentDocument = currentDocument || props.getDocument(this.getRootDomNode());\n this.touchOutsideHandler = (0,rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_13__.default)(currentDocument, 'touchstart', this.onDocumentClick);\n } // close popup when trigger type contains 'onContextMenu' and document is scrolling.\n\n\n if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) {\n currentDocument = currentDocument || props.getDocument(this.getRootDomNode());\n this.contextMenuOutsideHandler1 = (0,rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_13__.default)(currentDocument, 'scroll', this.onContextMenuClose);\n } // close popup when trigger type contains 'onContextMenu' and window is blur.\n\n\n if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) {\n this.contextMenuOutsideHandler2 = (0,rc_util_es_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_13__.default)(window, 'blur', this.onContextMenuClose);\n }\n\n return;\n }\n\n this.clearOutsideHandler();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.clearDelayTimer();\n this.clearOutsideHandler();\n clearTimeout(this.mouseDownTimeout);\n rc_util_es_raf__WEBPACK_IMPORTED_MODULE_9__.default.cancel(this.attachId);\n }\n }, {\n key: \"getPopupDomNode\",\n value: function getPopupDomNode() {\n var _this$popupRef$curren2;\n\n // for test\n return ((_this$popupRef$curren2 = this.popupRef.current) === null || _this$popupRef$curren2 === void 0 ? void 0 : _this$popupRef$curren2.getElement()) || null;\n }\n }, {\n key: \"getPopupAlign\",\n value: function getPopupAlign() {\n var props = this.props;\n var popupPlacement = props.popupPlacement,\n popupAlign = props.popupAlign,\n builtinPlacements = props.builtinPlacements;\n\n if (popupPlacement && builtinPlacements) {\n return (0,_utils_alignUtil__WEBPACK_IMPORTED_MODULE_16__.getAlignFromPlacement)(builtinPlacements, popupPlacement, popupAlign);\n }\n\n return popupAlign;\n }\n /**\n * @param popupVisible Show or not the popup element\n * @param event SyntheticEvent, used for `pointAlign`\n */\n\n }, {\n key: \"setPopupVisible\",\n value: function setPopupVisible(popupVisible, event) {\n var alignPoint = this.props.alignPoint;\n var prevPopupVisible = this.state.popupVisible;\n this.clearDelayTimer();\n\n if (prevPopupVisible !== popupVisible) {\n if (!('popupVisible' in this.props)) {\n this.setState({\n popupVisible: popupVisible,\n prevPopupVisible: prevPopupVisible\n });\n }\n\n this.props.onPopupVisibleChange(popupVisible);\n } // Always record the point position since mouseEnterDelay will delay the show\n\n\n if (alignPoint && event && popupVisible) {\n this.setPoint(event);\n }\n }\n }, {\n key: \"delaySetPopupVisible\",\n value: function delaySetPopupVisible(visible, delayS, event) {\n var _this2 = this;\n\n var delay = delayS * 1000;\n this.clearDelayTimer();\n\n if (delay) {\n var point = event ? {\n pageX: event.pageX,\n pageY: event.pageY\n } : null;\n this.delayTimer = window.setTimeout(function () {\n _this2.setPopupVisible(visible, point);\n\n _this2.clearDelayTimer();\n }, delay);\n } else {\n this.setPopupVisible(visible, event);\n }\n }\n }, {\n key: \"clearDelayTimer\",\n value: function clearDelayTimer() {\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n }\n }, {\n key: \"clearOutsideHandler\",\n value: function clearOutsideHandler() {\n if (this.clickOutsideHandler) {\n this.clickOutsideHandler.remove();\n this.clickOutsideHandler = null;\n }\n\n if (this.contextMenuOutsideHandler1) {\n this.contextMenuOutsideHandler1.remove();\n this.contextMenuOutsideHandler1 = null;\n }\n\n if (this.contextMenuOutsideHandler2) {\n this.contextMenuOutsideHandler2.remove();\n this.contextMenuOutsideHandler2 = null;\n }\n\n if (this.touchOutsideHandler) {\n this.touchOutsideHandler.remove();\n this.touchOutsideHandler = null;\n }\n }\n }, {\n key: \"createTwoChains\",\n value: function createTwoChains(event) {\n var childPros = this.props.children.props;\n var props = this.props;\n\n if (childPros[event] && props[event]) {\n return this[\"fire\".concat(event)];\n }\n\n return childPros[event] || props[event];\n }\n }, {\n key: \"isClickToShow\",\n value: function isClickToShow() {\n var _this$props4 = this.props,\n action = _this$props4.action,\n showAction = _this$props4.showAction;\n return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1;\n }\n }, {\n key: \"isContextMenuToShow\",\n value: function isContextMenuToShow() {\n var _this$props5 = this.props,\n action = _this$props5.action,\n showAction = _this$props5.showAction;\n return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1;\n }\n }, {\n key: \"isClickToHide\",\n value: function isClickToHide() {\n var _this$props6 = this.props,\n action = _this$props6.action,\n hideAction = _this$props6.hideAction;\n return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1;\n }\n }, {\n key: \"isMouseEnterToShow\",\n value: function isMouseEnterToShow() {\n var _this$props7 = this.props,\n action = _this$props7.action,\n showAction = _this$props7.showAction;\n return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1;\n }\n }, {\n key: \"isMouseLeaveToHide\",\n value: function isMouseLeaveToHide() {\n var _this$props8 = this.props,\n action = _this$props8.action,\n hideAction = _this$props8.hideAction;\n return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1;\n }\n }, {\n key: \"isFocusToShow\",\n value: function isFocusToShow() {\n var _this$props9 = this.props,\n action = _this$props9.action,\n showAction = _this$props9.showAction;\n return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1;\n }\n }, {\n key: \"isBlurToHide\",\n value: function isBlurToHide() {\n var _this$props10 = this.props,\n action = _this$props10.action,\n hideAction = _this$props10.hideAction;\n return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1;\n }\n }, {\n key: \"forcePopupAlign\",\n value: function forcePopupAlign() {\n if (this.state.popupVisible) {\n var _this$popupRef$curren3;\n\n (_this$popupRef$curren3 = this.popupRef.current) === null || _this$popupRef$curren3 === void 0 ? void 0 : _this$popupRef$curren3.forceAlign();\n }\n }\n }, {\n key: \"fireEvents\",\n value: function fireEvents(type, e) {\n var childCallback = this.props.children.props[type];\n\n if (childCallback) {\n childCallback(e);\n }\n\n var callback = this.props[type];\n\n if (callback) {\n callback(e);\n }\n }\n }, {\n key: \"close\",\n value: function close() {\n this.setPopupVisible(false);\n }\n }, {\n key: \"render\",\n value: function render() {\n var popupVisible = this.state.popupVisible;\n var _this$props11 = this.props,\n children = _this$props11.children,\n forceRender = _this$props11.forceRender,\n alignPoint = _this$props11.alignPoint,\n className = _this$props11.className,\n autoDestroy = _this$props11.autoDestroy;\n var child = react__WEBPACK_IMPORTED_MODULE_7__.Children.only(children);\n var newChildProps = {\n key: 'trigger'\n }; // ============================== Visible Handlers ==============================\n // >>> ContextMenu\n\n if (this.isContextMenuToShow()) {\n newChildProps.onContextMenu = this.onContextMenu;\n } else {\n newChildProps.onContextMenu = this.createTwoChains('onContextMenu');\n } // >>> Click\n\n\n if (this.isClickToHide() || this.isClickToShow()) {\n newChildProps.onClick = this.onClick;\n newChildProps.onMouseDown = this.onMouseDown;\n newChildProps.onTouchStart = this.onTouchStart;\n } else {\n newChildProps.onClick = this.createTwoChains('onClick');\n newChildProps.onMouseDown = this.createTwoChains('onMouseDown');\n newChildProps.onTouchStart = this.createTwoChains('onTouchStart');\n } // >>> Hover(enter)\n\n\n if (this.isMouseEnterToShow()) {\n newChildProps.onMouseEnter = this.onMouseEnter; // Point align\n\n if (alignPoint) {\n newChildProps.onMouseMove = this.onMouseMove;\n }\n } else {\n newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter');\n } // >>> Hover(leave)\n\n\n if (this.isMouseLeaveToHide()) {\n newChildProps.onMouseLeave = this.onMouseLeave;\n } else {\n newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave');\n } // >>> Focus\n\n\n if (this.isFocusToShow() || this.isBlurToHide()) {\n newChildProps.onFocus = this.onFocus;\n newChildProps.onBlur = this.onBlur;\n } else {\n newChildProps.onFocus = this.createTwoChains('onFocus');\n newChildProps.onBlur = this.createTwoChains('onBlur');\n } // =================================== Render ===================================\n\n\n var childrenClassName = classnames__WEBPACK_IMPORTED_MODULE_15___default()(child && child.props && child.props.className, className);\n\n if (childrenClassName) {\n newChildProps.className = childrenClassName;\n }\n\n var cloneProps = (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__.default)({}, newChildProps);\n\n if ((0,rc_util_es_ref__WEBPACK_IMPORTED_MODULE_12__.supportRef)(child)) {\n cloneProps.ref = (0,rc_util_es_ref__WEBPACK_IMPORTED_MODULE_12__.composeRef)(this.triggerRef, child.ref);\n }\n\n var trigger = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__.cloneElement(child, cloneProps);\n var portal; // prevent unmounting after it's rendered\n\n if (popupVisible || this.popupRef.current || forceRender) {\n portal = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__.createElement(PortalComponent, {\n key: \"portal\",\n getContainer: this.getContainer,\n didUpdate: this.handlePortalUpdate\n }, this.getComponent());\n }\n\n if (!popupVisible && autoDestroy) {\n portal = null;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__.createElement(_context__WEBPACK_IMPORTED_MODULE_18__.default.Provider, {\n value: {\n onPopupMouseDown: this.onPopupMouseDown\n }\n }, trigger, portal);\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(_ref, prevState) {\n var popupVisible = _ref.popupVisible;\n var newState = {};\n\n if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {\n newState.popupVisible = popupVisible;\n newState.prevPopupVisible = prevState.popupVisible;\n }\n\n return newState;\n }\n }]);\n\n return Trigger;\n }(react__WEBPACK_IMPORTED_MODULE_7__.Component);\n\n Trigger.contextType = _context__WEBPACK_IMPORTED_MODULE_18__.default;\n Trigger.defaultProps = {\n prefixCls: 'rc-trigger-popup',\n getPopupClassNameFromAlign: returnEmptyString,\n getDocument: returnDocument,\n onPopupVisibleChange: noop,\n afterPopupVisibleChange: noop,\n onPopupAlign: noop,\n popupClassName: '',\n mouseEnterDelay: 0,\n mouseLeaveDelay: 0.1,\n focusDelay: 0,\n blurDelay: 0.15,\n popupStyle: {},\n destroyPopupOnHide: false,\n popupAlign: {},\n defaultPopupVisible: false,\n mask: false,\n maskClosable: true,\n action: [],\n showAction: [],\n hideAction: [],\n autoDestroy: false\n };\n return Trigger;\n}", "function generateTrigger(PortalComponent) {\n var Trigger = /*#__PURE__*/function (_React$Component) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_inherits__[\"a\" /* default */])(Trigger, _React$Component);\n\n var _super = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_helpers_esm_createSuper__[\"a\" /* default */])(Trigger);\n\n function Trigger(props) {\n var _this;\n\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_classCallCheck__[\"a\" /* default */])(this, Trigger);\n\n _this = _super.call(this, props);\n _this.popupRef = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_7_react__[\"createRef\"]();\n _this.triggerRef = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_7_react__[\"createRef\"]();\n\n _this.onMouseEnter = function (e) {\n var mouseEnterDelay = _this.props.mouseEnterDelay;\n\n _this.fireEvents('onMouseEnter', e);\n\n _this.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e);\n };\n\n _this.onMouseMove = function (e) {\n _this.fireEvents('onMouseMove', e);\n\n _this.setPoint(e);\n };\n\n _this.onMouseLeave = function (e) {\n _this.fireEvents('onMouseLeave', e);\n\n _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n };\n\n _this.onPopupMouseEnter = function () {\n _this.clearDelayTimer();\n };\n\n _this.onPopupMouseLeave = function (e) {\n var _this$popupRef$curren;\n\n // https://github.com/react-component/trigger/pull/13\n // react bug?\n if (e.relatedTarget && !e.relatedTarget.setTimeout && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10_rc_util_es_Dom_contains__[\"a\" /* default */])((_this$popupRef$curren = _this.popupRef.current) === null || _this$popupRef$curren === void 0 ? void 0 : _this$popupRef$curren.getElement(), e.relatedTarget)) {\n return;\n }\n\n _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n };\n\n _this.onFocus = function (e) {\n _this.fireEvents('onFocus', e); // incase focusin and focusout\n\n\n _this.clearDelayTimer();\n\n if (_this.isFocusToShow()) {\n _this.focusTime = Date.now();\n\n _this.delaySetPopupVisible(true, _this.props.focusDelay);\n }\n };\n\n _this.onMouseDown = function (e) {\n _this.fireEvents('onMouseDown', e);\n\n _this.preClickTime = Date.now();\n };\n\n _this.onTouchStart = function (e) {\n _this.fireEvents('onTouchStart', e);\n\n _this.preTouchTime = Date.now();\n };\n\n _this.onBlur = function (e) {\n _this.fireEvents('onBlur', e);\n\n _this.clearDelayTimer();\n\n if (_this.isBlurToHide()) {\n _this.delaySetPopupVisible(false, _this.props.blurDelay);\n }\n };\n\n _this.onContextMenu = function (e) {\n e.preventDefault();\n\n _this.fireEvents('onContextMenu', e);\n\n _this.setPopupVisible(true, e);\n };\n\n _this.onContextMenuClose = function () {\n if (_this.isContextMenuToShow()) {\n _this.close();\n }\n };\n\n _this.onClick = function (event) {\n _this.fireEvents('onClick', event); // focus will trigger click\n\n\n if (_this.focusTime) {\n var preTime;\n\n if (_this.preClickTime && _this.preTouchTime) {\n preTime = Math.min(_this.preClickTime, _this.preTouchTime);\n } else if (_this.preClickTime) {\n preTime = _this.preClickTime;\n } else if (_this.preTouchTime) {\n preTime = _this.preTouchTime;\n }\n\n if (Math.abs(preTime - _this.focusTime) < 20) {\n return;\n }\n\n _this.focusTime = 0;\n }\n\n _this.preClickTime = 0;\n _this.preTouchTime = 0; // Only prevent default when all the action is click.\n // https://github.com/ant-design/ant-design/issues/17043\n // https://github.com/ant-design/ant-design/issues/17291\n\n if (_this.isClickToShow() && (_this.isClickToHide() || _this.isBlurToHide()) && event && event.preventDefault) {\n event.preventDefault();\n }\n\n var nextVisible = !_this.state.popupVisible;\n\n if (_this.isClickToHide() && !nextVisible || nextVisible && _this.isClickToShow()) {\n _this.setPopupVisible(!_this.state.popupVisible, event);\n }\n };\n\n _this.onPopupMouseDown = function () {\n _this.hasPopupMouseDown = true;\n clearTimeout(_this.mouseDownTimeout);\n _this.mouseDownTimeout = window.setTimeout(function () {\n _this.hasPopupMouseDown = false;\n }, 0);\n\n if (_this.context) {\n var _this$context;\n\n (_this$context = _this.context).onPopupMouseDown.apply(_this$context, arguments);\n }\n };\n\n _this.onDocumentClick = function (event) {\n if (_this.props.mask && !_this.props.maskClosable) {\n return;\n }\n\n var target = event.target;\n\n var root = _this.getRootDomNode();\n\n var popupNode = _this.getPopupDomNode();\n\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10_rc_util_es_Dom_contains__[\"a\" /* default */])(root, target) && !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10_rc_util_es_Dom_contains__[\"a\" /* default */])(popupNode, target) && !_this.hasPopupMouseDown) {\n _this.close();\n }\n };\n\n _this.getRootDomNode = function () {\n var getTriggerDOMNode = _this.props.getTriggerDOMNode;\n\n if (getTriggerDOMNode) {\n return getTriggerDOMNode(_this.triggerRef.current);\n }\n\n try {\n var domNode = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11_rc_util_es_Dom_findDOMNode__[\"a\" /* default */])(_this.triggerRef.current);\n\n if (domNode) {\n return domNode;\n }\n } catch (err) {// Do nothing\n }\n\n return __WEBPACK_IMPORTED_MODULE_8_react_dom___default.a.findDOMNode(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_assertThisInitialized__[\"a\" /* default */])(_this));\n };\n\n _this.getPopupClassNameFromAlign = function (align) {\n var className = [];\n var _this$props = _this.props,\n popupPlacement = _this$props.popupPlacement,\n builtinPlacements = _this$props.builtinPlacements,\n prefixCls = _this$props.prefixCls,\n alignPoint = _this$props.alignPoint,\n getPopupClassNameFromAlign = _this$props.getPopupClassNameFromAlign;\n\n if (popupPlacement && builtinPlacements) {\n className.push(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_16__utils_alignUtil__[\"a\" /* getAlignPopupClassName */])(builtinPlacements, prefixCls, align, alignPoint));\n }\n\n if (getPopupClassNameFromAlign) {\n className.push(getPopupClassNameFromAlign(align));\n }\n\n return className.join(' ');\n };\n\n _this.getComponent = function () {\n var _this$props2 = _this.props,\n prefixCls = _this$props2.prefixCls,\n destroyPopupOnHide = _this$props2.destroyPopupOnHide,\n popupClassName = _this$props2.popupClassName,\n onPopupAlign = _this$props2.onPopupAlign,\n popupMotion = _this$props2.popupMotion,\n popupAnimation = _this$props2.popupAnimation,\n popupTransitionName = _this$props2.popupTransitionName,\n popupStyle = _this$props2.popupStyle,\n mask = _this$props2.mask,\n maskAnimation = _this$props2.maskAnimation,\n maskTransitionName = _this$props2.maskTransitionName,\n maskMotion = _this$props2.maskMotion,\n zIndex = _this$props2.zIndex,\n popup = _this$props2.popup,\n stretch = _this$props2.stretch,\n alignPoint = _this$props2.alignPoint,\n mobile = _this$props2.mobile,\n forceRender = _this$props2.forceRender;\n var _this$state = _this.state,\n popupVisible = _this$state.popupVisible,\n point = _this$state.point;\n\n var align = _this.getPopupAlign();\n\n var mouseProps = {};\n\n if (_this.isMouseEnterToShow()) {\n mouseProps.onMouseEnter = _this.onPopupMouseEnter;\n }\n\n if (_this.isMouseLeaveToHide()) {\n mouseProps.onMouseLeave = _this.onPopupMouseLeave;\n }\n\n mouseProps.onMouseDown = _this.onPopupMouseDown;\n mouseProps.onTouchStart = _this.onPopupMouseDown;\n return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_7_react__[\"createElement\"](__WEBPACK_IMPORTED_MODULE_17__Popup__[\"a\" /* default */], __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_extends__[\"a\" /* default */])({\n prefixCls: prefixCls,\n destroyPopupOnHide: destroyPopupOnHide,\n visible: popupVisible,\n point: alignPoint && point,\n className: popupClassName,\n align: align,\n onAlign: onPopupAlign,\n animation: popupAnimation,\n getClassNameFromAlign: _this.getPopupClassNameFromAlign\n }, mouseProps, {\n stretch: stretch,\n getRootDomNode: _this.getRootDomNode,\n style: popupStyle,\n mask: mask,\n zIndex: zIndex,\n transitionName: popupTransitionName,\n maskAnimation: maskAnimation,\n maskTransitionName: maskTransitionName,\n maskMotion: maskMotion,\n ref: _this.popupRef,\n motion: popupMotion,\n mobile: mobile,\n forceRender: forceRender\n }), typeof popup === 'function' ? popup() : popup);\n };\n\n _this.attachParent = function (popupContainer) {\n __WEBPACK_IMPORTED_MODULE_9_rc_util_es_raf__[\"a\" /* default */].cancel(_this.attachId);\n var _this$props3 = _this.props,\n getPopupContainer = _this$props3.getPopupContainer,\n getDocument = _this$props3.getDocument;\n\n var domNode = _this.getRootDomNode();\n\n var mountNode;\n\n if (!getPopupContainer) {\n mountNode = getDocument(_this.getRootDomNode()).body;\n } else if (domNode || getPopupContainer.length === 0) {\n // Compatible for legacy getPopupContainer with domNode argument.\n // If no need `domNode` argument, will call directly.\n // https://codesandbox.io/s/eloquent-mclean-ss93m?file=/src/App.js\n mountNode = getPopupContainer(domNode);\n }\n\n if (mountNode) {\n mountNode.appendChild(popupContainer);\n } else {\n // Retry after frame render in case parent not ready\n _this.attachId = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9_rc_util_es_raf__[\"a\" /* default */])(function () {\n _this.attachParent(popupContainer);\n });\n }\n };\n\n _this.getContainer = function () {\n var getDocument = _this.props.getDocument;\n var popupContainer = getDocument(_this.getRootDomNode()).createElement('div'); // Make sure default popup container will never cause scrollbar appearing\n // https://github.com/react-component/trigger/issues/41\n\n popupContainer.style.position = 'absolute';\n popupContainer.style.top = '0';\n popupContainer.style.left = '0';\n popupContainer.style.width = '100%';\n\n _this.attachParent(popupContainer);\n\n return popupContainer;\n };\n\n _this.setPoint = function (point) {\n var alignPoint = _this.props.alignPoint;\n if (!alignPoint || !point) return;\n\n _this.setState({\n point: {\n pageX: point.pageX,\n pageY: point.pageY\n }\n });\n };\n\n _this.handlePortalUpdate = function () {\n if (_this.state.prevPopupVisible !== _this.state.popupVisible) {\n _this.props.afterPopupVisibleChange(_this.state.popupVisible);\n }\n };\n\n var popupVisible;\n\n if ('popupVisible' in props) {\n popupVisible = !!props.popupVisible;\n } else {\n popupVisible = !!props.defaultPopupVisible;\n }\n\n _this.state = {\n prevPopupVisible: popupVisible,\n popupVisible: popupVisible\n };\n ALL_HANDLERS.forEach(function (h) {\n _this[\"fire\".concat(h)] = function (e) {\n _this.fireEvents(h, e);\n };\n });\n return _this;\n }\n\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_createClass__[\"a\" /* default */])(Trigger, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.componentDidUpdate();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n var props = this.props;\n var state = this.state; // We must listen to `mousedown` or `touchstart`, edge case:\n // https://github.com/ant-design/ant-design/issues/5804\n // https://github.com/react-component/calendar/issues/250\n // https://github.com/react-component/trigger/issues/50\n\n if (state.popupVisible) {\n var currentDocument;\n\n if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {\n currentDocument = props.getDocument(this.getRootDomNode());\n this.clickOutsideHandler = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_13_rc_util_es_Dom_addEventListener__[\"a\" /* default */])(currentDocument, 'mousedown', this.onDocumentClick);\n } // always hide on mobile\n\n\n if (!this.touchOutsideHandler) {\n currentDocument = currentDocument || props.getDocument(this.getRootDomNode());\n this.touchOutsideHandler = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_13_rc_util_es_Dom_addEventListener__[\"a\" /* default */])(currentDocument, 'touchstart', this.onDocumentClick);\n } // close popup when trigger type contains 'onContextMenu' and document is scrolling.\n\n\n if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) {\n currentDocument = currentDocument || props.getDocument(this.getRootDomNode());\n this.contextMenuOutsideHandler1 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_13_rc_util_es_Dom_addEventListener__[\"a\" /* default */])(currentDocument, 'scroll', this.onContextMenuClose);\n } // close popup when trigger type contains 'onContextMenu' and window is blur.\n\n\n if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) {\n this.contextMenuOutsideHandler2 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_13_rc_util_es_Dom_addEventListener__[\"a\" /* default */])(window, 'blur', this.onContextMenuClose);\n }\n\n return;\n }\n\n this.clearOutsideHandler();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.clearDelayTimer();\n this.clearOutsideHandler();\n clearTimeout(this.mouseDownTimeout);\n __WEBPACK_IMPORTED_MODULE_9_rc_util_es_raf__[\"a\" /* default */].cancel(this.attachId);\n }\n }, {\n key: \"getPopupDomNode\",\n value: function getPopupDomNode() {\n var _this$popupRef$curren2;\n\n // for test\n return ((_this$popupRef$curren2 = this.popupRef.current) === null || _this$popupRef$curren2 === void 0 ? void 0 : _this$popupRef$curren2.getElement()) || null;\n }\n }, {\n key: \"getPopupAlign\",\n value: function getPopupAlign() {\n var props = this.props;\n var popupPlacement = props.popupPlacement,\n popupAlign = props.popupAlign,\n builtinPlacements = props.builtinPlacements;\n\n if (popupPlacement && builtinPlacements) {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_16__utils_alignUtil__[\"b\" /* getAlignFromPlacement */])(builtinPlacements, popupPlacement, popupAlign);\n }\n\n return popupAlign;\n }\n /**\n * @param popupVisible Show or not the popup element\n * @param event SyntheticEvent, used for `pointAlign`\n */\n\n }, {\n key: \"setPopupVisible\",\n value: function setPopupVisible(popupVisible, event) {\n var alignPoint = this.props.alignPoint;\n var prevPopupVisible = this.state.popupVisible;\n this.clearDelayTimer();\n\n if (prevPopupVisible !== popupVisible) {\n if (!('popupVisible' in this.props)) {\n this.setState({\n popupVisible: popupVisible,\n prevPopupVisible: prevPopupVisible\n });\n }\n\n this.props.onPopupVisibleChange(popupVisible);\n } // Always record the point position since mouseEnterDelay will delay the show\n\n\n if (alignPoint && event && popupVisible) {\n this.setPoint(event);\n }\n }\n }, {\n key: \"delaySetPopupVisible\",\n value: function delaySetPopupVisible(visible, delayS, event) {\n var _this2 = this;\n\n var delay = delayS * 1000;\n this.clearDelayTimer();\n\n if (delay) {\n var point = event ? {\n pageX: event.pageX,\n pageY: event.pageY\n } : null;\n this.delayTimer = window.setTimeout(function () {\n _this2.setPopupVisible(visible, point);\n\n _this2.clearDelayTimer();\n }, delay);\n } else {\n this.setPopupVisible(visible, event);\n }\n }\n }, {\n key: \"clearDelayTimer\",\n value: function clearDelayTimer() {\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n }\n }, {\n key: \"clearOutsideHandler\",\n value: function clearOutsideHandler() {\n if (this.clickOutsideHandler) {\n this.clickOutsideHandler.remove();\n this.clickOutsideHandler = null;\n }\n\n if (this.contextMenuOutsideHandler1) {\n this.contextMenuOutsideHandler1.remove();\n this.contextMenuOutsideHandler1 = null;\n }\n\n if (this.contextMenuOutsideHandler2) {\n this.contextMenuOutsideHandler2.remove();\n this.contextMenuOutsideHandler2 = null;\n }\n\n if (this.touchOutsideHandler) {\n this.touchOutsideHandler.remove();\n this.touchOutsideHandler = null;\n }\n }\n }, {\n key: \"createTwoChains\",\n value: function createTwoChains(event) {\n var childPros = this.props.children.props;\n var props = this.props;\n\n if (childPros[event] && props[event]) {\n return this[\"fire\".concat(event)];\n }\n\n return childPros[event] || props[event];\n }\n }, {\n key: \"isClickToShow\",\n value: function isClickToShow() {\n var _this$props4 = this.props,\n action = _this$props4.action,\n showAction = _this$props4.showAction;\n return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1;\n }\n }, {\n key: \"isContextMenuToShow\",\n value: function isContextMenuToShow() {\n var _this$props5 = this.props,\n action = _this$props5.action,\n showAction = _this$props5.showAction;\n return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1;\n }\n }, {\n key: \"isClickToHide\",\n value: function isClickToHide() {\n var _this$props6 = this.props,\n action = _this$props6.action,\n hideAction = _this$props6.hideAction;\n return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1;\n }\n }, {\n key: \"isMouseEnterToShow\",\n value: function isMouseEnterToShow() {\n var _this$props7 = this.props,\n action = _this$props7.action,\n showAction = _this$props7.showAction;\n return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1;\n }\n }, {\n key: \"isMouseLeaveToHide\",\n value: function isMouseLeaveToHide() {\n var _this$props8 = this.props,\n action = _this$props8.action,\n hideAction = _this$props8.hideAction;\n return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1;\n }\n }, {\n key: \"isFocusToShow\",\n value: function isFocusToShow() {\n var _this$props9 = this.props,\n action = _this$props9.action,\n showAction = _this$props9.showAction;\n return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1;\n }\n }, {\n key: \"isBlurToHide\",\n value: function isBlurToHide() {\n var _this$props10 = this.props,\n action = _this$props10.action,\n hideAction = _this$props10.hideAction;\n return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1;\n }\n }, {\n key: \"forcePopupAlign\",\n value: function forcePopupAlign() {\n if (this.state.popupVisible) {\n var _this$popupRef$curren3;\n\n (_this$popupRef$curren3 = this.popupRef.current) === null || _this$popupRef$curren3 === void 0 ? void 0 : _this$popupRef$curren3.forceAlign();\n }\n }\n }, {\n key: \"fireEvents\",\n value: function fireEvents(type, e) {\n var childCallback = this.props.children.props[type];\n\n if (childCallback) {\n childCallback(e);\n }\n\n var callback = this.props[type];\n\n if (callback) {\n callback(e);\n }\n }\n }, {\n key: \"close\",\n value: function close() {\n this.setPopupVisible(false);\n }\n }, {\n key: \"render\",\n value: function render() {\n var popupVisible = this.state.popupVisible;\n var _this$props11 = this.props,\n children = _this$props11.children,\n forceRender = _this$props11.forceRender,\n alignPoint = _this$props11.alignPoint,\n className = _this$props11.className,\n autoDestroy = _this$props11.autoDestroy;\n var child = __WEBPACK_IMPORTED_MODULE_7_react__[\"Children\"].only(children);\n var newChildProps = {\n key: 'trigger'\n }; // ============================== Visible Handlers ==============================\n // >>> ContextMenu\n\n if (this.isContextMenuToShow()) {\n newChildProps.onContextMenu = this.onContextMenu;\n } else {\n newChildProps.onContextMenu = this.createTwoChains('onContextMenu');\n } // >>> Click\n\n\n if (this.isClickToHide() || this.isClickToShow()) {\n newChildProps.onClick = this.onClick;\n newChildProps.onMouseDown = this.onMouseDown;\n newChildProps.onTouchStart = this.onTouchStart;\n } else {\n newChildProps.onClick = this.createTwoChains('onClick');\n newChildProps.onMouseDown = this.createTwoChains('onMouseDown');\n newChildProps.onTouchStart = this.createTwoChains('onTouchStart');\n } // >>> Hover(enter)\n\n\n if (this.isMouseEnterToShow()) {\n newChildProps.onMouseEnter = this.onMouseEnter; // Point align\n\n if (alignPoint) {\n newChildProps.onMouseMove = this.onMouseMove;\n }\n } else {\n newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter');\n } // >>> Hover(leave)\n\n\n if (this.isMouseLeaveToHide()) {\n newChildProps.onMouseLeave = this.onMouseLeave;\n } else {\n newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave');\n } // >>> Focus\n\n\n if (this.isFocusToShow() || this.isBlurToHide()) {\n newChildProps.onFocus = this.onFocus;\n newChildProps.onBlur = this.onBlur;\n } else {\n newChildProps.onFocus = this.createTwoChains('onFocus');\n newChildProps.onBlur = this.createTwoChains('onBlur');\n } // =================================== Render ===================================\n\n\n var childrenClassName = __WEBPACK_IMPORTED_MODULE_15_classnames___default()(child && child.props && child.props.className, className);\n\n if (childrenClassName) {\n newChildProps.className = childrenClassName;\n }\n\n var cloneProps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectSpread2__[\"a\" /* default */])({}, newChildProps);\n\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12_rc_util_es_ref__[\"b\" /* supportRef */])(child)) {\n cloneProps.ref = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_12_rc_util_es_ref__[\"c\" /* composeRef */])(this.triggerRef, child.ref);\n }\n\n var trigger = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_7_react__[\"cloneElement\"](child, cloneProps);\n var portal; // prevent unmounting after it's rendered\n\n if (popupVisible || this.popupRef.current || forceRender) {\n portal = /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_7_react__[\"createElement\"](PortalComponent, {\n key: \"portal\",\n getContainer: this.getContainer,\n didUpdate: this.handlePortalUpdate\n }, this.getComponent());\n }\n\n if (!popupVisible && autoDestroy) {\n portal = null;\n }\n\n return /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_7_react__[\"createElement\"](__WEBPACK_IMPORTED_MODULE_18__context__[\"a\" /* default */].Provider, {\n value: {\n onPopupMouseDown: this.onPopupMouseDown\n }\n }, trigger, portal);\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(_ref, prevState) {\n var popupVisible = _ref.popupVisible;\n var newState = {};\n\n if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {\n newState.popupVisible = popupVisible;\n newState.prevPopupVisible = prevState.popupVisible;\n }\n\n return newState;\n }\n }]);\n\n return Trigger;\n }(__WEBPACK_IMPORTED_MODULE_7_react__[\"Component\"]);\n\n Trigger.contextType = __WEBPACK_IMPORTED_MODULE_18__context__[\"a\" /* default */];\n Trigger.defaultProps = {\n prefixCls: 'rc-trigger-popup',\n getPopupClassNameFromAlign: returnEmptyString,\n getDocument: returnDocument,\n onPopupVisibleChange: noop,\n afterPopupVisibleChange: noop,\n onPopupAlign: noop,\n popupClassName: '',\n mouseEnterDelay: 0,\n mouseLeaveDelay: 0.1,\n focusDelay: 0,\n blurDelay: 0.15,\n popupStyle: {},\n destroyPopupOnHide: false,\n popupAlign: {},\n defaultPopupVisible: false,\n mask: false,\n maskClosable: true,\n action: [],\n showAction: [],\n hideAction: [],\n autoDestroy: false\n };\n return Trigger;\n}", "function ClickAwayListener(props) {\n var children = props.children,\n _props$disableReactTr = props.disableReactTree,\n disableReactTree = _props$disableReactTr === void 0 ? false : _props$disableReactTr,\n _props$mouseEvent = props.mouseEvent,\n mouseEvent = _props$mouseEvent === void 0 ? 'onClick' : _props$mouseEvent,\n onClickAway = props.onClickAway,\n _props$touchEvent = props.touchEvent,\n touchEvent = _props$touchEvent === void 0 ? 'onTouchEnd' : _props$touchEvent;\n var movedRef = React.useRef(false);\n var nodeRef = React.useRef(null);\n var activatedRef = React.useRef(false);\n var syntheticEventRef = React.useRef(false);\n React.useEffect(function () {\n // Ensure that this component is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n setTimeout(function () {\n activatedRef.current = true;\n }, 0);\n return function () {\n activatedRef.current = false;\n };\n }, []); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = React.useCallback(function (instance) {\n // #StrictMode ready\n nodeRef.current = ReactDOM.findDOMNode(instance);\n }, []);\n var handleRef = (0, _useForkRef.default)(children.ref, handleOwnRef); // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviours like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n\n var handleClickAway = (0, _useEventCallback.default)(function (event) {\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n var insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false; // 1. IE 11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n\n if (!activatedRef.current || !nodeRef.current || clickedRootScrollbar(event)) {\n return;\n } // Do not act if user performed touchmove\n\n\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n\n var insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n // TODO v6 remove dead logic https://caniuse.com/#search=composedPath.\n var doc = (0, _ownerDocument.default)(nodeRef.current);\n insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target);\n }\n\n if (!insideDOM && (disableReactTree || !insideReactTree)) {\n onClickAway(event);\n }\n }); // Keep track of mouse/touch events that bubbled up through the portal.\n\n var createHandleSynthetic = function createHandleSynthetic(handlerName) {\n return function (event) {\n syntheticEventRef.current = true;\n var childrenPropsHandler = children.props[handlerName];\n\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n };\n\n var childrenProps = {\n ref: handleRef\n };\n\n if (touchEvent !== false) {\n childrenProps[touchEvent] = createHandleSynthetic(touchEvent);\n }\n\n React.useEffect(function () {\n if (touchEvent !== false) {\n var mappedTouchEvent = mapEventPropToEvent(touchEvent);\n var doc = (0, _ownerDocument.default)(nodeRef.current);\n\n var handleTouchMove = function handleTouchMove() {\n movedRef.current = true;\n };\n\n doc.addEventListener(mappedTouchEvent, handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return function () {\n doc.removeEventListener(mappedTouchEvent, handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n\n return undefined;\n }, [handleClickAway, touchEvent]);\n\n if (mouseEvent !== false) {\n childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);\n }\n\n React.useEffect(function () {\n if (mouseEvent !== false) {\n var mappedMouseEvent = mapEventPropToEvent(mouseEvent);\n var doc = (0, _ownerDocument.default)(nodeRef.current);\n doc.addEventListener(mappedMouseEvent, handleClickAway);\n return function () {\n doc.removeEventListener(mappedMouseEvent, handleClickAway);\n };\n }\n\n return undefined;\n }, [handleClickAway, mouseEvent]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.cloneElement(children, childrenProps));\n}", "mouseOver() {\n this.setState({ hover: true });\n }", "onMouseUp(event) {\n this.setState({ moving: false });\n event.stopPropagation();\n event.preventDefault();\n }", "function ClickAwayListener(props) {\n var children = props.children,\n _props$disableReactTr = props.disableReactTree,\n disableReactTree = _props$disableReactTr === void 0 ? false : _props$disableReactTr,\n _props$mouseEvent = props.mouseEvent,\n mouseEvent = _props$mouseEvent === void 0 ? 'onClick' : _props$mouseEvent,\n onClickAway = props.onClickAway,\n _props$touchEvent = props.touchEvent,\n touchEvent = _props$touchEvent === void 0 ? 'onTouchEnd' : _props$touchEvent;\n var movedRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](false);\n var nodeRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](null);\n var mountedRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](false);\n var syntheticEventRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](false);\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n mountedRef.current = true;\n return function () {\n mountedRef.current = false;\n };\n }, []); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useCallback\"](function (instance) {\n // #StrictMode ready\n nodeRef.current = react_dom__WEBPACK_IMPORTED_MODULE_1__[\"findDOMNode\"](instance);\n }, []);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(children.ref, handleOwnRef); // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviours like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n\n var handleClickAway = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (event) {\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n var insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false; // 1. IE 11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n\n if (!mountedRef.current || !nodeRef.current || clickedRootScrollbar(event)) {\n return;\n } // Do not act if user performed touchmove\n\n\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n\n var insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n // TODO v6 remove dead logic https://caniuse.com/#search=composedPath.\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(nodeRef.current);\n insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target);\n }\n\n if (!insideDOM && (disableReactTree || !insideReactTree)) {\n onClickAway(event);\n }\n }); // Keep track of mouse/touch events that bubbled up through the portal.\n\n var createHandleSynthetic = function createHandleSynthetic(handlerName) {\n return function (event) {\n syntheticEventRef.current = true;\n var childrenPropsHandler = children.props[handlerName];\n\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n };\n\n var childrenProps = {\n ref: handleRef\n };\n\n if (touchEvent !== false) {\n childrenProps[touchEvent] = createHandleSynthetic(touchEvent);\n }\n\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n if (touchEvent !== false) {\n var mappedTouchEvent = mapEventPropToEvent(touchEvent);\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(nodeRef.current);\n\n var handleTouchMove = function handleTouchMove() {\n movedRef.current = true;\n };\n\n doc.addEventListener(mappedTouchEvent, handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return function () {\n doc.removeEventListener(mappedTouchEvent, handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n\n return undefined;\n }, [handleClickAway, touchEvent]);\n\n if (mouseEvent !== false) {\n childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);\n }\n\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n if (mouseEvent !== false) {\n var mappedMouseEvent = mapEventPropToEvent(mouseEvent);\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(nodeRef.current);\n doc.addEventListener(mappedMouseEvent, handleClickAway);\n return function () {\n doc.removeEventListener(mappedMouseEvent, handleClickAway);\n };\n }\n\n return undefined;\n }, [handleClickAway, mouseEvent]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"cloneElement\"](children, childrenProps));\n}", "function ClickAwayListener(props) {\n var children = props.children,\n _props$disableReactTr = props.disableReactTree,\n disableReactTree = _props$disableReactTr === void 0 ? false : _props$disableReactTr,\n _props$mouseEvent = props.mouseEvent,\n mouseEvent = _props$mouseEvent === void 0 ? 'onClick' : _props$mouseEvent,\n onClickAway = props.onClickAway,\n _props$touchEvent = props.touchEvent,\n touchEvent = _props$touchEvent === void 0 ? 'onTouchEnd' : _props$touchEvent;\n var movedRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](false);\n var nodeRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](null);\n var mountedRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](false);\n var syntheticEventRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](false);\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n mountedRef.current = true;\n return function () {\n mountedRef.current = false;\n };\n }, []); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useCallback\"](function (instance) {\n // #StrictMode ready\n nodeRef.current = react_dom__WEBPACK_IMPORTED_MODULE_1__[\"findDOMNode\"](instance);\n }, []);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(children.ref, handleOwnRef); // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviours like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n\n var handleClickAway = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (event) {\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n var insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false; // 1. IE 11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n\n if (!mountedRef.current || !nodeRef.current || clickedRootScrollbar(event)) {\n return;\n } // Do not act if user performed touchmove\n\n\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n\n var insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n // TODO v6 remove dead logic https://caniuse.com/#search=composedPath.\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(nodeRef.current);\n insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target);\n }\n\n if (!insideDOM && (disableReactTree || !insideReactTree)) {\n onClickAway(event);\n }\n }); // Keep track of mouse/touch events that bubbled up through the portal.\n\n var createHandleSynthetic = function createHandleSynthetic(handlerName) {\n return function (event) {\n syntheticEventRef.current = true;\n var childrenPropsHandler = children.props[handlerName];\n\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n };\n\n var childrenProps = {\n ref: handleRef\n };\n\n if (touchEvent !== false) {\n childrenProps[touchEvent] = createHandleSynthetic(touchEvent);\n }\n\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n if (touchEvent !== false) {\n var mappedTouchEvent = mapEventPropToEvent(touchEvent);\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(nodeRef.current);\n\n var handleTouchMove = function handleTouchMove() {\n movedRef.current = true;\n };\n\n doc.addEventListener(mappedTouchEvent, handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return function () {\n doc.removeEventListener(mappedTouchEvent, handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n\n return undefined;\n }, [handleClickAway, touchEvent]);\n\n if (mouseEvent !== false) {\n childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);\n }\n\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n if (mouseEvent !== false) {\n var mappedMouseEvent = mapEventPropToEvent(mouseEvent);\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(nodeRef.current);\n doc.addEventListener(mappedMouseEvent, handleClickAway);\n return function () {\n doc.removeEventListener(mappedMouseEvent, handleClickAway);\n };\n }\n\n return undefined;\n }, [handleClickAway, mouseEvent]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"cloneElement\"](children, childrenProps));\n}", "function ClickAwayListener(props) {\n var children = props.children,\n _props$disableReactTr = props.disableReactTree,\n disableReactTree = _props$disableReactTr === void 0 ? false : _props$disableReactTr,\n _props$mouseEvent = props.mouseEvent,\n mouseEvent = _props$mouseEvent === void 0 ? 'onClick' : _props$mouseEvent,\n onClickAway = props.onClickAway,\n _props$touchEvent = props.touchEvent,\n touchEvent = _props$touchEvent === void 0 ? 'onTouchEnd' : _props$touchEvent;\n var movedRef = react.useRef(false);\n var nodeRef = react.useRef(null);\n var activatedRef = react.useRef(false);\n var syntheticEventRef = react.useRef(false);\n react.useEffect(function () {\n // Ensure that this component is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n setTimeout(function () {\n activatedRef.current = true;\n }, 0);\n return function () {\n activatedRef.current = false;\n };\n }, []); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react.useCallback(function (instance) {\n // #StrictMode ready\n nodeRef.current = react_dom.findDOMNode(instance);\n }, []);\n var handleRef = (0,useForkRef/* default */.Z)(children.ref, handleOwnRef); // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviours like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n\n var handleClickAway = (0,useEventCallback/* default */.Z)(function (event) {\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n var insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false; // 1. IE 11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n\n if (!activatedRef.current || !nodeRef.current || clickedRootScrollbar(event)) {\n return;\n } // Do not act if user performed touchmove\n\n\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n\n var insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n // TODO v6 remove dead logic https://caniuse.com/#search=composedPath.\n var doc = (0,ownerDocument/* default */.Z)(nodeRef.current);\n insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target);\n }\n\n if (!insideDOM && (disableReactTree || !insideReactTree)) {\n onClickAway(event);\n }\n }); // Keep track of mouse/touch events that bubbled up through the portal.\n\n var createHandleSynthetic = function createHandleSynthetic(handlerName) {\n return function (event) {\n syntheticEventRef.current = true;\n var childrenPropsHandler = children.props[handlerName];\n\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n };\n\n var childrenProps = {\n ref: handleRef\n };\n\n if (touchEvent !== false) {\n childrenProps[touchEvent] = createHandleSynthetic(touchEvent);\n }\n\n react.useEffect(function () {\n if (touchEvent !== false) {\n var mappedTouchEvent = mapEventPropToEvent(touchEvent);\n var doc = (0,ownerDocument/* default */.Z)(nodeRef.current);\n\n var handleTouchMove = function handleTouchMove() {\n movedRef.current = true;\n };\n\n doc.addEventListener(mappedTouchEvent, handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return function () {\n doc.removeEventListener(mappedTouchEvent, handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n\n return undefined;\n }, [handleClickAway, touchEvent]);\n\n if (mouseEvent !== false) {\n childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);\n }\n\n react.useEffect(function () {\n if (mouseEvent !== false) {\n var mappedMouseEvent = mapEventPropToEvent(mouseEvent);\n var doc = (0,ownerDocument/* default */.Z)(nodeRef.current);\n doc.addEventListener(mappedMouseEvent, handleClickAway);\n return function () {\n doc.removeEventListener(mappedMouseEvent, handleClickAway);\n };\n }\n\n return undefined;\n }, [handleClickAway, mouseEvent]);\n return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.cloneElement(children, childrenProps));\n}", "function Dropdown(_ref) {\n var drop = _ref.drop,\n alignEnd = _ref.alignEnd,\n defaultShow = _ref.defaultShow,\n rawShow = _ref.show,\n rawOnToggle = _ref.onToggle,\n itemSelector = _ref.itemSelector,\n focusFirstItemOnShow = _ref.focusFirstItemOnShow,\n children = _ref.children;\n var forceUpdate = Object(_restart_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n\n var _useUncontrolled = Object(uncontrollable__WEBPACK_IMPORTED_MODULE_4__[\"useUncontrolled\"])({\n defaultShow: defaultShow,\n show: rawShow,\n onToggle: rawOnToggle\n }, {\n show: 'onToggle'\n }),\n show = _useUncontrolled.show,\n onToggle = _useUncontrolled.onToggle;\n\n var _useCallbackRef = Object(_restart_hooks_useCallbackRef__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(),\n toggleElement = _useCallbackRef[0],\n setToggle = _useCallbackRef[1]; // We use normal refs instead of useCallbackRef in order to populate the\n // the value as quickly as possible, otherwise the effect to focus the element\n // may run before the state value is set\n\n\n var menuRef = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])();\n var menuElement = menuRef.current;\n var setMenu = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"])(function (ref) {\n menuRef.current = ref; // ensure that a menu set triggers an update for consumers\n\n forceUpdate();\n }, [forceUpdate]);\n var lastShow = Object(_restart_hooks_usePrevious__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(show);\n var lastSourceEvent = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])(null);\n var focusInDropdown = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])(false);\n var toggle = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"])(function (event) {\n onToggle(!show, event);\n }, [onToggle, show]);\n var context = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useMemo\"])(function () {\n return {\n toggle: toggle,\n drop: drop,\n show: show,\n alignEnd: alignEnd,\n menuElement: menuElement,\n toggleElement: toggleElement,\n setMenu: setMenu,\n setToggle: setToggle\n };\n }, [toggle, drop, show, alignEnd, menuElement, toggleElement, setMenu, setToggle]);\n\n if (menuElement && lastShow && !show) {\n focusInDropdown.current = menuElement.contains(document.activeElement);\n }\n\n var focusToggle = Object(_restart_hooks_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function () {\n if (toggleElement && toggleElement.focus) {\n toggleElement.focus();\n }\n });\n var maybeFocusFirst = Object(_restart_hooks_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function () {\n var type = lastSourceEvent.current;\n var focusType = focusFirstItemOnShow;\n\n if (focusType == null) {\n focusType = menuRef.current && Object(dom_helpers_matches__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(menuRef.current, '[role=menu]') ? 'keyboard' : false;\n }\n\n if (focusType === false || focusType === 'keyboard' && !/^key.+$/.test(type)) {\n return;\n }\n\n var first = Object(dom_helpers_querySelectorAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(menuRef.current, itemSelector)[0];\n if (first && first.focus) first.focus();\n });\n Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"])(function () {\n if (show) maybeFocusFirst();else if (focusInDropdown.current) {\n focusInDropdown.current = false;\n focusToggle();\n } // only `show` should be changing\n }, [show, focusInDropdown, focusToggle, maybeFocusFirst]);\n Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"])(function () {\n lastSourceEvent.current = null;\n });\n\n var getNextFocusedChild = function getNextFocusedChild(current, offset) {\n if (!menuRef.current) return null;\n var items = Object(dom_helpers_querySelectorAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(menuRef.current, itemSelector);\n var index = items.indexOf(current) + offset;\n index = Math.max(0, Math.min(index, items.length));\n return items[index];\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n var key = event.key,\n target = event.target; // Second only to https://github.com/twbs/bootstrap/blob/8cfbf6933b8a0146ac3fbc369f19e520bd1ebdac/js/src/dropdown.js#L400\n // in inscrutability\n\n var isInput = /input|textarea/i.test(target.tagName);\n\n if (isInput && (key === ' ' || key !== 'Escape' && menuRef.current && menuRef.current.contains(target))) {\n return;\n }\n\n lastSourceEvent.current = event.type;\n\n switch (key) {\n case 'ArrowUp':\n {\n var next = getNextFocusedChild(target, -1);\n if (next && next.focus) next.focus();\n event.preventDefault();\n return;\n }\n\n case 'ArrowDown':\n event.preventDefault();\n\n if (!show) {\n toggle(event);\n } else {\n var _next = getNextFocusedChild(target, 1);\n\n if (_next && _next.focus) _next.focus();\n }\n\n return;\n\n case 'Escape':\n case 'Tab':\n onToggle(false, event);\n break;\n\n default:\n }\n };\n\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_DropdownContext__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Provider, {\n value: context\n }, children({\n props: {\n onKeyDown: handleKeyDown\n }\n }));\n}", "function Dropdown(_ref) {\n var drop = _ref.drop,\n alignEnd = _ref.alignEnd,\n defaultShow = _ref.defaultShow,\n rawShow = _ref.show,\n rawOnToggle = _ref.onToggle,\n itemSelector = _ref.itemSelector,\n focusFirstItemOnShow = _ref.focusFirstItemOnShow,\n children = _ref.children;\n var forceUpdate = Object(_restart_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n\n var _useUncontrolled = Object(uncontrollable__WEBPACK_IMPORTED_MODULE_4__[\"useUncontrolled\"])({\n defaultShow: defaultShow,\n show: rawShow,\n onToggle: rawOnToggle\n }, {\n show: 'onToggle'\n }),\n show = _useUncontrolled.show,\n onToggle = _useUncontrolled.onToggle;\n\n var _useCallbackRef = Object(_restart_hooks_useCallbackRef__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(),\n toggleElement = _useCallbackRef[0],\n setToggle = _useCallbackRef[1]; // We use normal refs instead of useCallbackRef in order to populate the\n // the value as quickly as possible, otherwise the effect to focus the element\n // may run before the state value is set\n\n\n var menuRef = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])();\n var menuElement = menuRef.current;\n var setMenu = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"])(function (ref) {\n menuRef.current = ref; // ensure that a menu set triggers an update for consumers\n\n forceUpdate();\n }, [forceUpdate]);\n var lastShow = Object(_restart_hooks_usePrevious__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(show);\n var lastSourceEvent = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])(null);\n var focusInDropdown = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])(false);\n var toggle = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"])(function (event) {\n onToggle(!show, event);\n }, [onToggle, show]);\n var context = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useMemo\"])(function () {\n return {\n toggle: toggle,\n drop: drop,\n show: show,\n alignEnd: alignEnd,\n menuElement: menuElement,\n toggleElement: toggleElement,\n setMenu: setMenu,\n setToggle: setToggle\n };\n }, [toggle, drop, show, alignEnd, menuElement, toggleElement, setMenu, setToggle]);\n\n if (menuElement && lastShow && !show) {\n focusInDropdown.current = menuElement.contains(document.activeElement);\n }\n\n var focusToggle = Object(_restart_hooks_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function () {\n if (toggleElement && toggleElement.focus) {\n toggleElement.focus();\n }\n });\n var maybeFocusFirst = Object(_restart_hooks_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function () {\n var type = lastSourceEvent.current;\n var focusType = focusFirstItemOnShow;\n\n if (focusType == null) {\n focusType = menuRef.current && Object(dom_helpers_matches__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(menuRef.current, '[role=menu]') ? 'keyboard' : false;\n }\n\n if (focusType === false || focusType === 'keyboard' && !/^key.+$/.test(type)) {\n return;\n }\n\n var first = Object(dom_helpers_querySelectorAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(menuRef.current, itemSelector)[0];\n if (first && first.focus) first.focus();\n });\n Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"])(function () {\n if (show) maybeFocusFirst();else if (focusInDropdown.current) {\n focusInDropdown.current = false;\n focusToggle();\n } // only `show` should be changing\n }, [show, focusInDropdown, focusToggle, maybeFocusFirst]);\n Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"])(function () {\n lastSourceEvent.current = null;\n });\n\n var getNextFocusedChild = function getNextFocusedChild(current, offset) {\n if (!menuRef.current) return null;\n var items = Object(dom_helpers_querySelectorAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(menuRef.current, itemSelector);\n var index = items.indexOf(current) + offset;\n index = Math.max(0, Math.min(index, items.length));\n return items[index];\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n var key = event.key,\n target = event.target; // Second only to https://github.com/twbs/bootstrap/blob/8cfbf6933b8a0146ac3fbc369f19e520bd1ebdac/js/src/dropdown.js#L400\n // in inscrutability\n\n var isInput = /input|textarea/i.test(target.tagName);\n\n if (isInput && (key === ' ' || key !== 'Escape' && menuRef.current && menuRef.current.contains(target))) {\n return;\n }\n\n lastSourceEvent.current = event.type;\n\n switch (key) {\n case 'ArrowUp':\n {\n var next = getNextFocusedChild(target, -1);\n if (next && next.focus) next.focus();\n event.preventDefault();\n return;\n }\n\n case 'ArrowDown':\n event.preventDefault();\n\n if (!show) {\n toggle(event);\n } else {\n var _next = getNextFocusedChild(target, 1);\n\n if (_next && _next.focus) _next.focus();\n }\n\n return;\n\n case 'Escape':\n case 'Tab':\n onToggle(false, event);\n break;\n\n default:\n }\n };\n\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_DropdownContext__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Provider, {\n value: context\n }, children({\n props: {\n onKeyDown: handleKeyDown\n }\n }));\n}", "focusToggle(e) {\n let root = this;\n this.dispatchEvent(\n new CustomEvent(\"focus-changed\", {\n bubbles: true,\n composed: true,\n detail: { focus: root.focusState }\n })\n );\n // see if it has hover classes\n if (typeof root.hoverClass !== typeof undefined && !root.disabled) {\n // break class into array\n var classes = root.hoverClass.split(\" \");\n // run through each and add or remove classes\n classes.forEach(function(item, index) {\n if (item != \"\") {\n if (root.focusState) {\n root.$.button.classList.add(item);\n if (item.indexOf(\"-\") != -1) {\n root.$.icon.classList.add(item);\n }\n } else {\n root.$.button.classList.remove(item);\n if (item.indexOf(\"-\") != -1) {\n root.$.icon.classList.remove(item);\n }\n }\n }\n });\n }\n root.focusState = !root.focusState;\n }", "onMouseOut_() {\n this.updateHoverStying_(false);\n }", "handleMouseLeave() {\n this.setState({ hovered: false });\n }", "function ClickAwayListener(props) {\n var children = props.children,\n _props$disableReactTr = props.disableReactTree,\n disableReactTree = _props$disableReactTr === void 0 ? false : _props$disableReactTr,\n _props$mouseEvent = props.mouseEvent,\n mouseEvent = _props$mouseEvent === void 0 ? 'onClick' : _props$mouseEvent,\n onClickAway = props.onClickAway,\n _props$touchEvent = props.touchEvent,\n touchEvent = _props$touchEvent === void 0 ? 'onTouchEnd' : _props$touchEvent;\n var movedRef = react.exports.useRef(false);\n var nodeRef = react.exports.useRef(null);\n var activatedRef = react.exports.useRef(false);\n var syntheticEventRef = react.exports.useRef(false);\n react.exports.useEffect(function () {\n // Ensure that this component is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n setTimeout(function () {\n activatedRef.current = true;\n }, 0);\n return function () {\n activatedRef.current = false;\n };\n }, []); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react.exports.useCallback(function (instance) {\n // #StrictMode ready\n nodeRef.current = reactDom.exports.findDOMNode(instance);\n }, []);\n var handleRef = useForkRef(children.ref, handleOwnRef); // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviours like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n\n var handleClickAway = useEventCallback(function (event) {\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n var insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false; // 1. IE 11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n\n if (!activatedRef.current || !nodeRef.current || clickedRootScrollbar(event)) {\n return;\n } // Do not act if user performed touchmove\n\n\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n\n var insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n // TODO v6 remove dead logic https://caniuse.com/#search=composedPath.\n var doc = ownerDocument(nodeRef.current);\n insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target);\n }\n\n if (!insideDOM && (disableReactTree || !insideReactTree)) {\n onClickAway(event);\n }\n }); // Keep track of mouse/touch events that bubbled up through the portal.\n\n var createHandleSynthetic = function createHandleSynthetic(handlerName) {\n return function (event) {\n syntheticEventRef.current = true;\n var childrenPropsHandler = children.props[handlerName];\n\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n };\n\n var childrenProps = {\n ref: handleRef\n };\n\n if (touchEvent !== false) {\n childrenProps[touchEvent] = createHandleSynthetic(touchEvent);\n }\n\n react.exports.useEffect(function () {\n if (touchEvent !== false) {\n var mappedTouchEvent = mapEventPropToEvent(touchEvent);\n var doc = ownerDocument(nodeRef.current);\n\n var handleTouchMove = function handleTouchMove() {\n movedRef.current = true;\n };\n\n doc.addEventListener(mappedTouchEvent, handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return function () {\n doc.removeEventListener(mappedTouchEvent, handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n\n return undefined;\n }, [handleClickAway, touchEvent]);\n\n if (mouseEvent !== false) {\n childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);\n }\n\n react.exports.useEffect(function () {\n if (mouseEvent !== false) {\n var mappedMouseEvent = mapEventPropToEvent(mouseEvent);\n var doc = ownerDocument(nodeRef.current);\n doc.addEventListener(mappedMouseEvent, handleClickAway);\n return function () {\n doc.removeEventListener(mappedMouseEvent, handleClickAway);\n };\n }\n\n return undefined;\n }, [handleClickAway, mouseEvent]);\n return /*#__PURE__*/react.exports.createElement(react.exports.Fragment, null, /*#__PURE__*/react.exports.cloneElement(children, childrenProps));\n}", "hover(e) {\n this.setState({\n isToggle: !this.state.isToggle\n });\n }", "onBrandMenuHover() {\n // Below timeout to prevent when Mouse only Move through ThuongHieu-menu shown\n // wait 300ms to show Menu list\n this.timeoutBrand = setTimeout(() => {\n this.setState({\n hoveredBrandMenu: true\n })\n },300);\n }", "onMouseUp() {\n this.setState({\n mouseDown: false,\n upperHandleDown: false,\n lowerHandleDown: false\n });\n }", "onBrandMenuClick() {\n this.setState({\n hoveredBrandContainer: false,\n hoveredBrandMenu: false\n })\n }", "handleSubMenuMouseEnter() {\n this.setState({\n mouseOverSubMenu: true,\n });\n }", "function Unstable_TrapFocus(props) {\n var children = props.children, _props$disableAutoFoc = props.disableAutoFocus, disableAutoFocus = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc, _props$disableEnforce = props.disableEnforceFocus, disableEnforceFocus = _props$disableEnforce === void 0 ? false : _props$disableEnforce, _props$disableRestore = props.disableRestoreFocus, disableRestoreFocus = _props$disableRestore === void 0 ? false : _props$disableRestore, getDoc = props.getDoc, isEnabled = props.isEnabled, open = props.open;\n var ignoreNextEnforceFocus = _react.useRef();\n var sentinelStart = _react.useRef(null);\n var sentinelEnd = _react.useRef(null);\n var nodeToRestore = _react.useRef();\n var rootRef = _react.useRef(null); // can be removed once we drop support for non ref forwarding class components\n var handleOwnRef = _react.useCallback(function(instance) {\n // #StrictMode ready\n rootRef.current = _reactDom.findDOMNode(instance);\n }, []);\n var handleRef = _useForkRefDefault.default(children.ref, handleOwnRef);\n var prevOpenRef = _react.useRef();\n _react.useEffect(function() {\n prevOpenRef.current = open;\n }, [\n open\n ]);\n if (!prevOpenRef.current && open && typeof window !== 'undefined') // WARNING: Potentially unsafe in concurrent mode.\n // The way the read on `nodeToRestore` is setup could make this actually safe.\n // Say we render `open={false}` -> `open={true}` but never commit.\n // We have now written a state that wasn't committed. But no committed effect\n // will read this wrong value. We only read from `nodeToRestore` in effects\n // that were committed on `open={true}`\n // WARNING: Prevents the instance from being garbage collected. Should only\n // hold a weak ref.\n nodeToRestore.current = getDoc().activeElement;\n _react.useEffect(function() {\n if (!open) return;\n var doc = _ownerDocumentDefault.default(rootRef.current); // We might render an empty child.\n if (!disableAutoFocus && rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n console.error([\n 'Material-UI: The modal content node does not accept focus.',\n \"For the benefit of assistive technologies, the tabIndex of the node is being set to \\\"-1\\\".\"\n ].join('\\n'));\n rootRef.current.setAttribute('tabIndex', -1);\n }\n rootRef.current.focus();\n }\n var contain = function contain1() {\n var rootElement = rootRef.current; // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n if (rootElement === null) return;\n if (!doc.hasFocus() || disableEnforceFocus || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n if (rootRef.current && !rootRef.current.contains(doc.activeElement)) rootRef.current.focus();\n };\n var loopFocus = function loopFocus1(event) {\n // 9 = Tab\n if (disableEnforceFocus || !isEnabled() || event.keyCode !== 9) return;\n // Make sure the next tab starts from the right place.\n if (doc.activeElement === rootRef.current) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n if (event.shiftKey) sentinelEnd.current.focus();\n else sentinelStart.current.focus();\n }\n };\n doc.addEventListener('focus', contain, true);\n doc.addEventListener('keydown', loopFocus, true); // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n var interval = setInterval(function() {\n contain();\n }, 50);\n return function() {\n clearInterval(interval);\n doc.removeEventListener('focus', contain, true);\n doc.removeEventListener('keydown', loopFocus, true); // restoreLastFocus()\n if (!disableRestoreFocus) {\n // In IE 11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE 11 have a focus method.\n // Once IE 11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) nodeToRestore.current.focus();\n nodeToRestore.current = null;\n }\n };\n }, [\n disableAutoFocus,\n disableEnforceFocus,\n disableRestoreFocus,\n isEnabled,\n open\n ]);\n return(/*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelStart,\n \"data-test\": \"sentinelStart\"\n }), /*#__PURE__*/ _react.cloneElement(children, {\n ref: handleRef\n }), /*#__PURE__*/ _react.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelEnd,\n \"data-test\": \"sentinelEnd\"\n })));\n}", "function Unstable_TrapFocus(props) {\n var children = props.children,\n _props$disableAutoFoc = props.disableAutoFocus,\n disableAutoFocus = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc,\n _props$disableEnforce = props.disableEnforceFocus,\n disableEnforceFocus = _props$disableEnforce === void 0 ? false : _props$disableEnforce,\n _props$disableRestore = props.disableRestoreFocus,\n disableRestoreFocus = _props$disableRestore === void 0 ? false : _props$disableRestore,\n getDoc = props.getDoc,\n isEnabled = props.isEnabled,\n open = props.open;\n var ignoreNextEnforceFocus = React.useRef();\n var sentinelStart = React.useRef(null);\n var sentinelEnd = React.useRef(null);\n var nodeToRestore = React.useRef();\n var rootRef = React.useRef(null); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = React.useCallback(function (instance) {\n // #StrictMode ready\n rootRef.current = ReactDOM.findDOMNode(instance);\n }, []);\n var handleRef = (0, _useForkRef.default)(children.ref, handleOwnRef);\n var prevOpenRef = React.useRef();\n React.useEffect(function () {\n prevOpenRef.current = open;\n }, [open]);\n\n if (!prevOpenRef.current && open && typeof window !== 'undefined') {\n // WARNING: Potentially unsafe in concurrent mode.\n // The way the read on `nodeToRestore` is setup could make this actually safe.\n // Say we render `open={false}` -> `open={true}` but never commit.\n // We have now written a state that wasn't committed. But no committed effect\n // will read this wrong value. We only read from `nodeToRestore` in effects\n // that were committed on `open={true}`\n // WARNING: Prevents the instance from being garbage collected. Should only\n // hold a weak ref.\n nodeToRestore.current = getDoc().activeElement;\n }\n\n React.useEffect(function () {\n if (!open) {\n return;\n }\n\n var doc = (0, _ownerDocument.default)(rootRef.current); // We might render an empty child.\n\n if (!disableAutoFocus && rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n if (\"development\" !== 'production') {\n console.error(['Material-UI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to \"-1\".'].join('\\n'));\n }\n\n rootRef.current.setAttribute('tabIndex', -1);\n }\n\n rootRef.current.focus();\n }\n\n var contain = function contain() {\n var rootElement = rootRef.current; // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n\n if (rootElement === null) {\n return;\n }\n\n if (!doc.hasFocus() || disableEnforceFocus || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n if (rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n rootRef.current.focus();\n }\n };\n\n var loopFocus = function loopFocus(event) {\n // 9 = Tab\n if (disableEnforceFocus || !isEnabled() || event.keyCode !== 9) {\n return;\n } // Make sure the next tab starts from the right place.\n\n\n if (doc.activeElement === rootRef.current) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n\n if (event.shiftKey) {\n sentinelEnd.current.focus();\n } else {\n sentinelStart.current.focus();\n }\n }\n };\n\n doc.addEventListener('focus', contain, true);\n doc.addEventListener('keydown', loopFocus, true); // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n\n var interval = setInterval(function () {\n contain();\n }, 50);\n return function () {\n clearInterval(interval);\n doc.removeEventListener('focus', contain, true);\n doc.removeEventListener('keydown', loopFocus, true); // restoreLastFocus()\n\n if (!disableRestoreFocus) {\n // In IE 11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE 11 have a focus method.\n // Once IE 11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n nodeToRestore.current.focus();\n }\n\n nodeToRestore.current = null;\n }\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelStart,\n \"data-test\": \"sentinelStart\"\n }), /*#__PURE__*/React.cloneElement(children, {\n ref: handleRef\n }), /*#__PURE__*/React.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelEnd,\n \"data-test\": \"sentinelEnd\"\n }));\n}", "onMouseOver(event) {\n const me = this;\n\n if (this.focusOnHover !== false) {\n const fromItemElement = DomHelper.up(event.relatedTarget, '.b-widget'),\n toItemElement = DomHelper.up(event.target, '.b-widget'),\n overItem = Widget.fromElement(toItemElement); // Activate soon in case they're moving fast over items.\n\n if (!DomHelper.isTouchEvent && toItemElement && toItemElement !== fromItemElement && overItem.parent === this) {\n me.setTimeout({\n fn: 'handleMouseOver',\n delay: 30,\n args: [overItem],\n cancelOutstanding: true\n });\n }\n }\n }", "function Unstable_TrapFocus(props) {\n var children = props.children,\n _props$disableAutoFoc = props.disableAutoFocus,\n disableAutoFocus = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc,\n _props$disableEnforce = props.disableEnforceFocus,\n disableEnforceFocus = _props$disableEnforce === void 0 ? false : _props$disableEnforce,\n _props$disableRestore = props.disableRestoreFocus,\n disableRestoreFocus = _props$disableRestore === void 0 ? false : _props$disableRestore,\n getDoc = props.getDoc,\n isEnabled = props.isEnabled,\n open = props.open;\n var ignoreNextEnforceFocus = react.exports.useRef();\n var sentinelStart = react.exports.useRef(null);\n var sentinelEnd = react.exports.useRef(null);\n var nodeToRestore = react.exports.useRef();\n var rootRef = react.exports.useRef(null); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react.exports.useCallback(function (instance) {\n // #StrictMode ready\n rootRef.current = reactDom.exports.findDOMNode(instance);\n }, []);\n var handleRef = useForkRef(children.ref, handleOwnRef);\n var prevOpenRef = react.exports.useRef();\n react.exports.useEffect(function () {\n prevOpenRef.current = open;\n }, [open]);\n\n if (!prevOpenRef.current && open && typeof window !== 'undefined') {\n // WARNING: Potentially unsafe in concurrent mode.\n // The way the read on `nodeToRestore` is setup could make this actually safe.\n // Say we render `open={false}` -> `open={true}` but never commit.\n // We have now written a state that wasn't committed. But no committed effect\n // will read this wrong value. We only read from `nodeToRestore` in effects\n // that were committed on `open={true}`\n // WARNING: Prevents the instance from being garbage collected. Should only\n // hold a weak ref.\n nodeToRestore.current = getDoc().activeElement;\n }\n\n react.exports.useEffect(function () {\n if (!open) {\n return;\n }\n\n var doc = ownerDocument(rootRef.current); // We might render an empty child.\n\n if (!disableAutoFocus && rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(['Material-UI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to \"-1\".'].join('\\n'));\n }\n\n rootRef.current.setAttribute('tabIndex', -1);\n }\n\n rootRef.current.focus();\n }\n\n var contain = function contain() {\n var rootElement = rootRef.current; // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n\n if (rootElement === null) {\n return;\n }\n\n if (!doc.hasFocus() || disableEnforceFocus || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n if (rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n rootRef.current.focus();\n }\n };\n\n var loopFocus = function loopFocus(event) {\n // 9 = Tab\n if (disableEnforceFocus || !isEnabled() || event.keyCode !== 9) {\n return;\n } // Make sure the next tab starts from the right place.\n\n\n if (doc.activeElement === rootRef.current) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n\n if (event.shiftKey) {\n sentinelEnd.current.focus();\n } else {\n sentinelStart.current.focus();\n }\n }\n };\n\n doc.addEventListener('focus', contain, true);\n doc.addEventListener('keydown', loopFocus, true); // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n\n var interval = setInterval(function () {\n contain();\n }, 50);\n return function () {\n clearInterval(interval);\n doc.removeEventListener('focus', contain, true);\n doc.removeEventListener('keydown', loopFocus, true); // restoreLastFocus()\n\n if (!disableRestoreFocus) {\n // In IE 11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE 11 have a focus method.\n // Once IE 11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n nodeToRestore.current.focus();\n }\n\n nodeToRestore.current = null;\n }\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open]);\n return /*#__PURE__*/react.exports.createElement(react.exports.Fragment, null, /*#__PURE__*/react.exports.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelStart,\n \"data-test\": \"sentinelStart\"\n }), /*#__PURE__*/react.exports.cloneElement(children, {\n ref: handleRef\n }), /*#__PURE__*/react.exports.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelEnd,\n \"data-test\": \"sentinelEnd\"\n }));\n}", "handleMouseUp() {\n this.setState({mouseIsPressed: false});\n }", "function ClickAwayListener(props) {\n var children = props.children,\n _props$disableReactTr = props.disableReactTree,\n disableReactTree = _props$disableReactTr === void 0 ? false : _props$disableReactTr,\n _props$mouseEvent = props.mouseEvent,\n mouseEvent = _props$mouseEvent === void 0 ? 'onClick' : _props$mouseEvent,\n onClickAway = props.onClickAway,\n _props$touchEvent = props.touchEvent,\n touchEvent = _props$touchEvent === void 0 ? 'onTouchEnd' : _props$touchEvent;\n var movedRef = react[\"useRef\"](false);\n var nodeRef = react[\"useRef\"](null);\n var mountedRef = react[\"useRef\"](false);\n var syntheticEventRef = react[\"useRef\"](false);\n react[\"useEffect\"](function () {\n mountedRef.current = true;\n return function () {\n mountedRef.current = false;\n };\n }, []); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react[\"useCallback\"](function (instance) {\n // #StrictMode ready\n nodeRef.current = react_dom[\"findDOMNode\"](instance);\n }, []);\n var handleRef = Object(useForkRef[\"a\" /* default */])(children.ref, handleOwnRef); // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviours like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n\n var handleClickAway = Object(useEventCallback[\"a\" /* default */])(function (event) {\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n var insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false; // 1. IE 11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n\n if (!mountedRef.current || !nodeRef.current || clickedRootScrollbar(event)) {\n return;\n } // Do not act if user performed touchmove\n\n\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n\n var insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n // TODO v6 remove dead logic https://caniuse.com/#search=composedPath.\n var doc = Object(ownerDocument[\"a\" /* default */])(nodeRef.current);\n insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target);\n }\n\n if (!insideDOM && (disableReactTree || !insideReactTree)) {\n onClickAway(event);\n }\n }); // Keep track of mouse/touch events that bubbled up through the portal.\n\n var createHandleSynthetic = function createHandleSynthetic(handlerName) {\n return function (event) {\n syntheticEventRef.current = true;\n var childrenPropsHandler = children.props[handlerName];\n\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n };\n\n var childrenProps = {\n ref: handleRef\n };\n\n if (touchEvent !== false) {\n childrenProps[touchEvent] = createHandleSynthetic(touchEvent);\n }\n\n react[\"useEffect\"](function () {\n if (touchEvent !== false) {\n var mappedTouchEvent = mapEventPropToEvent(touchEvent);\n var doc = Object(ownerDocument[\"a\" /* default */])(nodeRef.current);\n\n var handleTouchMove = function handleTouchMove() {\n movedRef.current = true;\n };\n\n doc.addEventListener(mappedTouchEvent, handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return function () {\n doc.removeEventListener(mappedTouchEvent, handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n\n return undefined;\n }, [handleClickAway, touchEvent]);\n\n if (mouseEvent !== false) {\n childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);\n }\n\n react[\"useEffect\"](function () {\n if (mouseEvent !== false) {\n var mappedMouseEvent = mapEventPropToEvent(mouseEvent);\n var doc = Object(ownerDocument[\"a\" /* default */])(nodeRef.current);\n doc.addEventListener(mappedMouseEvent, handleClickAway);\n return function () {\n doc.removeEventListener(mappedMouseEvent, handleClickAway);\n };\n }\n\n return undefined;\n }, [handleClickAway, mouseEvent]);\n return /*#__PURE__*/react[\"createElement\"](react[\"Fragment\"], null, /*#__PURE__*/react[\"cloneElement\"](children, childrenProps));\n}", "_dispatch(eventImpl, targetOverride /* , legacyOutputDidListenersThrowFlag */) {\n let targetImpl = this;\n let clearTargets = false;\n let activationTarget = null;\n\n eventImpl._dispatchFlag = true;\n\n targetOverride = targetOverride || targetImpl;\n let relatedTarget = retarget(eventImpl.relatedTarget, targetImpl);\n\n if (targetImpl !== relatedTarget || targetImpl === eventImpl.relatedTarget) {\n const touchTargets = [];\n\n appendToEventPath(eventImpl, targetImpl, targetOverride, relatedTarget, touchTargets, false);\n\n const isActivationEvent = MouseEvent.isImpl(eventImpl) && eventImpl.type === \"click\";\n\n if (isActivationEvent && targetImpl._hasActivationBehavior) {\n activationTarget = targetImpl;\n }\n\n let slotInClosedTree = false;\n let slotable = isSlotable(targetImpl) && targetImpl._assignedSlot ? targetImpl : null;\n let parent = getEventTargetParent(targetImpl, eventImpl);\n\n // Populate event path\n // https://dom.spec.whatwg.org/#event-path\n while (parent !== null) {\n if (slotable !== null) {\n if (parent.localName !== \"slot\") {\n throw new Error(`JSDOM Internal Error: Expected parent to be a Slot`);\n }\n\n slotable = null;\n\n const parentRoot = nodeRoot(parent);\n if (isShadowRoot(parentRoot) && parentRoot.mode === \"closed\") {\n slotInClosedTree = true;\n }\n }\n\n if (isSlotable(parent) && parent._assignedSlot) {\n slotable = parent;\n }\n\n relatedTarget = retarget(eventImpl.relatedTarget, parent);\n\n if (\n (isNode(parent) && isShadowInclusiveAncestor(nodeRoot(targetImpl), parent)) ||\n idlUtils.wrapperForImpl(parent).constructor.name === \"Window\"\n ) {\n if (isActivationEvent && eventImpl.bubbles && activationTarget === null &&\n parent._hasActivationBehavior) {\n activationTarget = parent;\n }\n\n appendToEventPath(eventImpl, parent, null, relatedTarget, touchTargets, slotInClosedTree);\n } else if (parent === relatedTarget) {\n parent = null;\n } else {\n targetImpl = parent;\n\n if (isActivationEvent && activationTarget === null && targetImpl._hasActivationBehavior) {\n activationTarget = targetImpl;\n }\n\n appendToEventPath(eventImpl, parent, targetImpl, relatedTarget, touchTargets, slotInClosedTree);\n }\n\n if (parent !== null) {\n parent = getEventTargetParent(parent, eventImpl);\n }\n\n slotInClosedTree = false;\n }\n\n let clearTargetsStructIndex = -1;\n for (let i = eventImpl._path.length - 1; i >= 0 && clearTargetsStructIndex === -1; i--) {\n if (eventImpl._path[i].target !== null) {\n clearTargetsStructIndex = i;\n }\n }\n const clearTargetsStruct = eventImpl._path[clearTargetsStructIndex];\n\n clearTargets =\n (isNode(clearTargetsStruct.target) && isShadowRoot(nodeRoot(clearTargetsStruct.target))) ||\n (isNode(clearTargetsStruct.relatedTarget) && isShadowRoot(nodeRoot(clearTargetsStruct.relatedTarget)));\n\n if (activationTarget !== null && activationTarget._legacyPreActivationBehavior) {\n activationTarget._legacyPreActivationBehavior();\n }\n\n for (let i = eventImpl._path.length - 1; i >= 0; --i) {\n const struct = eventImpl._path[i];\n\n if (struct.target !== null) {\n eventImpl.eventPhase = EVENT_PHASE.AT_TARGET;\n } else {\n eventImpl.eventPhase = EVENT_PHASE.CAPTURING_PHASE;\n }\n\n invokeEventListeners(struct, eventImpl, \"capturing\");\n }\n\n for (let i = 0; i < eventImpl._path.length; i++) {\n const struct = eventImpl._path[i];\n\n if (struct.target !== null) {\n eventImpl.eventPhase = EVENT_PHASE.AT_TARGET;\n } else {\n if (!eventImpl.bubbles) {\n continue;\n }\n\n eventImpl.eventPhase = EVENT_PHASE.BUBBLING_PHASE;\n }\n\n invokeEventListeners(struct, eventImpl, \"bubbling\");\n }\n }\n\n eventImpl.eventPhase = EVENT_PHASE.NONE;\n\n eventImpl.currentTarget = null;\n eventImpl._path = [];\n eventImpl._dispatchFlag = false;\n eventImpl._stopPropagationFlag = false;\n eventImpl._stopImmediatePropagationFlag = false;\n\n if (clearTargets) {\n eventImpl.target = null;\n eventImpl.relatedTarget = null;\n }\n\n if (activationTarget !== null) {\n if (!eventImpl._canceledFlag) {\n activationTarget._activationBehavior(eventImpl);\n } else if (activationTarget._legacyCanceledActivationBehavior) {\n activationTarget._legacyCanceledActivationBehavior();\n }\n }\n\n return !eventImpl._canceledFlag;\n }", "function Unstable_TrapFocus(props) {\n var children = props.children,\n _props$disableAutoFoc = props.disableAutoFocus,\n disableAutoFocus = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc,\n _props$disableEnforce = props.disableEnforceFocus,\n disableEnforceFocus = _props$disableEnforce === void 0 ? false : _props$disableEnforce,\n _props$disableRestore = props.disableRestoreFocus,\n disableRestoreFocus = _props$disableRestore === void 0 ? false : _props$disableRestore,\n getDoc = props.getDoc,\n isEnabled = props.isEnabled,\n open = props.open;\n var ignoreNextEnforceFocus = react.useRef();\n var sentinelStart = react.useRef(null);\n var sentinelEnd = react.useRef(null);\n var nodeToRestore = react.useRef();\n var rootRef = react.useRef(null); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react.useCallback(function (instance) {\n // #StrictMode ready\n rootRef.current = reactDom.findDOMNode(instance);\n }, []);\n var handleRef = useForkRef(children.ref, handleOwnRef);\n var prevOpenRef = react.useRef();\n react.useEffect(function () {\n prevOpenRef.current = open;\n }, [open]);\n\n if (!prevOpenRef.current && open && typeof window !== 'undefined') {\n // WARNING: Potentially unsafe in concurrent mode.\n // The way the read on `nodeToRestore` is setup could make this actually safe.\n // Say we render `open={false}` -> `open={true}` but never commit.\n // We have now written a state that wasn't committed. But no committed effect\n // will read this wrong value. We only read from `nodeToRestore` in effects\n // that were committed on `open={true}`\n // WARNING: Prevents the instance from being garbage collected. Should only\n // hold a weak ref.\n nodeToRestore.current = getDoc().activeElement;\n }\n\n react.useEffect(function () {\n if (!open) {\n return;\n }\n\n var doc = ownerDocument(rootRef.current); // We might render an empty child.\n\n if (!disableAutoFocus && rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n\n rootRef.current.setAttribute('tabIndex', -1);\n }\n\n rootRef.current.focus();\n }\n\n var contain = function contain() {\n if (!doc.hasFocus() || disableEnforceFocus || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n if (rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n rootRef.current.focus();\n }\n };\n\n var loopFocus = function loopFocus(event) {\n // 9 = Tab\n if (disableEnforceFocus || !isEnabled() || event.keyCode !== 9) {\n return;\n } // Make sure the next tab starts from the right place.\n\n\n if (doc.activeElement === rootRef.current) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n\n if (event.shiftKey) {\n sentinelEnd.current.focus();\n } else {\n sentinelStart.current.focus();\n }\n }\n };\n\n doc.addEventListener('focus', contain, true);\n doc.addEventListener('keydown', loopFocus, true); // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n\n var interval = setInterval(function () {\n contain();\n }, 50);\n return function () {\n clearInterval(interval);\n doc.removeEventListener('focus', contain, true);\n doc.removeEventListener('keydown', loopFocus, true); // restoreLastFocus()\n\n if (!disableRestoreFocus) {\n // In IE 11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE 11 have a focus method.\n // Once IE 11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n nodeToRestore.current.focus();\n }\n\n nodeToRestore.current = null;\n }\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open]);\n return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelStart,\n \"data-test\": \"sentinelStart\"\n }), react.cloneElement(children, {\n ref: handleRef\n }), /*#__PURE__*/react.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelEnd,\n \"data-test\": \"sentinelEnd\"\n }));\n }", "function generateTrigger(PortalComponent) {\n var Trigger = /*#__PURE__*/function (_React$Component) {\n (0,inherits/* default */.Z)(Trigger, _React$Component);\n var _super = (0,createSuper/* default */.Z)(Trigger);\n\n // ensure `getContainer` will be called only once\n function Trigger(props) {\n var _this;\n (0,classCallCheck/* default */.Z)(this, Trigger);\n _this = _super.call(this, props);\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"popupRef\", /*#__PURE__*/react.createRef());\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"triggerRef\", /*#__PURE__*/react.createRef());\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"portalContainer\", void 0);\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"attachId\", void 0);\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"clickOutsideHandler\", void 0);\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"touchOutsideHandler\", void 0);\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"contextMenuOutsideHandler1\", void 0);\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"contextMenuOutsideHandler2\", void 0);\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"mouseDownTimeout\", void 0);\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"focusTime\", void 0);\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"preClickTime\", void 0);\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"preTouchTime\", void 0);\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"delayTimer\", void 0);\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"hasPopupMouseDown\", void 0);\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"onMouseEnter\", function (e) {\n var mouseEnterDelay = _this.props.mouseEnterDelay;\n _this.fireEvents('onMouseEnter', e);\n _this.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e);\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"onMouseMove\", function (e) {\n _this.fireEvents('onMouseMove', e);\n _this.setPoint(e);\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"onMouseLeave\", function (e) {\n _this.fireEvents('onMouseLeave', e);\n _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"onPopupMouseEnter\", function () {\n _this.clearDelayTimer();\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"onPopupMouseLeave\", function (e) {\n var _this$popupRef$curren;\n\n // https://github.com/react-component/trigger/pull/13\n // react bug?\n if (e.relatedTarget && !e.relatedTarget.setTimeout && (0,contains/* default */.Z)((_this$popupRef$curren = _this.popupRef.current) === null || _this$popupRef$curren === void 0 ? void 0 : _this$popupRef$curren.getElement(), e.relatedTarget)) {\n return;\n }\n _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"onFocus\", function (e) {\n _this.fireEvents('onFocus', e); // incase focusin and focusout\n\n _this.clearDelayTimer();\n if (_this.isFocusToShow()) {\n _this.focusTime = Date.now();\n _this.delaySetPopupVisible(true, _this.props.focusDelay);\n }\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"onMouseDown\", function (e) {\n _this.fireEvents('onMouseDown', e);\n _this.preClickTime = Date.now();\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"onTouchStart\", function (e) {\n _this.fireEvents('onTouchStart', e);\n _this.preTouchTime = Date.now();\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"onBlur\", function (e) {\n _this.fireEvents('onBlur', e);\n _this.clearDelayTimer();\n if (_this.isBlurToHide()) {\n _this.delaySetPopupVisible(false, _this.props.blurDelay);\n }\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"onContextMenu\", function (e) {\n e.preventDefault();\n _this.fireEvents('onContextMenu', e);\n _this.setPopupVisible(true, e);\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"onContextMenuClose\", function () {\n if (_this.isContextMenuToShow()) {\n _this.close();\n }\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"onClick\", function (event) {\n _this.fireEvents('onClick', event); // focus will trigger click\n\n if (_this.focusTime) {\n var preTime;\n if (_this.preClickTime && _this.preTouchTime) {\n preTime = Math.min(_this.preClickTime, _this.preTouchTime);\n } else if (_this.preClickTime) {\n preTime = _this.preClickTime;\n } else if (_this.preTouchTime) {\n preTime = _this.preTouchTime;\n }\n if (Math.abs(preTime - _this.focusTime) < 20) {\n return;\n }\n _this.focusTime = 0;\n }\n _this.preClickTime = 0;\n _this.preTouchTime = 0; // Only prevent default when all the action is click.\n // https://github.com/ant-design/ant-design/issues/17043\n // https://github.com/ant-design/ant-design/issues/17291\n\n if (_this.isClickToShow() && (_this.isClickToHide() || _this.isBlurToHide()) && event && event.preventDefault) {\n event.preventDefault();\n }\n var nextVisible = !_this.state.popupVisible;\n if (_this.isClickToHide() && !nextVisible || nextVisible && _this.isClickToShow()) {\n _this.setPopupVisible(!_this.state.popupVisible, event);\n }\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"onPopupMouseDown\", function () {\n _this.hasPopupMouseDown = true;\n clearTimeout(_this.mouseDownTimeout);\n _this.mouseDownTimeout = window.setTimeout(function () {\n _this.hasPopupMouseDown = false;\n }, 0);\n if (_this.context) {\n var _this$context;\n (_this$context = _this.context).onPopupMouseDown.apply(_this$context, arguments);\n }\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"onDocumentClick\", function (event) {\n if (_this.props.mask && !_this.props.maskClosable) {\n return;\n }\n var target = event.target;\n var root = _this.getRootDomNode();\n var popupNode = _this.getPopupDomNode();\n if (\n // mousedown on the target should also close popup when action is contextMenu.\n // https://github.com/ant-design/ant-design/issues/29853\n (!(0,contains/* default */.Z)(root, target) || _this.isContextMenuOnly()) && !(0,contains/* default */.Z)(popupNode, target) && !_this.hasPopupMouseDown) {\n _this.close();\n }\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"getRootDomNode\", function () {\n var getTriggerDOMNode = _this.props.getTriggerDOMNode;\n if (getTriggerDOMNode) {\n return getTriggerDOMNode(_this.triggerRef.current);\n }\n try {\n var domNode = (0,findDOMNode/* default */.Z)(_this.triggerRef.current);\n if (domNode) {\n return domNode;\n }\n } catch (err) {// Do nothing\n }\n return react_dom.findDOMNode((0,assertThisInitialized/* default */.Z)(_this));\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"getPopupClassNameFromAlign\", function (align) {\n var className = [];\n var _this$props = _this.props,\n popupPlacement = _this$props.popupPlacement,\n builtinPlacements = _this$props.builtinPlacements,\n prefixCls = _this$props.prefixCls,\n alignPoint = _this$props.alignPoint,\n getPopupClassNameFromAlign = _this$props.getPopupClassNameFromAlign;\n if (popupPlacement && builtinPlacements) {\n className.push(getAlignPopupClassName(builtinPlacements, prefixCls, align, alignPoint));\n }\n if (getPopupClassNameFromAlign) {\n className.push(getPopupClassNameFromAlign(align));\n }\n return className.join(' ');\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"getComponent\", function () {\n var _this$props2 = _this.props,\n prefixCls = _this$props2.prefixCls,\n destroyPopupOnHide = _this$props2.destroyPopupOnHide,\n popupClassName = _this$props2.popupClassName,\n onPopupAlign = _this$props2.onPopupAlign,\n popupMotion = _this$props2.popupMotion,\n popupAnimation = _this$props2.popupAnimation,\n popupTransitionName = _this$props2.popupTransitionName,\n popupStyle = _this$props2.popupStyle,\n mask = _this$props2.mask,\n maskAnimation = _this$props2.maskAnimation,\n maskTransitionName = _this$props2.maskTransitionName,\n maskMotion = _this$props2.maskMotion,\n zIndex = _this$props2.zIndex,\n popup = _this$props2.popup,\n stretch = _this$props2.stretch,\n alignPoint = _this$props2.alignPoint,\n mobile = _this$props2.mobile,\n forceRender = _this$props2.forceRender,\n onPopupClick = _this$props2.onPopupClick;\n var _this$state = _this.state,\n popupVisible = _this$state.popupVisible,\n point = _this$state.point;\n var align = _this.getPopupAlign();\n var mouseProps = {};\n if (_this.isMouseEnterToShow()) {\n mouseProps.onMouseEnter = _this.onPopupMouseEnter;\n }\n if (_this.isMouseLeaveToHide()) {\n mouseProps.onMouseLeave = _this.onPopupMouseLeave;\n }\n mouseProps.onMouseDown = _this.onPopupMouseDown;\n mouseProps.onTouchStart = _this.onPopupMouseDown;\n return /*#__PURE__*/react.createElement(es_Popup, (0,esm_extends/* default */.Z)({\n prefixCls: prefixCls,\n destroyPopupOnHide: destroyPopupOnHide,\n visible: popupVisible,\n point: alignPoint && point,\n className: popupClassName,\n align: align,\n onAlign: onPopupAlign,\n animation: popupAnimation,\n getClassNameFromAlign: _this.getPopupClassNameFromAlign\n }, mouseProps, {\n stretch: stretch,\n getRootDomNode: _this.getRootDomNode,\n style: popupStyle,\n mask: mask,\n zIndex: zIndex,\n transitionName: popupTransitionName,\n maskAnimation: maskAnimation,\n maskTransitionName: maskTransitionName,\n maskMotion: maskMotion,\n ref: _this.popupRef,\n motion: popupMotion,\n mobile: mobile,\n forceRender: forceRender,\n onClick: onPopupClick\n }), typeof popup === 'function' ? popup() : popup);\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"attachParent\", function (popupContainer) {\n raf/* default.cancel */.Z.cancel(_this.attachId);\n var _this$props3 = _this.props,\n getPopupContainer = _this$props3.getPopupContainer,\n getDocument = _this$props3.getDocument;\n var domNode = _this.getRootDomNode();\n var mountNode;\n if (!getPopupContainer) {\n mountNode = getDocument(_this.getRootDomNode()).body;\n } else if (domNode || getPopupContainer.length === 0) {\n // Compatible for legacy getPopupContainer with domNode argument.\n // If no need `domNode` argument, will call directly.\n // https://codesandbox.io/s/eloquent-mclean-ss93m?file=/src/App.js\n mountNode = getPopupContainer(domNode);\n }\n if (mountNode) {\n mountNode.appendChild(popupContainer);\n } else {\n // Retry after frame render in case parent not ready\n _this.attachId = (0,raf/* default */.Z)(function () {\n _this.attachParent(popupContainer);\n });\n }\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"getContainer\", function () {\n if (!_this.portalContainer) {\n // In React.StrictMode component will call render multiple time in first mount.\n // When you want to refactor with FC, useRef will also init multiple time and\n // point to different useRef instance which will create multiple element\n // (This multiple render will not trigger effect so you can not clean up this\n // in effect). But this is safe with class component since it always point to same class instance.\n var getDocument = _this.props.getDocument;\n var popupContainer = getDocument(_this.getRootDomNode()).createElement('div'); // Make sure default popup container will never cause scrollbar appearing\n // https://github.com/react-component/trigger/issues/41\n\n popupContainer.style.position = 'absolute';\n popupContainer.style.top = '0';\n popupContainer.style.left = '0';\n popupContainer.style.width = '100%';\n _this.portalContainer = popupContainer;\n }\n _this.attachParent(_this.portalContainer);\n return _this.portalContainer;\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"setPoint\", function (point) {\n var alignPoint = _this.props.alignPoint;\n if (!alignPoint || !point) return;\n _this.setState({\n point: {\n pageX: point.pageX,\n pageY: point.pageY\n }\n });\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"handlePortalUpdate\", function () {\n if (_this.state.prevPopupVisible !== _this.state.popupVisible) {\n _this.props.afterPopupVisibleChange(_this.state.popupVisible);\n }\n });\n (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), \"triggerContextValue\", {\n onPopupMouseDown: _this.onPopupMouseDown\n });\n var _popupVisible;\n if ('popupVisible' in props) {\n _popupVisible = !!props.popupVisible;\n } else {\n _popupVisible = !!props.defaultPopupVisible;\n }\n _this.state = {\n prevPopupVisible: _popupVisible,\n popupVisible: _popupVisible\n };\n ALL_HANDLERS.forEach(function (h) {\n _this[\"fire\".concat(h)] = function (e) {\n _this.fireEvents(h, e);\n };\n });\n return _this;\n }\n (0,createClass/* default */.Z)(Trigger, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.componentDidUpdate();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n var props = this.props;\n var state = this.state; // We must listen to `mousedown` or `touchstart`, edge case:\n // https://github.com/ant-design/ant-design/issues/5804\n // https://github.com/react-component/calendar/issues/250\n // https://github.com/react-component/trigger/issues/50\n\n if (state.popupVisible) {\n var currentDocument;\n if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {\n currentDocument = props.getDocument(this.getRootDomNode());\n this.clickOutsideHandler = addEventListenerWrap(currentDocument, 'mousedown', this.onDocumentClick);\n } // always hide on mobile\n\n if (!this.touchOutsideHandler) {\n currentDocument = currentDocument || props.getDocument(this.getRootDomNode());\n this.touchOutsideHandler = addEventListenerWrap(currentDocument, 'touchstart', this.onDocumentClick);\n } // close popup when trigger type contains 'onContextMenu' and document is scrolling.\n\n if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) {\n currentDocument = currentDocument || props.getDocument(this.getRootDomNode());\n this.contextMenuOutsideHandler1 = addEventListenerWrap(currentDocument, 'scroll', this.onContextMenuClose);\n } // close popup when trigger type contains 'onContextMenu' and window is blur.\n\n if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) {\n this.contextMenuOutsideHandler2 = addEventListenerWrap(window, 'blur', this.onContextMenuClose);\n }\n return;\n }\n this.clearOutsideHandler();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.clearDelayTimer();\n this.clearOutsideHandler();\n clearTimeout(this.mouseDownTimeout);\n raf/* default.cancel */.Z.cancel(this.attachId);\n }\n }, {\n key: \"getPopupDomNode\",\n value: function getPopupDomNode() {\n var _this$popupRef$curren2;\n\n // for test\n return ((_this$popupRef$curren2 = this.popupRef.current) === null || _this$popupRef$curren2 === void 0 ? void 0 : _this$popupRef$curren2.getElement()) || null;\n }\n }, {\n key: \"getPopupAlign\",\n value: function getPopupAlign() {\n var props = this.props;\n var popupPlacement = props.popupPlacement,\n popupAlign = props.popupAlign,\n builtinPlacements = props.builtinPlacements;\n if (popupPlacement && builtinPlacements) {\n return getAlignFromPlacement(builtinPlacements, popupPlacement, popupAlign);\n }\n return popupAlign;\n }\n }, {\n key: \"setPopupVisible\",\n value:\n /**\n * @param popupVisible Show or not the popup element\n * @param event SyntheticEvent, used for `pointAlign`\n */\n function setPopupVisible(popupVisible, event) {\n var alignPoint = this.props.alignPoint;\n var prevPopupVisible = this.state.popupVisible;\n this.clearDelayTimer();\n if (prevPopupVisible !== popupVisible) {\n if (!('popupVisible' in this.props)) {\n this.setState({\n popupVisible: popupVisible,\n prevPopupVisible: prevPopupVisible\n });\n }\n this.props.onPopupVisibleChange(popupVisible);\n } // Always record the point position since mouseEnterDelay will delay the show\n\n if (alignPoint && event && popupVisible) {\n this.setPoint(event);\n }\n }\n }, {\n key: \"delaySetPopupVisible\",\n value: function delaySetPopupVisible(visible, delayS, event) {\n var _this2 = this;\n var delay = delayS * 1000;\n this.clearDelayTimer();\n if (delay) {\n var point = event ? {\n pageX: event.pageX,\n pageY: event.pageY\n } : null;\n this.delayTimer = window.setTimeout(function () {\n _this2.setPopupVisible(visible, point);\n _this2.clearDelayTimer();\n }, delay);\n } else {\n this.setPopupVisible(visible, event);\n }\n }\n }, {\n key: \"clearDelayTimer\",\n value: function clearDelayTimer() {\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n }\n }, {\n key: \"clearOutsideHandler\",\n value: function clearOutsideHandler() {\n if (this.clickOutsideHandler) {\n this.clickOutsideHandler.remove();\n this.clickOutsideHandler = null;\n }\n if (this.contextMenuOutsideHandler1) {\n this.contextMenuOutsideHandler1.remove();\n this.contextMenuOutsideHandler1 = null;\n }\n if (this.contextMenuOutsideHandler2) {\n this.contextMenuOutsideHandler2.remove();\n this.contextMenuOutsideHandler2 = null;\n }\n if (this.touchOutsideHandler) {\n this.touchOutsideHandler.remove();\n this.touchOutsideHandler = null;\n }\n }\n }, {\n key: \"createTwoChains\",\n value: function createTwoChains(event) {\n var childPros = this.props.children.props;\n var props = this.props;\n if (childPros[event] && props[event]) {\n return this[\"fire\".concat(event)];\n }\n return childPros[event] || props[event];\n }\n }, {\n key: \"isClickToShow\",\n value: function isClickToShow() {\n var _this$props4 = this.props,\n action = _this$props4.action,\n showAction = _this$props4.showAction;\n return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1;\n }\n }, {\n key: \"isContextMenuOnly\",\n value: function isContextMenuOnly() {\n var action = this.props.action;\n return action === 'contextMenu' || action.length === 1 && action[0] === 'contextMenu';\n }\n }, {\n key: \"isContextMenuToShow\",\n value: function isContextMenuToShow() {\n var _this$props5 = this.props,\n action = _this$props5.action,\n showAction = _this$props5.showAction;\n return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1;\n }\n }, {\n key: \"isClickToHide\",\n value: function isClickToHide() {\n var _this$props6 = this.props,\n action = _this$props6.action,\n hideAction = _this$props6.hideAction;\n return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1;\n }\n }, {\n key: \"isMouseEnterToShow\",\n value: function isMouseEnterToShow() {\n var _this$props7 = this.props,\n action = _this$props7.action,\n showAction = _this$props7.showAction;\n return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1;\n }\n }, {\n key: \"isMouseLeaveToHide\",\n value: function isMouseLeaveToHide() {\n var _this$props8 = this.props,\n action = _this$props8.action,\n hideAction = _this$props8.hideAction;\n return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1;\n }\n }, {\n key: \"isFocusToShow\",\n value: function isFocusToShow() {\n var _this$props9 = this.props,\n action = _this$props9.action,\n showAction = _this$props9.showAction;\n return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1;\n }\n }, {\n key: \"isBlurToHide\",\n value: function isBlurToHide() {\n var _this$props10 = this.props,\n action = _this$props10.action,\n hideAction = _this$props10.hideAction;\n return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1;\n }\n }, {\n key: \"forcePopupAlign\",\n value: function forcePopupAlign() {\n if (this.state.popupVisible) {\n var _this$popupRef$curren3;\n (_this$popupRef$curren3 = this.popupRef.current) === null || _this$popupRef$curren3 === void 0 ? void 0 : _this$popupRef$curren3.forceAlign();\n }\n }\n }, {\n key: \"fireEvents\",\n value: function fireEvents(type, e) {\n var childCallback = this.props.children.props[type];\n if (childCallback) {\n childCallback(e);\n }\n var callback = this.props[type];\n if (callback) {\n callback(e);\n }\n }\n }, {\n key: \"close\",\n value: function close() {\n this.setPopupVisible(false);\n }\n }, {\n key: \"render\",\n value: function render() {\n var popupVisible = this.state.popupVisible;\n var _this$props11 = this.props,\n children = _this$props11.children,\n forceRender = _this$props11.forceRender,\n alignPoint = _this$props11.alignPoint,\n className = _this$props11.className,\n autoDestroy = _this$props11.autoDestroy;\n var child = react.Children.only(children);\n var newChildProps = {\n key: 'trigger'\n }; // ============================== Visible Handlers ==============================\n // >>> ContextMenu\n\n if (this.isContextMenuToShow()) {\n newChildProps.onContextMenu = this.onContextMenu;\n } else {\n newChildProps.onContextMenu = this.createTwoChains('onContextMenu');\n } // >>> Click\n\n if (this.isClickToHide() || this.isClickToShow()) {\n newChildProps.onClick = this.onClick;\n newChildProps.onMouseDown = this.onMouseDown;\n newChildProps.onTouchStart = this.onTouchStart;\n } else {\n newChildProps.onClick = this.createTwoChains('onClick');\n newChildProps.onMouseDown = this.createTwoChains('onMouseDown');\n newChildProps.onTouchStart = this.createTwoChains('onTouchStart');\n } // >>> Hover(enter)\n\n if (this.isMouseEnterToShow()) {\n newChildProps.onMouseEnter = this.onMouseEnter; // Point align\n\n if (alignPoint) {\n newChildProps.onMouseMove = this.onMouseMove;\n }\n } else {\n newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter');\n } // >>> Hover(leave)\n\n if (this.isMouseLeaveToHide()) {\n newChildProps.onMouseLeave = this.onMouseLeave;\n } else {\n newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave');\n } // >>> Focus\n\n if (this.isFocusToShow() || this.isBlurToHide()) {\n newChildProps.onFocus = this.onFocus;\n newChildProps.onBlur = this.onBlur;\n } else {\n newChildProps.onFocus = this.createTwoChains('onFocus');\n newChildProps.onBlur = this.createTwoChains('onBlur');\n } // =================================== Render ===================================\n\n var childrenClassName = classnames_default()(child && child.props && child.props.className, className);\n if (childrenClassName) {\n newChildProps.className = childrenClassName;\n }\n var cloneProps = (0,objectSpread2/* default */.Z)({}, newChildProps);\n if ((0,es_ref/* supportRef */.Yr)(child)) {\n cloneProps.ref = (0,es_ref/* composeRef */.sQ)(this.triggerRef, child.ref);\n }\n var trigger = /*#__PURE__*/react.cloneElement(child, cloneProps);\n var portal; // prevent unmounting after it's rendered\n\n if (popupVisible || this.popupRef.current || forceRender) {\n portal = /*#__PURE__*/react.createElement(PortalComponent, {\n key: \"portal\",\n getContainer: this.getContainer,\n didUpdate: this.handlePortalUpdate\n }, this.getComponent());\n }\n if (!popupVisible && autoDestroy) {\n portal = null;\n }\n return /*#__PURE__*/react.createElement(context.Provider, {\n value: this.triggerContextValue\n }, trigger, portal);\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(_ref, prevState) {\n var popupVisible = _ref.popupVisible;\n var newState = {};\n if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {\n newState.popupVisible = popupVisible;\n newState.prevPopupVisible = prevState.popupVisible;\n }\n return newState;\n }\n }]);\n return Trigger;\n }(react.Component);\n (0,defineProperty/* default */.Z)(Trigger, \"contextType\", context);\n (0,defineProperty/* default */.Z)(Trigger, \"defaultProps\", {\n prefixCls: 'rc-trigger-popup',\n getPopupClassNameFromAlign: returnEmptyString,\n getDocument: returnDocument,\n onPopupVisibleChange: noop,\n afterPopupVisibleChange: noop,\n onPopupAlign: noop,\n popupClassName: '',\n mouseEnterDelay: 0,\n mouseLeaveDelay: 0.1,\n focusDelay: 0,\n blurDelay: 0.15,\n popupStyle: {},\n destroyPopupOnHide: false,\n popupAlign: {},\n defaultPopupVisible: false,\n mask: false,\n maskClosable: true,\n action: [],\n showAction: [],\n hideAction: [],\n autoDestroy: false\n });\n return Trigger;\n}", "handleOnMouseEnter() {\n this.setState({\n editorIsHovered: true\n });\n }", "mainContainerHandleOnMouseEnter(){\n this.setState({\n mainContainerIsHovered: true\n });\n }", "handleMouseUp(e) {\n this.props.onMouseUp(e);\n }", "focused(value) {\n // eslint-disable-next-line no-unused-expressions\n value ? this.mouseover() : this.mouseleave();\n }", "onMouseOver_() {\n if (this.isOpenable_()) {\n this.updateHoverStying_(true);\n }\n }", "get trigger() { return this._trigger || this._elementRef.nativeElement; }", "get trigger() { return this._trigger || this._elementRef.nativeElement; }", "get trigger() { return this._trigger || this._elementRef.nativeElement; }", "function E(){F=Q.props.trigger.trim().split(\" \").reduce(function(e,t){if(\"manual\"===t)return e;if(Q.props.target)switch(t){case\"mouseenter\":T(\"mouseover\",d,e),T(\"mouseout\",h,e);break;case\"focus\":T(\"focusin\",d,e),T(\"focusout\",h,e);break;case\"click\":T(t,d,e);break}else switch(T(t,c,e),Q.props.touchHold&&(T(\"touchstart\",c,e),T(\"touchend\",u,e)),t){case\"mouseenter\":T(\"mouseleave\",u,e);break;case\"focus\":T(Dt?\"focusout\":\"blur\",f,e);break}return e},[])}", "onListItemHover(event) {\n // do not modify state directly\n // use setState() instead,\n this.setState({\n // {stateProp : re-assigned}\n hover: !this.state.hover\n });\n console.log('wow! you altered this component\\'s state!');\n }", "render() {\n return (\n <div onMouseOver={this.mouseOver} onMouseOut={this.mouseOut}>\n {this.props.children(this.state.hovering)}\n </div>\n )\n }", "onMouseOver(event) {\n if (this.focusOnHover !== false) {\n const fromItemElement = DomHelper.up(event.relatedTarget, '.b-widget'),\n toItemElement = DomHelper.up(event.target, '.b-widget'),\n overItem = IdHelper.fromElement(toItemElement);\n\n if (!DomHelper.isTouchEvent && toItemElement && toItemElement !== fromItemElement && overItem.parent === this) {\n overItem && overItem.focus();\n }\n }\n }", "hoverOn() {\n this.setState({hover: true});\n }", "function NavBar_Item_MouseOut(event)\n{\n\t//get html\n\tvar html = Browser_GetEventSourceElement(event);\n\t//this a sub component?\n\tif (html.Style_Parent)\n\t{\n\t\t//use the parent\n\t\thtml = html.Style_Parent;\n\t}\n\t//valid?\n\tif (html && html.Style_MouseOver)\n\t{\n\t\t//trigger style\n\t\thtml.style.backgroundPosition = html.IsSelected ? html.Style_Selected : html.Style_Unselected;\n\t}\n}", "hoverHandle(){\n\t\tthis.setState({\n\t\t\thover: !this.state.hover\n\t\t})\n\t}", "_onPointerOut() {\n this.removeState(\"hovered\");\n }", "onElementMouseOver(event) {\n // bail out early if scrolling\n if (!this.scrolling) {\n const cellElement = DomHelper.up(event.target, '.b-grid-cell');\n\n if (cellElement) {\n const row = DomDataStore.get(cellElement).row;\n\n // No hover effect needed if a mouse button is pressed (like when resizing window, region, or resizing something etc).\n // NOTE: 'buttons' not supported in Safari\n if (row && (typeof event.buttons !== 'number' || event.buttons === 0)) {\n row.addCls('b-hover');\n }\n\n this.triggerCellMouseEvent('mouseOver', event);\n }\n\n /**\n * Mouse moved in over element in grid\n * @event mouseOver\n * @param {Event} event\n */\n this.trigger('mouseOver', { event });\n }\n }", "_mouseenterMouseleaveHandler(event) {\n const that = this;\n\n if (event.target === that.$.dropDown || that.disabled || that.readonly) {\n return;\n }\n\n if (event.type === 'mouseenter') {\n event.target.setAttribute('hover', '');\n }\n else {\n event.target.removeAttribute('hover');\n }\n }", "async elementMouseOver(e) {\n this.cancelEvent(e);\n const el = e.target;\n if (el) {\n this.selectedInstance = await this.ctx.api.getElementComponent(el);\n }\n highlighter_1.unHighlight();\n if (this.selectedInstance) {\n highlighter_1.highlight(this.selectedInstance, this.ctx);\n }\n }", "handleMouseLeave() {\n const { modalComponent, isSidebarOpen } = this.state;\n\n if (modalComponent || isSidebarOpen) {\n return;\n }\n\n this.setState(() => ({ activeBlockKey: null }), this.removeActiveStyling);\n }", "onMouseOver() \r\n {\r\n this.setState({action: true}); \r\n this.setState({title: true}); \r\n this.setState({shadow: 3}); \r\n }", "onElementMouseOver(event) {\n // bail out early if scrolling\n if (!this.scrolling) {\n const cellElement = DomHelper.up(event.target, '.b-grid-cell');\n\n if (cellElement) {\n const row = DomDataStore.get(cellElement).row; // No hover effect needed if a mouse button is pressed (like when resizing window, region, or resizing something etc).\n // NOTE: 'buttons' not supported in Safari\n\n if (row && (typeof event.buttons !== 'number' || event.buttons === 0)) {\n this.hoveredRow = row;\n }\n\n this.triggerCellMouseEvent('mouseOver', event);\n }\n /**\n * Mouse moved in over element in grid\n * @event mouseOver\n * @param {Event} event\n */\n\n this.trigger('mouseOver', {\n event\n });\n }\n }", "handleMapClick(event) {\n //this.toggleHover(-1);\n }", "handleAnimationEnd() {\n this.setState({ triggerEnabled: false });\n }", "onMouseUp(event) {\n\t\t// console.log(\"mouse up\");\n\t\tthis.props.setIsDrawing(false);\n\t}", "componentDidUpdate() {\n this.focused = false;\n this.mouseDownOnButton = false;\n }", "onMouseOut() \r\n {\r\n this.setState({action: false}); \r\n this.setState({title: false}); \r\n this.setState({shadow: 1});\r\n this.setState({detailsAboutMovie: false}); \r\n }", "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);}", "internalOnPointerOver(event) {\n const me = this,\n forElement = me.forElement,\n forSelector = me.forSelector,\n activeTarget = me.activeTarget;\n let newTarget;\n\n if (me.disabled) {\n return;\n }\n\n // If the mouse moves over this tooltip, it is theoretically a mouseout of its\n // forElement, but allowOver lets us tolerate this ane remain visible.\n if (me.allowOver && me.element.contains(event.target)) {\n return;\n }\n\n // There's been a mouseover. If we have a forSelector, we have to check\n // if it's an enter of a matching child\n if (forSelector) {\n // Moving inside a forSelector matching element\n if (activeTarget && activeTarget.contains(event.target) && activeTarget.contains(event.relatedTarget)) {\n return;\n }\n newTarget = event.target.closest(forSelector);\n\n // Mouseovers while within a target do nothing\n if (newTarget && event.relatedTarget && event.relatedTarget.closest(forSelector) === newTarget) {\n return;\n }\n }\n // There's no forSelector, so check if we moved from outside the target\n else if (!forElement.contains(event.relatedTarget)) {\n newTarget = forElement;\n }\n // Mouseover caused by moving from child to child inside the target\n else {\n return;\n }\n\n // If pointer entered the target or a forSelector child, then show.\n if (newTarget) {\n me.handleForElementOver(event, newTarget);\n }\n // If over a non-forSelector child, behave as in forElement out\n else if (activeTarget) {\n me.handleForElementOut();\n }\n }", "render(){\n\t\tconsole.log('render',this.props, this.state, this.referendum, this.refs.current);\n\t\treturn React.createElement(\n/*function myElementCreate(...args){\ndebugger;\nreturn 'div';\n\t\t}\n*/ 'div', {key: Date.now(), onClick: this.onClick, ref: 'current'}, [`it's ${this.state.when.toLocaleTimeString()} React@${React.version}`, ...this.props.children]);\n\t}", "handleMouseLeave() {\n this.setState({ visible: false })\n }", "handleLeftClickUp() {\n if (this.context.selectedComponents.length === 1) {\n this.context.showComponentSelection();\n }\n\n // Move to a hovered state when hovered after selection\n var hoveredComp = this.context.getHoveredComponent();\n var hoveredConn = this.context.getHoveredConnector();\n if (hoveredComp !== null) {\n this.context.setActiveState(States.HOVER_COMPONENT, hoveredComp);\n } else if (hoveredConn !== null) {\n this.context.setActiveState(States.HOVER_CONNECTOR, hoveredConn);\n } else {\n this.context.setActiveState(States.EMPTY);\n }\n }", "componentWillUnmount() {\n removeStyle(this.ratingWrapperStyleId);\n if (canUseDOM) {\n document.removeEventListener('mouseup', this.mouseUpOnDocumentCallback);\n }\n }", "onMouseLeave(event) {\n const me = this,\n {\n relatedTarget\n } = event,\n leavingToChild = relatedTarget && me.owns(relatedTarget);\n let targetCmp = relatedTarget && relatedTarget instanceof HTMLElement && Widget.fromElement(relatedTarget),\n shouldHideMenu = !leavingToChild;\n\n if (targetCmp) {\n while (targetCmp.ownerCmp) {\n targetCmp = targetCmp.ownerCmp;\n } // Or was found and does not belong to current menu DOM tree\n // This condition will not allow possibly existing picker to hide\n // Covered by Menu.t.js\n\n shouldHideMenu &= !DomHelper.getAncestor(targetCmp.element, [event.target]);\n }\n\n if (!leavingToChild && shouldHideMenu) {\n me.currentSubMenu && me.currentSubMenu.hide();\n me.currentSubMenu = me.selectedElement = null; // Deactivate currently active *menu items* on mouseleave\n\n if (me.element.contains(document.activeElement) && document.activeElement.matches('.b-menuitem')) {\n me.focusElement.focus();\n }\n }\n }", "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);}", "mouseOut() {\n this.setState({hover:false, temp:1});\n this.state.blueBorder = {border: 0, margin: 10};\n }", "onGroceryListItemHover() {\n this.setState({\n hover: !this.state.hover\n });\n }", "handleHoverChanged() {\n if(!hover) {\n hover = true;\n } else {\n hover = false;\n }\n }", "componentWillMount() {\n document.addEventListener('mousedown', this.handleClickOutside, false);\n }", "_onPointerOver() {\n this.addState(\"hovered\");\n }", "handleMouseLeave() {\n // eslint-disable-next-line @lwc/lwc/no-async-operation\n setTimeout(\n function () {\n if (\n !this._cancelBlur &&\n this._triggers === 'hover' &&\n this.popoverVisible &&\n !this._disabled\n ) {\n this.cancelBlur();\n this.toggleMenuVisibility();\n }\n if (\n this._cancelBlur &&\n this._triggers === 'hover' &&\n this.popoverVisible &&\n !this._disabled\n ) {\n this.allowBlur();\n }\n }.bind(this),\n 250\n );\n }", "handleMouseUp() {\n this.setState({\n isDragging: false,\n cursor: 'grab'\n });\n }", "_mouseEventsHandler(event) {\n const that = this;\n\n event.type === 'mouseenter' ? that.setAttribute('hover', '') : that.removeAttribute('hover');\n }", "function Form_SysButtonMouseOver(event)\n{\n\t//Get Source Element\n\tvar sourceElement = Browser_GetEventSourceElement(event);\n\t//has set pressed?\n\tif (sourceElement.SetMouseOver)\n\t{\n\t\t//update it\n\t\tsourceElement.style.backgroundPosition = sourceElement.SetMouseOver;\n\t\t//add listeners to unpress it\n\t\tBrowser_AddEvent(sourceElement, __BROWSER_EVENT_MOUSEOUT, Form_SysButtonUnpressed);\n\t}\n\t//block the event\n\tBrowser_CancelBubbleOnly(event);\n}", "function onTrigger(event) {\n if (!instance.state.isEnabled || isEventListenerStopped(event)) {\n return;\n }\n\n if (!instance.state.isVisible) {\n lastTriggerEventType = event.type;\n\n if (event instanceof MouseEvent) {\n lastMouseMoveEvent = event; // If scrolling, `mouseenter` events can be fired if the cursor lands\n // over a new target, but `mousemove` events don't get fired. This\n // causes interactive tooltips to get stuck open until the cursor is\n // moved\n\n mouseMoveListeners.forEach(function (listener) {\n return listener(event);\n });\n }\n } // Toggle show/hide when clicking click-triggered tooltips\n\n\n if (event.type === 'click' && instance.props.hideOnClick !== false && instance.state.isVisible) {\n scheduleHide();\n } else {\n scheduleShow(event);\n }\n }", "function handleMouseOverOut( // eslint-disable-next-line @typescript-eslint/no-shadow\nhandler, args, relatedNative) {\n var e = args[0];\n var target = e.currentTarget;\n var related = e.relatedTarget || e.nativeEvent[relatedNative];\n\n if ((!related || related !== target) && !(0,dom_helpers_contains__WEBPACK_IMPORTED_MODULE_3__.default)(target, related)) {\n handler.apply(void 0, args);\n }\n}", "_switchButtonOnMouseLeave() {\n const that = this;\n\n if (that.disabled || that.readonly) {\n return;\n }\n\n that.$.removeClass('hovered');\n }", "function NavBar_Item_MouseOver(event)\n{\n\t//get html\n\tvar html = Browser_GetEventSourceElement(event);\n\t//this a sub component?\n\tif (html.Style_Parent)\n\t{\n\t\t//use the parent\n\t\thtml = html.Style_Parent;\n\t}\n\t//valid?\n\tif (html && html.Style_MouseOver)\n\t{\n\t\t//trigger style\n\t\thtml.style.backgroundPosition = html.Style_Selected;\n\t}\n}", "function onTrigger(event) {\n if (!instance.state.isEnabled || isEventListenerStopped(event)) {\n return;\n }\n\n if (!instance.state.isVisible) {\n lastTriggerEventType = event.type;\n\n if (event instanceof MouseEvent) {\n lastMouseMoveEvent = event; // If scrolling, `mouseenter` events can be fired if the cursor lands\n // over a new target, but `mousemove` events don't get fired. This\n // causes interactive tooltips to get stuck open until the cursor is\n // moved\n\n mouseMoveListeners.forEach(function (listener) {\n return listener(event);\n });\n }\n } // Toggle show/hide when clicking click-triggered tooltips\n\n\n if (event.type === 'click' && instance.props.hideOnClick !== false && instance.state.isVisible) {\n scheduleHide();\n } else {\n scheduleShow(event);\n }\n }", "componentWillUnmount() {\n this.props.clearCurrentTarget();\n }", "componentWillUnmount() {\n this.props.clearCurrentTarget();\n }", "focusToggle(e) {\n this.dispatchEvent(\n new CustomEvent(\"focus-changed\", {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: { focus: this.focusState }\n })\n );\n // see if it has hover classes\n if (typeof this.hoverClass !== typeof undefined) {\n // break class into array\n var classes = this.hoverClass.split(\" \");\n // run through each and add or remove classes\n classes.forEach((item, index) => {\n if (item != \"\") {\n if (this.focusState) {\n this.$.dialogtrigger.classList.add(item);\n } else {\n this.$.dialogtrigger.classList.remove(item);\n }\n }\n });\n }\n this.focusState = !this.focusState;\n }", "handleMouseEnter() {\n this.setState({ hovered: true });\n }" ]
[ "0.60197717", "0.60001194", "0.5980883", "0.5940208", "0.59395945", "0.5919945", "0.58831406", "0.58402807", "0.5829305", "0.58265626", "0.58265626", "0.5800753", "0.5800428", "0.57929593", "0.578527", "0.578527", "0.57761455", "0.5767679", "0.57676435", "0.5764646", "0.57510483", "0.57485574", "0.5724956", "0.57129055", "0.5710529", "0.56978256", "0.56978256", "0.56826645", "0.5676496", "0.5676496", "0.5656249", "0.5648514", "0.5643079", "0.5633502", "0.56265014", "0.562098", "0.56184405", "0.56088054", "0.5601313", "0.55854326", "0.5548458", "0.55479354", "0.55453473", "0.55275315", "0.55207217", "0.55090004", "0.5506079", "0.5489709", "0.54836106", "0.5480833", "0.5478259", "0.5473127", "0.5469508", "0.5462751", "0.5462751", "0.5462751", "0.5458498", "0.54501396", "0.5447322", "0.5439339", "0.5438851", "0.5437819", "0.54367936", "0.5429", "0.54177445", "0.5416313", "0.5413568", "0.5410246", "0.5406539", "0.539439", "0.53793836", "0.5369646", "0.53692955", "0.5358574", "0.5356602", "0.5351174", "0.53508645", "0.534887", "0.5347427", "0.534685", "0.5344467", "0.5338287", "0.5337199", "0.533637", "0.5335644", "0.53145164", "0.5289605", "0.5286839", "0.52809036", "0.52800626", "0.5279899", "0.5278854", "0.5274568", "0.52735424", "0.5256719", "0.52561295", "0.5251261", "0.52497375", "0.52497375", "0.52491343", "0.5245842" ]
0.0
-1
Validate that children, if any, are instances of ``.
function onlyProgressBar(props, propName, componentName) { var children = props[propName]; if (!children) { return null; } var error = null; react__WEBPACK_IMPORTED_MODULE_3___default.a.Children.forEach(children, function (child) { if (error) { return; } /** * Compare types in a way that works with libraries that patch and proxy * components like react-hot-loader. * * see https://github.com/gaearon/react-hot-loader#checking-element-types */ var element = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(ProgressBar, null); if (child.type === element.type) return; var childType = child.type; var childIdentifier = react__WEBPACK_IMPORTED_MODULE_3___default.a.isValidElement(child) ? childType.displayName || childType.name || childType : child; error = new Error("Children of " + componentName + " can contain only ProgressBar " + ("components. Found " + childIdentifier + ".")); }); return error; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "childrenValidation() {\n const isChildren = Array.isArray(this.props.children);\n if (isChildren) {\n throw new Error('<Hello> component doen not support multiple children');\n } else if (!this.props.children) {\n throw new Error('<Hello> component cannot ben empty');\n }\n }", "hasValidChildren() {\n const children = this.children;\n if (children.length <= 1) {\n return true;\n }\n // There are more 2 or more children - they must have conditions\n for (const child of children) {\n if (!child.condition) {\n return false;\n }\n }\n return true;\n }", "function isAllowed(children, parent) {\n\t\t\tvar parentType = parent instanceof davinci.ve._Widget ?\n\t\t\t\t\tparent.type : parent._dvWidget.type;\n\t\t\tvar parentClassList,\n\t\t\t\tallowedChild = davinci.ve.metadata.getAllowedChild(parentType);\n\t\t\t\n\t\t\t// special case for HTML <body>\n\t\t\tif (parentType === \"html.body\") {\n\t\t\t\tallowedChild = [\"ANY\"];\n\t\t\t}\n\t\t\tparentClassList = getClassList(parentType);\n\t\t\t\n\t\t\t// Cycle through children, making sure that all of them work for\n\t\t\t// the given parent.\n\t\t\treturn children.every(function(child){\n\t\t\t\tvar isAllowedChild = allowedChild[0] !== \"NONE\" &&\n\t\t\t\t\t\t\t\t\t (allowedChild[0] === \"ANY\" ||\n\t\t\t\t\t\t\t\t\t containsClass(allowedChild, child.classList));\n\t\t\t\tvar isAllowedParent = child.allowedParent[0] === \"ANY\" ||\n\t\t\t\t\t\t\t\t\t containsClass(child.allowedParent, parentClassList);\n\t\t\t\treturn isAllowedChild && isAllowedParent;\n\t\t\t});\n\t\t}", "function all(children, parent) {\n var length = children.length\n var index = -1\n var child\n\n stack.push(parent)\n\n while (++index < length) {\n child = children[index]\n\n if (child && one(child) === false) {\n return false\n }\n }\n\n stack.pop()\n\n return true\n }", "function all(children, parent) {\n var length = children.length\n var index = -1\n var child\n\n stack.push(parent)\n\n while (++index < length) {\n child = children[index]\n\n if (child && one(child) === false) {\n return false\n }\n }\n\n stack.pop()\n\n return true\n }", "function all(children, parent) {\n var length = children.length\n var index = -1\n var child\n\n stack.push(parent)\n\n while (++index < length) {\n child = children[index]\n\n if (child && one(child) === false) {\n return false\n }\n }\n\n stack.pop()\n\n return true\n }", "function all(children, parent) {\n var length = children.length\n var index = -1\n var child\n\n stack.push(parent)\n\n while (++index < length) {\n child = children[index]\n\n if (child && one(child) === false) {\n return false\n }\n }\n\n stack.pop()\n\n return true\n }", "function all(children, parent) {\n var length = children.length\n var index = -1\n var child\n\n stack.push(parent)\n\n while (++index < length) {\n child = children[index]\n\n if (child && one(child) === false) {\n return false\n }\n }\n\n stack.pop()\n\n return true\n }", "function all(children, parent) {\n var length = children.length\n var index = -1\n var child\n\n stack.push(parent)\n\n while (++index < length) {\n child = children[index]\n\n if (child && one(child) === false) {\n return false\n }\n }\n\n stack.pop()\n\n return true\n }", "function hasChildOfType(children, type) {\n return React.Children.toArray(children).some(child => /*#__PURE__*/React.isValidElement(child) && child.type === type);\n}", "function all(children, parent) {\n var step = reverse ? -1 : 1;\n var max = children.length;\n var min = -1;\n var index = (reverse ? max : min) + step;\n var child;\n\n while (index > min && index < max) {\n child = children[index];\n\n if (child && one(child, index, parent) === false) {\n return false;\n }\n\n index += step;\n }\n\n return true;\n }", "set hasChildren(value) {}", "function NodeCanHaveChild() {\r\n Node.apply(this, arguments);\r\n this._children = []; \r\n}", "function Common_HTMLCanHaveChildren(theHTML)\n{\n\t//switch on tagname\n\treturn !theHTML.tagName.match(__NEMESIS_REGEX_HTML_NO_CHILDREN);\n}", "get hasChildren() {}", "hasChildren() {\n return this.numberOfChildren > 0;\n }", "hasChildren() {\n if (this.children !== undefined && this.children.length > 0) {\n return true;\n }\n return false;\n }", "function checkChildren(target){\n if(target.selected)\n return true;\n else if(target.children){\n for(var i=0; i<target.children.length; i++){\n if(checkChildren(target.children[i]))\n return true\n }\n }\n else if(target._children){\n for(var i=0; i<target._children.length; i++){\n if(checkChildren(target._children[i]))\n return true\n }\n }\n return false;\n }", "hasChildren() {\n const child = this.oneChild();\n if (child) {\n return child.hasChildren();\n }\n return this._children.size > 0;\n }", "hasChildren() {\n return this.numberOfChildren > 0;\n }", "hasChildren() {\n return this.numberOfChildren > 0;\n }", "hasChildren() {\n return this.numberOfChildren > 0;\n }", "hasChildren() {\n return this.numberOfChildren > 0;\n }", "hasChildren() {\n return this.numberOfChildren > 0;\n }", "function testChildrenNum(value) {\n\n if (value <= 0) {\n try {\n console.warn(\n 'A SimpleSlider main container element' +\n 'should have at least one child.'\n );\n } catch(e) {}\n\n return true;\n\n } else {\n\n return false;\n }\n\n }", "function hasNoRelevantChild(parent){\r\n var children = $(parent).children();\r\n if (children.size()==0) return true;\r\n for (i=0;i<children.size();i++){\r\n if (re.test($(children[i]).text())) return false;\r\n }\r\n return true;\r\n }", "function hasChildren(node) {\n var _match;\n\n return match(node, (_match = {}, _match[ARRAY_OF] = function () {\n return true;\n }, _match[OBJECT_OF] = function () {\n return true;\n }, _match[COMPONENT] = function () {\n return true;\n }, _match[ARRAY] = function (node) {\n return any(node.map(hasChildren));\n }, _match[OBJECT] = function (node) {\n return any(Object.keys(node).map(function (k) {\n return hasChildren(node[k]);\n }));\n }, _match));\n}", "function checkChildren(str) {\n jq('.' + str).each(function() {\n jq(this).attr(\"checked\", true);\n });\n}", "function simpleNormalizeChildren(children){for(var i=0;i<children.length;i++){if(Array.isArray(children[i])){return Array.prototype.concat.apply([],children);}}return children;}// 2. When the children contains constrcuts that always generated nested Arrays,", "function hasChildren(arg) { \n if(arg.children(\"ul\").length > 0) {\n arg.addClass(\"hasChildren\");\n arg.find(\"a\").eq(0).addClass(\"hasChildren\");\n }\n }", "function hasChildren(arg) { \n if(arg.children(\"ul\").length > 0) {\n arg.addClass(\"hasChildren\");\n arg.find(\"a\").eq(0).addClass(\"hasChildren\");\n }\n }", "everyChildren(callback) {\n return this.childElements.every(visit);\n function visit(node) {\n if (!callback(node)) {\n return false;\n }\n return node.childElements.every(visit);\n }\n }", "function validateChildCount() {\n\tif (!listOfItems.childElementCount) {\n\t\tconst tagElement = createNodeElement('p', { id: 'not-elements' });\n\t\tlistOfItems.appendChild(tagElement('There is no content to show'));\n\t\ttotalsContainer.classList.add('hidden');\n\t} else {\n\t\ttotalsContainer.classList.remove('hidden');\n\t\tdocument.getElementById('not-elements')?.remove();\n\t}\n}", "someChildren(callback) {\n return this.childElements.some(visit);\n function visit(node) {\n if (callback(node)) {\n return true;\n }\n else {\n return node.childElements.some(visit);\n }\n }\n }", "function validateStructure(el) {\n const html_tag = el.tagName;\n const parent = el.parentElement;\n switch (html_tag) {\n case 'QUESTION':\n return parentHasToBe(el, parent, \"QUESTIONNAIRE\");\n case 'SOLUTION':\n case 'DISTRACTOR':\n return parentHasToBe(el, parent, \"QUESTION\");\n case 'EXPLANATION':\n return parentHasToBe(el, parent, \"SOLUTION\", \"DISTRACTOR\");\n default:\n console.log('html_tag to check was no question, solution, distractor or explanation');\n return true;\n }\n}", "static validateArityAndAnyType(expression, minArity, maxArity, returnType = returnType_1.ReturnType.Object) {\n if (expression.children.length < minArity) {\n throw new Error(`${expression} should have at least ${minArity} children.`);\n }\n if (expression.children.length > maxArity) {\n throw new Error(`${expression} can't have more than ${maxArity} children.`);\n }\n if ((returnType & returnType_1.ReturnType.Object) === 0) {\n for (const child of expression.children) {\n if ((child.returnType & returnType_1.ReturnType.Object) === 0 && (returnType & child.returnType) === 0) {\n throw new Error(FunctionUtils.buildTypeValidatorError(returnType, child, expression));\n }\n }\n }\n }", "function simpleNormalizeChildren(children){for(var i=0;i<children.length;i++){if(Array.isArray(children[i])){return Array.prototype.concat.apply([],children);}}return children;}// 2. When the children contains constructs that always generated nested Arrays,", "function simpleNormalizeChildren(children){for(var i=0;i<children.length;i++){if(Array.isArray(children[i])){return Array.prototype.concat.apply([],children);}}return children;}// 2. When the children contains constructs that always generated nested Arrays,", "function hasChildrenObjects(obj)\n {\n if(obj.length===0) return false;\n for(var i in obj) if(typeof obj[i] === \"object\") return true;\n return false; \n }", "static validateRequiredContent(node, rules) {\n if (!rules || rules.length === 0) {\n return [];\n }\n return rules.filter((tagName) => {\n const haveMatchingChild = node.childElements.some((child) => child.is(tagName));\n return !haveMatchingChild;\n });\n }", "static validateRequiredContent(node, rules) {\n if (!rules || rules.length === 0) {\n return [];\n }\n return rules.filter((tagName) => {\n const haveMatchingChild = node.childElements.some((child) => child.is(tagName));\n return !haveMatchingChild;\n });\n }", "isElementProps(props) {\n return props.children !== undefined;\n }", "static validateOccurrences(node, rules, numSiblings) {\n if (!rules) {\n return true;\n }\n const category = rules.find((cur) => {\n /** @todo handle complex rules and not just plain arrays (but as of now\n * there is no use-case for it) */\n // istanbul ignore next\n if (typeof cur !== \"string\") {\n return false;\n }\n const match = cur.match(/^(.*?)[?*]?$/);\n return match && match[1] === node.tagName;\n });\n const limit = parseAmountQualifier(category);\n return limit === null || numSiblings <= limit;\n }", "static validateOccurrences(node, rules, numSiblings) {\n if (!rules) {\n return true;\n }\n const category = rules.find((cur) => {\n /** @todo handle complex rules and not just plain arrays (but as of now\n * there is no use-case for it) */\n // istanbul ignore next\n if (typeof cur !== \"string\") {\n return false;\n }\n const match = cur.match(/^(.*?)[?*]?$/);\n return match && match[1] === node.tagName;\n });\n const limit = parseAmountQualifier(category);\n return limit === null || numSiblings <= limit;\n }", "function validate_child_style_class_types(parent_node_names, names) {\n\t\tvar _iteratorNormalCompletion = true;\n\t\tvar _didIteratorError = false;\n\t\tvar _iteratorError = undefined;\n\t\n\t\ttry {\n\t\t\tfor (var _iterator = (0, _getIterator3.default)(parent_node_names), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar parent = _step.value;\n\t\n\t\t\t\t// if it's a pseudoclass, it can't contain any style classes\n\t\t\t\tif (is_pseudo_class(parent) && (0, _helpers.not_empty)(names)) {\n\t\t\t\t\tthrow new Error('A style class declaration \"' + names[0] + '\" found inside a pseudoclass \"' + parent + '\". Pseudoclasses (:hover, etc) can\\'t contain child style classes.');\n\t\t\t\t}\n\t\n\t\t\t\t// if it's a media query style class, it must contain only pseudoclasses\n\t\t\t\tif (is_media_query(parent)) {\n\t\t\t\t\tvar non_pseudoclass = names.filter(function (x) {\n\t\t\t\t\t\treturn !is_pseudo_class(x);\n\t\t\t\t\t})[0];\n\t\n\t\t\t\t\tif (non_pseudoclass) {\n\t\t\t\t\t\tthrow new Error('A non-pseudoclass \"' + non_pseudoclass + '\" found inside a media query style class \"' + parent + '\". Media query style classes can only contain pseudoclasses (:hover, etc).');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t// if it's a keyframes style class, it must contain only keyframe selectors\n\t\t\t\tif (is_keyframes(parent)) {\n\t\t\t\t\tvar non_keyframe_selector = names.filter(function (x) {\n\t\t\t\t\t\treturn !is_keyframe_selector(x);\n\t\t\t\t\t})[0];\n\t\n\t\t\t\t\tif (non_keyframe_selector) {\n\t\t\t\t\t\tthrow new Error('A non-keyframe-selector \"' + non_keyframe_selector + '\" found inside a keyframes style class \"' + parent + '\". Keyframes style classes can only contain keyframe selectors (from, 100%, etc).');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return) {\n\t\t\t\t\t_iterator.return();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) {\n\t\t\t\t\tthrow _iteratorError;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "hasChildren(count = 1) {\n return this.children && this.children.length >= count;\n }", "hasChildren (node) {\n return !!node[this.childrenProp];\n }", "function elementChildren(children, predicate) {\n if (predicate === void 0) { predicate = function () { return true; }; }\n return Children.toArray(children).filter(function (child) { return isValidElement(child) && predicate(child); });\n}", "function ensureElement(child) {\n // wrap text in a <span> so children are always elements\n if (typeof child === \"string\") {\n // cull whitespace strings\n return child.trim().length > 0 ? React.createElement(\"span\", null, child) : undefined;\n }\n else if (typeof child === \"number\") {\n return React.createElement(\"span\", null, child);\n }\n else {\n return child;\n }\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n }", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n }", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n }", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n }", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n }", "function isChildOf(element, classname) {\n\t\tif (!element.parentNode) return false;\n\t\tif (element.className.split(\" \").indexOf(classname) >= 0) return true;\n\t\treturn isChildOf(element.parentNode, classname);\n\t}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}", "function normalizeChildren (children) {\n return isPrimitive(children)\n ? [createTextVNode(children)]\n : Array.isArray(children)\n ? normalizeArrayChildren(children)\n : undefined\n}" ]
[ "0.7083619", "0.6617665", "0.6392238", "0.60621476", "0.60621476", "0.60621476", "0.60621476", "0.60621476", "0.60621476", "0.6042598", "0.5989525", "0.5980775", "0.59798163", "0.59605354", "0.588464", "0.58601123", "0.5825246", "0.5811257", "0.5780012", "0.57676", "0.57676", "0.57676", "0.57676", "0.57676", "0.57137066", "0.5705812", "0.56861216", "0.5671555", "0.56486106", "0.56292343", "0.56292343", "0.5610097", "0.5605125", "0.55632955", "0.5556416", "0.5531411", "0.55299985", "0.55299985", "0.5525946", "0.54432863", "0.54432863", "0.54311454", "0.54016685", "0.54016685", "0.5396423", "0.53927875", "0.5378987", "0.53651047", "0.5358755", "0.534535", "0.53430784", "0.53430784", "0.53430784", "0.53430784", "0.5342349", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146", "0.5338146" ]
0.0
-1