UNPKG

insomnia-documenter

Version:
26 lines 86 kB
{ "version": 3, "file": "bundle.css", "sources": [ "Item.svelte", "List.svelte", "MultiSelection.svelte", "Select.svelte", "Selection.svelte", "VirtualList.svelte", "App.svelte", "ErrorPage.svelte", "Content.svelte", "Sidebar.svelte", "Request.svelte", "Table.svelte", "Group.svelte" ], "sourcesContent": [ "<script>\n export let isActive = false;\n export let isFirst = false;\n export let isHover = false;\n export let getOptionLabel = undefined;\n export let item = undefined;\n export let filterText = '';\n\n let itemClasses = '';\n\n $: {\n const classes = [];\n if (isActive) { classes.push('active'); }\n if (isFirst) { classes.push('first'); }\n if (isHover) { classes.push('hover'); }\n if (item.isGroupHeader) { classes.push('groupHeader'); }\n if (item.isGroupItem) { classes.push('groupItem'); }\n itemClasses = classes.join(' ');\n }\n</script>\n\n<style>\n.item {\n cursor: default;\n height: var(--height, 42px);\n line-height: var(--height, 42px);\n padding: var(--itemPadding, 0 20px);\n color: var(--itemColor, inherit);\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n\n.groupHeader {\n text-transform: var(--groupTitleTextTransform, uppercase);\n}\n\n.groupItem {\n padding-left: var(--groupItemPaddingLeft, 40px);\n}\n\n.item:active {\n background: var(--itemActiveBackground, #b9daff);\n}\n\n.item.active {\n background: var(--itemIsActiveBG, #007aff);\n color: var(--itemIsActiveColor, #fff);\n}\n\n.item.first {\n border-radius: var(--itemFirstBorderRadius, 4px 4px 0 0);\n}\n\n.item.hover:not(.active) {\n background: var(--itemHoverBG, #e7f2ff);\n}\n</style>\n\n\n\n<div class=\"item {itemClasses}\">\n {@html getOptionLabel(item, filterText)}\n</div>\n", "<script>\n import { beforeUpdate, createEventDispatcher, onDestroy, onMount, tick } from 'svelte';\n\n const dispatch = createEventDispatcher();\n\n export let container = undefined;\n\n import ItemComponent from './Item.svelte';\n import VirtualList from './VirtualList.svelte';\n\n export let Item = ItemComponent;\n export let isVirtualList = false;\n export let items = [];\n export let getOptionLabel = (option, filterText) => {\n if (option) return option.isCreator ? `Create \\\"${filterText}\\\"` : option.label;\n };\n export let getGroupHeaderLabel = (option) => { return option.label };\n export let itemHeight = 40;\n export let hoverItemIndex = 0;\n export let selectedValue = undefined;\n export let optionIdentifier = 'value';\n export let hideEmptyState = false;\n export let noOptionsMessage = 'No options';\n export let isMulti = false;\n export let activeItemIndex = 0;\n export let filterText = '';\n\n let isScrollingTimer = 0;\n let isScrolling = false;\n let prev_items;\n let prev_activeItemIndex;\n let prev_selectedValue;\n\n onMount(() => {\n if (items.length > 0 && !isMulti && selectedValue) {\n const _hoverItemIndex = items.findIndex((item) => item[optionIdentifier] === selectedValue[optionIdentifier]);\n\n if (_hoverItemIndex) {\n hoverItemIndex = _hoverItemIndex;\n }\n }\n\n scrollToActiveItem('active');\n\n\n container.addEventListener('scroll', () => {\n clearTimeout(isScrollingTimer);\n\n isScrollingTimer = setTimeout(() => {\n isScrolling = false;\n }, 100);\n }, false);\n });\n\n onDestroy(() => {\n // clearTimeout(isScrollingTimer);\n });\n\n beforeUpdate(() => {\n\n if (items !== prev_items && items.length > 0) {\n hoverItemIndex = 0;\n }\n\n\n // if (prev_activeItemIndex && activeItemIndex > -1) {\n // hoverItemIndex = activeItemIndex;\n\n // scrollToActiveItem('active');\n // }\n // if (prev_selectedValue && selectedValue) {\n // scrollToActiveItem('active');\n\n // if (items && !isMulti) {\n // const hoverItemIndex = items.findIndex((item) => item[optionIdentifier] === selectedValue[optionIdentifier]);\n\n // if (hoverItemIndex) {\n // hoverItemIndex = hoverItemIndex;\n // }\n // }\n // }\n\n prev_items = items;\n prev_activeItemIndex = activeItemIndex;\n prev_selectedValue = selectedValue;\n });\n\n function itemClasses(hoverItemIndex, item, itemIndex, items, selectedValue, optionIdentifier, isMulti) {\n return `${selectedValue && !isMulti && (selectedValue[optionIdentifier] === item[optionIdentifier]) ? 'active ' : ''}${hoverItemIndex === itemIndex || items.length === 1 ? 'hover' : ''}`;\n }\n\n function handleSelect(item) {\n if (item.isCreator) return;\n dispatch('itemSelected', item);\n }\n\n function handleHover(i) {\n if (isScrolling) return;\n hoverItemIndex = i;\n }\n\n function handleClick(args) {\n const { item, i, event } = args;\n event.stopPropagation();\n\n if (selectedValue && !isMulti && selectedValue[optionIdentifier] === item[optionIdentifier]) return closeList();\n\n if (item.isCreator) {\n dispatch('itemCreated', filterText);\n } else {\n activeItemIndex = i;\n hoverItemIndex = i;\n handleSelect(item);\n }\n }\n\n function closeList() {\n dispatch('closeList');\n }\n\n async function updateHoverItem(increment) {\n if (isVirtualList) return;\n\n let isNonSelectableItem = true;\n\n while (isNonSelectableItem) {\n if (increment > 0 && hoverItemIndex === (items.length - 1)) {\n hoverItemIndex = 0;\n }\n else if (increment < 0 && hoverItemIndex === 0) {\n hoverItemIndex = items.length - 1;\n }\n else {\n hoverItemIndex = hoverItemIndex + increment;\n }\n\n isNonSelectableItem = items[hoverItemIndex].isGroupHeader && !items[hoverItemIndex].isSelectable;\n }\n\n await tick();\n\n scrollToActiveItem('hover');\n }\n\n function handleKeyDown(e) {\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault();\n items.length && updateHoverItem(1);\n break;\n case 'ArrowUp':\n e.preventDefault();\n items.length && updateHoverItem(-1);\n break;\n case 'Enter':\n e.preventDefault();\n if (items.length === 0) break;\n const hoverItem = items[hoverItemIndex];\n if (selectedValue && !isMulti && selectedValue[optionIdentifier] === hoverItem[optionIdentifier]) {\n closeList();\n break;\n }\n\n if (hoverItem.isCreator) {\n dispatch('itemCreated', filterText);\n } else {\n activeItemIndex = hoverItemIndex;\n handleSelect(items[hoverItemIndex]);\n }\n break;\n case 'Tab':\n e.preventDefault();\n if (items.length === 0) break;\n if (selectedValue && selectedValue[optionIdentifier] === items[hoverItemIndex][optionIdentifier]) return closeList();\n activeItemIndex = hoverItemIndex;\n handleSelect(items[hoverItemIndex]);\n break;\n }\n }\n\n function scrollToActiveItem(className) {\n if (isVirtualList || !container) return;\n\n let offsetBounding;\n const focusedElemBounding = container.querySelector(`.listItem .${className}`);\n\n if (focusedElemBounding) {\n offsetBounding = container.getBoundingClientRect().bottom - focusedElemBounding.getBoundingClientRect().bottom;\n }\n\n container.scrollTop -= offsetBounding;\n }\n\n function isItemActive(item, selectedValue, optionIdentifier) {\n return selectedValue && (selectedValue[optionIdentifier] === item[optionIdentifier]);\n };\n\n function isItemFirst(itemIndex) {\n return itemIndex === 0;\n };\n\n function isItemHover(hoverItemIndex, item, itemIndex, items) {\n return hoverItemIndex === itemIndex || items.length === 1;\n }\n\n</script>\n\n<svelte:window on:keydown=\"{handleKeyDown}\" />\n\n{#if isVirtualList}\n<div class=\"listContainer virtualList\" bind:this={container}>\n\n <VirtualList {items} {itemHeight} let:item let:i>\n\n <div on:mouseover=\"{() => handleHover(i)}\" on:click=\"{event => handleClick({item, i, event})}\"\n class=\"listItem\">\n <svelte:component\n this=\"{Item}\"\n {item}\n {filterText}\n {getOptionLabel}\n isFirst=\"{isItemFirst(i)}\"\n isActive=\"{isItemActive(item, selectedValue, optionIdentifier)}\"\n isHover=\"{isItemHover(hoverItemIndex, item, i, items)}\"\n />\n </div>\n\n</VirtualList>\n</div>\n{/if}\n\n{#if !isVirtualList}\n<div class=\"listContainer\" bind:this={container}>\n {#each items as item, i}\n {#if item.isGroupHeader && !item.isSelectable}\n <div class=\"listGroupTitle\">{getGroupHeaderLabel(item)}</div>\n { :else }\n <div\n on:mouseover=\"{() => handleHover(i)}\"\n on:click=\"{event => handleClick({item, i, event})}\"\n class=\"listItem\"\n >\n <svelte:component\n this=\"{Item}\"\n {item}\n {filterText}\n {getOptionLabel}\n isFirst=\"{isItemFirst(i)}\"\n isActive=\"{isItemActive(item, selectedValue, optionIdentifier)}\"\n isHover=\"{isItemHover(hoverItemIndex, item, i, items)}\"\n />\n </div>\n {/if}\n {:else}\n {#if !hideEmptyState}\n <div class=\"empty\">{noOptionsMessage}</div>\n {/if}\n {/each}\n</div>\n{/if}\n\n<style>\n.listContainer {\n box-shadow: var(--listShadow, 0 2px 3px 0 rgba(44, 62, 80, 0.24));\n border-radius: var(--listBorderRadius, 4px);\n max-height: var(--listMaxHeight, 250px);\n overflow-y: auto;\n background: var(--listBackground, #fff);\n}\n\n.virtualList {\n height: var(--virtualListHeight, 200px);\n}\n\n.listGroupTitle {\n color: var(--groupTitleColor, #8f8f8f);\n cursor: default;\n font-size: var(--groupTitleFontSize, 12px);\n font-weight: var(--groupTitleFontWeight, 600);\n height: var(--height, 42px);\n line-height: var(--height, 42px);\n padding: var(--groupTitlePadding, 0 20px);\n text-overflow: ellipsis;\n overflow-x: hidden;\n white-space: nowrap;\n text-transform: var(--groupTitleTextTransform, uppercase);\n}\n\n.empty {\n text-align: var(--listEmptyTextAlign, center);\n padding: var(--listEmptyPadding, 20px 0);\n color: var(--listEmptyColor, #78848F);\n}\n</style>\n", "<script>\n import { createEventDispatcher } from 'svelte';\n\n const dispatch = createEventDispatcher();\n\n export let selectedValue = [];\n export let activeSelectedValue = undefined;\n export let isDisabled = false;\n export let multiFullItemClearable = false;\n export let getSelectionLabel = undefined;\n\n function handleClear(i, event) {\n event.stopPropagation();\n dispatch('multiItemClear', {i});\n }\n</script>\n\n{#each selectedValue as value, i}\n<div class=\"multiSelectItem {activeSelectedValue === i ? 'active' : ''} {isDisabled ? 'disabled' : ''}\" on:click={event => multiFullItemClearable ? handleClear(i, event) : {}}>\n <div class=\"multiSelectItem_label\">\n {@html getSelectionLabel(value)}\n </div>\n {#if !isDisabled && !multiFullItemClearable}\n <div class=\"multiSelectItem_clear\" on:click=\"{event => handleClear(i, event)}\">\n <svg width=\"100%\" height=\"100%\" viewBox=\"-2 -2 50 50\" focusable=\"false\" role=\"presentation\">\n <path\n d=\"M34.923,37.251L24,26.328L13.077,37.251L9.436,33.61l10.923-10.923L9.436,11.765l3.641-3.641L24,19.047L34.923,8.124 l3.641,3.641L27.641,22.688L38.564,33.61L34.923,37.251z\"></path>\n </svg>\n </div>\n {/if}\n</div>\n{/each}\n\n\n\n<style>\n.multiSelectItem {\n background: var(--multiItemBG, #EBEDEF);\n margin: var(--multiItemMargin, 5px 5px 0 0);\n border-radius: var(--multiItemBorderRadius, 16px);\n height: var(--multiItemHeight, 32px);\n line-height: var(--multiItemHeight, 32px);\n display: flex;\n cursor: default;\n padding: var(--multiItemPadding, 0 10px 0 15px);\n max-width: 100%;\n}\n\n.multiSelectItem_label {\n margin: var(--multiLabelMargin, 0 5px 0 0);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.multiSelectItem:hover,\n.multiSelectItem.active {\n background-color: var(--multiItemActiveBG, #006FFF);\n color: var(--multiItemActiveColor, #fff);\n}\n\n.multiSelectItem.disabled:hover {\n background: var(--multiItemDisabledHoverBg, #EBEDEF);\n color: var(--multiItemDisabledHoverColor, #C1C6CC);\n}\n\n.multiSelectItem_clear {\n border-radius: var(--multiClearRadius, 50%);\n background: var(--multiClearBG, #52616F);\n min-width: var(--multiClearWidth, 16px);\n max-width: var(--multiClearWidth, 16px);\n height: var(--multiClearHeight, 16px);\n position: relative;\n top: var(--multiClearTop, 8px);\n text-align: var(--multiClearTextAlign, center);\n padding: var(--multiClearPadding, 1px);\n}\n\n.multiSelectItem_clear:hover,\n.active .multiSelectItem_clear {\n background: var(--multiClearHoverBG, #fff);\n}\n\n.multiSelectItem_clear:hover svg,\n.active .multiSelectItem_clear svg {\n fill: var(--multiClearHoverFill, #006FFF);\n}\n\n.multiSelectItem_clear svg {\n fill: var(--multiClearFill, #EBEDEF);\n vertical-align: top;\n}\n</style>\n", "<script>\n import {\n beforeUpdate,\n createEventDispatcher,\n onDestroy,\n onMount,\n tick\n } from \"svelte\";\n import List from \"./List.svelte\";\n import ItemComponent from \"./Item.svelte\";\n import SelectionComponent from \"./Selection.svelte\";\n import MultiSelectionComponent from \"./MultiSelection.svelte\";\n import isOutOfViewport from \"./utils/isOutOfViewport\";\n import debounce from \"./utils/debounce\";\n import DefaultClearIcon from \"./ClearIcon.svelte\";\n\n const dispatch = createEventDispatcher();\n export let container = undefined;\n export let input = undefined;\n export let Item = ItemComponent;\n export let Selection = SelectionComponent;\n export let MultiSelection = MultiSelectionComponent;\n export let isMulti = false;\n export let multiFullItemClearable = false;\n export let isDisabled = false;\n export let isCreatable = false;\n export let isFocused = false;\n export let selectedValue = undefined;\n export let filterText = \"\";\n export let placeholder = \"Select...\";\n export let items = [];\n export let itemFilter = (label, filterText, option) =>\n label.toLowerCase().includes(filterText.toLowerCase());\n export let groupBy = undefined;\n export let groupFilter = groups => groups;\n export let isGroupHeaderSelectable = false;\n export let getGroupHeaderLabel = option => {\n return option.label;\n };\n export let getOptionLabel = (option, filterText) => {\n return option.isCreator ? `Create \\\"${filterText}\\\"` : option.label;\n };\n export let optionIdentifier = \"value\";\n export let loadOptions = undefined;\n export let hasError = false;\n export let containerStyles = \"\";\n export let getSelectionLabel = option => {\n if (option) return option.label;\n };\n\n export let createGroupHeaderItem = groupValue => {\n return {\n value: groupValue,\n label: groupValue\n };\n };\n\n export let createItem = filterText => {\n return {\n value: filterText,\n label: filterText\n };\n };\n\n export let isSearchable = true;\n export let inputStyles = \"\";\n export let isClearable = true;\n export let isWaiting = false;\n export let listPlacement = \"auto\";\n export let listOpen = false;\n export let list = undefined;\n export let isVirtualList = false;\n export let loadOptionsInterval = 300;\n export let noOptionsMessage = \"No options\";\n export let hideEmptyState = false;\n export let filteredItems = [];\n export let inputAttributes = {};\n export let listAutoWidth = true;\n export let itemHeight = 40;\n export let Icon = undefined;\n export let iconProps = {};\n export let showChevron = false;\n export let showIndicator = false;\n export let containerClasses = \"\";\n export let indicatorSvg = undefined;\n export let ClearIcon = DefaultClearIcon;\n\n let target;\n let activeSelectedValue;\n let _items = [];\n let originalItemsClone;\n let prev_selectedValue;\n let prev_listOpen;\n let prev_filterText;\n let prev_isFocused;\n let prev_filteredItems;\n\n async function resetFilter() {\n await tick();\n filterText = \"\";\n }\n\n let getItemsHasInvoked = false;\n const getItems = debounce(async () => {\n getItemsHasInvoked = true;\n isWaiting = true;\n\n let res = await loadOptions(filterText).catch(err => {\n console.warn('svelte-select loadOptions error :>> ', err);\n dispatch(\"error\", { type: 'loadOptions', details: err });\n });\n \n if (res && !res.cancelled) {\n if (res) {\n items = [...res];\n dispatch(\"loaded\", { items });\n } else {\n items = [];\n }\n\n isWaiting = false;\n isFocused = true;\n listOpen = true;\n }\n \n }, loadOptionsInterval);\n\n $: disabled = isDisabled;\n\n $: updateSelectedValueDisplay(items);\n\n $: {\n if (typeof selectedValue === \"string\") {\n selectedValue = {\n [optionIdentifier]: selectedValue,\n label: selectedValue\n };\n } else if (isMulti && Array.isArray(selectedValue) && selectedValue.length > 0) {\n selectedValue = selectedValue.map(item => typeof item === \"string\" ? ({ value: item, label: item }) : item);\n }\n }\n\n $: {\n if (noOptionsMessage && list) list.$set({ noOptionsMessage });\n }\n\n $: showSelectedItem = selectedValue && filterText.length === 0;\n\n $: placeholderText = selectedValue ? \"\" : placeholder;\n\n let _inputAttributes = {};\n $: {\n _inputAttributes = Object.assign({\n autocomplete: \"off\",\n autocorrect: \"off\",\n spellcheck: false\n }, inputAttributes);\n\n if (!isSearchable) {\n _inputAttributes.readonly = true;\n }\n }\n\n $: {\n let _filteredItems;\n let _items = items;\n\n if (items && items.length > 0 && typeof items[0] !== \"object\") {\n _items = items.map((item, index) => {\n return {\n index,\n value: item,\n label: item\n };\n });\n }\n\n if (loadOptions && filterText.length === 0 && originalItemsClone) {\n _filteredItems = JSON.parse(originalItemsClone);\n _items = JSON.parse(originalItemsClone);\n } else {\n _filteredItems = loadOptions\n ? filterText.length === 0\n ? []\n : _items\n : _items.filter(item => {\n let keepItem = true;\n\n if (isMulti && selectedValue) {\n keepItem = !selectedValue.some(value => {\n return value[optionIdentifier] === item[optionIdentifier];\n });\n }\n\n if (!keepItem) return false;\n if (filterText.length < 1) return true;\n return itemFilter(\n getOptionLabel(item, filterText),\n filterText,\n item\n );\n });\n }\n\n if (groupBy) {\n const groupValues = [];\n const groups = {};\n\n _filteredItems.forEach(item => {\n const groupValue = groupBy(item);\n\n if (!groupValues.includes(groupValue)) {\n groupValues.push(groupValue);\n groups[groupValue] = [];\n\n if (groupValue) {\n groups[groupValue].push(\n Object.assign(createGroupHeaderItem(groupValue, item), {\n id: groupValue,\n isGroupHeader: true,\n isSelectable: isGroupHeaderSelectable\n })\n );\n }\n }\n\n groups[groupValue].push(\n Object.assign({ isGroupItem: !!groupValue }, item)\n );\n });\n\n const sortedGroupedItems = [];\n\n groupFilter(groupValues).forEach(groupValue => {\n sortedGroupedItems.push(...groups[groupValue]);\n });\n\n filteredItems = sortedGroupedItems;\n } else {\n filteredItems = _filteredItems;\n }\n }\n\n beforeUpdate(() => {\n if (isMulti && selectedValue && selectedValue.length > 1) {\n checkSelectedValueForDuplicates();\n }\n\n if (!isMulti && selectedValue && prev_selectedValue !== selectedValue) {\n if (\n !prev_selectedValue ||\n JSON.stringify(selectedValue[optionIdentifier]) !==\n JSON.stringify(prev_selectedValue[optionIdentifier])\n ) {\n dispatch(\"select\", selectedValue);\n }\n }\n\n if (\n isMulti &&\n JSON.stringify(selectedValue) !== JSON.stringify(prev_selectedValue)\n ) {\n if (checkSelectedValueForDuplicates()) {\n dispatch(\"select\", selectedValue);\n }\n }\n\n if (container && listOpen !== prev_listOpen) {\n if (listOpen) {\n loadList();\n } else {\n removeList();\n }\n }\n\n if (filterText !== prev_filterText) {\n if (filterText.length > 0) {\n isFocused = true;\n listOpen = true;\n\n if (loadOptions) {\n getItems();\n } else {\n loadList();\n listOpen = true;\n\n if (isMulti) {\n activeSelectedValue = undefined;\n }\n }\n } else {\n setList([]);\n }\n\n if (list) {\n list.$set({\n filterText\n });\n }\n }\n\n if (isFocused !== prev_isFocused) {\n if (isFocused || listOpen) {\n handleFocus();\n } else {\n resetFilter();\n if (input) input.blur();\n }\n }\n\n if (prev_filteredItems !== filteredItems) {\n let _filteredItems = [...filteredItems];\n\n if (isCreatable && filterText) {\n const itemToCreate = createItem(filterText);\n itemToCreate.isCreator = true;\n\n const existingItemWithFilterValue = _filteredItems.find(item => {\n return item[optionIdentifier] === itemToCreate[optionIdentifier];\n });\n\n let existingSelectionWithFilterValue;\n\n if (selectedValue) {\n if (isMulti) {\n existingSelectionWithFilterValue = selectedValue.find(selection => {\n return (\n selection[optionIdentifier] === itemToCreate[optionIdentifier]\n );\n });\n } else if (\n selectedValue[optionIdentifier] === itemToCreate[optionIdentifier]\n ) {\n existingSelectionWithFilterValue = selectedValue;\n }\n }\n\n if (!existingItemWithFilterValue && !existingSelectionWithFilterValue) {\n _filteredItems = [..._filteredItems, itemToCreate];\n }\n }\n\n setList(_filteredItems);\n }\n\n prev_selectedValue = selectedValue;\n prev_listOpen = listOpen;\n prev_filterText = filterText;\n prev_isFocused = isFocused;\n prev_filteredItems = filteredItems;\n });\n\n function checkSelectedValueForDuplicates() {\n let noDuplicates = true;\n if (selectedValue) {\n const ids = [];\n const uniqueValues = [];\n\n selectedValue.forEach(val => {\n if (!ids.includes(val[optionIdentifier])) {\n ids.push(val[optionIdentifier]);\n uniqueValues.push(val);\n } else {\n noDuplicates = false;\n }\n });\n\n if (!noDuplicates)\n selectedValue = uniqueValues;\n }\n return noDuplicates;\n }\n\n function findItem(selection) {\n let matchTo = selection ? selection[optionIdentifier] : selectedValue[optionIdentifier];\n return items.find(item => item[optionIdentifier] === matchTo);\n } \n\n function updateSelectedValueDisplay(items) {\n if (!items || items.length === 0 || items.some(item => typeof item !== \"object\")) return;\n if (!selectedValue || (isMulti ? selectedValue.some(selection => !selection || !selection[optionIdentifier]) : !selectedValue[optionIdentifier])) return;\n\n if (Array.isArray(selectedValue)) {\n selectedValue = selectedValue.map(selection => findItem(selection) || selection);\n } else {\n selectedValue = findItem() || selectedValue;\n }\n }\n\n async function setList(items) {\n await tick();\n if (!listOpen) return;\n if (list) return list.$set({ items });\n if (loadOptions && getItemsHasInvoked && items.length > 0) loadList();\n }\n\n function handleMultiItemClear(event) {\n const { detail } = event;\n const itemToRemove =\n selectedValue[detail ? detail.i : selectedValue.length - 1];\n\n if (selectedValue.length === 1) {\n selectedValue = undefined;\n } else {\n selectedValue = selectedValue.filter(item => {\n return item !== itemToRemove;\n });\n }\n\n dispatch(\"clear\", itemToRemove);\n\n getPosition();\n }\n\n async function getPosition() {\n await tick();\n if (!target || !container) return;\n const { top, height, width } = container.getBoundingClientRect();\n\n target.style[\"min-width\"] = `${width}px`;\n target.style.width = `${listAutoWidth ? \"auto\" : \"100%\"}`;\n target.style.left = \"0\";\n\n if (listPlacement === \"top\") {\n target.style.bottom = `${height + 5}px`;\n } else {\n target.style.top = `${height + 5}px`;\n }\n\n target = target;\n\n if (listPlacement === \"auto\" && isOutOfViewport(target).bottom) {\n target.style.top = ``;\n target.style.bottom = `${height + 5}px`;\n }\n\n target.style.visibility = \"\";\n }\n\n function handleKeyDown(e) {\n if (!isFocused) return;\n\n switch (e.key) {\n case \"ArrowDown\":\n e.preventDefault();\n listOpen = true;\n activeSelectedValue = undefined;\n break;\n case \"ArrowUp\":\n e.preventDefault();\n listOpen = true;\n activeSelectedValue = undefined;\n break;\n case \"Tab\":\n if (!listOpen) isFocused = false;\n break;\n case \"Backspace\":\n if (!isMulti || filterText.length > 0) return;\n if (isMulti && selectedValue && selectedValue.length > 0) {\n handleMultiItemClear(\n activeSelectedValue !== undefined\n ? activeSelectedValue\n : selectedValue.length - 1\n );\n if (activeSelectedValue === 0 || activeSelectedValue === undefined)\n break;\n activeSelectedValue =\n selectedValue.length > activeSelectedValue\n ? activeSelectedValue - 1\n : undefined;\n }\n break;\n case \"ArrowLeft\":\n if (list) list.$set({ hoverItemIndex: -1 });\n if (!isMulti || filterText.length > 0) return;\n\n if (activeSelectedValue === undefined) {\n activeSelectedValue = selectedValue.length - 1;\n } else if (\n selectedValue.length > activeSelectedValue &&\n activeSelectedValue !== 0\n ) {\n activeSelectedValue -= 1;\n }\n break;\n case \"ArrowRight\":\n if (list) list.$set({ hoverItemIndex: -1 });\n if (\n !isMulti ||\n filterText.length > 0 ||\n activeSelectedValue === undefined\n )\n return;\n if (activeSelectedValue === selectedValue.length - 1) {\n activeSelectedValue = undefined;\n } else if (activeSelectedValue < selectedValue.length - 1) {\n activeSelectedValue += 1;\n }\n break;\n }\n }\n\n function handleFocus() {\n isFocused = true;\n if (input) input.focus();\n }\n\n function removeList() {\n resetFilter();\n activeSelectedValue = undefined;\n\n if (!list) return;\n list.$destroy();\n list = undefined;\n\n if (!target) return;\n if (target.parentNode) target.parentNode.removeChild(target);\n target = undefined;\n\n list = list;\n target = target;\n }\n\n function handleWindowClick(event) {\n if (!container) return;\n const eventTarget =\n event.path && event.path.length > 0 ? event.path[0] : event.target;\n if (container.contains(eventTarget)) return;\n isFocused = false;\n listOpen = false;\n activeSelectedValue = undefined;\n if (input) input.blur();\n }\n\n function handleClick() {\n if (isDisabled) return;\n isFocused = true;\n listOpen = !listOpen;\n }\n\n export function handleClear() {\n selectedValue = undefined;\n listOpen = false;\n dispatch(\"clear\", selectedValue);\n handleFocus();\n }\n\n async function loadList() {\n await tick();\n if (target && list) return;\n\n const data = {\n Item,\n filterText,\n optionIdentifier,\n noOptionsMessage,\n hideEmptyState,\n isVirtualList,\n selectedValue,\n isMulti,\n getGroupHeaderLabel,\n items: filteredItems,\n itemHeight\n };\n\n if (getOptionLabel) {\n data.getOptionLabel = getOptionLabel;\n }\n\n target = document.createElement(\"div\");\n\n Object.assign(target.style, {\n position: \"absolute\",\n \"z-index\": 2,\n visibility: \"hidden\"\n });\n\n list = list;\n target = target;\n if (container) container.appendChild(target);\n\n list = new List({\n target,\n props: data\n });\n\n list.$on(\"itemSelected\", event => {\n const { detail } = event;\n\n if (detail) {\n const item = Object.assign({}, detail);\n\n if (!item.isGroupHeader || item.isSelectable) {\n\n if (isMulti) {\n selectedValue = selectedValue ? selectedValue.concat([item]) : [item];\n } else {\n selectedValue = item;\n }\n\n resetFilter();\n selectedValue = selectedValue;\n\n setTimeout(() => {\n listOpen = false;\n activeSelectedValue = undefined;\n });\n }\n }\n });\n\n list.$on(\"itemCreated\", event => {\n const { detail } = event;\n if (isMulti) {\n selectedValue = selectedValue || [];\n selectedValue = [...selectedValue, createItem(detail)];\n } else {\n selectedValue = createItem(detail);\n }\n \n dispatch('itemCreated', detail);\n filterText = \"\";\n listOpen = false;\n activeSelectedValue = undefined;\n resetFilter();\n });\n\n list.$on(\"closeList\", () => {\n listOpen = false;\n });\n\n (list = list), (target = target);\n getPosition();\n }\n\n onMount(() => {\n if (isFocused) input.focus();\n if (listOpen) loadList();\n\n if (items && items.length > 0) {\n originalItemsClone = JSON.stringify(items);\n }\n });\n\n onDestroy(() => {\n removeList();\n });\n</script>\n\n<style>\n.selectContainer {\n --padding: 0 16px;\n\n border: var(--border, 1px solid #d8dbdf);\n border-radius: var(--borderRadius, 3px);\n height: var(--height, 42px);\n position: relative;\n display: flex;\n align-items: center;\n padding: var(--padding);\n background: var(--background, #fff);\n}\n\n.selectContainer input {\n cursor: default;\n border: none;\n color: var(--inputColor, #3f4f5f);\n height: var(--height, 42px);\n line-height: var(--height, 42px);\n padding: var(--inputPadding, var(--padding));\n width: 100%;\n background: transparent;\n font-size: var(--inputFontSize, 14px);\n letter-spacing: var(--inputLetterSpacing, -0.08px);\n position: absolute;\n left: var(--inputLeft, 0);\n}\n\n.selectContainer input::placeholder {\n color: var(--placeholderColor, #78848f);\n opacity: var(--placeholderOpacity, 1);\n}\n\n.selectContainer input:focus {\n outline: none;\n}\n\n.selectContainer:hover {\n border-color: var(--borderHoverColor, #b2b8bf);\n}\n\n.selectContainer.focused {\n border-color: var(--borderFocusColor, #006fe8);\n}\n\n.selectContainer.disabled {\n background: var(--disabledBackground, #ebedef);\n border-color: var(--disabledBorderColor, #ebedef);\n color: var(--disabledColor, #c1c6cc);\n}\n\n.selectContainer.disabled input::placeholder {\n color: var(--disabledPlaceholderColor, #c1c6cc);\n opacity: var(--disabledPlaceholderOpacity, 1);\n}\n\n.selectedItem {\n line-height: var(--height, 42px);\n height: var(--height, 42px);\n overflow-x: hidden;\n padding: var(--selectedItemPadding, 0 20px 0 0);\n}\n\n.selectedItem:focus {\n outline: none;\n}\n\n.clearSelect {\n position: absolute;\n right: var(--clearSelectRight, 10px);\n top: var(--clearSelectTop, 11px);\n bottom: var(--clearSelectBottom, 11px);\n width: var(--clearSelectWidth, 20px);\n color: var(--clearSelectColor, #c5cacf);\n flex: none !important;\n}\n\n.clearSelect:hover {\n color: var(--clearSelectHoverColor, #2c3e50);\n}\n\n.selectContainer.focused .clearSelect {\n color: var(--clearSelectFocusColor, #3f4f5f);\n}\n\n.indicator {\n position: absolute;\n right: var(--indicatorRight, 10px);\n top: var(--indicatorTop, 11px);\n width: var(--indicatorWidth, 20px);\n height: var(--indicatorHeight, 20px);\n color: var(--indicatorColor, #c5cacf);\n}\n\n.indicator svg {\n display: inline-block;\n fill: var(--indicatorFill, currentcolor);\n line-height: 1;\n stroke: var(--indicatorStroke, currentcolor);\n stroke-width: 0;\n}\n\n.spinner {\n position: absolute;\n right: var(--spinnerRight, 10px);\n top: var(--spinnerLeft, 11px);\n width: var(--spinnerWidth, 20px);\n height: var(--spinnerHeight, 20px);\n color: var(--spinnerColor, #51ce6c);\n animation: rotate 0.75s linear infinite;\n}\n\n.spinner_icon {\n display: block;\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n -webkit-transform: none;\n}\n\n.spinner_path {\n stroke-dasharray: 90;\n stroke-linecap: round;\n}\n\n.multiSelect {\n display: flex;\n padding: var(--multiSelectPadding, 0 35px 0 16px);\n height: auto;\n flex-wrap: wrap;\n align-items: stretch;\n}\n\n.multiSelect > * {\n flex: 1 1 50px;\n}\n\n.selectContainer.multiSelect input {\n padding: var(--multiSelectInputPadding, 0);\n position: relative;\n margin: var(--multiSelectInputMargin, 0);\n}\n\n.hasError {\n border: var(--errorBorder, 1px solid #ff2d55);\n background: var(--errorBackground, #fff);\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n</style>\n\n<svelte:window\n on:click={handleWindowClick}\n on:keydown={handleKeyDown}\n on:resize={getPosition} />\n\n<div\n class=\"selectContainer {containerClasses}\"\n class:hasError\n class:multiSelect={isMulti}\n class:disabled={isDisabled}\n class:focused={isFocused}\n style={containerStyles}\n on:click={handleClick}\n bind:this={container}>\n\n {#if Icon}\n <svelte:component this={Icon} {...iconProps} />\n {/if}\n\n {#if isMulti && selectedValue && selectedValue.length > 0}\n <svelte:component\n this={MultiSelection}\n {selectedValue}\n {getSelectionLabel}\n {activeSelectedValue}\n {isDisabled}\n {multiFullItemClearable}\n on:multiItemClear={handleMultiItemClear}\n on:focus={handleFocus} />\n {/if}\n\n {#if isDisabled}\n <input\n {..._inputAttributes}\n bind:this={input}\n on:focus={handleFocus}\n bind:value={filterText}\n placeholder={placeholderText}\n style={inputStyles}\n disabled />\n {:else}\n <input\n {..._inputAttributes}\n bind:this={input}\n on:focus={handleFocus}\n bind:value={filterText}\n placeholder={placeholderText}\n style={inputStyles} />\n {/if}\n\n {#if !isMulti && showSelectedItem}\n <div class=\"selectedItem\" on:focus={handleFocus}>\n <svelte:component\n this={Selection}\n item={selectedValue}\n {getSelectionLabel} />\n </div>\n {/if}\n\n {#if showSelectedItem && isClearable && !isDisabled && !isWaiting}\n <div class=\"clearSelect\" on:click|preventDefault={handleClear}>\n <svelte:component this={ClearIcon} /> \n </div>\n {/if}\n\n {#if showIndicator || (showChevron && !selectedValue || (!isSearchable && !isDisabled && !isWaiting && ((showSelectedItem && !isClearable) || !showSelectedItem)))}\n <div class=\"indicator\">\n {#if indicatorSvg}\n {@html indicatorSvg}\n {:else}\n <svg\n width=\"100%\"\n height=\"100%\"\n viewBox=\"0 0 20 20\"\n focusable=\"false\">\n <path\n d=\"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747\n 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0\n 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502\n 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0\n 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z\" />\n </svg>\n {/if}\n </div>\n {/if}\n\n {#if isWaiting}\n <div class=\"spinner\">\n <svg class=\"spinner_icon\" viewBox=\"25 25 50 50\">\n <circle\n class=\"spinner_path\"\n cx=\"50\"\n cy=\"50\"\n r=\"20\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"5\"\n stroke-miterlimit=\"10\" />\n </svg>\n </div>\n {/if}\n</div>\n", "<script>\n export let getSelectionLabel = undefined;\n export let item = undefined;\n</script>\n\n<style>\n.selection {\n text-overflow: ellipsis;\n overflow-x: hidden;\n white-space: nowrap;\n}\n</style>\n\n<div class=\"selection\">\n {@html getSelectionLabel(item)}\n</div>\n", "<script>\n\timport { onMount, tick } from 'svelte';\n\n\t// props\n\texport let items = undefined;\n\texport let height = '100%';\n\texport let itemHeight = 40;\n\texport let hoverItemIndex = 0;\n\n\t// read-only, but visible to consumers via bind:start\n\texport let start = 0;\n\texport let end = 0;\n\n\t// local state\n\tlet height_map = [];\n\tlet rows;\n\tlet viewport;\n\tlet contents;\n\tlet viewport_height = 0;\n\tlet visible;\n\tlet mounted;\n\n\tlet top = 0;\n\tlet bottom = 0;\n\tlet average_height;\n\n\t$: visible = items.slice(start, end).map((data, i) => {\n\t\treturn { index: i + start, data };\n\t});\n\n\t// whenever `items` changes, invalidate the current heightmap\n\t$: if (mounted) refresh(items, viewport_height, itemHeight);\n\n\tasync function refresh(items, viewport_height, itemHeight) {\n\t\tconst { scrollTop } = viewport;\n\n\t\tawait tick(); // wait until the DOM is up to date\n\n\t\tlet content_height = top - scrollTop;\n\t\tlet i = start;\n\n\t\twhile (content_height < viewport_height && i < items.length) {\n\t\t\tlet row = rows[i - start];\n\n\t\t\tif (!row) {\n\t\t\t\tend = i + 1;\n\t\t\t\tawait tick(); // render the newly visible row\n\t\t\t\trow = rows[i - start];\n\t\t\t}\n\n\t\t\tconst row_height = height_map[i] = itemHeight || row.offsetHeight;\n\t\t\tcontent_height += row_height;\n\t\t\ti += 1;\n\t\t}\n\n\t\tend = i;\n\n\t\tconst remaining = items.length - end;\n\t\taverage_height = (top + content_height) / end;\n\n\t\tbottom = remaining * average_height;\n\t\theight_map.length = items.length;\n\n\t\tviewport.scrollTop = 0;\n\t}\n\n\tasync function handle_scroll() {\n\t\tconst { scrollTop } = viewport;\n\n\t\tconst old_start = start;\n\n\t\tfor (let v = 0; v < rows.length; v += 1) {\n\t\t\theight_map[start + v] = itemHeight || rows[v].offsetHeight;\n\t\t}\n\n\t\tlet i = 0;\n\t\tlet y = 0;\n\n\t\twhile (i < items.length) {\n\t\t\tconst row_height = height_map[i] || average_height;\n\t\t\tif (y + row_height > scrollTop) {\n\t\t\t\tstart = i;\n\t\t\t\ttop = y;\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\ty += row_height;\n\t\t\ti += 1;\n\t\t}\n\n\t\twhile (i < items.length) {\n\t\t\ty += height_map[i] || average_height;\n\t\t\ti += 1;\n\n\t\t\tif (y > scrollTop + viewport_height) break;\n\t\t}\n\n\t\tend = i;\n\n\t\tconst remaining = items.length - end;\n\t\taverage_height = y / end;\n\n\t\twhile (i < items.length) height_map[i++] = average_height;\n\t\tbottom = remaining * average_height;\n\n\t\t// prevent jumping if we scrolled up into unknown territory\n\t\tif (start < old_start) {\n\t\t\tawait tick();\n\n\t\t\tlet expected_height = 0;\n\t\t\tlet actual_height = 0;\n\n\t\t\tfor (let i = start; i < old_start; i += 1) {\n\t\t\t\tif (rows[i - start]) {\n\t\t\t\t\texpected_height += height_map[i];\n\t\t\t\t\tactual_height += itemHeight || rows[i - start].offsetHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst d = actual_height - expected_height;\n\t\t\tviewport.scrollTo(0, scrollTop + d);\n\t\t}\n\n\t\t// TODO if we overestimated the space these\n\t\t// rows would occupy we may need to add some\n\t\t// more. maybe we can just call handle_scroll again?\n\t}\n\n\t// trigger initial refresh\n\tonMount(() => {\n\t\trows = contents.getElementsByTagName('svelte-virtual-list-row');\n\t\tmounted = true;\n\t});\n</script>\n\n<style>\nsvelte-virtual-list-viewport {\n\tposition: relative;\n\toverflow-y: auto;\n\t-webkit-overflow-scrolling: touch;\n\tdisplay: block;\n}\n\nsvelte-virtual-list-contents,\nsvelte-virtual-list-row {\n\tdisplay: block;\n}\n\nsvelte-virtual-list-row {\n\toverflow: hidden;\n}\n</style>\n\n<svelte-virtual-list-viewport bind:this={viewport} bind:offsetHeight={viewport_height} on:scroll={handle_scroll}\n\tstyle=\"height: {height};\">\n\t<svelte-virtual-list-contents bind:this={contents} style=\"padding-top: {top}px; padding-bottom: {bottom}px;\">\n\t\t{#each visible as row (row.index)}\n\t\t\t<svelte-virtual-list-row>\n\t\t\t\t<slot item={row.data} i={row.index} {hoverItemIndex}>Missing template</slot>\n\t\t\t</svelte-virtual-list-row>\n\t\t{/each}\n\t</svelte-virtual-list-contents>\n</svelte-virtual-list-viewport>\n", "<script>\n import Sidebar from './components/Sidebar.svelte';\n import Content from './components/Content.svelte';\n import applyEnvForObject from './lib/applyEnvForObject';\n\n export let config;\n\n let envId = 0;\n $: env = config.environments[envId];\n $: color = env.color;\n $: requests = applyEnvForObject(config.requests, config.environments[envId]);\n $: groups = applyEnvForObject(config.groups, config.environments[envId]);\n\n const jsonUrl = window.location.origin + window.INSOMNIA_URL;\n const runInInsomniaLink = `https://insomnia.rest/run/?label=${encodeURIComponent(\n config.workspace.name\n )}&uri=${encodeURIComponent(jsonUrl)}`;\n\n let menuVisible = false;\n let exampleVisible =\n (localStorage.getItem('show-examples') || 'true') === 'true';\n\n function toggleHamburger() {\n menuVisible = !menuVisible;\n }\n\n function toggleExample() {\n exampleVisible = !exampleVisible;\n localStorage.setItem('show-examples', exampleVisible);\n }\n</script>\n\n<svelte:head>\n <title>{config.workspace.name}</title>\n</svelte:head>\n\n<header style=\"border-top: 6px solid {color !== null ? color : '#6a57d5'};\">\n <div class=\"header-left\">\n <span class=\"hamburger-toggler\" on:click={toggleHamburger}>\n <i class=\"fa fa-bars\" aria-hidden=\"true\" />\n </span>\n\n <div class=\"logo\">\n <img src=\"logo.png\" alt={config.workspace.name} />\n </div>\n\n <h1 class=\"title\">{config.workspace.name}</h1>\n </div>\n <div class=\"header-right\">\n <div class=\"run\">\n <a href={runInInsomniaLink} target=\"_blank\">\n <img src=\"https://insomnia.rest/images/run.svg\" alt=\"Run in Insomnia\" />\n </a>\n </div>\n <div class=\"environment\">\n <label for=\"env\" style=\"display:inline-block;\">Environment:</label>\n <select id=\"env\" bind:value={envId}>\n {#each config.environments as environment, idx}\n <option value={idx}>{environment.name}</option>\n {/each}\n </select>\n </div>\n <span\n class=\"example-toggler\"\n class:inactive={!exampleVisible}\n on:click={toggleExample}\n title=\"Toggle request examples\"\n >\n <i class=\"fa fa-code\" aria-hidden=\"true\" />\n </span>\n </div>\n</header>\n\n<section class=\"wrapper\" class:hide-right={!exampleVisible}>\n <Sidebar\n {requests}\n {groups}\n workspace={config.workspace}\n visible={menuVisible}\n />\n <Content\n {requests}\n {groups}\n workspace={config.workspace}\n cookiejars={config.cookiejars}\n {env}\n />\n</section>\n\n<style type=\"scss\" global>/*\nMonokai style - ported by Luigi Maselli - http://grigio.org\n*/\n:global(.hljs) {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n background: #272822;\n color: #ddd; }\n\n:global(.hljs-tag),\n:global(.hljs-keyword),\n:global(.hljs-selector-tag),\n:global(.hljs-literal),\n:global(.hljs-strong),\n:global(.hljs-name) {\n color: #f92672; }\n\n:global(.hljs-code) {\n color: #66d9ef; }\n\n:global(.hljs-class) :global(.hljs-title) {\n color: white; }\n\n:global(.hljs-attribute),\n:global(.hljs-symbol),\n:global(.hljs-regexp),\n:global(.hljs-link) {\n color: #bf79db; }\n\n:global(.hljs-string),\n:global(.hljs-bullet),\n:global(.hljs-subst),\n:global(.hljs-title),\n:global(.hljs-section),\n:global(.hljs-emphasis),\n:global(.hljs-type),\n:global(.hljs-built_in),\n:global(.hljs-builtin-name),\n:global(.hljs-selector-attr),\n:global(.hljs-selector-pseudo),\n:global(.hljs-addition),\n:global(.hljs-variable),\n:global(.hljs-template-tag),\n:global(.hljs-template-variable) {\n color: #a6e22e; }\n\n:global(.hljs-comment),\n:global(.hljs-quote),\n:global(.hljs-deletion),\n:global(.hljs-meta) {\n color: #75715e; }\n\n:global(.hljs-keyword),\n:global(.hljs-selector-tag),\n:global(.hljs-literal),\n:global(.hljs-doctag),\n:global(.hljs-title),\n:global(.hljs-section),\n:global(.hljs-type),\n:global(.hljs-selector-id) {\n font-weight: bold; }\n\n:global(html), :global(body) {\n position: relative;\n width: 100%; }\n\n:global(body) {\n color: #333;\n margin: 0;\n box-sizing: border-box;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif; }\n\n:global(h1) {\n font-size: 36px; }\n\n:global(h1), :global(h2), :global(h3), :global(h4) {\n font-weight: normal;\n margin: 0;\n padding: 10px 0; }\n\n:global(hr) {\n border: none;\n display: block;\n height: 1px;\n background: #e7e7e7; }\n\n:global(a) {\n color: #0064c8;\n text-decoration: none; }\n :global(a:hover) {\n text-decoration: underline; }\n\n:global(label) {\n display: block; }\n\n:global(input), :global(button), :global(select), :global(textarea) {\n font-family: inherit;\n font-size: inherit;\n padding: 0.4em;\n margin: 0 0 0.5em 0;\n box-sizing: border-box;\n border: 1px solid #ccc;\n border-radius: 2px; }\n\n:global(input:disabled) {\n color: #ccc; }\n\n:global(input[type=\"range\"]) {\n height: 0; }\n\n:global(button) {\n color: #333;\n background-color: #f4f4f4;\n outline: none; }\n :global(button:active) {\n background-color: #ddd; }\n :global(button:focus) {\n background-color: #666; }\n\n:global(.row) {\n display: flex;\n height: 100%; }\n\n:global(.left), :global(.right) {\n box-sizing: border-box;\n padding: 10px 15px;\n flex: 1;\n min-width: 50%; }\n\n:global(.left) {\n transition-duration: .2s;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-property: min-width;\n will-change: transform; }\n\n:global(.right) {\n background: #232323;\n color: #fff;\n max-width: 0; }\n\n:global(.wrapper.hide-right) :global(.left) {\n min-width: 100%; }\n\n:global(.sidebar-list-link) {\n display: block;\n padding: 5px 15px;\n margin-bottom: 5px;\n text-decoration: none;\n color: #222;\n border-top-left-radius: 5px;\n border-bottom-left-radius: 5px; }\n :global(.sidebar-list-link:hover) {\n background: rgba(0, 0, 0, 0.05);\n text-decoration: none; }\n :global(.sidebar-list-link.expanded) {\n background: rgba(0, 0, 0, 0.1); }\n :global(.sidebar-list-link::before), :global(.sidebar-list-link) :global(span), :global(.sidebar-list-link) :global(strong) {\n display: inline-block;\n vertical-align: middle; }\n :global(.sidebar-list-link::before) {\n margin-right: 7px; }\n :global(.sidebar-list-link) :global(strong) {\n font-size: 11px;\n margin-right: 5px; }\n :global(.sidebar-list-link) :global(strong.get) {\n color: #7d69cb; }\n :global(.sidebar-list-link) :global(strong.post) {\n color: #59a210; }\n :global(.sidebar-list-link) :global(strong.put) {\n color: #ff9a1f; }\n :global(.sidebar-list-link) :global(strong.patch) {\n color: #d07502; }\n :global(.sidebar-list-link) :global(strong.delete) {\n color: #d04444; }\n :global(.sidebar-list-link) :global(strong.options), :global(.sidebar-list-link) :global(strong.head) {\n color: #1c90b4; }\n\n:global(.request-title) {\n font-weight: 600; }\n :global(.request-title) :global(strong) {\n display: inline-block;\n padding: 5px 8px;\n text-transform: uppercase;\n color: #fff;\n border-radius: 3px;\n margin-right: 10px;\n font-size: 17px;\n background: #1c90b4; }\n :global(.request-title) :global(strong.get) {\n background: #7d69cb; }\n :global(.request-title) :global(strong.post) {\n background: #59a210; }\n :global(.request-title) :global(strong.put) {\n background: #ff9a1f; }\n :global(.request-title) :global(strong.patch) {\n background: #d07502; }\n :global(.request-title) :global(strong.delete) {\n background: #d04444; }\n\n:global(.hljs) {\n padding: 0;\n background: transparent; }\n\n:global(.description) {\n overflow-x: auto; }\n :global(.description) :global(code), :global(.description) :global(pre) {\n background: #eee;\n text-shadow: 0 1px #fff;\n padding: 0 .3em;\n white-space: pre-wrap;\n overflow-wrap: break-word; }\n :global(.description) :global(pre) {\n padding: 10px 15px; }\n :global(.description) :global(pre) :global(code) {\n padding: 0; }\n\n:global(.language-selector) :global(.selectContainer) {\n transition: background 150ms linear; }\n :global(.language-selector) :global(.selectContain