{"version":3,"sources":["webpack:///./node_modules/preact/dist/preact.module.js","webpack:///./app/javascript/crayons/Buttons/Button.jsx","webpack:///./app/javascript/crayons/Links/Link.jsx","webpack:///./app/javascript/crayons/CTAs/CTA.jsx","webpack:///./app/javascript/crayons/ButtonGroup/ButtonGroup.jsx","webpack:///./app/javascript/crayons/Dropdown/Dropdown.jsx","webpack:///./app/javascript/crayons/formElements/FormField/FormField.jsx","webpack:///./app/javascript/crayons/formElements/RadioButton/RadioButton.jsx","webpack:///./app/javascript/crayons/formElements/ColorPicker/ColorPicker.jsx","webpack:///./app/javascript/crayons/formElements/Toggles/Toggle.jsx","webpack:///./app/javascript/crayons/formElements/DateRangePicker/dateRangeUtils.js","webpack:///./app/javascript/crayons/formElements/DateRangePicker/DateRangePicker.jsx","webpack:///./app/javascript/crayons/Icons/Icon.jsx","webpack:///./app/javascript/crayons/MobileDrawer/MobileDrawer.jsx","webpack:///./app/javascript/crayons/MarkdownToolbar/markdownSyntaxFormatters.jsx","webpack:///./app/javascript/crayons/MarkdownToolbar/MarkdownToolbar.jsx","webpack:///./app/javascript/utilities/calculateTextAreaHeight.js","webpack:///./app/javascript/utilities/textAreaUtils.js","webpack:///./app/javascript/common-prop-types/user-prop-types.js","webpack:///./app/javascript/common-prop-types/selected-tags-prop-types.js","webpack:///./app/javascript/utilities/runtime.js","webpack:///./app/javascript/shared/components/useMediaQuery.js","webpack:///./app/javascript/common-prop-types/default-children-prop-types.js","webpack:///./app/javascript/Snackbar/index.js","webpack:///./app/javascript/utilities/dropdownUtils.js","webpack:///./app/javascript/utilities/viewport.js","webpack:///./node_modules/bignumber.js/bignumber.js","webpack:///./app/javascript/utilities/debounceAction.js","webpack:///./app/javascript/shared/components/useKeyboardShortcuts.js","webpack:///./app/javascript/packs/validateFileInputs.js","webpack:///./app/javascript/Snackbar/SnackbarItem.jsx","webpack:///./app/javascript/shared/components/focusTrap.jsx","webpack:///./app/javascript/crayons/Modal/Modal.jsx","webpack:///./app/javascript/article-form/actions.js","webpack:///./app/javascript/common-prop-types/article-prop-types.js","webpack:///./app/javascript/Snackbar/Snackbar.jsx","webpack:///./app/javascript/shared/components/defaultSelectionTemplate.jsx","webpack:///./app/javascript/crayons/MultiSelectAutocomplete/MultiSelectAutocomplete.jsx","webpack:///./app/javascript/crayons/Button/index.js","webpack:///./app/javascript/crayons/Spinner/Spinner.jsx","webpack:///./app/javascript/crayons/Button/Button.jsx","webpack:///./app/javascript/crayons/AutocompleteTriggerTextArea/UserListItemContent.jsx","webpack:///./app/javascript/crayons/AutocompleteTriggerTextArea/AutocompleteTriggerTextArea.jsx","webpack:///./app/javascript/article-form/components/ClipboardButton.jsx","webpack:///./app/javascript/article-form/components/ImageUploader.jsx","webpack:///./node_modules/lodash/isArray.js","webpack:///./node_modules/lodash/_getNative.js","webpack:///./node_modules/lodash/toString.js","webpack:///./node_modules/lodash/get.js","webpack:///./node_modules/lodash/_toKey.js","webpack:///./node_modules/lodash/_nativeCreate.js","webpack:///./node_modules/lodash/_ListCache.js","webpack:///./node_modules/lodash/_assocIndexOf.js","webpack:///./node_modules/lodash/eq.js","webpack:///./node_modules/lodash/_getMapData.js","webpack:///./node_modules/lodash/_isIndex.js","webpack:///./node_modules/lodash/isArrayLike.js","webpack:///./node_modules/lodash/identity.js","webpack:///./node_modules/moment/locale sync ^\\.\\/.*$","webpack:///./app/javascript/utilities/locale.js","webpack:///./node_modules/lodash/_baseGet.js","webpack:///./node_modules/lodash/_castPath.js","webpack:///./node_modules/lodash/_isKey.js","webpack:///./node_modules/lodash/_MapCache.js","webpack:///./node_modules/lodash/_Map.js","webpack:///./node_modules/lodash/isArguments.js","webpack:///./node_modules/lodash/isLength.js","webpack:///./node_modules/lodash/_setToArray.js","webpack:///./node_modules/lodash/_isIterateeCall.js","webpack:///./node_modules/lodash/keys.js","webpack:///./node_modules/lodash/isFunction.js","webpack:///./node_modules/lodash/_toSource.js","webpack:///./node_modules/lodash/_arrayMap.js","webpack:///./node_modules/lodash/_hasPath.js","webpack:///./node_modules/lodash/_baseSet.js","webpack:///./node_modules/lodash/_assignValue.js","webpack:///./node_modules/lodash/_defineProperty.js","webpack:///./node_modules/lodash/_SetCache.js","webpack:///./node_modules/lodash/_cacheHas.js","webpack:///./node_modules/lodash/_Set.js","webpack:///./node_modules/lodash/_hasUnicode.js","webpack:///./node_modules/lodash/toFinite.js","webpack:///./node_modules/lodash/_baseFlatten.js","webpack:///./node_modules/lodash/_arrayPush.js","webpack:///./node_modules/lodash/_Stack.js","webpack:///./node_modules/lodash/_baseIsEqual.js","webpack:///./node_modules/lodash/_equalArrays.js","webpack:///./node_modules/lodash/isBuffer.js","webpack:///./node_modules/lodash/isTypedArray.js","webpack:///./node_modules/lodash/_baseUnary.js","webpack:///./node_modules/lodash/_isStrictComparable.js","webpack:///./node_modules/lodash/_matchesStrictComparable.js","webpack:///./node_modules/i18n-js/dist/import/Locales.js","webpack:///./node_modules/i18n-js/dist/import/Pluralization.js","webpack:///./node_modules/make-plural/plurals.mjs","webpack:///./node_modules/i18n-js/dist/import/helpers/camelCaseKeys.js","webpack:///./node_modules/i18n-js/dist/import/helpers/isSet.js","webpack:///./node_modules/i18n-js/dist/import/helpers/expandRoundMode.js","webpack:///./node_modules/i18n-js/dist/import/helpers/roundNumber.js","webpack:///./node_modules/i18n-js/dist/import/helpers/formatNumber.js","webpack:///./node_modules/i18n-js/dist/import/helpers/getFullScope.js","webpack:///./node_modules/i18n-js/dist/import/helpers/inferType.js","webpack:///./node_modules/i18n-js/dist/import/helpers/interpolate.js","webpack:///./node_modules/i18n-js/dist/import/helpers/lookup.js","webpack:///./node_modules/i18n-js/dist/import/helpers/numberToHuman.js","webpack:///./node_modules/i18n-js/dist/import/helpers/numberToHumanSize.js","webpack:///./node_modules/i18n-js/dist/import/helpers/parseDate.js","webpack:///./node_modules/i18n-js/dist/import/helpers/pluralize.js","webpack:///./node_modules/i18n-js/dist/import/helpers/propertyFlatList.js","webpack:///./node_modules/i18n-js/dist/import/helpers/strftime.js","webpack:///./node_modules/i18n-js/dist/import/helpers/timeAgoInWords.js","webpack:///./node_modules/i18n-js/dist/import/MissingTranslation.js","webpack:///./node_modules/i18n-js/dist/import/I18n.js","webpack:///./node_modules/i18n-js/dist/import/helpers/createTranslationOptions.js","webpack:///./node_modules/i18n-js/dist/import/helpers/numberToDelimited.js","webpack:///./node_modules/lodash/has.js","webpack:///./node_modules/lodash/set.js","webpack:///./node_modules/lodash/setWith.js","webpack:///./node_modules/lodash/uniq.js","webpack:///./node_modules/lodash/camelCase.js","webpack:///./node_modules/lodash/repeat.js","webpack:///./node_modules/lodash/sortBy.js","webpack:///./node_modules/lodash/zipObject.js","webpack:///./node_modules/lodash/flattenDeep.js","webpack:///./node_modules/lodash/range.js","webpack:///./node_modules/lodash/_stringToPath.js","webpack:///./node_modules/lodash/_memoizeCapped.js","webpack:///./node_modules/lodash/memoize.js","webpack:///./node_modules/lodash/_mapCacheClear.js","webpack:///./node_modules/lodash/_Hash.js","webpack:///./node_modules/lodash/_hashClear.js","webpack:///./node_modules/lodash/_baseIsNative.js","webpack:///./node_modules/lodash/_isMasked.js","webpack:///./node_modules/lodash/_coreJsData.js","webpack:///./node_modules/lodash/_getValue.js","webpack:///./node_modules/lodash/_hashDelete.js","webpack:///./node_modules/lodash/_hashGet.js","webpack:///./node_modules/lodash/_hashHas.js","webpack:///./node_modules/lodash/_hashSet.js","webpack:///./node_modules/lodash/_listCacheClear.js","webpack:///./node_modules/lodash/_listCacheDelete.js","webpack:///./node_modules/lodash/_listCacheGet.js","webpack:///./node_modules/lodash/_listCacheHas.js","webpack:///./node_modules/lodash/_listCacheSet.js","webpack:///./node_modules/lodash/_mapCacheDelete.js","webpack:///./node_modules/lodash/_isKeyable.js","webpack:///./node_modules/lodash/_mapCacheGet.js","webpack:///./node_modules/lodash/_mapCacheHas.js","webpack:///./node_modules/lodash/_mapCacheSet.js","webpack:///./node_modules/lodash/_baseToString.js","webpack:///./node_modules/lodash/_baseHas.js","webpack:///./node_modules/lodash/_baseIsArguments.js","webpack:///./node_modules/lodash/_baseAssignValue.js","webpack:///./node_modules/lodash/_baseUniq.js","webpack:///./node_modules/lodash/_setCacheAdd.js","webpack:///./node_modules/lodash/_setCacheHas.js","webpack:///./node_modules/lodash/_arrayIncludes.js","webpack:///./node_modules/lodash/_baseIndexOf.js","webpack:///./node_modules/lodash/_baseFindIndex.js","webpack:///./node_modules/lodash/_baseIsNaN.js","webpack:///./node_modules/lodash/_strictIndexOf.js","webpack:///./node_modules/lodash/_arrayIncludesWith.js","webpack:///./node_modules/lodash/_createSet.js","webpack:///./node_modules/lodash/noop.js","webpack:///./node_modules/lodash/capitalize.js","webpack:///./node_modules/lodash/upperFirst.js","webpack:///./node_modules/lodash/_createCaseFirst.js","webpack:///./node_modules/lodash/_castSlice.js","webpack:///./node_modules/lodash/_baseSlice.js","webpack:///./node_modules/lodash/_stringToArray.js","webpack:///./node_modules/lodash/_asciiToArray.js","webpack:///./node_modules/lodash/_unicodeToArray.js","webpack:///./node_modules/lodash/_createCompounder.js","webpack:///./node_modules/lodash/_arrayReduce.js","webpack:///./node_modules/lodash/deburr.js","webpack:///./node_modules/lodash/_deburrLetter.js","webpack:///./node_modules/lodash/_basePropertyOf.js","webpack:///./node_modules/lodash/words.js","webpack:///./node_modules/lodash/_asciiWords.js","webpack:///./node_modules/lodash/_hasUnicodeWord.js","webpack:///./node_modules/lodash/_unicodeWords.js","webpack:///./node_modules/lodash/_baseRepeat.js","webpack:///./node_modules/lodash/toInteger.js","webpack:///./node_modules/lodash/_isFlattenable.js","webpack:///./node_modules/lodash/_baseOrderBy.js","webpack:///./node_modules/lodash/_baseIteratee.js","webpack:///./node_modules/lodash/_baseMatches.js","webpack:///./node_modules/lodash/_baseIsMatch.js","webpack:///./node_modules/lodash/_stackClear.js","webpack:///./node_modules/lodash/_stackDelete.js","webpack:///./node_modules/lodash/_stackGet.js","webpack:///./node_modules/lodash/_stackHas.js","webpack:///./node_modules/lodash/_stackSet.js","webpack:///./node_modules/lodash/_baseIsEqualDeep.js","webpack:///./node_modules/lodash/_arraySome.js","webpack:///./node_modules/lodash/_equalByTag.js","webpack:///./node_modules/lodash/_Uint8Array.js","webpack:///./node_modules/lodash/_mapToArray.js","webpack:///./node_modules/lodash/_equalObjects.js","webpack:///./node_modules/lodash/_getAllKeys.js","webpack:///./node_modules/lodash/_baseGetAllKeys.js","webpack:///./node_modules/lodash/_getSymbols.js","webpack:///./node_modules/lodash/_arrayFilter.js","webpack:///./node_modules/lodash/stubArray.js","webpack:///./node_modules/lodash/_arrayLikeKeys.js","webpack:///./node_modules/lodash/_baseTimes.js","webpack:///./node_modules/lodash/stubFalse.js","webpack:///./node_modules/lodash/_baseIsTypedArray.js","webpack:///./node_modules/lodash/_nodeUtil.js","webpack:///./node_modules/lodash/_baseKeys.js","webpack:///./node_modules/lodash/_isPrototype.js","webpack:///./node_modules/lodash/_nativeKeys.js","webpack:///./node_modules/lodash/_overArg.js","webpack:///./node_modules/lodash/_getTag.js","webpack:///./node_modules/lodash/_DataView.js","webpack:///./node_modules/lodash/_Promise.js","webpack:///./node_modules/lodash/_WeakMap.js","webpack:///./node_modules/lodash/_getMatchData.js","webpack:///./node_modules/lodash/_baseMatchesProperty.js","webpack:///./node_modules/lodash/hasIn.js","webpack:///./node_modules/lodash/_baseHasIn.js","webpack:///./node_modules/lodash/property.js","webpack:///./node_modules/lodash/_baseProperty.js","webpack:///./node_modules/lodash/_basePropertyDeep.js","webpack:///./node_modules/lodash/_baseMap.js","webpack:///./node_modules/lodash/_baseEach.js","webpack:///./node_modules/lodash/_baseForOwn.js","webpack:///./node_modules/lodash/_baseFor.js","webpack:///./node_modules/lodash/_createBaseFor.js","webpack:///./node_modules/lodash/_createBaseEach.js","webpack:///./node_modules/lodash/_baseSortBy.js","webpack:///./node_modules/lodash/_compareMultiple.js","webpack:///./node_modules/lodash/_compareAscending.js","webpack:///./node_modules/lodash/_baseRest.js","webpack:///./node_modules/lodash/_overRest.js","webpack:///./node_modules/lodash/_apply.js","webpack:///./node_modules/lodash/_setToString.js","webpack:///./node_modules/lodash/_baseSetToString.js","webpack:///./node_modules/lodash/constant.js","webpack:///./node_modules/lodash/_shortOut.js","webpack:///./node_modules/lodash/_baseZipObject.js","webpack:///./node_modules/lodash/_createRange.js","webpack:///./node_modules/lodash/_baseRange.js","webpack:///./app/javascript/packs/commentDropdowns.js"],"names":["n","l","u","t","i","o","r","f","e","c","s","a","v","Array","isArray","h","p","parentNode","removeChild","y","arguments","length","children","call","defaultProps","d","type","props","key","ref","__k","__","__b","__e","__d","__c","__h","constructor","__v","vnode","_","current","k","b","this","context","g","indexOf","m","base","w","push","x","__r","debounceRendering","sort","shift","__P","z","__n","ownerSVGElement","L","P","C","D","H","I","T","j","A","N","nextSibling","S","$","O","some","insertBefore","setProperty","test","style","cssText","replace","toLowerCase","slice","Date","now","addEventListener","removeEventListener","removeAttribute","setAttribute","event","contextType","value","__E","prototype","render","q","sub","state","_sb","__s","getDerivedStateFromProps","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","forEach","componentWillUpdate","componentDidUpdate","getChildContext","getSnapshotBeforeUpdate","M","diffed","localName","nodeType","document","createTextNode","createElementNS","createElement","is","data","childNodes","dangerouslySetInnerHTML","attributes","name","__html","innerHTML","checked","unmount","componentWillUnmount","B","firstChild","E","F","G","Consumer","Provider","splice","getDerivedStateFromError","setState","componentDidCatch","forceUpdate","Promise","then","bind","resolve","setTimeout","ButtonNew","_classNames","_props$variant","variant","icon","rounded","destructive","_props$type","className","tooltip","onKeyUp","otherProps","_objectWithoutProperties","_excluded","_useState2","_slicedToArray","useState","suppressTooltip","setSuppressTooltip","classes","classNames","_defineProperty","concat","_extends","Icon","focusable","src","displayName","propTypes","defaultChildrenPropTypes","PropTypes","oneOf","bool","string","oneOfType","node","func","elementType","Link","_props$href","href","block","isRequired","CTA","ButtonGroup","_ref","labelText","role","Dropdown","triggerButtonId","dropdownContentId","dropdownContentCloseButtonId","_ref$onOpen","onOpen","_ref$onClose","onClose","restOfProps","isInitialized","setIsInitialized","useLayoutEffect","initializeDropdown","triggerElementId","id","undefined","FormField","RadioButton","onClick","ColorPicker","buttonLabelText","defaultValue","inputProps","onChange","onBlur","color","setColor","buttonId","popoverId","Fragment","Button","backgroundColor","HexColorInput","fullHexCode","hex","charAt","handleBlur","prefixed","HexColorPicker","object","Toggle","_objectDestructuringEmpty","MONTH_UNTIL_TODAY","QUARTER_UNTIL_TODAY","YEAR_UNTIL_TODAY","LAST_FULL_MONTH","LAST_FULL_QUARTER","LAST_FULL_YEAR","ALL_PRESET_RANGES","RANGE_LABELS","PERIODS","getPeriodUntilToday","today","period","start","clone","startOf","end","getLastFullPeriod","subtract","endOf","getDateRangeStartAndEndDates","dateRangeName","ChevronLeft","width","height","viewBox","fill","xmlns","ChevronRight","Calendar","PICKER_PHRASES","_objectSpread","defaultPhrases","chooseAvailableStartDate","date","chooseAvailableEndDate","_ref2","focusStartDate","invalidDateFormat","format","errorPrefix","dateTooLate","latestDate","dateTooEarly","earliestDate","MONTH_NAMES","_toConsumableArray","keys","map","toLocaleString","month","MonthYearPicker","_ref4","earliestMoment","latestMoment","onMonthSelect","onYearSelect","selectedMonth","selectedYear","year","latestMonthIndex","availableMonths","yearsDiff","diff","years","target","index","PresetDateRangeOptions","_ref5","_ref5$presetRanges","presetRanges","onPresetSelected","presetsWithinPermittedDates","filter","_getDateRangeStartAnd","rangeStart","rangeEnd","isSameOrBefore","isSameOrAfter","rangeName","DateRangePicker","_ref8","startDateId","endDateId","defaultStartDate","defaultEndDate","_ref8$maxEndDate","maxEndDate","_ref8$minStartDate","minStartDate","onDatesChanged","_ref8$presetRanges","startDateAriaLabel","endDateAriaLabel","_ref8$todaysDate","todaysDate","_useState10","START_DATE","focusedInput","setFocusedInput","_useState12","moment","startMoment","setStartMoment","_useState14","endMoment","setEndMoment","dateFormat","getCurrentLocale","useCompactLayout","useMediaQuery","BREAKPOINTS","Medium","_useDateRangeValidati","_ref6","startDateInput","setStartDateInput","_useState4","endDateInput","setEndDateInput","_useState6","startDateError","setStartDateError","_useState8","endDateError","setEndDateError","useEffect","setError","error","inputType","_ref7","valueMoment","isValid","isBefore","isAfter","handleStartBlur","handleEndBlur","useDateRangeValidation","getElementById","ReactDateRangePicker","startDate","endDate","startDatePlaceholderText","endDatePlaceholderText","displayFormat","navPrev","tabindex","navNext","minDate","maxDate","initialVisibleMonth","relevantDate","isMonthSameAsLatestMonth","customInputIcon","showDefaultInputIcon","inputIconPosition","ICON_BEFORE_POSITION","orientation","VERTICAL_ORIENTATION","HORIZONTAL_ORIENTATION","showClearDates","customArrowIcon","phrases","onFocusChange","isOutsideRange","_ref3","isBetween","isDateOutsideOfRange","onDatesChange","_ref9","toDate","small","renderMonthElement","renderCalendarInfo","_ref10","instanceOf","maxStartDate","arrayOf","InternalIcon","native","MobileDrawer","title","FocusTrap","clickOutsideDeactivates","selector","onDeactivate","BoldIcon","ItalicIcon","LinkIcon","OrderedListIcon","UnorderedListIcon","HeadingIcon","QuoteIcon","CodeIcon","CodeBlockIcon","EmbedIcon","UnderlineIcon","StrikethroughIcon","DividerIcon","clipRule","fillRule","ORDERED_LIST_ITEM_REGEX","MARKDOWN_LINK_REGEX","URL_PLACEHOLDER_TEXT","getNewLinePrefixSuffixes","selectionStart","selectionEnd","numberOfNewLinesBeforeSelection","getNumberOfNewLinesPrecedingSelection","numberOfNewLinesFollowingSelection","getNumberOfNewLinesFollowingSelection","numberOfNewLinesNeededAtStart","newLinesPrefix","String","padStart","newLinesSuffix","undoOrAddFormattingForInlineSyntax","prefix","suffix","prefixLength","suffixLength","_getSelectionData","getSelectionData","selectedText","textBeforeSelection","textAfterSelection","editSelectionStart","editSelectionEnd","replaceSelectionWith","newCursorStart","newCursorEnd","substring","undoOrAddFormattingForMultilineSyntax","linePrefix","blockPrefix","blockSuffix","_getSelectionData2","formattedText","lastNewLine","getLastIndexOfCharacter","content","selectionIndex","character","lineStart","splitByNewLine","split","line","every","unformattedText","join","_getNewLinePrefixSuff","newLinePrefixLength","cursorStartBaseline","cursorStartBlockPrefixOffset","cursorStartLinePrefixOffset","markdownSyntaxFormatters","bold","label","getKeyboardShortcut","modifier","getOSKeyboardModifierKeyString","command","tooltipHint","toUpperCase","getFormatting","italic","link","startingText","_getSelectionData3","basicFormattingForEmptySelection","indexOfLinkStructureEnd","getNextIndexOfCharacter","breakOnCharacters","urlText","handleLinkFormattingForEmptyTextSelection","startsWith","basicFormattingForLinkSelection","indexOfSyntaxOpen","textToReplaceMarkdown","handleLinkFormattingForUrlSelection","match","linkDescriptionEnd","linkText","handleUndoMarkdownLinkSelection","orderedList","_ref11","_getSelectionData4","_getNewLinePrefixSuff2","newLineSuffixLength","newText","indexOfFullStop","formattedList","textChunk","unorderedList","_ref12","heading","_ref13","currentLineSelectionStart","indexOfFirstLineCharacter","currentHeadingIndex","_getNewLinePrefixSuff3","adjustingHeading","cursorOffset","quote","_ref14","code","_ref15","codeBlock","_ref16","embed","_ref17","underline","_ref18","strikethrough","_ref19","divider","_ref20","OverflowIcon","UPLOADING_IMAGE_PLACEHOLDER","MAX_CORE_FORMATTERS_BY_SCREEN_SIZE","MarkdownToolbar","textAreaId","_ref2$additionalSecon","additionalSecondaryToolbarElements","textAreaRef","useRef","overflowMenuOpen","setOverflowMenuOpen","storedCursorPosition","setStoredCursorPosition","smallScreen","largeScreen","Large","ExtraLarge","overflowMenuRows","additionalSecondaryItems","SecondaryItem","cloneElement","handleToolbarButtonKeyPress","keyboardShortcuts","Object","fromEntries","syntaxName","preventDefault","insertSyntax","useKeyboardShortcuts","querySelector","clickOutsideHandler","escapePressHandler","focus","getElementsByClassName","isSmallScreen","isLargeScreen","nextButton","element","sibling","nextElementSibling","matches","getNextMatchingSibling","previousButton","previousElementSibling","getPreviousMatchingSibling","firstButton","allButtons","lastButton","textArea","_markdownSyntaxFormat2","contentEditable","preventScroll","setSelectionRange","execCommand","_unused","textAreaValue","getNewTextAreaValueWithEdits","dispatchEvent","Event","handleImageUploadEnd","imageMarkdown","currentTextAreaValue","indexOfPlaceholder","newTextValue","differenceInLength","numberOfCoreFormatters","coreSyntaxFormatters","entries","secondarySyntaxFormatters","secondaryFormatterButtons","controlName","_secondarySyntaxForma","_coreSyntaxFormatters","ImageUploader","editorVersion","onImageUploadStart","textWithPlaceholder","newCursorPosition","onImageUploadSuccess","onImageUploadError","buttonProps","_textAreaRef$current","hiddenTextarea","SIZING_STYLE","calculateNodeStyling","window","getComputedStyle","boxSizing","getPropertyValue","paddingSize","parseFloat","borderSize","sizingStyle","getCursorXY","input","selectionPoint","_ref$relativeToElemen","relativeToElement","body","bodyRect","getBoundingClientRect","elementRect","inputY","top","scrollTop","inputX","left","scrollLeft","div","copyStyle","_i","_Object$values","values","property","inputValue","tagName","textContent","substr","span","appendChild","spanX","offsetLeft","spanY","offsetTop","getAutocompleteWordData","triggerCharacter","valueBeforeKeystroke","isTriggered","indexOfAutocompleteStart","_ref3$breakOnCharacte","currentCharacter","previousCharacter","includes","_ref4$breakOnCharacte","nextCharacter","count","searchIndex","useTextAreaAutoResize","setTextArea","constrainToContentHeight","setConstrainToContentHeight","additionalElements","setAdditionalElements","resizeTextArea","allElements","allContentHeights","uiTextNode","_calculateNodeStyling","placeholder","baseHeight","scrollHeight","calculateTextAreaHeight","Math","max","apply","newHeight","resizeCallback","debounceAction","resizeObserver","ResizeObserver","observe","disconnect","userPropTypes","shape","profile_image_url","summary","selectedTagsPropTypes","tags","onKeyPress","currentContext","currentMedium","currentOS","navigator","userAgent","platform","isNativeIOS","namespace","nativeCheck","webkit","messageHandlers","namespaceCheck","isNativeAndroid","AndroidBridge","copyToClipboard","text","reject","clipboard","writeText","hasOSSpecificModifier","KeyboardEvent","metaKey","ctrlKey","language","freeze","Small","query","mediaQuery","matchMedia","setMatch","handler","addListener","removeListener","getDropdownRepositionListener","handleDropdownRepositions","_step","_iterator","_createForOfIteratorHelper","querySelectorAll","done","classList","remove","isDropdownCurrentlyOpen","display","opacity","isInViewport","add","removeProperty","err","INTERACTIVE_ELEMENTS_QUERY","openDropdown","_dropdownContent$quer","dropdownContent","closeDropdown","_document$getElementB","triggerButton","_document$getElementB3","keyUpListener","getAttribute","onCloseCleanupActions","contains","activeElement","clickOutsideListener","_document$getElementB2","_document$getElementB4","_ref$offsetTop","_ref$allowPartialVisi","allowPartialVisibility","boundingRect","clientHeight","innerHeight","documentElement","clientWidth","innerWidth","topIsInViewport","rightIsInViewport","right","bottomIsInViewport","bottom","leftIsInViewport","topIsOutOfViewport","bottomIsOutOfViewport","globalObject","BigNumber","isNumeric","mathceil","ceil","mathfloor","floor","bignumberError","tooManyDigits","BASE","LOG_BASE","MAX_SAFE_INTEGER","POWS_TEN","SQRT_BASE","MAX","bitFloor","coeffToString","charCodeAt","compare","xc","yc","intCheck","min","Error","isOdd","toExponential","str","toFixedPoint","len","zs","configObject","convertBase","parseNumeric","pow2_53","random53bitInt","basePrefix","dotAfter","dotBefore","isInfinityOrNaN","whitespaceOrPlus","toString","valueOf","ONE","DECIMAL_PLACES","ROUNDING_MODE","TO_EXP_NEG","TO_EXP_POS","MIN_EXP","MAX_EXP","CRYPTO","MODULO_MODE","POW_PRECISION","FORMAT","groupSize","secondaryGroupSize","groupSeparator","decimalSeparator","fractionGroupSize","fractionGroupSeparator","ALPHABET","alphabetHasNormalDecimalDigits","alphabet","caseChanged","isNum","_isBigNumber","search","round","DEBUG","rm","c0","ne","maxOrMin","args","method","normalise","pop","sd","ni","rd","pows10","out","ROUND_UP","ROUND_DOWN","ROUND_CEIL","ROUND_FLOOR","ROUND_HALF_UP","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_CEIL","ROUND_HALF_FLOOR","EUCLID","config","set","obj","hasOwnProperty","crypto","getRandomValues","randomBytes","EXPONENTIAL_AT","RANGE","isBigNumber","maximum","lt","minimum","gt","random","dp","rand","Uint32Array","copy","sum","plus","decimal","toBaseOut","baseIn","baseOut","arrL","arr","reverse","sign","callerIsToString","pow","multiply","temp","xlo","xhi","carry","klo","khi","aL","bL","cmp","more","prod","prodL","qc","rem","remL","rem0","xi","xL","yc0","yL","yz","NaN","isNaN","p1","p2","absoluteValue","abs","comparedTo","decimalPlaces","dividedBy","dividedToIntegerBy","idiv","exponentiatedBy","half","isModExp","nIsBig","nIsNeg","nIsOdd","isInteger","mod","times","integerValue","isEqualTo","eq","isFinite","isGreaterThan","isGreaterThanOrEqualTo","gte","isLessThan","isLessThanOrEqualTo","lte","isNegative","isPositive","isZero","minus","xLTy","xe","ye","modulo","multipliedBy","xcL","ycL","ylo","yhi","zc","sqrtBase","negated","precision","shiftedBy","squareRoot","sqrt","rep","toFixed","toFormat","g1","g2","intPart","fractionPart","isNeg","intDigits","RegExp","toFraction","md","d0","d1","d2","exp","n0","n1","toNumber","toPrecision","toJSON","action","_ref$time","time","_ref$config","leading","configs","debounce","isFormField","HTMLElement","nodeName","isContentEditable","callShortcut","chain","shortcuts","shortcut","defaultOptions","timeout","eventTarget","options","_useState","storedShortcuts","_useState3","keyChain","setKeyChain","_useState5","mergedOptions","setMergedOptions","newOptions","clearTimeout","keyEvent","defaultPrevented","ctrlKeyEntry","cmdKeyEntry","altKeyEntry","altKey","shiftKeyEntry","shiftKey","Node","newChain","KeyboardShortcuts","number","Element","Window","MAX_FILE_SIZE_MB","image","video","PERMITTED_FILE_TYPES","addErrorMessage","msg","addSnackbarItem","message","addCloseButton","validateFileSize","file","fileType","fileInput","maxFileSizeMb","dataset","fileSizeErrorHandler","fileSizeMb","size","isValidFileSize","Number","errorMessage","handleFileSizeError","validateFileType","permittedFileTypes","JSON","parse","fileTypeErrorHandler","isValidFileType","fileTypeBracketed","handleFileTypeError","validateFileNameLength","maxFileNameLength","fileNameLengthErrorHandler","isValidFileNameLength","handleFileNameLengthError","validateFileInput","isValidFileInput","files","from","validateFileInputs","validFileInputs","fileInputs","snackbarItemProps","actions","lifespan","SnackbarItem","_ref$actions","inverted","_ref$clickOutsideDeac","_ref$document","focusTrap","deactivate","useCallback","currentLocationHref","location","routeChangeObserver","MutationObserver","mutations","_focusTrap$current","createFocusTrap","escapeDeactivates","activate","childList","escape","CloseIcon","Modal","prompt","sheet","centered","noBackdrop","_ref$showHeader","showHeader","_ref$sheetAlign","sheetAlign","_ref$backdropDismissi","backdropDismissible","_ref$allowOverflow","allowOverflow","_ref$focusTrapSelecto","focusTrapSelector","class","backdrop","previewArticle","payload","successCb","failureCb","fetch","headers","Accept","csrfToken","stringify","article_body","credentials","response","json","status","_x","processPayload","previewShowing","helpShowing","previewResponse","helpHTML","imageManagementShowing","moreConfigShowing","errors","submitArticle","onSuccess","onError","url","article","current_state_path","generateUploadFormdata","token","formData","FormData","append","generateMainImage","signal","links","processImageUpload","images","handleImageUploading","handleImageSuccess","handleImageFailure","articleSnippetResultPropTypes","body_text","articlePropTypes","path","cloudinary_video_url","video_duration_in_minutes","type_of","class_name","flare_tag","bg_color_hex","text_color_hex","tag_list","cached_tag_list_array","podcast","slug","image_url","user_id","user","username","organization","profile_image_90","highlight","public_reactions_count","reactions_count","comments_count","reading_time","snackbarItems","snackbarItem","Snackbar","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","_key","snacks","pollingId","paused","pauseLifespan","resumeLifespan","initializePolling","_this2","_event","stopPropagation","_this3","_this$props","pollingTime","setInterval","newSnacks","updateSnackbarItems","snack","lifespanTimeoutId","decreaseLifespan","prevState","potentialSnackToFilterOut","updatedSnacks","_this4","currentSnack","_this5","_ref2$actions","Component","Close","DefaultSelectionTemplate","_ref$enableValidation","enableValidation","_ref$valid","valid","_ref$buttonVariant","buttonVariant","_ref$className","onEdit","onDeselect","React","KEYS","ALLOWED_CHARS_REGEX","reducer","_action$payload$sugge","selectedItems","suggestions","activeDescendentIndex","editValue","inputPosition","ignoreBlur","showMaxSelectionsReached","MultiSelectAutocomplete","_inputRef$current5","_ref$showLabel","showLabel","fetchSuggestions","_ref$defaultValue","_ref$staticSuggestion","staticSuggestions","staticSuggestionsHeading","_ref$border","border","_ref$placeholder","inputId","maxSelections","onSelectionsChanged","onFocus","_ref$allowUserDefined","allowUserDefinedSelections","SuggestionTemplate","_ref$SelectionTemplat","SelectionTemplate","_useReducer2","useReducer","dispatch","inputRef","inputSizerRef","selectedItemsRef","popoverRef","allowSelections","resizeInputToContentSize","cursorPosition","changeEvent","popover","activeItem","offsetHeight","popoverOffsetHeight","isBelow","scrollTo","selectByText","textValue","_ref2$nextInputValue","nextInputValue","_ref2$keepSelecting","keepSelecting","matchingSuggestion","find","suggestion","selectItem","selectedItem","enterEditState","editItem","editItemIndex","innerText","deselectItem","exitEditState","_inputRef$current","_ref3$nextInputValue","_ref3$keepSelecting","handleInputChange","results","item","clearInput","editPreviousSelectionIfExists","nextEditIndex","_ref7$nextInputValue","_ref7$keepSelecting","_ref6$currentSelectio","currentSelections","insertIndex","newSelections","listItem","selection","deselectedItem","selectionNode","allSelectedItemElements","defaultPosition","position","order","selectionsPlaceholder","inputPlaceholder","_inputRef$current4","autocomplete","onKeyDown","_inputRef$current3","currentValue","_inputRef$current2","suggestionDisplayName","onMouseDown","optionPropType","Spinner","getAdditionalClassNames","contentType","disabled","additionalClassNames","buttonType","onMouseOver","onMouseOut","tabIndex","ComponentName","UserListItemContent","alt","isComboboxMode","dropdownPositionPoints","suppressPopover","emptyStateMessage","AutocompleteTriggerTextArea","forwardRef","forwardedRef","_ref2$autoResize","autoResize","searchInstructionsMessage","maxSuggestions","replaceElement","wrapperRef","_useTextAreaAutoResiz","scrollIntoView","originalTextArea","newTextArea","enhancedTextArea","defaultView","attributeKey","transition","refs","selectSuggestion","currentInput","indexOfSearchStart","currentSearchTerm","newTextAreaValue","comboboxProps","_getAutocompleteWordD","isSearching","searchTermStartPosition","searchTerm","_getCursorXY","cursorX","textAreaX","createPortal","CopyIcon","ClipboardButton","imageLinks","onCopy","imageUrls","_ref$showCopyMessage","showCopyMessage","readOnly","imageLink","ImageIcon","CancelIcon","SpinnerOrCancel","imageUploaderReducer","uploadErrorMessage","uploadingImage","insertionImageUrls","initNativeImagePicker","_window$ForemMobile","ForemMobile","injectNativeMessage","NativeIosV1ImageUpload","V2EditorImageUpload","handleInsertionImageUpload","useNativeUpload","handleNativeMessage","abortRequestController","setAbortRequestController","actionTooltip","controller","AbortController","accept","abort","_buttonProps$onClick","click","V1EditorImageUpload","showCopiedImageText","setShowCopiedImageText","multiple","imageMarkdownInput","Honeybadger","notify","_ref4$editorVersion","_ref4$buttonProps","onUploadError","abortSignal","handleInsertImageUploadSuccess","detail","module","exports","baseIsNative","getValue","baseToString","baseGet","result","isSymbol","nativeCreate","getNative","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","ListCache","clear","entry","get","has","array","other","isKeyable","__data__","reIsUint","isFunction","isLength","webpackContext","req","webpackContextResolve","__webpack_require__","i18n","I18n","translationsDiv","translations","store","defaultLocale","userLocale","locale","term","params","castPath","toKey","isKey","stringToPath","reIsDeepProp","reIsPlainProp","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","MapCache","Map","baseIsArguments","isObjectLike","objectProto","propertyIsEnumerable","isArguments","isArrayLike","isIndex","isObject","arrayLikeKeys","baseKeys","baseGetTag","tag","funcToString","Function","iteratee","hasFunc","assignValue","customizer","lastIndex","nested","newValue","objValue","baseAssignValue","defineProperty","setCacheAdd","setCacheHas","SetCache","cache","Set","reHasUnicode","INFINITY","arrayPush","isFlattenable","baseFlatten","depth","predicate","isStrict","offset","stackClear","stackDelete","stackGet","stackHas","stackSet","Stack","baseIsEqualDeep","baseIsEqual","bitmask","stack","arraySome","cacheHas","equalFunc","isPartial","arrLength","othLength","arrStacked","othStacked","seen","arrValue","othValue","compared","othIndex","stubFalse","freeExports","freeModule","Buffer","root","isBuffer","baseIsTypedArray","baseUnary","nodeUtil","nodeIsTypedArray","isTypedArray","srcValue","defaultLocaleResolver","locales","list","enableFallback","Boolean","currentLocale","codes","Locales","registry","register","localeResolver","default","defaultPluralizer","pluralizer","includeZero","ordinal","_i18n","useMakePlural","ord","v0","t0","n10","n100","Pluralization","camelCaseKeys","reduce","buffer","isSet","RoundingModeMap","expandRoundMode","roundMode","_a","getAbsolutePrecision","numeric","significant","log10","digitCount","roundNumber","rounder","formatNumber","_b","_c","originalNumber","raise","roundedNumber","whole","significand","formattedNumber","positiveFormat","negativeFormat","unshift","delimiter","limit","computeSignificand","stripInsignificantZeros","separator","unit","replaceInFormat","getFullScope","scope","defaultSeparator","inferType","instance","interpolate","transformKey","nullPlaceholder","missingPlaceholder","regex","lookup","assign","localeType","component","DECIMAL_UNITS","INVERTED_DECIMAL_UNITS","parseInt","numberToHuman","roundOptions","units","exponent","num","unitExponents","calculateExponent","determineUnit","trim","STORAGE_UNITS","parseDate","setTime","parts","day","hour","minute","second","milliseconds","UTC","$1","$2","$3","$6","$4","$5","pluralize","baseScope","missingTranslation","pluralization","missingKeys","compute","DEFAULT_OPTIONS","meridian","am","pm","dayNames","abbrDayNames","monthNames","abbrMonthNames","within","actual","guessStrategy","missingTranslationPrefix","_match","messageStrategy","fullScope","errorStrategy","fullScopeWithLocale","MissingTranslation","strategy","missingBehavior","__awaiter","thisArg","_arguments","generator","fulfilled","step","next","rejected","DEFAULT_I18N_OPTIONS","availableLocales","_locale","_defaultLocale","_version","onChangeHandlers","translate","localize","distanceOfTimeInWords","timeAgoInWords","hasChanged","newLocale","changed","translationOptions","defaults","createTranslationOptions","translation","translationOption","numberToCurrency","numberToPercentage","localizedValue","toTime","strftime","numberToHumanSize","smallerThanBase","numberToBeFormatted","log","computeExponent","billion","million","quadrillion","thousand","trillion","numberToRounded","numberToDelimited","delimiterPattern","global","digitToDelimiter","withLocale","callback","originalLocale","AM_PM","getTime","weekDay","getDay","getDate","getFullYear","getMonth","getHours","hour12","secs","getSeconds","mins","getMinutes","getTimezoneOffset","absOffsetHours","absOffsetMinutes","timezoneoffset","update","override","strict","currentNode","currentType","overrideType","newNode","toSentence","items","wordsConnector","twoWordsConnector","lastWordConnector","fromTime","fromInSeconds","toInSeconds","distanceInSeconds","distanceInMinutes","distanceInDays","distanceInHoursRounded","distanceInDaysRounded","distanceInMonthsRounded","includeSeconds","fromYear","toYear","minutesInYear","minutesWithOffset","distanceInYears","trunc","version","runCallbacks","baseHas","hasPath","baseSet","baseUniq","capitalize","camelCase","createCompounder","word","baseRepeat","isIterateeCall","toInteger","guard","baseOrderBy","baseRest","sortBy","collection","iteratees","baseZipObject","range","createRange","memoizeCapped","rePropName","reEscapeChar","subString","memoize","resolver","TypeError","memoized","Cache","Hash","hashClear","hashDelete","hashGet","hashHas","hashSet","isMasked","toSource","reIsHostCtor","funcProto","reIsNative","uid","coreJsData","maskSrcKey","exec","IE_PROTO","assocIndexOf","getMapData","Symbol","arrayMap","symbolProto","symbolToString","arrayIncludes","arrayIncludesWith","createSet","setToArray","comparator","isCommon","outer","computed","seenIndex","baseIndexOf","baseFindIndex","baseIsNaN","strictIndexOf","fromIndex","fromRight","noop","upperFirst","createCaseFirst","castSlice","hasUnicode","stringToArray","methodName","strSymbols","chr","trailing","baseSlice","asciiToArray","unicodeToArray","rsAstral","rsCombo","rsFitz","rsNonAstral","rsRegional","rsSurrPair","reOptMod","rsOptVar","rsSeq","rsSymbol","reUnicode","arrayReduce","deburr","words","reApos","accumulator","initAccum","deburrLetter","reLatin","reComboMark","basePropertyOf","asciiWords","hasUnicodeWord","unicodeWords","pattern","reAsciiWord","reHasUnicodeWord","rsDingbatRange","rsLowerRange","rsUpperRange","rsBreakRange","rsMathOpRange","rsBreak","rsDigits","rsDingbat","rsLower","rsMisc","rsUpper","rsMiscLower","rsMiscUpper","rsOptContrLower","rsOptContrUpper","rsModifier","rsEmoji","reUnicodeWord","nativeFloor","toFinite","remainder","spreadableSymbol","isConcatSpreadable","baseIteratee","baseMap","baseSortBy","compareMultiple","identity","orders","baseMatches","baseMatchesProperty","baseIsMatch","getMatchData","matchesStrictComparable","source","matchData","noCustomizer","COMPARE_PARTIAL_FLAG","pairs","LARGE_ARRAY_SIZE","equalArrays","equalByTag","equalObjects","getTag","argsTag","arrayTag","objectTag","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","Uint8Array","mapToArray","symbolValueOf","byteLength","byteOffset","convert","stacked","getAllKeys","objProps","objLength","objStacked","skipCtor","objCtor","othCtor","baseGetAllKeys","getSymbols","keysFunc","symbolsFunc","arrayFilter","stubArray","nativeGetSymbols","getOwnPropertySymbols","symbol","resIndex","baseTimes","inherited","isArr","isArg","isBuff","isType","skipIndexes","typedArrayTags","freeProcess","freeGlobal","process","types","require","binding","isPrototype","nativeKeys","Ctor","overArg","transform","arg","DataView","WeakMap","mapTag","promiseTag","setTag","weakMapTag","dataViewTag","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","ArrayBuffer","ctorString","isStrictComparable","hasIn","baseHasIn","baseProperty","basePropertyDeep","baseEach","baseForOwn","createBaseEach","baseFor","createBaseFor","iterable","eachFunc","comparer","compareAscending","objCriteria","criteria","othCriteria","ordersLength","valIsDefined","valIsNull","valIsReflexive","valIsSymbol","othIsDefined","othIsNull","othIsReflexive","othIsSymbol","overRest","setToString","nativeMax","otherArgs","baseSetToString","shortOut","constant","nativeNow","lastCalled","stamp","remaining","assignFunc","valsLength","baseRange","nativeCeil","initializeArticlePageDropdowns","_loop","dropdownTrigger","initialized","isProfilePreview","dropdownElement","_dropdownElement$quer","reportAbuseWrapper","permalink","handleCopyPermalink","fetchMissingProfilePreviewCard","placeholderElement","_placeholderElement$d","commentUserId","jsCommentUserId","jsDropdownContentId","htmlContent","generatedElement","previewCard","firstElementChild","replaceChild","observer","mutationsList","mutation","addedNodes","ELEMENT_NODE","checkMutationForProfilePreviewCardPlaceholder","subtree","dropdownRepositionListener","InstantClick","on"],"mappings":"uGAAA,sgBAAIA,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAE,CAAC,EAAEC,EAAE,GAAGC,EAAE,oEAAoEC,EAAEC,MAAMC,QAAQ,SAASC,EAAEf,EAAEC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,IAEAl7C,OAAOxiB,iBAAiB,gBAAgB,WACtCm9D,EAAS/1C,aACTvlB,SAAS5B,oBAAoB,SAAUy9D,EACzC,IAEA5B,G","file":"js/commentDropdowns-f661ad48fe0557bfe5e1.chunk.js","sourcesContent":["var n,l,u,t,i,o,r,f,e,c={},s=[],a=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v=Array.isArray;function h(n,l){for(var u in l)n[u]=l[u];return n}function p(n){var l=n.parentNode;l&&l.removeChild(n)}function y(l,u,t){var i,o,r,f={};for(r in u)\"key\"==r?i=u[r]:\"ref\"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return d(l,f,i,o,null)}function d(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u:r};return null==r&&null!=l.vnode&&l.vnode(f),f}function _(){return{current:null}}function k(n){return n.children}function b(n,l){this.props=n,this.context=l}function g(n,l){if(null==l)return n.__?g(n.__,n.__.__k.indexOf(n)+1):null;for(var u;ll&&i.sort(f));x.__r=0}function P(n,l,u,t,i,o,r,f,e,a,h){var p,y,_,b,m,w,x,P,C,D=0,H=t&&t.__k||s,I=H.length,T=I,j=l.length;for(u.__k=[],p=0;p0?d(b.type,b.props,b.key,b.ref?b.ref:null,b.__v):b)?(b.__=u,b.__b=u.__b+1,-1===(P=A(b,H,x=p+D,T))?_=c:(_=H[P]||c,H[P]=void 0,T--),z(n,b,_,i,o,r,f,e,a,h),m=b.__e,(y=b.ref)&&_.ref!=y&&(_.ref&&N(_.ref,null,b),h.push(y,b.__c||m,b)),null!=m&&(null==w&&(w=m),(C=_===c||null===_.__v)?-1==P&&D--:P!==x&&(P===x+1?D++:P>x?T>j-x?D+=P-x:D--:D=P(null!=e?1:0))for(;r>=0||f=0){if((e=l[r])&&i==e.key&&o===e.type)return r;r--}if(f2&&(e.children=arguments.length>3?n.call(arguments,2):t),d(l.type,e,i||l.key,o||l.ref,null)}function G(n,l){var u={__c:l=\"__cC\"+e++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=[],(t={})[l]=this,this.getChildContext=function(){return t},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,w(n)})},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=s.slice,l={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&void 0===n.constructor},b.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),\"function\"==typeof n&&(n=n(h({},u),this.props)),n&&h(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),w(this))},b.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),w(this))},b.prototype.render=k,i=[],r=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f=function(n,l){return n.__v.__b-l.__v.__b},x.__r=0,e=0;export{b as Component,k as Fragment,F as cloneElement,G as createContext,y as createElement,_ as createRef,y as h,E as hydrate,t as isValidElement,l as options,B as render,C as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","import { h } from 'preact';\nimport PropTypes from 'prop-types';\nimport { useState } from 'preact/hooks';\nimport classNames from 'classnames/bind';\nimport { defaultChildrenPropTypes } from '../../common-prop-types/default-children-prop-types';\nimport { Icon } from '@crayons';\n\nexport const ButtonNew = (props) => {\n const {\n children,\n variant = 'default',\n icon,\n rounded,\n destructive,\n type = 'button',\n className,\n tooltip,\n onKeyUp,\n ...otherProps\n } = props;\n\n const [suppressTooltip, setSuppressTooltip] = useState(false);\n\n const handleKeyUp = (event) => {\n onKeyUp?.(event);\n if (!tooltip) {\n return;\n }\n setSuppressTooltip(event.key === 'Escape');\n };\n\n const classes = classNames('c-btn', {\n [`c-btn--${variant}`]: variant && variant !== 'default',\n 'c-btn--destructive': destructive && variant !== 'secondary',\n 'c-btn--icon-left': icon && children,\n 'c-btn--icon-alone': icon && !children,\n 'crayons-tooltip__activator': tooltip,\n 'radius-full': rounded,\n [className]: className,\n });\n\n return (\n \n {icon && (\n \n )}\n {children}\n {tooltip ? (\n \n {tooltip}\n \n ) : null}\n \n );\n};\n\nButtonNew.displayName = 'ButtonNew';\n\nButtonNew.propTypes = {\n children: defaultChildrenPropTypes,\n variant: PropTypes.oneOf(['default', 'primary', 'secondary']),\n rounded: PropTypes.bool,\n destructive: PropTypes.bool,\n type: PropTypes.oneOf(['button', 'submit']),\n className: PropTypes.string,\n tooltip: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n onKeyUp: PropTypes.func,\n icon: PropTypes.elementType,\n};\n","import { h } from 'preact';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames/bind';\nimport { defaultChildrenPropTypes } from '../../common-prop-types/default-children-prop-types';\nimport { Icon } from '@crayons';\n\nexport const Link = (props) => {\n const {\n children,\n href = '#',\n variant = 'default',\n block,\n icon,\n rounded,\n className,\n ...otherProps\n } = props;\n\n const classes = classNames('c-link', {\n [`c-link--${variant}`]: variant && variant !== 'default',\n 'c-link--icon-left': icon && children,\n 'c-link--icon-alone': icon && !children,\n 'c-link--block': block,\n 'radius-full': rounded,\n [className]: className,\n });\n\n return (\n \n {icon && (\n \n )}\n {children}\n \n );\n};\n\nLink.displayName = 'Link';\n\nLink.propTypes = {\n variant: PropTypes.oneOf(['default', 'branded']),\n block: PropTypes.bool,\n rounded: PropTypes.bool,\n href: PropTypes.string.isRequired,\n className: PropTypes.string,\n children: defaultChildrenPropTypes,\n icon: PropTypes.elementType,\n};\n","import { h } from 'preact';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames/bind';\nimport { defaultChildrenPropTypes } from '../../common-prop-types/default-children-prop-types';\nimport { Icon } from '@crayons';\n\nexport const CTA = (props) => {\n const {\n children,\n href = '#',\n variant = 'default',\n icon,\n className,\n ...otherProps\n } = props;\n\n const classes = classNames('c-cta', {\n [`c-cta--${variant}`]: variant && variant !== 'default',\n 'c-cta--icon-left': icon && children,\n [className]: className,\n });\n\n return (\n \n {icon && (\n \n )}\n {children}\n \n );\n};\n\nCTA.displayName = 'CTA';\n\nCTA.propTypes = {\n variant: PropTypes.oneOf(['default', 'branded']),\n rounded: PropTypes.bool,\n href: PropTypes.string.isRequired,\n className: PropTypes.string,\n children: defaultChildrenPropTypes.isRequired,\n icon: PropTypes.elementType,\n};\n","import { h } from 'preact';\nimport PropTypes from 'prop-types';\nimport { defaultChildrenPropTypes } from '../../common-prop-types/default-children-prop-types';\n\n/**\n * Used to group related buttons together\n *\n * @param {string} labelText Used to form the aria-label providing to assistive technologies to describe the control\n * @param {HTMLElement[]} children The buttons rendered inside the group\n */\nexport const ButtonGroup = ({ children, labelText }) => (\n
\n {children}\n
\n);\n\nButtonGroup.displayName = 'ButtonGroup';\n\nButtonGroup.propTypes = {\n children: defaultChildrenPropTypes,\n labelText: PropTypes.string.isRequired,\n};\n","import { h } from 'preact';\nimport { useLayoutEffect, useState } from 'preact/hooks';\nimport PropTypes from 'prop-types';\nimport { defaultChildrenPropTypes } from '../../common-prop-types/default-children-prop-types';\nimport { initializeDropdown } from '@utilities/dropdownUtils';\n\n/**\n * A component to render a dropdown with the provided children.\n * This component handles the attachment of all open/close click events and listeners.\n *\n * @param {Object} props\n * @param {Array} props.children Children to be rendered inside the dropdown, passed via composition\n * @param {String} props.className Optional string of classnames to be applied to the dropdown (e.g for positioning)\n * @param {String} props.triggerButtonId The ID of the button element which should open and close the dropdown\n * @param {String} props.dropdownContentId The ID to be applied to the dropdown itself\n * @param {String} props.dropdownContentCloseButtonId An optional ID for any button inside the dropdown content itself which should close it\n * @param {Function} props.onOpen Optional callback for any side-effects needed when the dropdown opens\n * @param {Function} props.onClose Optional callback for any side-effects needed when the dropdown closes\n *\n * @example\n *
\n * \n * \n * {dropdownInnerContent}\n * \n *
\n */\nexport const Dropdown = ({\n children,\n className,\n triggerButtonId,\n dropdownContentId,\n dropdownContentCloseButtonId,\n onOpen = () => {},\n onClose = () => {},\n ...restOfProps\n}) => {\n const [isInitialized, setIsInitialized] = useState(false);\n useLayoutEffect(() => {\n if (!isInitialized) {\n initializeDropdown({\n triggerElementId: triggerButtonId,\n dropdownContentId,\n dropdownContentCloseButtonId,\n onOpen,\n onClose,\n });\n\n setIsInitialized(true);\n }\n }, [\n dropdownContentId,\n triggerButtonId,\n dropdownContentCloseButtonId,\n isInitialized,\n onOpen,\n onClose,\n ]);\n\n return (\n 0 ? ` ${className}` : ''\n }`}\n {...restOfProps}\n >\n {children}\n \n );\n};\n\nDropdown.defaultProps = {\n className: undefined,\n};\n\nDropdown.displayName = 'Dropdown';\n\nDropdown.propTypes = {\n children: defaultChildrenPropTypes.isRequired,\n className: PropTypes.string,\n triggerButtonId: PropTypes.string.isRequired,\n dropdownContentId: PropTypes.string.isRequired,\n dropdownContentCloseButtonId: PropTypes.string,\n onOpen: PropTypes.func,\n onClose: PropTypes.func,\n};\n","import { h } from 'preact';\nimport PropTypes from 'prop-types';\nimport { defaultChildrenPropTypes } from '../../../common-prop-types';\n\n// Only radio and checkboxes require an additional CSS class (variant class). Other form elements do not.\n\nexport const FormField = ({ children, variant }) => {\n return (\n 0 ? ` crayons-field--${variant}` : ''\n }`}\n >\n {children}\n \n );\n};\n\nFormField.displayName = 'FormField';\n\nFormField.defaultProps = {\n variant: undefined,\n};\n\nFormField.propTypes = {\n children: defaultChildrenPropTypes.isRequired,\n variant: PropTypes.oneOf(['radio', 'checkbox']),\n};\n","import { h } from 'preact';\nimport PropTypes from 'prop-types';\n\nexport const RadioButton = (props) => {\n const { id, value, name, className, checked, onClick, ...otherProps } = props;\n\n return (\n 0 ? ` ${className}` : ''\n }`}\n checked={checked}\n onClick={onClick}\n type=\"radio\"\n {...otherProps}\n />\n );\n};\n\nRadioButton.displayName = 'RadioButton';\n\nRadioButton.defaultProps = {\n id: undefined,\n className: undefined,\n checked: false,\n name: undefined,\n};\n\nRadioButton.propTypes = {\n id: PropTypes.string,\n value: PropTypes.string.isRequired,\n className: PropTypes.string,\n checked: PropTypes.bool,\n name: PropTypes.string,\n onClick: PropTypes.func.isRequired,\n};\n","import { h, Fragment } from 'preact';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { useState, useLayoutEffect } from 'preact/hooks';\nimport { HexColorPicker, HexColorInput } from 'react-colorful';\nimport { initializeDropdown } from '@utilities/dropdownUtils';\nimport { ButtonNew as Button } from '@crayons';\n\nconst convertThreeCharHexToSix = (hex) => {\n const r = hex.charAt(1);\n const g = hex.charAt(2);\n const b = hex.charAt(3);\n\n return `#${r}${r}${g}${g}${b}${b}`;\n};\n\nexport const ColorPicker = ({\n id,\n buttonLabelText,\n defaultValue,\n inputProps,\n onChange,\n onBlur,\n}) => {\n // Ternary has been used here to guard against an empty string being passed as default value\n const [color, setColor] = useState(defaultValue ? defaultValue : '#000');\n\n const buttonId = `color-popover-btn-${id}`;\n const popoverId = `color-popover-${id}`;\n\n useLayoutEffect(() => {\n initializeDropdown({\n triggerElementId: buttonId,\n dropdownContentId: popoverId,\n });\n }, [buttonId, popoverId]);\n\n // Hex codes may validly be represented by three characters, where r, g, b are all repeated,\n // e.g. #0D6 === #00DD66. To make sure that all color codes can be handled consistently through our app,\n // we convert any shorthand hex codes to their full 6 char representation.\n const handleBlur = () => {\n // Color always includes a leading '#', hence a length of 4\n if (color.length === 4) {\n const fullHexCode = convertThreeCharHexToSix(color);\n setColor(fullHexCode);\n onChange?.(fullHexCode);\n }\n };\n\n return (\n \n
\n \n {\n onChange?.(color);\n setColor(color);\n }}\n onBlur={(e) => {\n onBlur?.(e);\n handleBlur();\n }}\n prefixed\n />\n \n {\n onChange?.(color);\n setColor(color);\n }}\n />\n
\n \n
\n );\n};\n\nColorPicker.propTypes = {\n id: PropTypes.string.isRequired,\n buttonLabelText: PropTypes.string.isRequired,\n defaultValue: PropTypes.string,\n inputProps: PropTypes.object,\n};\n","import { h } from 'preact';\n\nexport const Toggle = ({ ...otherProps }) => {\n return ;\n};\n\nToggle.displayName = 'Toggle';\n","export const MONTH_UNTIL_TODAY = 'MONTH_UNTIL_TODAY';\nexport const QUARTER_UNTIL_TODAY = 'QUARTER_UNTIL_TODAY';\nexport const YEAR_UNTIL_TODAY = 'YEAR_UNTIL_TODAY';\nexport const LAST_FULL_MONTH = 'LAST_FULL_MONTH';\nexport const LAST_FULL_QUARTER = 'LAST_FULL_QUARTER';\nexport const LAST_FULL_YEAR = 'LAST_FULL_YEAR';\n\nexport const ALL_PRESET_RANGES = [\n MONTH_UNTIL_TODAY,\n LAST_FULL_MONTH,\n QUARTER_UNTIL_TODAY,\n LAST_FULL_QUARTER,\n YEAR_UNTIL_TODAY,\n LAST_FULL_YEAR,\n];\n\nexport const RANGE_LABELS = {\n MONTH_UNTIL_TODAY: 'This month',\n QUARTER_UNTIL_TODAY: 'This quarter',\n YEAR_UNTIL_TODAY: 'This year',\n LAST_FULL_MONTH: 'Last month',\n LAST_FULL_QUARTER: 'Last quarter',\n LAST_FULL_YEAR: 'Last year',\n};\n\nconst PERIODS = {\n DAY: 'day',\n MONTH: 'month',\n QUARTER: 'quarter',\n YEAR: 'year',\n};\n\nconst getPeriodUntilToday = (today, period) => ({\n start: today.clone().startOf(period),\n end: today.clone(),\n});\n\nconst getLastFullPeriod = (today, period) => ({\n start: today.clone().subtract(1, period).startOf(period),\n end: today.clone().subtract(1, period).endOf(period),\n});\n\nexport const getDateRangeStartAndEndDates = ({ today, dateRangeName }) => {\n switch (dateRangeName) {\n case MONTH_UNTIL_TODAY:\n return getPeriodUntilToday(today, PERIODS.MONTH);\n case LAST_FULL_MONTH:\n return getLastFullPeriod(today, PERIODS.MONTH);\n case QUARTER_UNTIL_TODAY:\n return getPeriodUntilToday(today, PERIODS.QUARTER);\n case LAST_FULL_QUARTER:\n return getLastFullPeriod(today, PERIODS.QUARTER);\n case YEAR_UNTIL_TODAY:\n return getPeriodUntilToday(today, PERIODS.YEAR);\n case LAST_FULL_YEAR:\n return getLastFullPeriod(today, PERIODS.YEAR);\n }\n};\n","import { h } from 'preact';\nimport PropTypes from 'prop-types';\nimport { useState, useLayoutEffect, useEffect } from 'preact/hooks';\nimport 'react-dates/initialize';\nimport moment from 'moment';\nimport { DateRangePicker as ReactDateRangePicker } from 'react-dates';\nimport defaultPhrases from 'react-dates/lib/defaultPhrases';\nimport {\n START_DATE,\n ICON_BEFORE_POSITION,\n VERTICAL_ORIENTATION,\n HORIZONTAL_ORIENTATION,\n} from 'react-dates/constants';\nimport { getDateRangeStartAndEndDates, RANGE_LABELS } from './dateRangeUtils';\nimport { Icon, ButtonNew as Button } from '@crayons';\nimport ChevronLeft from '@images/chevron-left.svg';\nimport ChevronRight from '@images/chevron-right.svg';\nimport Calendar from '@images/calendar.svg';\nimport { getCurrentLocale } from '@utilities/runtime';\nimport { useMediaQuery, BREAKPOINTS } from '@components/useMediaQuery';\n\nconst PICKER_PHRASES = {\n ...defaultPhrases,\n chooseAvailableStartDate: ({ date }) => `Choose ${date} as start date`,\n chooseAvailableEndDate: ({ date }) => `Choose ${date} as end date`,\n focusStartDate: 'Interact with the calendar and add your start date',\n invalidDateFormat: (format, errorPrefix) =>\n `${errorPrefix} must be in the format ${format}`,\n dateTooLate: (latestDate, errorPrefix) =>\n `${errorPrefix} must be on or before ${latestDate}`,\n dateTooEarly: (earliestDate, errorPrefix) =>\n `${errorPrefix} must be on or after ${earliestDate}`,\n};\n\nconst MONTH_NAMES = [...Array(12).keys()].map((key) =>\n new Date(0, key).toLocaleString('en', { month: 'long' }),\n);\n\nconst isDateOutsideOfRange = ({ date, minDate, maxDate }) =>\n !date.isBetween(minDate, maxDate);\n\n/**\n * Renders select elements allowing a user to jump to a given month/year\n * @param {Object} earliestMoment Moment object representing the earliest permitted date\n * @param {Object} latestMoment Moment object representing the latest permitted date\n * @param {Function} onMonthSelect Callback passed by react-dates library\n * @param {Function} onYearSelect Callback passed by react-dates library\n * @param {Object} month Moment object passed by react-dates library, representing the currently visible calendar\n */\nconst MonthYearPicker = ({\n earliestMoment,\n latestMoment,\n onMonthSelect,\n onYearSelect,\n month,\n}) => {\n const selectedMonth = month.month();\n const selectedYear = month.year();\n\n const latestYear = latestMoment.year();\n\n // Make sure we only display the available months for the currently selected year\n const latestMonthIndex =\n latestYear === selectedYear ? latestMoment.month() : 11;\n const availableMonths = MONTH_NAMES.slice(0, latestMonthIndex + 1);\n\n const yearsDiff = latestMoment.diff(earliestMoment, 'years');\n\n const years = [...Array(yearsDiff).keys()].map(\n (key) => latestMoment.year() - key,\n );\n years.push(earliestMoment.year());\n\n return (\n
\n onMonthSelect(month, e.target.value)}\n value={selectedMonth}\n >\n {availableMonths.map((month, index) => (\n \n ))}\n \n onYearSelect(month, e.target.value)}\n value={selectedYear}\n >\n {years.map((year) => (\n \n ))}\n \n
\n );\n};\n\n/**\n * Renders preset date ranges as 'quick select' buttons, if the range falls within the permitted dates.\n * Possible preset ranges are defined in ./dateRangeUtils.js\n *\n * @param {[string]} presetRanges The preset range names requested\n * @param {Object} earliestMoment Moment object representing earliest permitted date\n * @param {Object} latestMoment Moment object representing latest permitted date\n * @param {Function} onPresetSelected Callback which will receive start and end dates of selected preset\n * @param {Object} today Moment object representing today's date\n */\nconst PresetDateRangeOptions = ({\n presetRanges = [],\n earliestMoment,\n latestMoment,\n onPresetSelected,\n today,\n}) => {\n // Filter out any requested ranges which extend beyond the valid time period\n const presetsWithinPermittedDates = presetRanges.filter((dateRangeName) => {\n const { start: rangeStart, end: rangeEnd } = getDateRangeStartAndEndDates({\n today,\n dateRangeName,\n });\n\n return (\n rangeStart.isSameOrBefore(rangeEnd) &&\n rangeStart.isSameOrAfter(earliestMoment) &&\n rangeEnd.isSameOrBefore(latestMoment)\n );\n });\n\n if (presetsWithinPermittedDates.length === 0) {\n return null;\n }\n\n return (\n
    \n {presetsWithinPermittedDates.map((rangeName) => (\n
  • \n {\n onPresetSelected(\n getDateRangeStartAndEndDates({\n today,\n dateRangeName: rangeName,\n }),\n );\n }}\n >\n {RANGE_LABELS[rangeName]}\n \n
  • \n ))}\n
\n );\n};\n\n/**\n * Hook that will attach listeners to date range inputs and return the correct error message for each.\n * @param {Object} props\n * @param {Object} props.earliesMoment Moment object reflecting the earliest date that may be selected\n * @param {Object} props.latestMoment Moment object reflecting the latest date that may be selected\n * @param {string} props.dateFormat The expected date format, e.g. \"MM/DD/YYYY\"\n */\nconst useDateRangeValidation = ({\n earliestMoment,\n latestMoment,\n dateFormat,\n}) => {\n const [startDateInput, setStartDateInput] = useState(null);\n const [endDateInput, setEndDateInput] = useState(null);\n const [startDateError, setStartDateError] = useState('');\n const [endDateError, setEndDateError] = useState('');\n\n useEffect(() => {\n const setError = (error, inputType) =>\n inputType === 'start'\n ? setStartDateError(error ?? '')\n : setEndDateError(error ?? '');\n\n const handleBlur = ({ target: { value } }, inputType) => {\n if (value === '') {\n setError('', inputType);\n return;\n }\n\n const errorPrefix = `${inputType === 'start' ? 'Start' : 'End'} date`;\n\n const valueMoment = moment(value, dateFormat);\n if (!valueMoment.isValid()) {\n setError(\n PICKER_PHRASES.invalidDateFormat(dateFormat, errorPrefix),\n inputType,\n );\n return;\n }\n\n if (valueMoment.isBefore(earliestMoment)) {\n setError(\n PICKER_PHRASES.dateTooEarly(\n earliestMoment.format(dateFormat),\n errorPrefix,\n ),\n inputType,\n );\n return;\n }\n\n if (valueMoment.isAfter(latestMoment)) {\n setError(\n PICKER_PHRASES.dateTooLate(\n latestMoment.format(dateFormat),\n errorPrefix,\n ),\n inputType,\n );\n return;\n }\n\n // Date is valid\n setError('', inputType);\n };\n\n const handleStartBlur = (e) => handleBlur(e, 'start');\n const handleEndBlur = (e) => handleBlur(e, 'end');\n\n startDateInput?.addEventListener('blur', handleStartBlur);\n endDateInput?.addEventListener('blur', handleEndBlur);\n\n return () => {\n startDateInput?.removeEventListener('blur', handleStartBlur);\n endDateInput?.removeEventListener('blur', handleEndBlur);\n };\n }, [startDateInput, endDateInput, dateFormat, earliestMoment, latestMoment]);\n\n return { setStartDateInput, setEndDateInput, startDateError, endDateError };\n};\n\n/**\n * Used to facilitate picking a date range. This component is a wrapper around the one provided from react-dates.\n *\n * @param {Object} props\n * @param {string} props.startDateId A unique ID for the start date input\n * @param {string} props.endDateId A unique ID for the end date input\n * @param {Date} props.defaultStartDate The optional initial value for the start date\n * @param {Date} props.defaultEndDate The optional initial value for the end date\n * @param {Date} props.maxEndDate The latest date that may be selected\n * @param {Date} props.minStartDate The oldest date that may be selected\n * @param {Function} props.onDatesChanged Callback function for when dates are selected. Receives an object with startDate and endDate values.\n * @param {[string]} props.presetRanges Quick-select preset date ranges to offer in the calendar. These will only be shown if they fall within the min and max dates.\n * @param {string} props.startDateAriaLabel Custom aria-label for start date input\n * @param {string} props.endDateAriaLabel Custom aria-label for end date input\n * @param {Date} props.todaysDate Optional param to pass in today's Date, primarily for testing purposes\n */\nexport const DateRangePicker = ({\n startDateId,\n endDateId,\n defaultStartDate,\n defaultEndDate,\n maxEndDate = new Date(),\n minStartDate = new Date(),\n onDatesChanged,\n presetRanges = [],\n startDateAriaLabel,\n endDateAriaLabel,\n todaysDate = new Date(),\n}) => {\n const [focusedInput, setFocusedInput] = useState(START_DATE);\n const [startMoment, setStartMoment] = useState(\n defaultStartDate ? moment(defaultStartDate) : null,\n );\n\n const [endMoment, setEndMoment] = useState(\n defaultEndDate ? moment(defaultEndDate) : null,\n );\n\n const dateFormat =\n getCurrentLocale().toLowerCase() === 'en-us' ? 'MM/DD/YYYY' : 'DD/MM/YYYY';\n\n const useCompactLayout = useMediaQuery(\n `(max-width: ${BREAKPOINTS.Medium - 1}px)`,\n );\n\n const earliestMoment = moment(minStartDate).startOf('day');\n const latestMoment = moment(maxEndDate).endOf('day');\n\n const isMonthSameAsLatestMonth = (relevantDate) =>\n relevantDate.year() === latestMoment.year() &&\n relevantDate.month() === latestMoment.month();\n\n const today = moment(todaysDate);\n\n const { setStartDateInput, setEndDateInput, startDateError, endDateError } =\n useDateRangeValidation({ earliestMoment, latestMoment, dateFormat });\n\n useLayoutEffect(() => {\n const startDateInput = document.getElementById(startDateId);\n startDateInput.setAttribute('aria-describedby', 'start-date-error');\n setStartDateInput(startDateInput);\n\n const endDateInput = document.getElementById(endDateId);\n endDateInput.setAttribute('aria-describedby', 'end-date-error');\n setEndDateInput(endDateInput);\n }, [startDateId, endDateId, setStartDateInput, setEndDateInput]);\n\n return (\n // We wrap in a span to assist with scoping CSS selectors & overriding styles from react-dates\n \n }\n navNext={}\n minDate={earliestMoment}\n maxDate={latestMoment}\n initialVisibleMonth={() => {\n const relevantDate = startMoment ? startMoment : today;\n\n return isMonthSameAsLatestMonth(relevantDate)\n ? relevantDate.clone().subtract(1, 'month')\n : relevantDate;\n }}\n customInputIcon={}\n showDefaultInputIcon={!(startMoment || endMoment)}\n inputIconPosition={ICON_BEFORE_POSITION}\n orientation={\n useCompactLayout ? VERTICAL_ORIENTATION : HORIZONTAL_ORIENTATION\n }\n showClearDates={startMoment || endMoment}\n customArrowIcon=\"-\"\n phrases={PICKER_PHRASES}\n onFocusChange={(focusedInput) => setFocusedInput(focusedInput)}\n isOutsideRange={(date) =>\n isDateOutsideOfRange({\n date,\n minDate: earliestMoment,\n maxDate: latestMoment,\n })\n }\n onDatesChange={({ startDate, endDate }) => {\n setStartMoment(startDate);\n setEndMoment(endDate);\n onDatesChanged?.({\n startDate: startDate?.toDate(),\n endDate: endDate?.toDate(),\n });\n }}\n small={useCompactLayout}\n renderMonthElement={(props) => (\n \n )}\n renderCalendarInfo={() => (\n {\n setStartMoment(start);\n setEndMoment(end);\n // Force the calendar to close, same as if user clicks an end date manually\n setFocusedInput(false);\n }}\n />\n )}\n />\n {/* This hidden input provides information that may be needed by implementing forms to properly parse dates */}\n \n \n
{startDateError}
\n
{endDateError}
\n \n \n );\n};\n\nDateRangePicker.propTypes = {\n startDateId: PropTypes.string.isRequired,\n endDateId: PropTypes.string.isRequired,\n defaultStartDate: PropTypes.instanceOf(Date),\n defaultEndDate: PropTypes.instanceOf(Date),\n maxStartDate: PropTypes.instanceOf(Date),\n maxEndDate: PropTypes.instanceOf(Date),\n onDatesChanged: PropTypes.func,\n presetRanges: PropTypes.arrayOf(PropTypes.string),\n};\n","import { h } from 'preact';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames/bind';\n\nexport const Icon = ({\n src: InternalIcon,\n native,\n className,\n ...otherProps\n}) => {\n return (\n \n );\n};\n\nIcon.displayName = 'Icon';\n\nIcon.propTypes = {\n native: PropTypes.bool,\n className: PropTypes.string,\n src: PropTypes.elementType.isRequired,\n};\n","import { h } from 'preact';\nimport PropTypes from 'prop-types';\nimport { defaultChildrenPropTypes } from '../../common-prop-types';\nimport { FocusTrap } from '../../shared/components/focusTrap';\n\n/**\n * A component that creates a full-width modal that slides in from the bottom of viewport.\n *\n *\n * @param {object} props\n * @param {Array} props.children\n * @param {string} props.title The title to be applied to the dialog, surfaced to screen reader users\n * @param {Function} props.onClose Action to complete when user opts to close the drawer\n *\n * @example\n * const [isDrawerOpen, setIsDrawerOpen] = useState(false);\n * return (\n *
\n * \n * {isDrawerOpen && (\n * setIsDrawerOpen(false)}\n * >\n *

Lorem ipsum

\n * \n * \n * )}\n *
\n * );\n */\nexport const MobileDrawer = ({ children, title, onClose = () => {} }) => {\n return (\n
\n
\n \n \n {children}\n
\n \n
\n );\n};\n\nMobileDrawer.propTypes = {\n children: defaultChildrenPropTypes.isRequired,\n title: PropTypes.string.isRequired,\n onClose: PropTypes.func,\n};\n","import { h } from 'preact';\nimport {\n getLastIndexOfCharacter,\n getNextIndexOfCharacter,\n getNumberOfNewLinesFollowingSelection,\n getNumberOfNewLinesPrecedingSelection,\n getSelectionData,\n} from '../../utilities/textAreaUtils';\nimport { getOSKeyboardModifierKeyString } from '@utilities/runtime';\nimport BoldIcon from '@images/bold.svg';\nimport ItalicIcon from '@images/italic.svg';\nimport LinkIcon from '@images/link.svg';\nimport OrderedListIcon from '@images/list-ordered.svg';\nimport UnorderedListIcon from '@images/list-unordered.svg';\nimport HeadingIcon from '@images/heading.svg';\nimport QuoteIcon from '@images/quote.svg';\nimport CodeIcon from '@images/code.svg';\nimport CodeBlockIcon from '@images/codeblock.svg';\nimport EmbedIcon from '@images/lightning.svg';\nimport UnderlineIcon from '@images/underline.svg';\nimport StrikethroughIcon from '@images/strikethrough.svg';\nimport DividerIcon from '@images/divider.svg';\nimport { Icon } from '@crayons';\n\nconst ORDERED_LIST_ITEM_REGEX = /^\\d+\\.\\s+.*/;\nconst MARKDOWN_LINK_REGEX =\n /^\\[([\\w\\s\\d]*)\\]\\((url|(https?:\\/\\/[\\w\\d./?=#]+))\\)$/;\nconst URL_PLACEHOLDER_TEXT = 'url';\n\nconst NUMBER_OF_NEW_LINES_BEFORE_BLOCK_SYNTAX = 2;\nconst NUMBER_OF_NEW_LINES_BEFORE_AFTER_SYNTAX = 1;\n\nconst getNewLinePrefixSuffixes = ({ selectionStart, selectionEnd, value }) => {\n const numberOfNewLinesBeforeSelection = getNumberOfNewLinesPrecedingSelection(\n { selectionStart, value },\n );\n const numberOfNewLinesFollowingSelection =\n getNumberOfNewLinesFollowingSelection({ selectionEnd, value });\n\n // We only add new lines if we're not at the beginning of the text area\n const numberOfNewLinesNeededAtStart =\n selectionStart === 0\n ? 0\n : NUMBER_OF_NEW_LINES_BEFORE_BLOCK_SYNTAX -\n numberOfNewLinesBeforeSelection;\n\n const newLinesPrefix = String.prototype.padStart(\n numberOfNewLinesNeededAtStart,\n '\\n',\n );\n\n const newLinesSuffix =\n numberOfNewLinesFollowingSelection >=\n NUMBER_OF_NEW_LINES_BEFORE_AFTER_SYNTAX\n ? ''\n : '\\n';\n\n return { newLinesPrefix, newLinesSuffix };\n};\n\nconst handleLinkFormattingForEmptyTextSelection = ({\n textBeforeSelection,\n textAfterSelection,\n value,\n selectionStart,\n selectionEnd,\n}) => {\n const basicFormattingForEmptySelection = {\n editSelectionStart: selectionStart,\n editSelectionEnd: selectionEnd,\n replaceSelectionWith: `[](${URL_PLACEHOLDER_TEXT})`,\n newCursorStart: selectionStart + 3,\n newCursorEnd: selectionEnd + 6,\n };\n\n // Directly after inserting a link with a URL highlighted, cursor is inside the link description '[]'\n // Check if we are inside empty link description remove the link syntax if so\n const directlySurroundedByLinkStructure =\n textBeforeSelection.slice(-1) === '[' &&\n textAfterSelection.slice(0, 2) === '](';\n\n if (!directlySurroundedByLinkStructure)\n return basicFormattingForEmptySelection;\n\n // Search for the closing bracket of markdown link\n const indexOfLinkStructureEnd = getNextIndexOfCharacter({\n content: value,\n selectionIndex: selectionStart,\n character: ')',\n breakOnCharacters: [' ', '\\n'],\n });\n\n if (indexOfLinkStructureEnd === -1) return basicFormattingForEmptySelection;\n\n // Remove the markdown link structure, preserving the link text if it isn't the \"url\" placeholder\n const urlText = value.slice(selectionEnd + 2, indexOfLinkStructureEnd);\n\n return {\n editSelectionStart: selectionStart - 1,\n editSelectionEnd: indexOfLinkStructureEnd + 1,\n replaceSelectionWith: urlText === URL_PLACEHOLDER_TEXT ? '' : urlText,\n newCursorStart: selectionStart - 1,\n newCursorEnd: selectionEnd - 1,\n };\n};\n\nconst handleLinkFormattingForUrlSelection = ({\n textBeforeSelection,\n textAfterSelection,\n value,\n selectionStart,\n selectionEnd,\n selectedText,\n}) => {\n const basicFormattingForLinkSelection = {\n editSelectionStart: selectionStart,\n editSelectionEnd: selectionEnd,\n replaceSelectionWith: `[](${selectedText})`,\n newCursorStart: selectionStart + 1,\n newCursorEnd: selectionStart + 1,\n };\n\n // Check if the text selection is likely inside a currently formatted markdown link\n const directlySurroundedByLinkStructure =\n textBeforeSelection.slice(-2) === '](' &&\n textAfterSelection.slice(0, 1) === ')';\n\n if (!directlySurroundedByLinkStructure)\n return basicFormattingForLinkSelection;\n\n // Get the index of where the current link opens so we can get the text inside the square brackets\n const indexOfSyntaxOpen = getLastIndexOfCharacter({\n content: value,\n selectionIndex: selectionStart,\n character: '[',\n });\n\n // If link syntax is incomplete, format the selection as a link\n if (indexOfSyntaxOpen === -1) return basicFormattingForLinkSelection;\n\n // Replace the markdown with the link text in square brackets, if available\n let textToReplaceMarkdown = textBeforeSelection.slice(\n indexOfSyntaxOpen + 1,\n -2,\n );\n\n // If not available, take the URL as long as it's not the placeholder 'url' text\n if (textToReplaceMarkdown === '') {\n textToReplaceMarkdown =\n selectedText === URL_PLACEHOLDER_TEXT ? '' : selectedText;\n }\n\n return {\n editSelectionStart: indexOfSyntaxOpen,\n editSelectionEnd: selectionEnd + 1,\n replaceSelectionWith: textToReplaceMarkdown,\n newCursorStart: indexOfSyntaxOpen,\n newCursorEnd: indexOfSyntaxOpen + textToReplaceMarkdown.length,\n };\n};\n\nconst handleUndoMarkdownLinkSelection = ({\n selectedText,\n selectionStart,\n selectionEnd,\n}) => {\n const linkDescriptionEnd = getNextIndexOfCharacter({\n content: selectedText,\n selectionIndex: 0,\n character: ']',\n });\n\n let textToReplaceMarkdown = selectedText.slice(1, linkDescriptionEnd);\n\n // Keep the URL instead if no link description exists\n if (textToReplaceMarkdown === '') {\n const linkText = selectedText.slice(linkDescriptionEnd + 2, -1);\n textToReplaceMarkdown = linkText === URL_PLACEHOLDER_TEXT ? '' : linkText;\n }\n\n return {\n editSelectionStart: selectionStart,\n editSelectionEnd: selectionEnd,\n replaceSelectionWith: textToReplaceMarkdown,\n newCursorStart: selectionStart,\n newCursorEnd: selectionStart + textToReplaceMarkdown.length,\n };\n};\n\nconst isStringStartAUrl = (string) => {\n const startingText = string.substring(0, 8);\n return startingText === 'https://' || startingText.startsWith('http://');\n};\n\nconst undoOrAddFormattingForInlineSyntax = ({\n value,\n selectionStart,\n selectionEnd,\n prefix,\n suffix,\n}) => {\n const { length: prefixLength } = prefix;\n const { length: suffixLength } = suffix;\n const { selectedText, textBeforeSelection, textAfterSelection } =\n getSelectionData({ selectionStart, selectionEnd, value });\n\n // Check if selected text has prefix/suffix\n const selectedTextAlreadyFormatted =\n selectedText.slice(0, prefixLength) === prefix &&\n selectedText.slice(-1 * suffixLength) === suffix;\n\n if (selectedTextAlreadyFormatted) {\n return {\n editSelectionStart: selectionStart,\n editSelectionEnd: selectionEnd,\n replaceSelectionWith: selectedText.slice(prefixLength, -1 * suffixLength),\n newCursorStart: selectionStart,\n newCursorEnd: selectionEnd - (prefixLength + suffixLength),\n };\n }\n\n // Check if immediate surrounding content has prefix/suffix\n const surroundingTextHasFormatting =\n textBeforeSelection.substring(textBeforeSelection.length - prefixLength) ===\n prefix && textAfterSelection.substring(0, suffixLength) === suffix;\n\n if (surroundingTextHasFormatting) {\n return {\n editSelectionStart: selectionStart - prefixLength,\n editSelectionEnd: selectionEnd + suffixLength,\n replaceSelectionWith: selectedText,\n newCursorStart: selectionStart - prefixLength,\n newCursorEnd: selectionEnd - prefixLength,\n };\n }\n\n // No formatting to undo - format the selected text\n return {\n editSelectionStart: selectionStart,\n editSelectionEnd: selectionEnd,\n replaceSelectionWith: `${prefix}${selectedText}${suffix}`,\n newCursorStart: selectionStart + prefixLength,\n newCursorEnd: selectionEnd + prefixLength,\n };\n};\n\nconst undoOrAddFormattingForMultilineSyntax = ({\n selectionStart,\n selectionEnd,\n value,\n linePrefix,\n blockPrefix,\n blockSuffix,\n}) => {\n const { selectedText, textBeforeSelection, textAfterSelection } =\n getSelectionData({ selectionStart, selectionEnd, value });\n\n let formattedText = selectedText;\n\n if (linePrefix) {\n const { length: prefixLength } = linePrefix;\n\n // If no selection, check if we're in a freshly inserted syntax\n if (selectedText === '') {\n const lastNewLine =\n textBeforeSelection === ''\n ? -1\n : getLastIndexOfCharacter({\n content: value,\n selectionIndex: selectionStart - 1,\n character: '\\n',\n });\n\n const lineStart = lastNewLine === -1 ? 0 : lastNewLine + 1;\n\n if (\n textBeforeSelection.slice(lineStart, lineStart + prefixLength) ===\n linePrefix\n ) {\n // Remove the list formatting\n\n return {\n editSelectionStart: lineStart,\n editSelectionEnd: lineStart + prefixLength,\n replaceSelectionWith: '',\n newCursorStart: selectionStart - prefixLength,\n newCursorEnd: selectionEnd - prefixLength,\n };\n }\n }\n\n // Split by new lines and check each line has formatting\n const splitByNewLine = selectedText\n .split('\\n')\n .filter((line) => line !== '');\n\n const isAlreadyFormatted =\n splitByNewLine.length > 0 &&\n splitByNewLine.every(\n (line) => line.slice(0, prefixLength) === linePrefix,\n );\n\n if (isAlreadyFormatted) {\n // Remove the formatting\n const unformattedText = splitByNewLine\n .map((line) => line.slice(prefixLength))\n .join('\\n');\n\n return {\n editSelectionStart: selectionStart,\n editSelectionEnd: selectionEnd,\n replaceSelectionWith: unformattedText,\n newCursorStart: selectionStart,\n newCursorEnd:\n selectionEnd + (unformattedText.length - selectedText.length),\n };\n }\n\n // Otherwise add the prefix to each line to create the new formatted text\n formattedText =\n selectedText === ''\n ? linePrefix\n : splitByNewLine.map((line) => `${linePrefix}${line}`).join('\\n');\n } else {\n // Uses only block prefix and suffix\n const { length: prefixLength } = blockPrefix;\n const { length: suffixLength } = blockSuffix;\n\n // does the selection start and end with the prefix/suffix\n const selectionIsFormatted =\n selectedText.slice(0, prefixLength) === blockPrefix &&\n selectedText.slice(-1 * suffixLength) === blockSuffix;\n\n if (selectionIsFormatted) {\n return {\n editSelectionStart: selectionStart,\n editSelectionEnd: selectionEnd,\n replaceSelectionWith: selectedText.slice(\n prefixLength,\n -1 * suffixLength,\n ),\n newCursorStart: selectionStart,\n newCursorEnd: selectionEnd - prefixLength - suffixLength,\n };\n }\n\n // or does the prefix/suffix plus new line chars immediately precede and follow the selection\n const surroundingTextIsFormatted =\n textBeforeSelection.slice(-1 * prefixLength) === blockPrefix &&\n textAfterSelection.slice(0, suffixLength) === blockSuffix;\n\n if (surroundingTextIsFormatted) {\n return {\n editSelectionStart: selectionStart - prefixLength,\n editSelectionEnd: selectionEnd + suffixLength,\n replaceSelectionWith: selectedText,\n newCursorStart: selectionStart - prefixLength,\n newCursorEnd: selectionEnd - prefixLength,\n };\n }\n }\n\n // Add the formatting\n\n const { newLinesPrefix, newLinesSuffix } = getNewLinePrefixSuffixes({\n selectionStart,\n selectionEnd,\n value,\n });\n const { length: newLinePrefixLength } = newLinesPrefix;\n\n const cursorStartBaseline = selectionStart + newLinePrefixLength;\n const cursorStartBlockPrefixOffset = blockPrefix ? blockPrefix.length : 0;\n const cursorStartLinePrefixOffset =\n selectedText === '' && linePrefix ? linePrefix.length : 0;\n\n return {\n editSelectionStart: selectionStart,\n editSelectionEnd: selectionEnd,\n replaceSelectionWith: `${newLinesPrefix}${\n blockPrefix ? blockPrefix : ''\n }${formattedText}${blockSuffix ? blockSuffix : ''}${newLinesSuffix}`,\n newCursorStart:\n cursorStartBaseline +\n cursorStartBlockPrefixOffset +\n cursorStartLinePrefixOffset,\n newCursorEnd:\n selectionEnd +\n formattedText.length -\n selectedText.length +\n newLinePrefixLength +\n (blockPrefix?.length || 0),\n };\n};\n\nexport const getNewTextAreaValueWithEdits = ({\n textAreaValue,\n editSelectionStart,\n editSelectionEnd,\n replaceSelectionWith,\n}) =>\n `${textAreaValue.substring(\n 0,\n editSelectionStart,\n )}${replaceSelectionWith}${textAreaValue.substring(editSelectionEnd)}`;\n\nexport const markdownSyntaxFormatters = {\n bold: {\n icon: () => ,\n label: 'Bold',\n getKeyboardShortcut: () => {\n const modifier = getOSKeyboardModifierKeyString();\n return {\n command: `${modifier}+b`,\n tooltipHint: `${modifier.toUpperCase()} + B`,\n };\n },\n getFormatting: ({ selectionStart, selectionEnd, value }) => {\n return undoOrAddFormattingForInlineSyntax({\n selectionStart,\n selectionEnd,\n value,\n prefix: '**',\n suffix: '**',\n });\n },\n },\n italic: {\n icon: () => ,\n label: 'Italic',\n getKeyboardShortcut: () => {\n const modifier = getOSKeyboardModifierKeyString();\n return {\n command: `${modifier}+i`,\n tooltipHint: `${modifier.toUpperCase()} + I`,\n };\n },\n getFormatting: ({ selectionStart, selectionEnd, value }) => {\n return undoOrAddFormattingForInlineSyntax({\n selectionStart,\n selectionEnd,\n value,\n prefix: '_',\n suffix: '_',\n });\n },\n },\n link: {\n icon: () => ,\n label: 'Link',\n getKeyboardShortcut: () => {\n const modifier = getOSKeyboardModifierKeyString();\n return {\n command: `${modifier}+k`,\n tooltipHint: `${modifier.toUpperCase()} + K`,\n };\n },\n getFormatting: ({ selectionStart, selectionEnd, value }) => {\n const { selectedText, textBeforeSelection, textAfterSelection } =\n getSelectionData({ selectionStart, selectionEnd, value });\n\n if (selectedText === '') {\n return handleLinkFormattingForEmptyTextSelection({\n textBeforeSelection,\n textAfterSelection,\n value,\n selectionStart,\n selectionEnd,\n });\n }\n\n if (\n isStringStartAUrl(selectedText) ||\n selectedText === URL_PLACEHOLDER_TEXT\n ) {\n return handleLinkFormattingForUrlSelection({\n textBeforeSelection,\n textAfterSelection,\n value,\n selectionStart,\n selectedText,\n selectionEnd,\n });\n }\n\n // If the whole selectedText matches markdown link formatting, undo it\n if (selectedText.match(MARKDOWN_LINK_REGEX)) {\n return handleUndoMarkdownLinkSelection({\n selectedText,\n selectionStart,\n selectionEnd,\n textBeforeSelection,\n textAfterSelection,\n });\n }\n\n // Finally, handle the case where link syntax is inserted for a selection other than a URL\n return {\n editSelectionStart: selectionStart,\n editSelectionEnd: selectionEnd,\n replaceSelectionWith: `[${selectedText}](${URL_PLACEHOLDER_TEXT})`,\n newCursorStart: selectionStart + selectedText.length + 3,\n newCursorEnd: selectionEnd + 6,\n };\n },\n },\n orderedList: {\n icon: () => ,\n label: 'Ordered list',\n getFormatting: ({ selectionStart, selectionEnd, value }) => {\n const { selectedText, textBeforeSelection } = getSelectionData({\n selectionStart,\n selectionEnd,\n value,\n });\n\n const { newLinesPrefix, newLinesSuffix } = getNewLinePrefixSuffixes({\n selectionStart,\n selectionEnd,\n value,\n });\n const { length: newLinePrefixLength } = newLinesPrefix;\n const { length: newLineSuffixLength } = newLinesSuffix;\n\n if (selectedText === '') {\n // Check start of line for whether we're in an empty ordered list\n const lastNewLine =\n textBeforeSelection === ''\n ? -1\n : getLastIndexOfCharacter({\n content: value,\n selectionIndex: selectionStart - 1,\n character: '\\n',\n });\n\n const lineStart = lastNewLine === -1 ? 0 : lastNewLine + 1;\n\n if (textBeforeSelection.slice(lineStart, lineStart + 3) === '1. ') {\n // Remove the list formatting\n return {\n editSelectionStart: lineStart,\n editSelectionEnd: lineStart + 3,\n replaceSelectionWith: '',\n newCursorStart: selectionStart - 3,\n newCursorEnd: selectionEnd - 3,\n };\n }\n }\n\n if (selectedText === '') {\n // Otherwise insert an empty list for an empty selection\n return {\n editSelectionStart: selectionStart,\n editSelectionEnd: selectionEnd,\n replaceSelectionWith: `${newLinesPrefix}1. ${newLinesSuffix}`,\n newCursorStart: selectionStart + 3 + newLinePrefixLength,\n newCursorEnd: selectionEnd + 3 + newLinePrefixLength,\n };\n }\n\n const splitByNewLine = selectedText.split('\\n');\n\n const isAlreadyAnOrderedList = splitByNewLine.every(\n (line) => line.match(ORDERED_LIST_ITEM_REGEX) || line === '',\n );\n\n if (isAlreadyAnOrderedList) {\n // Undo formatting\n const newText = splitByNewLine\n .filter((line) => line !== '')\n .map((line) => {\n const indexOfFullStop = line.indexOf('.');\n return line.substring(indexOfFullStop + 2);\n })\n .join('\\n');\n\n return {\n editSelectionStart: selectionStart,\n editSelectionEnd: selectionEnd,\n replaceSelectionWith: newText,\n newCursorStart: selectionStart + selectedText.indexOf('.') - 1,\n newCursorEnd: selectionEnd + newText.length - selectedText.length,\n };\n }\n // Otherwise convert to an ordered list\n const formattedList = `${newLinesPrefix}${splitByNewLine\n .map((textChunk, index) => `${index + 1}. ${textChunk}`)\n .join('\\n')}${newLinesSuffix}`;\n\n const cursorOffsetStart =\n selectedText.length === 0 ? 4 : newLinePrefixLength;\n\n return {\n editSelectionStart: selectionStart,\n editSelectionEnd: selectionEnd,\n replaceSelectionWith: formattedList,\n newCursorStart: selectionStart + cursorOffsetStart,\n newCursorEnd:\n selectionStart + formattedList.length - newLineSuffixLength,\n };\n },\n },\n unorderedList: {\n icon: () => ,\n label: 'Unordered list',\n getFormatting: ({ selectionStart, selectionEnd, value }) => {\n return undoOrAddFormattingForMultilineSyntax({\n selectionStart,\n selectionEnd,\n value,\n linePrefix: '- ',\n });\n },\n },\n heading: {\n icon: () => ,\n label: 'Heading',\n getFormatting: ({ selectionStart, selectionEnd, value }) => {\n let currentLineSelectionStart = selectionStart;\n\n // The 'heading' formatter changes insertion based on the existing heading level of the current line\n // So we find the start of the current line and check for '#' characters\n if (selectionStart > 0) {\n const lastNewLine = getLastIndexOfCharacter({\n content: value,\n selectionIndex: selectionStart - 1,\n character: '\\n',\n });\n\n const indexOfFirstLineCharacter =\n lastNewLine === -1 ? 0 : lastNewLine + 1;\n\n if (value.charAt(indexOfFirstLineCharacter) === '#') {\n currentLineSelectionStart = indexOfFirstLineCharacter;\n }\n }\n\n const { selectedText } = getSelectionData({\n selectionStart: currentLineSelectionStart,\n selectionEnd,\n value,\n });\n\n let currentHeadingIndex = 0;\n while (selectedText.charAt(currentHeadingIndex) === '#') {\n currentHeadingIndex++;\n }\n\n // After h4, revert to no heading at all\n if (currentHeadingIndex >= 4) {\n return {\n editSelectionStart: currentLineSelectionStart,\n editSelectionEnd: selectionEnd,\n replaceSelectionWith: selectedText.substring(5),\n newCursorStart: selectionStart - 5,\n newCursorEnd: selectionEnd - 5,\n };\n }\n\n const { newLinesPrefix, newLinesSuffix } = getNewLinePrefixSuffixes({\n selectionStart,\n selectionEnd,\n value,\n });\n const { length: newLinePrefixLength } = newLinesPrefix;\n\n const adjustingHeading = currentHeadingIndex > 0;\n const cursorOffset = adjustingHeading ? 1 : 3 + newLinePrefixLength;\n\n return {\n editSelectionStart: adjustingHeading\n ? currentLineSelectionStart\n : selectionStart,\n editSelectionEnd: selectionEnd,\n replaceSelectionWith: adjustingHeading\n ? `#${selectedText}`\n : `${newLinesPrefix}## ${selectedText}${newLinesSuffix}`,\n newCursorStart: selectionStart + cursorOffset,\n newCursorEnd: selectionEnd + cursorOffset,\n };\n },\n },\n quote: {\n icon: () => ,\n label: 'Quote',\n getFormatting: ({ selectionStart, selectionEnd, value }) =>\n undoOrAddFormattingForMultilineSyntax({\n selectionStart,\n selectionEnd,\n value,\n linePrefix: '> ',\n }),\n },\n code: {\n icon: () => ,\n label: 'Code',\n getFormatting: ({ selectionStart, selectionEnd, value }) =>\n undoOrAddFormattingForInlineSyntax({\n selectionStart,\n selectionEnd,\n value,\n prefix: '`',\n suffix: '`',\n }),\n },\n codeBlock: {\n icon: () => ,\n label: 'Code block',\n getFormatting: ({ selectionStart, selectionEnd, value }) =>\n undoOrAddFormattingForMultilineSyntax({\n selectionStart,\n selectionEnd,\n value,\n blockPrefix: '```\\n',\n blockSuffix: '\\n```',\n }),\n },\n embed: {\n icon: () => ,\n label: 'Embed',\n getKeyboardShortcut: () => {\n const modifier = getOSKeyboardModifierKeyString();\n return {\n command: `${modifier}+shift+k`,\n tooltipHint: `${modifier.toUpperCase()} + SHIFT + K`,\n };\n },\n getFormatting: ({ selectionStart, selectionEnd, value }) =>\n undoOrAddFormattingForInlineSyntax({\n value,\n selectionStart,\n selectionEnd,\n prefix: '{% embed ',\n suffix: ' %}',\n }),\n },\n underline: {\n icon: () => ,\n label: 'Underline',\n getKeyboardShortcut: () => {\n const modifier = getOSKeyboardModifierKeyString();\n return {\n command: `${modifier}+u`,\n tooltipHint: `${modifier.toUpperCase()} + U`,\n };\n },\n getFormatting: ({ selectionStart, selectionEnd, value }) =>\n undoOrAddFormattingForInlineSyntax({\n selectionStart,\n selectionEnd,\n value,\n prefix: '',\n suffix: '',\n }),\n },\n strikethrough: {\n icon: () => ,\n label: 'Strikethrough',\n getKeyboardShortcut: () => {\n const modifier = getOSKeyboardModifierKeyString();\n return {\n command: `${modifier}+shift+x`,\n tooltipHint: `${modifier.toUpperCase()} + SHIFT + X`,\n };\n },\n getFormatting: ({ selectionStart, selectionEnd, value }) =>\n undoOrAddFormattingForInlineSyntax({\n selectionStart,\n selectionEnd,\n value,\n prefix: '~~',\n suffix: '~~',\n }),\n },\n divider: {\n icon: () => ,\n label: 'Line divider',\n getFormatting: ({ selectionStart, selectionEnd, value }) =>\n undoOrAddFormattingForMultilineSyntax({\n selectionStart,\n selectionEnd,\n value,\n blockPrefix: '---\\n',\n blockSuffix: '',\n }),\n },\n};\n","import { h, cloneElement } from 'preact';\nimport { useState, useLayoutEffect, useRef } from 'preact/hooks';\nimport { ImageUploader } from '../../article-form/components/ImageUploader';\nimport {\n markdownSyntaxFormatters,\n getNewTextAreaValueWithEdits,\n} from './markdownSyntaxFormatters';\nimport OverflowIcon from '@images/overflow-vertical.svg';\nimport { ButtonNew as Button } from '@crayons';\nimport { useKeyboardShortcuts } from '@components/useKeyboardShortcuts';\nimport { BREAKPOINTS, useMediaQuery } from '@components/useMediaQuery';\nimport { getSelectionData } from '@utilities/textAreaUtils';\n\n// Placeholder text displayed while an image is uploading\nconst UPLOADING_IMAGE_PLACEHOLDER = '![Uploading image](...)';\n\nconst MAX_CORE_FORMATTERS_BY_SCREEN_SIZE = {\n small: 5,\n large: 7,\n extraLarge: 10,\n};\n\nconst getNumberOfIconsToDisplayInToolbar = ({\n isSmallScreen,\n isLargeScreen,\n}) => {\n if (isSmallScreen) {\n return MAX_CORE_FORMATTERS_BY_SCREEN_SIZE.small;\n }\n if (isLargeScreen) {\n return MAX_CORE_FORMATTERS_BY_SCREEN_SIZE.large;\n }\n return MAX_CORE_FORMATTERS_BY_SCREEN_SIZE.extraLarge;\n};\n\n/**\n * Returns the next sibling in the DOM which matches the given CSS selector.\n * This makes sure that only toolbar buttons are cycled through on Arrow key press,\n * and not e.g. the hidden file input from ImageUploader\n *\n * @param {HTMLElement} element The current HTML element\n * @param {string} selector The CSS selector to match\n * @returns\n */\nconst getNextMatchingSibling = (element, selector) => {\n let sibling = element.nextElementSibling;\n\n while (sibling) {\n if (sibling.matches(selector)) return sibling;\n sibling = sibling.nextElementSibling;\n }\n};\n\n/**\n * Returns the previous sibling in the DOM which matches the given CSS selector.\n * This makes sure that only toolbar buttons are cycled through on Arrow key press,\n * and not e.g. the hidden file input from ImageUploader\n *\n * @param {HTMLElement} element The current HTML element\n * @param {string} selector The CSS selector to match\n * @returns\n */\nconst getPreviousMatchingSibling = (element, selector) => {\n let sibling = element.previousElementSibling;\n\n while (sibling) {\n if (sibling.matches(selector)) return sibling;\n sibling = sibling.previousElementSibling;\n }\n};\n\n/**\n * UI component providing markdown shortcuts, to be inserted into the textarea with the given ID\n *\n * @param {object} props\n * @param {string} props.textAreaId The ID of the textarea the markdown formatting should be added to\n */\nexport const MarkdownToolbar = ({\n textAreaId,\n additionalSecondaryToolbarElements = [],\n}) => {\n const textAreaRef = useRef(null);\n\n const [overflowMenuOpen, setOverflowMenuOpen] = useState(false);\n const [storedCursorPosition, setStoredCursorPosition] = useState({});\n const smallScreen = useMediaQuery(`(max-width: ${BREAKPOINTS.Medium - 1}px)`);\n const largeScreen = useMediaQuery(\n `(min-width: ${BREAKPOINTS.Large}px) and (max-width: ${\n BREAKPOINTS.ExtraLarge - 1\n }px)`,\n );\n\n const overflowMenuRows = smallScreen ? 2 : 1;\n\n // Enhance any additional toolbar elements with the appropriate roles & listeners\n const additionalSecondaryItems = additionalSecondaryToolbarElements.map(\n (SecondaryItem) =>\n cloneElement(SecondaryItem, {\n role: 'menuitem',\n className: 'overflow-menu-btn',\n tabindex: '-1',\n onKeyUp: (e) => handleToolbarButtonKeyPress(e, 'overflow-menu-btn'),\n }),\n );\n\n const keyboardShortcuts = Object.fromEntries(\n Object.keys(markdownSyntaxFormatters)\n .filter(\n (syntaxName) =>\n !!markdownSyntaxFormatters[syntaxName].getKeyboardShortcut,\n )\n .map((syntaxName) => {\n const { command } =\n markdownSyntaxFormatters[syntaxName].getKeyboardShortcut();\n return [\n command,\n (e) => {\n e.preventDefault();\n insertSyntax(syntaxName);\n },\n ];\n }),\n );\n\n useKeyboardShortcuts(keyboardShortcuts, textAreaRef.current);\n\n useLayoutEffect(() => {\n textAreaRef.current = document.getElementById(textAreaId);\n }, [textAreaId]);\n\n useLayoutEffect(() => {\n // If a user resizes their screen, make sure roving tabindex continues to operate\n const focusableToolbarButton = document.querySelector(\n '.toolbar-btn[tabindex=\"0\"]',\n );\n if (!focusableToolbarButton) {\n document.querySelector('.toolbar-btn').setAttribute('tabindex', '0');\n }\n }, [smallScreen, largeScreen]);\n\n useLayoutEffect(() => {\n const clickOutsideHandler = ({ target }) => {\n if (target.id !== 'overflow-menu-button') {\n setOverflowMenuOpen(false);\n }\n };\n\n const escapePressHandler = ({ key }) => {\n if (key === 'Escape') {\n setOverflowMenuOpen(false);\n document.getElementById('overflow-menu-button').focus();\n }\n if (key === 'Tab') {\n setOverflowMenuOpen(false);\n }\n };\n\n if (overflowMenuOpen) {\n document\n .getElementById('overflow-menu')\n .getElementsByClassName('overflow-menu-btn')[0]\n .focus();\n\n document.addEventListener('keyup', escapePressHandler);\n document.addEventListener('click', clickOutsideHandler);\n } else {\n document.removeEventListener('keyup', escapePressHandler);\n document.removeEventListener('click', clickOutsideHandler);\n }\n\n return () => {\n document.removeEventListener('keyup', escapePressHandler);\n document.removeEventListener('click', clickOutsideHandler);\n };\n }, [overflowMenuOpen]);\n\n // Handles keyboard 'roving tabindex' pattern for toolbar\n const handleToolbarButtonKeyPress = (event, className) => {\n const { key, target } = event;\n\n const nextButton = getNextMatchingSibling(target, `.${className}`);\n const previousButton = getPreviousMatchingSibling(target, `.${className}`);\n\n switch (key) {\n case 'ArrowRight':\n event.preventDefault();\n target.setAttribute('tabindex', '-1');\n if (nextButton) {\n nextButton.setAttribute('tabindex', 0);\n nextButton.focus();\n } else {\n const firstButton = document.querySelector(`.${className}`);\n firstButton.setAttribute('tabindex', '0');\n firstButton.focus();\n }\n break;\n case 'ArrowLeft':\n event.preventDefault();\n target.setAttribute('tabindex', '-1');\n if (previousButton) {\n previousButton.setAttribute('tabindex', 0);\n previousButton.focus();\n } else {\n const allButtons = document.getElementsByClassName(className);\n const lastButton = allButtons[allButtons.length - 1];\n lastButton.setAttribute('tabindex', '0');\n lastButton.focus();\n }\n break;\n case 'ArrowDown':\n if (target.id === 'overflow-menu-button') {\n event.preventDefault();\n setOverflowMenuOpen(true);\n }\n break;\n }\n };\n\n const insertSyntax = (syntaxName) => {\n setOverflowMenuOpen(false);\n\n const { current: textArea } = textAreaRef;\n const {\n newCursorStart,\n newCursorEnd,\n editSelectionStart,\n editSelectionEnd,\n replaceSelectionWith,\n } = markdownSyntaxFormatters[syntaxName].getFormatting(textArea);\n\n // We try to update the textArea with document.execCommand, which requires the contentEditable attribute to be true.\n // The value is later toggled back to 'false'\n textArea.contentEditable = 'true';\n textArea.focus({ preventScroll: true });\n textArea.setSelectionRange(editSelectionStart, editSelectionEnd);\n\n try {\n // We first try to use execCommand which allows the change to be correctly added to the undo queue.\n // document.execCommand is deprecated, but the API which will eventually replace it is still incoming (https://w3c.github.io/input-events/)\n if (replaceSelectionWith === '') {\n document.execCommand('delete', false);\n } else {\n document.execCommand('insertText', false, replaceSelectionWith);\n }\n } catch {\n // In the event of any error using execCommand, we make sure the text area updates (but undo queue will not)\n textArea.value = getNewTextAreaValueWithEdits({\n textAreaValue: textArea.value,\n editSelectionStart,\n editSelectionEnd,\n replaceSelectionWith,\n });\n }\n\n textArea.contentEditable = 'false';\n textArea.dispatchEvent(new Event('input'));\n textArea.setSelectionRange(newCursorStart, newCursorEnd);\n };\n\n const handleImageUploadStarted = () => {\n const { current: textArea } = textAreaRef;\n const { textBeforeSelection, textAfterSelection } =\n getSelectionData(textArea);\n\n const { selectionEnd } = storedCursorPosition;\n\n const textWithPlaceholder = `${textBeforeSelection}\\n${UPLOADING_IMAGE_PLACEHOLDER}${textAfterSelection}`;\n textArea.value = textWithPlaceholder;\n // Make sure Editor text area updates via linkstate\n textArea.dispatchEvent(new Event('input'));\n\n textArea.focus({ preventScroll: true });\n\n // Set cursor to the end of the placeholder\n const newCursorPosition =\n selectionEnd + UPLOADING_IMAGE_PLACEHOLDER.length + 1;\n\n textArea.setSelectionRange(newCursorPosition, newCursorPosition);\n };\n\n const handleImageUploadEnd = (imageMarkdown = '') => {\n const { current: textArea } = textAreaRef;\n\n const {\n selectionStart,\n selectionEnd,\n value: currentTextAreaValue,\n } = textArea;\n\n const indexOfPlaceholder = currentTextAreaValue.indexOf(\n UPLOADING_IMAGE_PLACEHOLDER,\n );\n\n // User has deleted placeholder, nothing to do\n if (indexOfPlaceholder === -1) return;\n\n const newTextValue = textArea.value.replace(\n UPLOADING_IMAGE_PLACEHOLDER,\n imageMarkdown,\n );\n\n textArea.value = newTextValue;\n // Make sure Editor text area updates via linkstate\n textArea.dispatchEvent(new Event('input'));\n\n // The change to image markdown length does not affect cursor position\n if (indexOfPlaceholder > selectionStart) {\n textArea.setSelectionRange(selectionStart, selectionEnd);\n return;\n }\n\n const differenceInLength =\n imageMarkdown.length - UPLOADING_IMAGE_PLACEHOLDER.length;\n\n textArea.setSelectionRange(\n selectionStart + differenceInLength,\n selectionEnd + differenceInLength,\n );\n };\n\n const numberOfCoreFormatters = getNumberOfIconsToDisplayInToolbar({\n isSmallScreen: smallScreen,\n isLargeScreen: largeScreen,\n });\n\n const coreSyntaxFormatters = Object.fromEntries(\n Object.entries(markdownSyntaxFormatters).slice(0, numberOfCoreFormatters),\n );\n const secondarySyntaxFormatters = Object.fromEntries(\n Object.entries(markdownSyntaxFormatters).slice(numberOfCoreFormatters),\n );\n\n const secondaryFormatterButtons = Object.keys(secondarySyntaxFormatters).map(\n (controlName, index) => {\n const { icon, label, getKeyboardShortcut } =\n secondarySyntaxFormatters[controlName];\n\n return (\n insertSyntax(controlName)}\n onKeyUp={(e) => handleToolbarButtonKeyPress(e, 'overflow-menu-btn')}\n aria-label={label}\n tooltip={\n smallScreen ? null : (\n \n {label}\n {getKeyboardShortcut ? (\n \n {` ${getKeyboardShortcut().tooltipHint}`}\n \n ) : null}\n \n )\n }\n />\n );\n },\n );\n\n return (\n \n {Object.keys(coreSyntaxFormatters).map((controlName, index) => {\n const { icon, label, getKeyboardShortcut } =\n coreSyntaxFormatters[controlName];\n return (\n insertSyntax(controlName)}\n onKeyUp={(e) => handleToolbarButtonKeyPress(e, 'toolbar-btn')}\n aria-label={label}\n tooltip={\n smallScreen ? null : (\n \n {label}\n {getKeyboardShortcut ? (\n \n {` ${getKeyboardShortcut().tooltipHint}`}\n \n ) : null}\n \n )\n }\n />\n );\n })}\n\n handleToolbarButtonKeyPress(e, 'toolbar-btn'),\n onClick: () => {\n const {\n current: { selectionStart, selectionEnd },\n } = textAreaRef;\n setStoredCursorPosition({ selectionStart, selectionEnd });\n },\n tooltip: smallScreen ? null : (\n Upload image\n ),\n key: 'image-btn',\n className: 'toolbar-btn formatter-btn mr-1',\n tabindex: '-1',\n }}\n />\n\n setOverflowMenuOpen(!overflowMenuOpen)}\n onKeyUp={(e) => handleToolbarButtonKeyPress(e, 'toolbar-btn')}\n aria-expanded={overflowMenuOpen ? 'true' : 'false'}\n aria-haspopup=\"true\"\n icon={OverflowIcon}\n className=\"toolbar-btn ml-auto\"\n tabindex=\"-1\"\n aria-label=\"More options\"\n />\n\n {overflowMenuOpen && (\n \n {secondaryFormatterButtons}\n {additionalSecondaryItems}\n \n )}\n \n );\n};\n","// These styles are applied to the hidden element we use to measure the height.\n// !important styles are used to ensure no matter what style properties are attached to the given textarea, the hidden textarea will never become visible or cause layout jumps\nconst HIDDEN_TEXTAREA_STYLE = `\nmin-height:0 !important;\nmax-height:none !important;\nheight:0 !important;\nvisibility:hidden !important;\noverflow:hidden !important;\nposition:absolute !important;\nz-index:-1000 !important;\ntop:0 !important;\nright:0 !important\n`;\n\nconst SIZING_STYLE = [\n 'letter-spacing',\n 'line-height',\n 'padding-top',\n 'padding-bottom',\n 'font-family',\n 'font-weight',\n 'font-size',\n 'text-rendering',\n 'text-transform',\n 'width',\n 'text-indent',\n 'padding-left',\n 'padding-right',\n 'border-width',\n 'box-sizing',\n];\n\nlet hiddenTextarea;\n\n/**\n * Helper function to get the height of the textarea based on the current text content\n *\n * @param {HTMLElement} uiTextNode The textarea to measure height of\n *\n * @returns {{height: number}} Object with the calculated height\n */\nexport const calculateTextAreaHeight = (uiTextNode) => {\n if (!hiddenTextarea) {\n hiddenTextarea = document.createElement('textarea');\n document.body.appendChild(hiddenTextarea);\n }\n\n // Copy all CSS properties that have an impact on the height of the content in\n // the textbox\n const {\n paddingSize,\n borderSize,\n boxSizing,\n sizingStyle,\n } = calculateNodeStyling(uiTextNode);\n\n // Need to have the overflow attribute to hide the scrollbar otherwise\n // text-lines will not calculated properly as the shadow will technically be\n // narrower for content\n hiddenTextarea.setAttribute(\n 'style',\n `${sizingStyle};${HIDDEN_TEXTAREA_STYLE}`,\n );\n hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || 'x';\n\n const baseHeight = hiddenTextarea.scrollHeight;\n\n if (boxSizing === 'border-box') {\n // border-box: add border, since height = content + padding + border\n return { height: baseHeight + borderSize };\n } else if (boxSizing === 'content-box') {\n // remove padding, since height = content\n return { height: baseHeight - paddingSize };\n }\n\n return { height: baseHeight };\n};\n\nconst calculateNodeStyling = (node) => {\n const style = window.getComputedStyle(node);\n\n const boxSizing =\n style.getPropertyValue('box-sizing') ||\n style.getPropertyValue('-moz-box-sizing') ||\n style.getPropertyValue('-webkit-box-sizing');\n\n const paddingSize =\n parseFloat(style.getPropertyValue('padding-bottom')) +\n parseFloat(style.getPropertyValue('padding-top'));\n\n const borderSize =\n parseFloat(style.getPropertyValue('border-bottom-width')) +\n parseFloat(style.getPropertyValue('border-top-width'));\n\n const sizingStyle = SIZING_STYLE.map(\n (name) => `${name}:${style.getPropertyValue(name)}`,\n ).join(';');\n\n return {\n sizingStyle,\n paddingSize,\n borderSize,\n boxSizing,\n };\n};\n","import { useEffect, useState } from 'preact/hooks';\nimport { calculateTextAreaHeight } from '@utilities/calculateTextAreaHeight';\nimport { debounceAction } from '@utilities/debounceAction';\n\n/**\n * A helper function to get the X/Y coordinates of the current cursor position within an element.\n * For a full explanation see the post by Jhey Tompkins: https://medium.com/@jh3y/how-to-where-s-the-caret-getting-the-xy-position-of-the-caret-a24ba372990a\n *\n * @param {args}\n * @param {args.element} input The DOM element the cursor is to be found within\n * @param {args.number} selectionPoint The current cursor position (e.g. either selectionStart or selectionEnd)\n * @param {args.element} relativeToElement The DOM element the position to be calculated relative to. Defaults to the document body\n *\n * @returns {object} An object with x and y properties (e.g. {x: 10, y: 0})\n *\n * @example\n * const coordinates = getCursorXY(elementRef.current, elementRef.current.selectionStart)\n */\nexport const getCursorXY = ({\n input,\n selectionPoint,\n relativeToElement = document.body,\n}) => {\n const bodyRect = relativeToElement.getBoundingClientRect();\n const elementRect = input.getBoundingClientRect();\n\n const inputY = elementRect.top - bodyRect.top - input.scrollTop;\n const inputX = elementRect.left - bodyRect.left - input.scrollLeft;\n\n // create a dummy element with the computed style of the input\n const div = document.createElement('div');\n const copyStyle = getComputedStyle(input);\n\n for (const property of Object.values(copyStyle)) {\n div.style.setProperty(property, copyStyle.getPropertyValue(property));\n }\n\n // set the div to the correct position\n div.style['position'] = 'absolute';\n div.style['top'] = `${inputY}px`;\n div.style['left'] = `${inputX}px`;\n div.style['opacity'] = 0;\n\n // replace whitespace with '.' when filling the dummy element if it's a single line \n const swap = '.';\n const inputValue =\n input.tagName === 'INPUT' ? input.value.replace(/ /g, swap) : input.value;\n\n // set the div content to that of the textarea up until selection point\n div.textContent = inputValue.substr(0, selectionPoint);\n\n if (input.tagName === 'TEXTAREA') div.style.height = 'auto';\n // if a single line input then the div needs to be single line and not break out like a text area\n if (input.tagName === 'INPUT') div.style.width = 'auto';\n\n // marker element to obtain caret position\n const span = document.createElement('span');\n // give the span the textContent of remaining content so that the recreated dummy element is as close as possible\n span.textContent = inputValue.substr(selectionPoint) || '.';\n\n // append the span marker to the div and the dummy element to the body\n div.appendChild(span);\n relativeToElement.appendChild(div);\n\n // get the marker position, this is the caret position top and left relative to the input\n const { offsetLeft: spanX, offsetTop: spanY } = span;\n\n // remove dummy element\n relativeToElement.removeChild(div);\n\n // return object with the x and y of the caret. account for input positioning so that you don't need to wrap the input\n return {\n x: inputX + spanX,\n y: inputY + spanY,\n };\n};\n\n// TODO: Remove once MentionAutocompleteTextArea removed\nexport const getMentionWordData = () => {};\n\n/**\n * A helper function that searches back to the beginning of the currently typed word (indicated by cursor position) and verifies whether it begins with an '@' symbol for user mention\n *\n * @param {element} textArea The text area or input to inspect the current word of\n * @returns {{isTriggered: boolean, indexOfAutocompleteStart: number}} Object with the word's autocomplete data\n *\n * @example\n * const { isTriggered, indexOfAutocompleteStart } = getAutocompleteWordData({textArea, triggerCharacter: '@'});\n * if (isTriggered) {\n * // Do something\n * }\n */\nexport const getAutocompleteWordData = ({ textArea, triggerCharacter }) => {\n const { selectionStart, value: valueBeforeKeystroke } = textArea;\n\n if (selectionStart === 0 || valueBeforeKeystroke === '') {\n return {\n isTriggered: false,\n indexOfAutocompleteStart: -1,\n };\n }\n\n const indexOfAutocompleteStart = getLastIndexOfCharacter({\n content: valueBeforeKeystroke,\n selectionIndex: selectionStart,\n character: triggerCharacter,\n breakOnCharacters: [' ', '', '\\n'],\n });\n\n return {\n isTriggered: indexOfAutocompleteStart !== -1,\n indexOfAutocompleteStart,\n };\n};\n\n/**\n * Searches backwards through text content for the last occurrence of the given character\n *\n * @param {Object} params\n * @param {string} content The chunk of text to search within\n * @param {number} selectionIndex The starting point to search from\n * @param {string} character The character to search for\n * @param {string[]} breakOnCharacters Any characters which should result in an immediate halt to the search\n * @returns {number} Index of the last occurrence of the character, or -1 if it isn't found\n */\nexport const getLastIndexOfCharacter = ({\n content,\n selectionIndex,\n character,\n breakOnCharacters = [],\n}) => {\n const currentCharacter = content.charAt(selectionIndex);\n const previousCharacter = content.charAt(selectionIndex - 1);\n\n if (currentCharacter === character) {\n return selectionIndex;\n }\n\n if (selectionIndex !== 0 && !breakOnCharacters.includes(previousCharacter)) {\n return getLastIndexOfCharacter({\n content,\n selectionIndex: selectionIndex - 1,\n character,\n breakOnCharacters,\n });\n }\n\n return -1;\n};\n\n/**\n * Searches forwards through text content for the next occurrence of the given character\n *\n * @param {Object} params\n * @param {string} content The chunk of text to search within\n * @param {number} selectionIndex The starting point to search from\n * @param {string} character The character to search for\n * @param {string[]} breakOnCharacters Any characters which should result in an immediate halt to the search\n * @returns {number} Index of the next occurrence of the character, or -1 if it isn't found\n */\nexport const getNextIndexOfCharacter = ({\n content,\n selectionIndex,\n character,\n breakOnCharacters = [],\n}) => {\n const currentCharacter = content.charAt(selectionIndex);\n const nextCharacter = content.charAt(selectionIndex + 1);\n\n if (currentCharacter === character) {\n return selectionIndex;\n }\n\n if (\n selectionIndex <= content.length &&\n !breakOnCharacters.includes(nextCharacter)\n ) {\n return getNextIndexOfCharacter({\n content,\n selectionIndex: selectionIndex + 1,\n character,\n breakOnCharacters,\n });\n }\n\n return -1;\n};\n\n/**\n * Counts how many new lines come immediately before the user's current selection start\n * @param {object} args\n * @param {number} args.selectionStart The index of user's current selection start\n * @param {string} args.value The value of the textarea\n *\n * @returns {number} Number of new lines directly before selection start\n */\nexport const getNumberOfNewLinesPrecedingSelection = ({\n selectionStart,\n value,\n}) => {\n if (selectionStart === 0) {\n return 0;\n }\n\n let count = 0;\n let searchIndex = selectionStart - 1;\n\n while (searchIndex >= 0 && value.charAt(searchIndex) === '\\n') {\n count++;\n searchIndex--;\n }\n\n return count;\n};\n\n/**\n * Counts how many new lines come immediately after the user's current selection end\n *\n * @param {object} args\n * @param {number} args.selectionEnd The index of user's current selection end\n * @param {string} args.value The value of the textarea\n *\n * @returns {number} the count of new line characters immediately following selection\n */\nexport const getNumberOfNewLinesFollowingSelection = ({\n selectionEnd,\n value,\n}) => {\n if (selectionEnd === value.length) {\n return 0;\n }\n\n let count = 0;\n let searchIndex = selectionEnd;\n\n while (searchIndex < value.length && value.charAt(searchIndex) === '\\n') {\n count++;\n searchIndex++;\n }\n\n return count;\n};\n\n/**\n * Retrieve data about the user's current text selection\n *\n * @param {Object} params\n * @param {number} selectionStart The start point of user's selection\n * @param {number} selectionEnd The end point of user's selection\n * @param {string} value The current value of the textarea\n * @returns {Object} object containing the text chunks before and after insertion, and the currently selected text\n */\nexport const getSelectionData = ({ selectionStart, selectionEnd, value }) => ({\n textBeforeSelection: value.substring(0, selectionStart),\n textAfterSelection: value.substring(selectionEnd, value.length),\n selectedText: value.substring(selectionStart, selectionEnd),\n});\n\n/**\n * This hook can be used to keep the height of a textarea in step with the current content height, avoiding a scrolling textarea.\n * An optional array of additional elements can be set. If provided, all elements will be set to the greatest content height.\n * Optionally, it can be specified to also constrain the max-height to the content height. Otherwise the max-height will continue to be managed only by the textarea's CSS\n *\n * @example\n *\n * const { setTextArea } = useTextAreaAutoResize();\n * setTextArea(myTextAreaRef.current);\n * setAdditionalElements([myOtherElement.current]);\n */\nexport const useTextAreaAutoResize = () => {\n const [textArea, setTextArea] = useState(null);\n const [constrainToContentHeight, setConstrainToContentHeight] =\n useState(false);\n const [additionalElements, setAdditionalElements] = useState([]);\n\n useEffect(() => {\n if (!textArea) {\n return;\n }\n\n const resizeTextArea = () => {\n const allElements = [textArea, ...additionalElements];\n\n const allContentHeights = allElements.map(\n (element) => calculateTextAreaHeight(element).height,\n );\n\n const height = Math.max(...allContentHeights);\n const newHeight = `${height}px`;\n\n allElements.forEach((element) => {\n element.style['min-height'] = newHeight;\n if (constrainToContentHeight) {\n // Don't allow the textarea to grow to a size larger than the content\n element.style['max-height'] = newHeight;\n }\n });\n };\n\n // Resize on first attach\n resizeTextArea();\n\n // Resize on window size changes\n const resizeCallback = debounceAction(() => resizeTextArea(), 300);\n const resizeObserver = new ResizeObserver(resizeCallback);\n resizeObserver.observe(textArea);\n\n // Resize on subsequent value changes\n textArea.addEventListener('input', resizeTextArea);\n\n return () => {\n resizeObserver.disconnect();\n textArea.removeEventListener('input', resizeTextArea);\n };\n }, [textArea, additionalElements, constrainToContentHeight]);\n\n return { setTextArea, setAdditionalElements, setConstrainToContentHeight };\n};\n","import PropTypes from 'prop-types';\n\nexport const userPropTypes = PropTypes.shape({\n id: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n profile_image_url: PropTypes.string.isRequired,\n summary: PropTypes.string.isRequired,\n});\n","import PropTypes from 'prop-types';\n\nexport const selectedTagsPropTypes = PropTypes.shape({\n tags: PropTypes.arrayOf(PropTypes.string).isRequired,\n onClick: PropTypes.func.isRequired,\n onKeyPress: PropTypes.func.isRequired,\n});\n","/**\n * This function returns a string combining the current Medium and OS\n * that represents the current Context where the app is running.\n *\n * @returns {String} \"Medium-OS\", for example \"Browser-Android\"\n */\nexport const currentContext = () => `${currentMedium()}-${currentOS()}`;\n\n/**\n * This function returns a string that represents the current Medium where\n * the app is currently running. The currently supported mediums are Browser,\n * and ForemWebView.\n *\n * @returns {String} One of the supported Mediums\n */\nexport const currentMedium = () =>\n /ForemWebView/i.test(navigator.userAgent) ? 'ForemWebView' : 'Browser';\n\n/**\n * This function returns a string that represents the current OS where the app\n * is currently running. The currently supported Operating Systems are\n * Windows, Linux, macOS, Android and iOS.\n *\n * @returns {String} One of the supported Operating Systems or 'Unsupported'\n */\nexport const currentOS = () => {\n const macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'];\n const windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'];\n const iosPlatforms = ['iPhone', 'iPad', 'iPod'];\n\n if (macosPlatforms.includes(window.navigator.platform)) {\n return 'macOS';\n } else if (iosPlatforms.includes(window.navigator.platform)) {\n return 'iOS';\n } else if (windowsPlatforms.includes(window.navigator.platform)) {\n return 'Windows';\n } else if (/Android/i.test(window.navigator.userAgent)) {\n return 'Android';\n } else if (/Linux/i.test(window.navigator.platform)) {\n return 'Linux';\n }\n\n return 'Unsupported';\n};\n\n/**\n * Checks the device for iOS (webkit) native feature support\n *\n * @function isNativeIOS\n * @param {string} namespace Specifies support for a specific feature\n * (i.e. video, podcast, etc)\n * @returns {boolean} true if current environment support native features\n */\nexport const isNativeIOS = (namespace = null) => {\n const nativeCheck =\n /DEV-Native-ios|ForemWebView/i.test(navigator.userAgent) &&\n window &&\n window.webkit &&\n window.webkit.messageHandlers;\n\n let namespaceCheck = true;\n if (nativeCheck && namespace) {\n namespaceCheck = window.webkit.messageHandlers[namespace] != undefined;\n }\n\n return nativeCheck && namespaceCheck;\n};\n\n/**\n * Checks the device for Android native feature support\n *\n * @function isNativeAndroid\n * @param {string} namespace Specifies support for a specific feature\n * (i.e. videoMessage, podcastMessage, etc)\n * @returns {boolean} true if current environment support native features\n */\nexport const isNativeAndroid = (namespace = null) => {\n const nativeCheck =\n /DEV-Native-android|ForemWebView/i.test(navigator.userAgent) &&\n typeof AndroidBridge !== 'undefined';\n\n let namespaceCheck = true;\n if (nativeCheck && namespace) {\n namespaceCheck = AndroidBridge[namespace] != undefined;\n }\n\n return nativeCheck && namespaceCheck;\n};\n\n/**\n * This function copies text to clipboard taking in consideration all\n * supported platforms.\n *\n * @param {string} text to be copied to the clipboard\n *\n * @returns {Promise} Resolves when successful in copying to clipboard\n */\nexport const copyToClipboard = (text) => {\n return new Promise((resolve, reject) => {\n if (isNativeAndroid('copyToClipboard')) {\n AndroidBridge.copyToClipboard(text);\n resolve();\n } else if (navigator.clipboard != null) {\n navigator.clipboard\n .writeText(text)\n .then(() => {\n resolve();\n })\n .catch((e) => {\n reject(e);\n });\n } else {\n reject('Unable to copy the text. Try reloading the page');\n }\n });\n};\n\n/**\n * Returns true if the supplied KeyboardEvent includes the OS-specific\n * modifier key. For example, the Cmd key on Apple platforms or the Ctrl key\n * on others.\n *\n * @param {KeyboardEvent} The event to check for the OS-specific modifier key\n *\n * @returns {Boolean} true if the event was fired with the OS-specific\n * modifier key, false otherwise. Also returns false if\n * the event is not a KeyboardEvent.\n */\nexport const hasOSSpecificModifier = (event) => {\n if (!(event instanceof KeyboardEvent)) {\n return false;\n }\n\n if (navigator.userAgent.indexOf('Mac OS X') >= 0) {\n return event.metaKey;\n }\n return event.ctrlKey;\n};\n\n/**\n * Returns a string representation of the expected modifier key for the current OS.\n * This allows us to display correct shortcut key hints to users in the UI, and set up correct shortcut key bindings.\n *\n * @returns {string} either 'cmd' if on macOS, or 'ctrl' otherwise\n */\nexport const getOSKeyboardModifierKeyString = () =>\n currentOS() === 'macOS' ? 'cmd' : 'ctrl';\n\n/**\n * @returns {string} A string representing the locale as per the user's browser settings\n */\nexport const getCurrentLocale = () => navigator.language;\n","import { useState, useEffect } from 'preact/hooks';\n\n/**\n * Pre-defined breakpoints for width.\n *\n * Note: These were copied from _import.scss.\n */\nexport const BREAKPOINTS = Object.freeze({\n Small: 640,\n Medium: 768,\n Large: 1024,\n ExtraLarge: 1280,\n});\n\n/**\n * A custom Preact hook for evaluating whether or not a CSS media query is matched or not.\n *\n * @param {string} query The media query to evaluate.\n *\n * @returns {boolean} True if the media query is matched, false otherwise.\n *\n * @example\n * import { useMediaQuery } from '@components/useMediaQuery';\n *\n * function SomeComponent({ query }) {\n * const matchesBreakpoint = useMediaQuery(query);\n *\n * if (!matchesBreakpoint) {\n * return null;\n * }\n *\n * return \n * }\n */\nexport const useMediaQuery = (query) => {\n const mediaQuery = window.matchMedia(query);\n\n const [match, setMatch] = useState(!!mediaQuery.matches);\n\n useEffect(() => {\n const handler = () => {\n setMatch(!!mediaQuery.matches);\n };\n mediaQuery.addListener(handler);\n\n return () => mediaQuery.removeListener(handler);\n });\n\n return match;\n};\n","import PropTypes from 'prop-types';\n\n// Use this whenever you need the standard children prop.\nexport const defaultChildrenPropTypes = PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n PropTypes.object,\n PropTypes.arrayOf(PropTypes.object),\n]);\n","export * from './Snackbar';\nexport * from './SnackbarItem';\n","import { isInViewport } from '@utilities/viewport';\nimport { debounceAction } from '@utilities/debounceAction';\n\n/**\n * Helper function designed to be used on scroll to detect when dropdowns should switch from dropping downwards/upwards.\n * The action is debounced since scroll events are usually fired several at a time.\n *\n * @returns {Function} a debounced function that handles the repositioning of dropdowns\n * @example\n *\n * document.addEventListener('scroll', getDropdownRepositionListener());\n */\nexport const getDropdownRepositionListener = () =>\n debounceAction(handleDropdownRepositions);\n\n/**\n * Checks for all dropdowns on the page which have the attribute 'data-repositioning-dropdown', signalling\n * they should dynamically change between dropping downwards or upwards, depending on viewport position.\n *\n * Any dropdowns not fully in view when dropping down will be switched to dropping upwards.\n */\nconst handleDropdownRepositions = () => {\n // Select all of the dropdowns which should reposition\n const allRepositioningDropdowns = document.querySelectorAll(\n '[data-repositioning-dropdown]',\n );\n\n for (const element of allRepositioningDropdowns) {\n // Default to dropping downwards\n element.classList.remove('reverse');\n\n const isDropdownCurrentlyOpen = element.style.display === 'block';\n\n if (!isDropdownCurrentlyOpen) {\n // We can't determine position on an element with display:none, so we \"show\" the dropdown with 0 opacity very temporarily\n element.style.opacity = 0;\n element.style.display = 'block';\n }\n\n if (!isInViewport({ element })) {\n // If the element isn't fully visible when dropping down, reverse the direction\n element.classList.add('reverse');\n }\n\n if (!isDropdownCurrentlyOpen) {\n // Revert the temporary changes to determine position\n element.style.removeProperty('display');\n element.style.removeProperty('opacity');\n }\n }\n};\n\n/**\n * Helper query string to identify interactive/focusable HTML elements\n */\nexport const INTERACTIVE_ELEMENTS_QUERY =\n 'button, [href], input:not([type=\"hidden\"]), select, textarea, [tabindex=\"0\"]';\n\n/**\n * Open the given dropdown, updating aria attributes, and focusing the first interactive element\n *\n * @param {Object} args\n * @param {string} args.triggerElementId The id of the button which activates the dropdown\n * @param {string} args.dropdownContent The id of the dropdown content element\n */\nexport const openDropdown = ({ triggerElementId, dropdownContentId }) => {\n const dropdownContent = document.getElementById(dropdownContentId);\n const triggerElement = document.getElementById(triggerElementId);\n\n triggerElement.setAttribute('aria-expanded', 'true');\n\n // Style set inline to prevent specificity issues\n dropdownContent.style.display = 'block';\n\n // Send focus to the first suitable element\n dropdownContent.querySelector(INTERACTIVE_ELEMENTS_QUERY)?.focus();\n};\n\n/**\n * Close the given dropdown, updating aria attributes\n *\n * @param {Object} args\n * @param {string} args.triggerElementId The id of the button which activates the dropdown\n * @param {string} args.dropdownContent The id of the dropdown content element\n * @param {Function} args.onClose Optional function for any side-effects which should occur on dropdown close\n */\nexport const closeDropdown = ({\n triggerElementId,\n dropdownContentId,\n onClose,\n}) => {\n const dropdownContent = document.getElementById(dropdownContentId);\n\n if (!dropdownContent) {\n // Component may have unmounted\n return;\n }\n\n document\n .getElementById(triggerElementId)\n ?.setAttribute('aria-expanded', 'false');\n\n // Remove the inline style added when we opened the dropdown\n dropdownContent.style.removeProperty('display');\n\n onClose?.();\n};\n\n/**\n * A helper function to initialize dropdown behaviors. This function attaches open/close click and keyup listeners,\n * and makes sure relevant aria properties and keyboard focus are updated.\n *\n * @param {Object} args\n * @param {string} args.triggerButtonElementId The ID of the button which triggers the dropdown open/close behavior\n * @param {string} args.dropdownContentId The ID of the dropdown content which should open/close on trigger button press\n * @param {string} args.dropdownContentCloseButtonId Optional ID of any button within the dropdown content which should close the dropdown\n * @param {Function} args.onClose An optional callback for when the dropdown is closed. This can be passed to execute any side-effects required when the dropdown closes.\n * @param {Function} args.onOpen An optional callback for when the dropdown is opened. This can be passed to execute any side-effects required when the dropdown opens.\n *\n * @returns {{closeDropdown: Function}} Object with callback to close the initialized dropdown\n */\nexport const initializeDropdown = ({\n triggerElementId,\n dropdownContentId,\n dropdownContentCloseButtonId,\n onClose,\n onOpen,\n}) => {\n const triggerButton = document.getElementById(triggerElementId);\n const dropdownContent = document.getElementById(dropdownContentId);\n\n if (!triggerButton || !dropdownContent) {\n // The required props haven't been provided, do nothing\n return;\n }\n\n // Ensure default values have been applied\n triggerButton.setAttribute('aria-expanded', 'false');\n triggerButton.setAttribute('aria-controls', dropdownContentId);\n triggerButton.setAttribute('aria-haspopup', 'true');\n\n const keyUpListener = ({ key }) => {\n if (key === 'Escape') {\n // Close the dropdown and return focus to the trigger button to prevent focus being lost\n const isCurrentlyOpen =\n triggerButton.getAttribute('aria-expanded') === 'true';\n if (isCurrentlyOpen) {\n closeDropdown({\n triggerElementId,\n dropdownContentId,\n onClose: onCloseCleanupActions,\n });\n triggerButton.focus();\n }\n } else if (key === 'Tab') {\n // Close the dropdown if the user has tabbed away from it\n const isInsideDropdown = dropdownContent?.contains(\n document.activeElement,\n );\n if (!isInsideDropdown) {\n closeDropdown({\n triggerElementId,\n dropdownContentId,\n onClose: onCloseCleanupActions,\n });\n }\n }\n };\n\n // Close the dropdown if user has clicked outside\n const clickOutsideListener = ({ target }) => {\n // Get fresh handle every time, resulting in more streamlined functionality for cypress\n const triggerButton = document.getElementById(triggerElementId);\n if (\n triggerButton &&\n target !== triggerButton &&\n !dropdownContent.contains(target) &&\n !triggerButton.contains(target)\n ) {\n closeDropdown({\n triggerElementId,\n dropdownContentId,\n onClose: onCloseCleanupActions,\n });\n\n // If the user did not click on another interactive item, return focus to the trigger\n if (!target.matches(INTERACTIVE_ELEMENTS_QUERY)) {\n triggerButton.focus();\n }\n }\n };\n\n // Any necessary side effects required on dropdown close\n const onCloseCleanupActions = () => {\n onClose?.();\n document.removeEventListener('keyup', keyUpListener);\n document.removeEventListener('click', clickOutsideListener);\n };\n\n // Add the main trigger button toggle functionality\n triggerButton.addEventListener('click', () => {\n if (\n document\n .getElementById(triggerElementId)\n ?.getAttribute('aria-expanded') === 'true'\n ) {\n closeDropdown({\n triggerElementId,\n dropdownContentId,\n onClose: onCloseCleanupActions,\n });\n } else {\n openDropdown({\n triggerElementId,\n dropdownContentId,\n });\n onOpen?.();\n\n document.addEventListener('keyup', keyUpListener);\n document.addEventListener('click', clickOutsideListener);\n }\n });\n\n if (dropdownContentCloseButtonId) {\n // The dropdown content has a 'close' button inside that we also need to handle\n document\n .getElementById(dropdownContentCloseButtonId)\n ?.addEventListener('click', () => {\n closeDropdown({\n triggerElementId,\n dropdownContentId,\n onClose: onCloseCleanupActions,\n });\n\n document.getElementById(triggerElementId)?.focus();\n });\n }\n\n return {\n closeDropdown: () => {\n closeDropdown({\n triggerElementId,\n dropdownContentId,\n onClose: onCloseCleanupActions,\n });\n },\n };\n};\n","/**\n * Checks if an element is visible in the viewport\n *\n * @example\n * const element = document.getElementById('element');\n * isInViewport({element, allowPartialVisibility = true}); // true or false\n *\n * @param {HTMLElement} element - The HTML element to check\n * @param {number} [offsetTop=0] - Part of the screen to ignore counting from the top\n * @param {boolean} [allowPartialVisibility=false] - A boolean to flip the check between partial or completely visible in the viewport\n * @returns {boolean} isInViewport - true if the element is visible in the viewport\n */\nexport function isInViewport({\n element,\n offsetTop = 0,\n allowPartialVisibility = false,\n}) {\n const boundingRect = element.getBoundingClientRect();\n const clientHeight =\n window.innerHeight || document.documentElement.clientHeight;\n const clientWidth = window.innerWidth || document.documentElement.clientWidth;\n const topIsInViewport =\n boundingRect.top <= clientHeight && boundingRect.top >= offsetTop;\n const rightIsInViewport =\n boundingRect.right >= 0 && boundingRect.right <= clientWidth;\n const bottomIsInViewport =\n boundingRect.bottom >= offsetTop && boundingRect.bottom <= clientHeight;\n const leftIsInViewport =\n boundingRect.left <= clientWidth && boundingRect.left >= 0;\n const topIsOutOfViewport = boundingRect.top <= offsetTop;\n const bottomIsOutOfViewport = boundingRect.bottom >= clientHeight;\n const elementSpansEntireViewport =\n topIsOutOfViewport && bottomIsOutOfViewport;\n\n if (allowPartialVisibility) {\n return (\n (topIsInViewport || bottomIsInViewport || elementSpansEntireViewport) &&\n (leftIsInViewport || rightIsInViewport)\n );\n }\n return (\n topIsInViewport &&\n bottomIsInViewport &&\n leftIsInViewport &&\n rightIsInViewport\n );\n}\n",";(function (globalObject) {\r\n 'use strict';\r\n\r\n/*\r\n * bignumber.js v9.1.0\r\n * A JavaScript library for arbitrary-precision arithmetic.\r\n * https://github.com/MikeMcl/bignumber.js\r\n * Copyright (c) 2022 Michael Mclaughlin \r\n * MIT Licensed.\r\n *\r\n * BigNumber.prototype methods | BigNumber methods\r\n * |\r\n * absoluteValue abs | clone\r\n * comparedTo | config set\r\n * decimalPlaces dp | DECIMAL_PLACES\r\n * dividedBy div | ROUNDING_MODE\r\n * dividedToIntegerBy idiv | EXPONENTIAL_AT\r\n * exponentiatedBy pow | RANGE\r\n * integerValue | CRYPTO\r\n * isEqualTo eq | MODULO_MODE\r\n * isFinite | POW_PRECISION\r\n * isGreaterThan gt | FORMAT\r\n * isGreaterThanOrEqualTo gte | ALPHABET\r\n * isInteger | isBigNumber\r\n * isLessThan lt | maximum max\r\n * isLessThanOrEqualTo lte | minimum min\r\n * isNaN | random\r\n * isNegative | sum\r\n * isPositive |\r\n * isZero |\r\n * minus |\r\n * modulo mod |\r\n * multipliedBy times |\r\n * negated |\r\n * plus |\r\n * precision sd |\r\n * shiftedBy |\r\n * squareRoot sqrt |\r\n * toExponential |\r\n * toFixed |\r\n * toFormat |\r\n * toFraction |\r\n * toJSON |\r\n * toNumber |\r\n * toPrecision |\r\n * toString |\r\n * valueOf |\r\n *\r\n */\r\n\r\n\r\n var BigNumber,\r\n isNumeric = /^-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?$/i,\r\n mathceil = Math.ceil,\r\n mathfloor = Math.floor,\r\n\r\n bignumberError = '[BigNumber Error] ',\r\n tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ',\r\n\r\n BASE = 1e14,\r\n LOG_BASE = 14,\r\n MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1\r\n // MAX_INT32 = 0x7fffffff, // 2^31 - 1\r\n POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13],\r\n SQRT_BASE = 1e7,\r\n\r\n // EDITABLE\r\n // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and\r\n // the arguments to toExponential, toFixed, toFormat, and toPrecision.\r\n MAX = 1E9; // 0 to MAX_INT32\r\n\r\n\r\n /*\r\n * Create and return a BigNumber constructor.\r\n */\r\n function clone(configObject) {\r\n var div, convertBase, parseNumeric,\r\n P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null },\r\n ONE = new BigNumber(1),\r\n\r\n\r\n //----------------------------- EDITABLE CONFIG DEFAULTS -------------------------------\r\n\r\n\r\n // The default values below must be integers within the inclusive ranges stated.\r\n // The values can also be changed at run-time using BigNumber.set.\r\n\r\n // The maximum number of decimal places for operations involving division.\r\n DECIMAL_PLACES = 20, // 0 to MAX\r\n\r\n // The rounding mode used when rounding to the above decimal places, and when using\r\n // toExponential, toFixed, toFormat and toPrecision, and round (default value).\r\n // UP 0 Away from zero.\r\n // DOWN 1 Towards zero.\r\n // CEIL 2 Towards +Infinity.\r\n // FLOOR 3 Towards -Infinity.\r\n // HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n // HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n // HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n // HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n // HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n ROUNDING_MODE = 4, // 0 to 8\r\n\r\n // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS]\r\n\r\n // The exponent value at and beneath which toString returns exponential notation.\r\n // Number type: -7\r\n TO_EXP_NEG = -7, // 0 to -MAX\r\n\r\n // The exponent value at and above which toString returns exponential notation.\r\n // Number type: 21\r\n TO_EXP_POS = 21, // 0 to MAX\r\n\r\n // RANGE : [MIN_EXP, MAX_EXP]\r\n\r\n // The minimum exponent value, beneath which underflow to zero occurs.\r\n // Number type: -324 (5e-324)\r\n MIN_EXP = -1e7, // -1 to -MAX\r\n\r\n // The maximum exponent value, above which overflow to Infinity occurs.\r\n // Number type: 308 (1.7976931348623157e+308)\r\n // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow.\r\n MAX_EXP = 1e7, // 1 to MAX\r\n\r\n // Whether to use cryptographically-secure random number generation, if available.\r\n CRYPTO = false, // true or false\r\n\r\n // The modulo mode used when calculating the modulus: a mod n.\r\n // The quotient (q = a / n) is calculated according to the corresponding rounding mode.\r\n // The remainder (r) is calculated as: r = a - n * q.\r\n //\r\n // UP 0 The remainder is positive if the dividend is negative, else is negative.\r\n // DOWN 1 The remainder has the same sign as the dividend.\r\n // This modulo mode is commonly known as 'truncated division' and is\r\n // equivalent to (a % n) in JavaScript.\r\n // FLOOR 3 The remainder has the same sign as the divisor (Python %).\r\n // HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function.\r\n // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)).\r\n // The remainder is always positive.\r\n //\r\n // The truncated division, floored division, Euclidian division and IEEE 754 remainder\r\n // modes are commonly used for the modulus operation.\r\n // Although the other rounding modes can also be used, they may not give useful results.\r\n MODULO_MODE = 1, // 0 to 9\r\n\r\n // The maximum number of significant digits of the result of the exponentiatedBy operation.\r\n // If POW_PRECISION is 0, there will be unlimited significant digits.\r\n POW_PRECISION = 0, // 0 to MAX\r\n\r\n // The format specification used by the BigNumber.prototype.toFormat method.\r\n FORMAT = {\r\n prefix: '',\r\n groupSize: 3,\r\n secondaryGroupSize: 0,\r\n groupSeparator: ',',\r\n decimalSeparator: '.',\r\n fractionGroupSize: 0,\r\n fractionGroupSeparator: '\\xA0', // non-breaking space\r\n suffix: ''\r\n },\r\n\r\n // The alphabet used for base conversion. It must be at least 2 characters long, with no '+',\r\n // '-', '.', whitespace, or repeated character.\r\n // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'\r\n ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz',\r\n alphabetHasNormalDecimalDigits = true;\r\n\r\n\r\n //------------------------------------------------------------------------------------------\r\n\r\n\r\n // CONSTRUCTOR\r\n\r\n\r\n /*\r\n * The BigNumber constructor and exported function.\r\n * Create and return a new instance of a BigNumber object.\r\n *\r\n * v {number|string|BigNumber} A numeric value.\r\n * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive.\r\n */\r\n function BigNumber(v, b) {\r\n var alphabet, c, caseChanged, e, i, isNum, len, str,\r\n x = this;\r\n\r\n // Enable constructor call without `new`.\r\n if (!(x instanceof BigNumber)) return new BigNumber(v, b);\r\n\r\n if (b == null) {\r\n\r\n if (v && v._isBigNumber === true) {\r\n x.s = v.s;\r\n\r\n if (!v.c || v.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n } else if (v.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = v.e;\r\n x.c = v.c.slice();\r\n }\r\n\r\n return;\r\n }\r\n\r\n if ((isNum = typeof v == 'number') && v * 0 == 0) {\r\n\r\n // Use `1 / n` to handle minus zero also.\r\n x.s = 1 / v < 0 ? (v = -v, -1) : 1;\r\n\r\n // Fast path for integers, where n < 2147483648 (2**31).\r\n if (v === ~~v) {\r\n for (e = 0, i = v; i >= 10; i /= 10, e++);\r\n\r\n if (e > MAX_EXP) {\r\n x.c = x.e = null;\r\n } else {\r\n x.e = e;\r\n x.c = [v];\r\n }\r\n\r\n return;\r\n }\r\n\r\n str = String(v);\r\n } else {\r\n\r\n if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum);\r\n\r\n x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n\r\n // Allow exponential notation to be used with base 10 argument, while\r\n // also rounding to DECIMAL_PLACES as with other bases.\r\n if (b == 10 && alphabetHasNormalDecimalDigits) {\r\n x = new BigNumber(v);\r\n return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);\r\n }\r\n\r\n str = String(v);\r\n\r\n if (isNum = typeof v == 'number') {\r\n\r\n // Avoid potential interpretation of Infinity and NaN as base 44+ values.\r\n if (v * 0 != 0) return parseNumeric(x, str, isNum, b);\r\n\r\n x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (BigNumber.DEBUG && str.replace(/^0\\.0*|\\./, '').length > 15) {\r\n throw Error\r\n (tooManyDigits + v);\r\n }\r\n } else {\r\n x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n alphabet = ALPHABET.slice(0, b);\r\n e = i = 0;\r\n\r\n // Check that str is a valid base b number.\r\n // Don't use RegExp, so alphabet can contain special characters.\r\n for (len = str.length; i < len; i++) {\r\n if (alphabet.indexOf(c = str.charAt(i)) < 0) {\r\n if (c == '.') {\r\n\r\n // If '.' is not the first character and it has not be found before.\r\n if (i > e) {\r\n e = len;\r\n continue;\r\n }\r\n } else if (!caseChanged) {\r\n\r\n // Allow e.g. hexadecimal 'FF' as well as 'ff'.\r\n if (str == str.toUpperCase() && (str = str.toLowerCase()) ||\r\n str == str.toLowerCase() && (str = str.toUpperCase())) {\r\n caseChanged = true;\r\n i = -1;\r\n e = 0;\r\n continue;\r\n }\r\n }\r\n\r\n return parseNumeric(x, String(v), isNum, b);\r\n }\r\n }\r\n\r\n // Prevent later check for length on converted number.\r\n isNum = false;\r\n str = convertBase(str, b, 10, x.s);\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n else e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(--len) === 48;);\r\n\r\n if (str = str.slice(i, ++len)) {\r\n len -= i;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (isNum && BigNumber.DEBUG &&\r\n len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {\r\n throw Error\r\n (tooManyDigits + (x.s * v));\r\n }\r\n\r\n // Overflow?\r\n if ((e = e - i - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n x.c = x.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = e;\r\n x.c = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first element of the coefficient array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE; // i < 1\r\n\r\n if (i < len) {\r\n if (i) x.c.push(+str.slice(0, i));\r\n\r\n for (len -= LOG_BASE; i < len;) {\r\n x.c.push(+str.slice(i, i += LOG_BASE));\r\n }\r\n\r\n i = LOG_BASE - (str = str.slice(i)).length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--; str += '0');\r\n x.c.push(+str);\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n\r\n // CONSTRUCTOR PROPERTIES\r\n\r\n\r\n BigNumber.clone = clone;\r\n\r\n BigNumber.ROUND_UP = 0;\r\n BigNumber.ROUND_DOWN = 1;\r\n BigNumber.ROUND_CEIL = 2;\r\n BigNumber.ROUND_FLOOR = 3;\r\n BigNumber.ROUND_HALF_UP = 4;\r\n BigNumber.ROUND_HALF_DOWN = 5;\r\n BigNumber.ROUND_HALF_EVEN = 6;\r\n BigNumber.ROUND_HALF_CEIL = 7;\r\n BigNumber.ROUND_HALF_FLOOR = 8;\r\n BigNumber.EUCLID = 9;\r\n\r\n\r\n /*\r\n * Configure infrequently-changing library-wide settings.\r\n *\r\n * Accept an object with the following optional properties (if the value of a property is\r\n * a number, it must be an integer within the inclusive range stated):\r\n *\r\n * DECIMAL_PLACES {number} 0 to MAX\r\n * ROUNDING_MODE {number} 0 to 8\r\n * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX]\r\n * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX]\r\n * CRYPTO {boolean} true or false\r\n * MODULO_MODE {number} 0 to 9\r\n * POW_PRECISION {number} 0 to MAX\r\n * ALPHABET {string} A string of two or more unique characters which does\r\n * not contain '.'.\r\n * FORMAT {object} An object with some of the following properties:\r\n * prefix {string}\r\n * groupSize {number}\r\n * secondaryGroupSize {number}\r\n * groupSeparator {string}\r\n * decimalSeparator {string}\r\n * fractionGroupSize {number}\r\n * fractionGroupSeparator {string}\r\n * suffix {string}\r\n *\r\n * (The values assigned to the above FORMAT object properties are not checked for validity.)\r\n *\r\n * E.g.\r\n * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 })\r\n *\r\n * Ignore properties/parameters set to null or undefined, except for ALPHABET.\r\n *\r\n * Return an object with the properties current values.\r\n */\r\n BigNumber.config = BigNumber.set = function (obj) {\r\n var p, v;\r\n\r\n if (obj != null) {\r\n\r\n if (typeof obj == 'object') {\r\n\r\n // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] DECIMAL_PLACES {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'DECIMAL_PLACES')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n DECIMAL_PLACES = v;\r\n }\r\n\r\n // ROUNDING_MODE {number} Integer, 0 to 8 inclusive.\r\n // '[BigNumber Error] ROUNDING_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'ROUNDING_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 8, p);\r\n ROUNDING_MODE = v;\r\n }\r\n\r\n // EXPONENTIAL_AT {number|number[]}\r\n // Integer, -MAX to MAX inclusive or\r\n // [integer -MAX to 0 inclusive, 0 to MAX inclusive].\r\n // '[BigNumber Error] EXPONENTIAL_AT {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'EXPONENTIAL_AT')) {\r\n v = obj[p];\r\n if (v && v.pop) {\r\n intCheck(v[0], -MAX, 0, p);\r\n intCheck(v[1], 0, MAX, p);\r\n TO_EXP_NEG = v[0];\r\n TO_EXP_POS = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v);\r\n }\r\n }\r\n\r\n // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or\r\n // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive].\r\n // '[BigNumber Error] RANGE {not a primitive number|not an integer|out of range|cannot be zero}: {v}'\r\n if (obj.hasOwnProperty(p = 'RANGE')) {\r\n v = obj[p];\r\n if (v && v.pop) {\r\n intCheck(v[0], -MAX, -1, p);\r\n intCheck(v[1], 1, MAX, p);\r\n MIN_EXP = v[0];\r\n MAX_EXP = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n if (v) {\r\n MIN_EXP = -(MAX_EXP = v < 0 ? -v : v);\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' cannot be zero: ' + v);\r\n }\r\n }\r\n }\r\n\r\n // CRYPTO {boolean} true or false.\r\n // '[BigNumber Error] CRYPTO not true or false: {v}'\r\n // '[BigNumber Error] crypto unavailable'\r\n if (obj.hasOwnProperty(p = 'CRYPTO')) {\r\n v = obj[p];\r\n if (v === !!v) {\r\n if (v) {\r\n if (typeof crypto != 'undefined' && crypto &&\r\n (crypto.getRandomValues || crypto.randomBytes)) {\r\n CRYPTO = v;\r\n } else {\r\n CRYPTO = !v;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n } else {\r\n CRYPTO = v;\r\n }\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' not true or false: ' + v);\r\n }\r\n }\r\n\r\n // MODULO_MODE {number} Integer, 0 to 9 inclusive.\r\n // '[BigNumber Error] MODULO_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'MODULO_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 9, p);\r\n MODULO_MODE = v;\r\n }\r\n\r\n // POW_PRECISION {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] POW_PRECISION {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'POW_PRECISION')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n POW_PRECISION = v;\r\n }\r\n\r\n // FORMAT {object}\r\n // '[BigNumber Error] FORMAT not an object: {v}'\r\n if (obj.hasOwnProperty(p = 'FORMAT')) {\r\n v = obj[p];\r\n if (typeof v == 'object') FORMAT = v;\r\n else throw Error\r\n (bignumberError + p + ' not an object: ' + v);\r\n }\r\n\r\n // ALPHABET {string}\r\n // '[BigNumber Error] ALPHABET invalid: {v}'\r\n if (obj.hasOwnProperty(p = 'ALPHABET')) {\r\n v = obj[p];\r\n\r\n // Disallow if less than two characters,\r\n // or if it contains '+', '-', '.', whitespace, or a repeated character.\r\n if (typeof v == 'string' && !/^.?$|[+\\-.\\s]|(.).*\\1/.test(v)) {\r\n alphabetHasNormalDecimalDigits = v.slice(0, 10) == '0123456789';\r\n ALPHABET = v;\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' invalid: ' + v);\r\n }\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Object expected: {v}'\r\n throw Error\r\n (bignumberError + 'Object expected: ' + obj);\r\n }\r\n }\r\n\r\n return {\r\n DECIMAL_PLACES: DECIMAL_PLACES,\r\n ROUNDING_MODE: ROUNDING_MODE,\r\n EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS],\r\n RANGE: [MIN_EXP, MAX_EXP],\r\n CRYPTO: CRYPTO,\r\n MODULO_MODE: MODULO_MODE,\r\n POW_PRECISION: POW_PRECISION,\r\n FORMAT: FORMAT,\r\n ALPHABET: ALPHABET\r\n };\r\n };\r\n\r\n\r\n /*\r\n * Return true if v is a BigNumber instance, otherwise return false.\r\n *\r\n * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed.\r\n *\r\n * v {any}\r\n *\r\n * '[BigNumber Error] Invalid BigNumber: {v}'\r\n */\r\n BigNumber.isBigNumber = function (v) {\r\n if (!v || v._isBigNumber !== true) return false;\r\n if (!BigNumber.DEBUG) return true;\r\n\r\n var i, n,\r\n c = v.c,\r\n e = v.e,\r\n s = v.s;\r\n\r\n out: if ({}.toString.call(c) == '[object Array]') {\r\n\r\n if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) {\r\n\r\n // If the first element is zero, the BigNumber value must be zero.\r\n if (c[0] === 0) {\r\n if (e === 0 && c.length === 1) return true;\r\n break out;\r\n }\r\n\r\n // Calculate number of digits that c[0] should have, based on the exponent.\r\n i = (e + 1) % LOG_BASE;\r\n if (i < 1) i += LOG_BASE;\r\n\r\n // Calculate number of digits of c[0].\r\n //if (Math.ceil(Math.log(c[0] + 1) / Math.LN10) == i) {\r\n if (String(c[0]).length == i) {\r\n\r\n for (i = 0; i < c.length; i++) {\r\n n = c[i];\r\n if (n < 0 || n >= BASE || n !== mathfloor(n)) break out;\r\n }\r\n\r\n // Last element cannot be zero, unless it is the only element.\r\n if (n !== 0) return true;\r\n }\r\n }\r\n\r\n // Infinity/NaN\r\n } else if (c === null && e === null && (s === null || s === 1 || s === -1)) {\r\n return true;\r\n }\r\n\r\n throw Error\r\n (bignumberError + 'Invalid BigNumber: ' + v);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the maximum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.maximum = BigNumber.max = function () {\r\n return maxOrMin(arguments, P.lt);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the minimum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.minimum = BigNumber.min = function () {\r\n return maxOrMin(arguments, P.gt);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber with a random value equal to or greater than 0 and less than 1,\r\n * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing\r\n * zeros are produced).\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}'\r\n * '[BigNumber Error] crypto unavailable'\r\n */\r\n BigNumber.random = (function () {\r\n var pow2_53 = 0x20000000000000;\r\n\r\n // Return a 53 bit integer n, where 0 <= n < 9007199254740992.\r\n // Check if Math.random() produces more than 32 bits of randomness.\r\n // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits.\r\n // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1.\r\n var random53bitInt = (Math.random() * pow2_53) & 0x1fffff\r\n ? function () { return mathfloor(Math.random() * pow2_53); }\r\n : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) +\r\n (Math.random() * 0x800000 | 0); };\r\n\r\n return function (dp) {\r\n var a, b, e, k, v,\r\n i = 0,\r\n c = [],\r\n rand = new BigNumber(ONE);\r\n\r\n if (dp == null) dp = DECIMAL_PLACES;\r\n else intCheck(dp, 0, MAX);\r\n\r\n k = mathceil(dp / LOG_BASE);\r\n\r\n if (CRYPTO) {\r\n\r\n // Browsers supporting crypto.getRandomValues.\r\n if (crypto.getRandomValues) {\r\n\r\n a = crypto.getRandomValues(new Uint32Array(k *= 2));\r\n\r\n for (; i < k;) {\r\n\r\n // 53 bits:\r\n // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2)\r\n // 11111 11111111 11111111 11111111 11100000 00000000 00000000\r\n // ((Math.pow(2, 32) - 1) >>> 11).toString(2)\r\n // 11111 11111111 11111111\r\n // 0x20000 is 2^21.\r\n v = a[i] * 0x20000 + (a[i + 1] >>> 11);\r\n\r\n // Rejection sampling:\r\n // 0 <= v < 9007199254740992\r\n // Probability that v >= 9e15, is\r\n // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251\r\n if (v >= 9e15) {\r\n b = crypto.getRandomValues(new Uint32Array(2));\r\n a[i] = b[0];\r\n a[i + 1] = b[1];\r\n } else {\r\n\r\n // 0 <= v <= 8999999999999999\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 2;\r\n }\r\n }\r\n i = k / 2;\r\n\r\n // Node.js supporting crypto.randomBytes.\r\n } else if (crypto.randomBytes) {\r\n\r\n // buffer\r\n a = crypto.randomBytes(k *= 7);\r\n\r\n for (; i < k;) {\r\n\r\n // 0x1000000000000 is 2^48, 0x10000000000 is 2^40\r\n // 0x100000000 is 2^32, 0x1000000 is 2^24\r\n // 11111 11111111 11111111 11111111 11111111 11111111 11111111\r\n // 0 <= v < 9007199254740992\r\n v = ((a[i] & 31) * 0x1000000000000) + (a[i + 1] * 0x10000000000) +\r\n (a[i + 2] * 0x100000000) + (a[i + 3] * 0x1000000) +\r\n (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6];\r\n\r\n if (v >= 9e15) {\r\n crypto.randomBytes(7).copy(a, i);\r\n } else {\r\n\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 7;\r\n }\r\n }\r\n i = k / 7;\r\n } else {\r\n CRYPTO = false;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n }\r\n\r\n // Use Math.random.\r\n if (!CRYPTO) {\r\n\r\n for (; i < k;) {\r\n v = random53bitInt();\r\n if (v < 9e15) c[i++] = v % 1e14;\r\n }\r\n }\r\n\r\n k = c[--i];\r\n dp %= LOG_BASE;\r\n\r\n // Convert trailing digits to zeros according to dp.\r\n if (k && dp) {\r\n v = POWS_TEN[LOG_BASE - dp];\r\n c[i] = mathfloor(k / v) * v;\r\n }\r\n\r\n // Remove trailing elements which are zero.\r\n for (; c[i] === 0; c.pop(), i--);\r\n\r\n // Zero?\r\n if (i < 0) {\r\n c = [e = 0];\r\n } else {\r\n\r\n // Remove leading elements which are zero and adjust exponent accordingly.\r\n for (e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE);\r\n\r\n // Count the digits of the first element of c to determine leading zeros, and...\r\n for (i = 1, v = c[0]; v >= 10; v /= 10, i++);\r\n\r\n // adjust the exponent accordingly.\r\n if (i < LOG_BASE) e -= LOG_BASE - i;\r\n }\r\n\r\n rand.e = e;\r\n rand.c = c;\r\n return rand;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the sum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.sum = function () {\r\n var i = 1,\r\n args = arguments,\r\n sum = new BigNumber(args[0]);\r\n for (; i < args.length;) sum = sum.plus(args[i++]);\r\n return sum;\r\n };\r\n\r\n\r\n // PRIVATE FUNCTIONS\r\n\r\n\r\n // Called by BigNumber and BigNumber.prototype.toString.\r\n convertBase = (function () {\r\n var decimal = '0123456789';\r\n\r\n /*\r\n * Convert string of baseIn to an array of numbers of baseOut.\r\n * Eg. toBaseOut('255', 10, 16) returns [15, 15].\r\n * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5].\r\n */\r\n function toBaseOut(str, baseIn, baseOut, alphabet) {\r\n var j,\r\n arr = [0],\r\n arrL,\r\n i = 0,\r\n len = str.length;\r\n\r\n for (; i < len;) {\r\n for (arrL = arr.length; arrL--; arr[arrL] *= baseIn);\r\n\r\n arr[0] += alphabet.indexOf(str.charAt(i++));\r\n\r\n for (j = 0; j < arr.length; j++) {\r\n\r\n if (arr[j] > baseOut - 1) {\r\n if (arr[j + 1] == null) arr[j + 1] = 0;\r\n arr[j + 1] += arr[j] / baseOut | 0;\r\n arr[j] %= baseOut;\r\n }\r\n }\r\n }\r\n\r\n return arr.reverse();\r\n }\r\n\r\n // Convert a numeric string of baseIn to a numeric string of baseOut.\r\n // If the caller is toString, we are converting from base 10 to baseOut.\r\n // If the caller is BigNumber, we are converting from baseIn to base 10.\r\n return function (str, baseIn, baseOut, sign, callerIsToString) {\r\n var alphabet, d, e, k, r, x, xc, y,\r\n i = str.indexOf('.'),\r\n dp = DECIMAL_PLACES,\r\n rm = ROUNDING_MODE;\r\n\r\n // Non-integer.\r\n if (i >= 0) {\r\n k = POW_PRECISION;\r\n\r\n // Unlimited precision.\r\n POW_PRECISION = 0;\r\n str = str.replace('.', '');\r\n y = new BigNumber(baseIn);\r\n x = y.pow(str.length - i);\r\n POW_PRECISION = k;\r\n\r\n // Convert str as if an integer, then restore the fraction part by dividing the\r\n // result by its base raised to a power.\r\n\r\n y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'),\r\n 10, baseOut, decimal);\r\n y.e = y.c.length;\r\n }\r\n\r\n // Convert the number as integer.\r\n\r\n xc = toBaseOut(str, baseIn, baseOut, callerIsToString\r\n ? (alphabet = ALPHABET, decimal)\r\n : (alphabet = decimal, ALPHABET));\r\n\r\n // xc now represents str as an integer and converted to baseOut. e is the exponent.\r\n e = k = xc.length;\r\n\r\n // Remove trailing zeros.\r\n for (; xc[--k] == 0; xc.pop());\r\n\r\n // Zero?\r\n if (!xc[0]) return alphabet.charAt(0);\r\n\r\n // Does str represent an integer? If so, no need for the division.\r\n if (i < 0) {\r\n --e;\r\n } else {\r\n x.c = xc;\r\n x.e = e;\r\n\r\n // The sign is needed for correct rounding.\r\n x.s = sign;\r\n x = div(x, y, dp, rm, baseOut);\r\n xc = x.c;\r\n r = x.r;\r\n e = x.e;\r\n }\r\n\r\n // xc now represents str converted to baseOut.\r\n\r\n // THe index of the rounding digit.\r\n d = e + dp + 1;\r\n\r\n // The rounding digit: the digit to the right of the digit that may be rounded up.\r\n i = xc[d];\r\n\r\n // Look at the rounding digits and mode to determine whether to round up.\r\n\r\n k = baseOut / 2;\r\n r = r || d < 0 || xc[d + 1] != null;\r\n\r\n r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : i > k || i == k &&(rm == 4 || r || rm == 6 && xc[d - 1] & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n // If the index of the rounding digit is not greater than zero, or xc represents\r\n // zero, then the result of the base conversion is zero or, if rounding up, a value\r\n // such as 0.00001.\r\n if (d < 1 || !xc[0]) {\r\n\r\n // 1^-dp or 0\r\n str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);\r\n } else {\r\n\r\n // Truncate xc to the required number of decimal places.\r\n xc.length = d;\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up and so on.\r\n for (--baseOut; ++xc[--d] > baseOut;) {\r\n xc[d] = 0;\r\n\r\n if (!d) {\r\n ++e;\r\n xc = [1].concat(xc);\r\n }\r\n }\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (k = xc.length; !xc[--k];);\r\n\r\n // E.g. [4, 11, 15] becomes 4bf.\r\n for (i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++]));\r\n\r\n // Add leading zeros, decimal point and trailing zeros as required.\r\n str = toFixedPoint(str, e, alphabet.charAt(0));\r\n }\r\n\r\n // The caller will add the sign.\r\n return str;\r\n };\r\n })();\r\n\r\n\r\n // Perform division in the specified base. Called by div and convertBase.\r\n div = (function () {\r\n\r\n // Assume non-zero x and k.\r\n function multiply(x, k, base) {\r\n var m, temp, xlo, xhi,\r\n carry = 0,\r\n i = x.length,\r\n klo = k % SQRT_BASE,\r\n khi = k / SQRT_BASE | 0;\r\n\r\n for (x = x.slice(); i--;) {\r\n xlo = x[i] % SQRT_BASE;\r\n xhi = x[i] / SQRT_BASE | 0;\r\n m = khi * xlo + xhi * klo;\r\n temp = klo * xlo + ((m % SQRT_BASE) * SQRT_BASE) + carry;\r\n carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi;\r\n x[i] = temp % base;\r\n }\r\n\r\n if (carry) x = [carry].concat(x);\r\n\r\n return x;\r\n }\r\n\r\n function compare(a, b, aL, bL) {\r\n var i, cmp;\r\n\r\n if (aL != bL) {\r\n cmp = aL > bL ? 1 : -1;\r\n } else {\r\n\r\n for (i = cmp = 0; i < aL; i++) {\r\n\r\n if (a[i] != b[i]) {\r\n cmp = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return cmp;\r\n }\r\n\r\n function subtract(a, b, aL, base) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for (; aL--;) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * base + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for (; !a[0] && a.length > 1; a.splice(0, 1));\r\n }\r\n\r\n // x: dividend, y: divisor.\r\n return function (x, y, dp, rm, base) {\r\n var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0,\r\n yL, yz,\r\n s = x.s == y.s ? 1 : -1,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n // Either NaN, Infinity or 0?\r\n if (!xc || !xc[0] || !yc || !yc[0]) {\r\n\r\n return new BigNumber(\r\n\r\n // Return NaN if either NaN, or both Infinity or 0.\r\n !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN :\r\n\r\n // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.\r\n xc && xc[0] == 0 || !yc ? s * 0 : s / 0\r\n );\r\n }\r\n\r\n q = new BigNumber(s);\r\n qc = q.c = [];\r\n e = x.e - y.e;\r\n s = dp + e + 1;\r\n\r\n if (!base) {\r\n base = BASE;\r\n e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE);\r\n s = s / LOG_BASE | 0;\r\n }\r\n\r\n // Result exponent may be one less then the current value of e.\r\n // The coefficients of the BigNumbers from convertBase may have trailing zeros.\r\n for (i = 0; yc[i] == (xc[i] || 0); i++);\r\n\r\n if (yc[i] > (xc[i] || 0)) e--;\r\n\r\n if (s < 0) {\r\n qc.push(1);\r\n more = true;\r\n } else {\r\n xL = xc.length;\r\n yL = yc.length;\r\n i = 0;\r\n s += 2;\r\n\r\n // Normalise xc and yc so highest order digit of yc is >= base / 2.\r\n\r\n n = mathfloor(base / (yc[0] + 1));\r\n\r\n // Not necessary, but to handle odd bases where yc[0] == (base / 2) - 1.\r\n // if (n > 1 || n++ == 1 && yc[0] < base / 2) {\r\n if (n > 1) {\r\n yc = multiply(yc, n, base);\r\n xc = multiply(xc, n, base);\r\n yL = yc.length;\r\n xL = xc.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xc.slice(0, yL);\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; remL < yL; rem[remL++] = 0);\r\n yz = yc.slice();\r\n yz = [0].concat(yz);\r\n yc0 = yc[0];\r\n if (yc[1] >= base / 2) yc0++;\r\n // Not necessary, but to prevent trial digit n > base, when using base 3.\r\n // else if (base == 3 && yc0 == 1) yc0 = 1 + 1e-15;\r\n\r\n do {\r\n n = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare(yc, rem, yL, remL);\r\n\r\n // If divisor < remainder.\r\n if (cmp < 0) {\r\n\r\n // Calculate trial digit, n.\r\n\r\n rem0 = rem[0];\r\n if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);\r\n\r\n // n is how many times the divisor goes into the current remainder.\r\n n = mathfloor(rem0 / yc0);\r\n\r\n // Algorithm:\r\n // product = divisor multiplied by trial digit (n).\r\n // Compare product and remainder.\r\n // If product is greater than remainder:\r\n // Subtract divisor from product, decrement trial digit.\r\n // Subtract product from remainder.\r\n // If product was less than remainder at the last compare:\r\n // Compare new remainder and divisor.\r\n // If remainder is greater than divisor:\r\n // Subtract divisor from remainder, increment trial digit.\r\n\r\n if (n > 1) {\r\n\r\n // n may be > base only when base is 3.\r\n if (n >= base) n = base - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiply(yc, n, base);\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n // If product > remainder then trial digit n too high.\r\n // n is 1 too high about 5% of the time, and is not known to have\r\n // ever been more than 1 too high.\r\n while (compare(prod, rem, prodL, remL) == 1) {\r\n n--;\r\n\r\n // Subtract divisor from product.\r\n subtract(prod, yL < prodL ? yz : yc, prodL, base);\r\n prodL = prod.length;\r\n cmp = 1;\r\n }\r\n } else {\r\n\r\n // n is 0 or 1, cmp is -1.\r\n // If n is 0, there is no need to compare yc and rem again below,\r\n // so change cmp to 1 to avoid it.\r\n // If n is 1, leave cmp as -1, so yc and rem are compared again.\r\n if (n == 0) {\r\n\r\n // divisor < remainder, so n must be at least 1.\r\n cmp = n = 1;\r\n }\r\n\r\n // product = divisor\r\n prod = yc.slice();\r\n prodL = prod.length;\r\n }\r\n\r\n if (prodL < remL) prod = [0].concat(prod);\r\n\r\n // Subtract product from remainder.\r\n subtract(rem, prod, remL, base);\r\n remL = rem.length;\r\n\r\n // If product was < remainder.\r\n if (cmp == -1) {\r\n\r\n // Compare divisor and new remainder.\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n // Trial digit n too low.\r\n // n is 1 too low about 5% of the time, and very rarely 2 too low.\r\n while (compare(yc, rem, yL, remL) < 1) {\r\n n++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract(rem, yL < remL ? yz : yc, remL, base);\r\n remL = rem.length;\r\n }\r\n }\r\n } else if (cmp === 0) {\r\n n++;\r\n rem = [0];\r\n } // else cmp === 1 and n will be 0\r\n\r\n // Add the next digit, n, to the result array.\r\n qc[i++] = n;\r\n\r\n // Update the remainder.\r\n if (rem[0]) {\r\n rem[remL++] = xc[xi] || 0;\r\n } else {\r\n rem = [xc[xi]];\r\n remL = 1;\r\n }\r\n } while ((xi++ < xL || rem[0] != null) && s--);\r\n\r\n more = rem[0] != null;\r\n\r\n // Leading zero?\r\n if (!qc[0]) qc.splice(0, 1);\r\n }\r\n\r\n if (base == BASE) {\r\n\r\n // To calculate q.e, first get the number of digits of qc[0].\r\n for (i = 1, s = qc[0]; s >= 10; s /= 10, i++);\r\n\r\n round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more);\r\n\r\n // Caller is convertBase.\r\n } else {\r\n q.e = e;\r\n q.r = +more;\r\n }\r\n\r\n return q;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a string representing the value of BigNumber n in fixed-point or exponential\r\n * notation rounded to the specified decimal places or significant digits.\r\n *\r\n * n: a BigNumber.\r\n * i: the index of the last digit required (i.e. the digit that may be rounded up).\r\n * rm: the rounding mode.\r\n * id: 1 (toExponential) or 2 (toPrecision).\r\n */\r\n function format(n, i, rm, id) {\r\n var c0, e, ne, len, str;\r\n\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n if (!n.c) return n.toString();\r\n\r\n c0 = n.c[0];\r\n ne = n.e;\r\n\r\n if (i == null) {\r\n str = coeffToString(n.c);\r\n str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS)\r\n ? toExponential(str, ne)\r\n : toFixedPoint(str, ne, '0');\r\n } else {\r\n n = round(new BigNumber(n), i, rm);\r\n\r\n // n.e may have changed if the value was rounded up.\r\n e = n.e;\r\n\r\n str = coeffToString(n.c);\r\n len = str.length;\r\n\r\n // toPrecision returns exponential notation if the number of significant digits\r\n // specified is less than the number of digits necessary to represent the integer\r\n // part of the value in fixed-point notation.\r\n\r\n // Exponential notation.\r\n if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) {\r\n\r\n // Append zeros?\r\n for (; len < i; str += '0', len++);\r\n str = toExponential(str, e);\r\n\r\n // Fixed-point notation.\r\n } else {\r\n i -= ne;\r\n str = toFixedPoint(str, e, '0');\r\n\r\n // Append zeros?\r\n if (e + 1 > len) {\r\n if (--i > 0) for (str += '.'; i--; str += '0');\r\n } else {\r\n i += e - len;\r\n if (i > 0) {\r\n if (e + 1 == len) str += '.';\r\n for (; i--; str += '0');\r\n }\r\n }\r\n }\r\n }\r\n\r\n return n.s < 0 && c0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Handle BigNumber.max and BigNumber.min.\r\n function maxOrMin(args, method) {\r\n var n,\r\n i = 1,\r\n m = new BigNumber(args[0]);\r\n\r\n for (; i < args.length; i++) {\r\n n = new BigNumber(args[i]);\r\n\r\n // If any number is NaN, return NaN.\r\n if (!n.s) {\r\n m = n;\r\n break;\r\n } else if (method.call(m, n)) {\r\n m = n;\r\n }\r\n }\r\n\r\n return m;\r\n }\r\n\r\n\r\n /*\r\n * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP.\r\n * Called by minus, plus and times.\r\n */\r\n function normalise(n, c, e) {\r\n var i = 1,\r\n j = c.length;\r\n\r\n // Remove trailing zeros.\r\n for (; !c[--j]; c.pop());\r\n\r\n // Calculate the base 10 exponent. First get the number of digits of c[0].\r\n for (j = c[0]; j >= 10; j /= 10, i++);\r\n\r\n // Overflow?\r\n if ((e = i + e * LOG_BASE - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n n.c = n.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n n.c = [n.e = 0];\r\n } else {\r\n n.e = e;\r\n n.c = c;\r\n }\r\n\r\n return n;\r\n }\r\n\r\n\r\n // Handle values that fail the validity test in BigNumber.\r\n parseNumeric = (function () {\r\n var basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i,\r\n dotAfter = /^([^.]+)\\.$/,\r\n dotBefore = /^\\.([^.]+)$/,\r\n isInfinityOrNaN = /^-?(Infinity|NaN)$/,\r\n whitespaceOrPlus = /^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g;\r\n\r\n return function (x, str, isNum, b) {\r\n var base,\r\n s = isNum ? str : str.replace(whitespaceOrPlus, '');\r\n\r\n // No exception on ±Infinity or NaN.\r\n if (isInfinityOrNaN.test(s)) {\r\n x.s = isNaN(s) ? null : s < 0 ? -1 : 1;\r\n } else {\r\n if (!isNum) {\r\n\r\n // basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i\r\n s = s.replace(basePrefix, function (m, p1, p2) {\r\n base = (p2 = p2.toLowerCase()) == 'x' ? 16 : p2 == 'b' ? 2 : 8;\r\n return !b || b == base ? p1 : m;\r\n });\r\n\r\n if (b) {\r\n base = b;\r\n\r\n // E.g. '1.' to '1', '.1' to '0.1'\r\n s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1');\r\n }\r\n\r\n if (str != s) return new BigNumber(s, base);\r\n }\r\n\r\n // '[BigNumber Error] Not a number: {n}'\r\n // '[BigNumber Error] Not a base {b} number: {n}'\r\n if (BigNumber.DEBUG) {\r\n throw Error\r\n (bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str);\r\n }\r\n\r\n // NaN\r\n x.s = null;\r\n }\r\n\r\n x.c = x.e = null;\r\n }\r\n })();\r\n\r\n\r\n /*\r\n * Round x to sd significant digits using rounding mode rm. Check for over/under-flow.\r\n * If r is truthy, it is known that there are more digits after the rounding digit.\r\n */\r\n function round(x, sd, rm, r) {\r\n var d, i, j, k, n, ni, rd,\r\n xc = x.c,\r\n pows10 = POWS_TEN;\r\n\r\n // if x is not Infinity or NaN...\r\n if (xc) {\r\n\r\n // rd is the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // n is a base 1e14 number, the value of the element of array x.c containing rd.\r\n // ni is the index of n within x.c.\r\n // d is the number of digits of n.\r\n // i is the index of rd within n including leading zeros.\r\n // j is the actual index of rd within n (if < 0, rd is a leading zero).\r\n out: {\r\n\r\n // Get the number of digits of the first element of xc.\r\n for (d = 1, k = xc[0]; k >= 10; k /= 10, d++);\r\n i = sd - d;\r\n\r\n // If the rounding digit is in the first element of xc...\r\n if (i < 0) {\r\n i += LOG_BASE;\r\n j = sd;\r\n n = xc[ni = 0];\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = n / pows10[d - j - 1] % 10 | 0;\r\n } else {\r\n ni = mathceil((i + 1) / LOG_BASE);\r\n\r\n if (ni >= xc.length) {\r\n\r\n if (r) {\r\n\r\n // Needed by sqrt.\r\n for (; xc.length <= ni; xc.push(0));\r\n n = rd = 0;\r\n d = 1;\r\n i %= LOG_BASE;\r\n j = i - LOG_BASE + 1;\r\n } else {\r\n break out;\r\n }\r\n } else {\r\n n = k = xc[ni];\r\n\r\n // Get the number of digits of n.\r\n for (d = 1; k >= 10; k /= 10, d++);\r\n\r\n // Get the index of rd within n.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within n, adjusted for leading zeros.\r\n // The number of leading zeros of n is given by LOG_BASE - d.\r\n j = i - LOG_BASE + d;\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = j < 0 ? 0 : n / pows10[d - j - 1] % 10 | 0;\r\n }\r\n }\r\n\r\n r = r || sd < 0 ||\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n // The expression n % pows10[d - j - 1] returns all digits of n to the right\r\n // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.\r\n xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]);\r\n\r\n r = rm < 4\r\n ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ((i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10) & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n if (sd < 1 || !xc[0]) {\r\n xc.length = 0;\r\n\r\n if (r) {\r\n\r\n // Convert sd to decimal places.\r\n sd -= x.e + 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE];\r\n x.e = -sd || 0;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if (i == 0) {\r\n xc.length = ni;\r\n k = 1;\r\n ni--;\r\n } else {\r\n xc.length = ni + 1;\r\n k = pows10[LOG_BASE - i];\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of n.\r\n xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0;\r\n }\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n for (; ;) {\r\n\r\n // If the digit to be rounded up is in the first element of xc...\r\n if (ni == 0) {\r\n\r\n // i will be the length of xc[0] before k is added.\r\n for (i = 1, j = xc[0]; j >= 10; j /= 10, i++);\r\n j = xc[0] += k;\r\n for (k = 1; j >= 10; j /= 10, k++);\r\n\r\n // if i != k the length has increased.\r\n if (i != k) {\r\n x.e++;\r\n if (xc[0] == BASE) xc[0] = 1;\r\n }\r\n\r\n break;\r\n } else {\r\n xc[ni] += k;\r\n if (xc[ni] != BASE) break;\r\n xc[ni--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xc.length; xc[--i] === 0; xc.pop());\r\n }\r\n\r\n // Overflow? Infinity.\r\n if (x.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n\r\n // Underflow? Zero.\r\n } else if (x.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n function valueOf(n) {\r\n var str,\r\n e = n.e;\r\n\r\n if (e === null) return n.toString();\r\n\r\n str = coeffToString(n.c);\r\n\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(str, e)\r\n : toFixedPoint(str, e, '0');\r\n\r\n return n.s < 0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // PROTOTYPE/INSTANCE METHODS\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the absolute value of this BigNumber.\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new BigNumber(this);\r\n if (x.s < 0) x.s = 1;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * -1 if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * 0 if they have the same value,\r\n * or null if the value of either is NaN.\r\n */\r\n P.comparedTo = function (y, b) {\r\n return compare(this, new BigNumber(y, b));\r\n };\r\n\r\n\r\n /*\r\n * If dp is undefined or null or true or false, return the number of decimal places of the\r\n * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.\r\n *\r\n * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * [dp] {number} Decimal places: integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.decimalPlaces = P.dp = function (dp, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), dp + x.e + 1, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last number.\r\n if (v = c[v]) for (; v % 10 == 0; v /= 10, n--);\r\n if (n < 0) n = 0;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * n / 0 = I\r\n * n / N = N\r\n * n / I = 0\r\n * 0 / n = 0\r\n * 0 / 0 = N\r\n * 0 / N = N\r\n * 0 / I = 0\r\n * N / n = N\r\n * N / 0 = N\r\n * N / N = N\r\n * N / I = N\r\n * I / n = I\r\n * I / 0 = I\r\n * I / N = N\r\n * I / I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber divided by the value of\r\n * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.dividedBy = P.div = function (y, b) {\r\n return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the integer part of dividing the value of this\r\n * BigNumber by the value of BigNumber(y, b).\r\n */\r\n P.dividedToIntegerBy = P.idiv = function (y, b) {\r\n return div(this, new BigNumber(y, b), 0, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the value of this BigNumber exponentiated by n.\r\n *\r\n * If m is present, return the result modulo m.\r\n * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE.\r\n * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE.\r\n *\r\n * The modular power operation works efficiently when x, n, and m are integers, otherwise it\r\n * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0.\r\n *\r\n * n {number|string|BigNumber} The exponent. An integer.\r\n * [m] {number|string|BigNumber} The modulus.\r\n *\r\n * '[BigNumber Error] Exponent not an integer: {n}'\r\n */\r\n P.exponentiatedBy = P.pow = function (n, m) {\r\n var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y,\r\n x = this;\r\n\r\n n = new BigNumber(n);\r\n\r\n // Allow NaN and ±Infinity, but not other non-integers.\r\n if (n.c && !n.isInteger()) {\r\n throw Error\r\n (bignumberError + 'Exponent not an integer: ' + valueOf(n));\r\n }\r\n\r\n if (m != null) m = new BigNumber(m);\r\n\r\n // Exponent of MAX_SAFE_INTEGER is 15.\r\n nIsBig = n.e > 14;\r\n\r\n // If x is NaN, ±Infinity, ±0 or ±1, or n is ±Infinity, NaN or ±0.\r\n if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {\r\n\r\n // The sign of the result of pow when x is negative depends on the evenness of n.\r\n // If +n overflows to ±Infinity, the evenness of n would be not be known.\r\n y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? 2 - isOdd(n) : +valueOf(n)));\r\n return m ? y.mod(m) : y;\r\n }\r\n\r\n nIsNeg = n.s < 0;\r\n\r\n if (m) {\r\n\r\n // x % m returns NaN if abs(m) is zero, or m is NaN.\r\n if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN);\r\n\r\n isModExp = !nIsNeg && x.isInteger() && m.isInteger();\r\n\r\n if (isModExp) x = x.mod(m);\r\n\r\n // Overflow to ±Infinity: >=2**1e10 or >=1.0000024**1e15.\r\n // Underflow to ±0: <=0.79**1e10 or <=0.9999975**1e15.\r\n } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0\r\n // [1, 240000000]\r\n ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7\r\n // [80000000000000] [99999750000000]\r\n : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) {\r\n\r\n // If x is negative and n is odd, k = -0, else k = 0.\r\n k = x.s < 0 && isOdd(n) ? -0 : 0;\r\n\r\n // If x >= 1, k = ±Infinity.\r\n if (x.e > -1) k = 1 / k;\r\n\r\n // If n is negative return ±0, else return ±Infinity.\r\n return new BigNumber(nIsNeg ? 1 / k : k);\r\n\r\n } else if (POW_PRECISION) {\r\n\r\n // Truncating each coefficient array to a length of k after each multiplication\r\n // equates to truncating significant digits to POW_PRECISION + [28, 41],\r\n // i.e. there will be a minimum of 28 guard digits retained.\r\n k = mathceil(POW_PRECISION / LOG_BASE + 2);\r\n }\r\n\r\n if (nIsBig) {\r\n half = new BigNumber(0.5);\r\n if (nIsNeg) n.s = 1;\r\n nIsOdd = isOdd(n);\r\n } else {\r\n i = Math.abs(+valueOf(n));\r\n nIsOdd = i % 2;\r\n }\r\n\r\n y = new BigNumber(ONE);\r\n\r\n // Performs 54 loop iterations for n of 9007199254740991.\r\n for (; ;) {\r\n\r\n if (nIsOdd) {\r\n y = y.times(x);\r\n if (!y.c) break;\r\n\r\n if (k) {\r\n if (y.c.length > k) y.c.length = k;\r\n } else if (isModExp) {\r\n y = y.mod(m); //y = y.minus(div(y, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (i) {\r\n i = mathfloor(i / 2);\r\n if (i === 0) break;\r\n nIsOdd = i % 2;\r\n } else {\r\n n = n.times(half);\r\n round(n, n.e + 1, 1);\r\n\r\n if (n.e > 14) {\r\n nIsOdd = isOdd(n);\r\n } else {\r\n i = +valueOf(n);\r\n if (i === 0) break;\r\n nIsOdd = i % 2;\r\n }\r\n }\r\n\r\n x = x.times(x);\r\n\r\n if (k) {\r\n if (x.c && x.c.length > k) x.c.length = k;\r\n } else if (isModExp) {\r\n x = x.mod(m); //x = x.minus(div(x, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (isModExp) return y;\r\n if (nIsNeg) y = ONE.div(y);\r\n\r\n return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer\r\n * using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}'\r\n */\r\n P.integerValue = function (rm) {\r\n var n = new BigNumber(this);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n return round(n, n.e + 1, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isEqualTo = P.eq = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is a finite number, otherwise return false.\r\n */\r\n P.isFinite = function () {\r\n return !!this.c;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isGreaterThan = P.gt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isGreaterThanOrEqualTo = P.gte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0;\r\n\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is an integer, otherwise return false.\r\n */\r\n P.isInteger = function () {\r\n return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isLessThan = P.lt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isLessThanOrEqualTo = P.lte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is NaN, otherwise return false.\r\n */\r\n P.isNaN = function () {\r\n return !this.s;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is negative, otherwise return false.\r\n */\r\n P.isNegative = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is positive, otherwise return false.\r\n */\r\n P.isPositive = function () {\r\n return this.s > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is 0 or -0, otherwise return false.\r\n */\r\n P.isZero = function () {\r\n return !!this.c && this.c[0] == 0;\r\n };\r\n\r\n\r\n /*\r\n * n - 0 = n\r\n * n - N = N\r\n * n - I = -I\r\n * 0 - n = -n\r\n * 0 - 0 = 0\r\n * 0 - N = N\r\n * 0 - I = -I\r\n * N - n = N\r\n * N - 0 = N\r\n * N - N = N\r\n * N - I = N\r\n * I - n = I\r\n * I - 0 = I\r\n * I - N = N\r\n * I - I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber minus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.minus = function (y, b) {\r\n var i, j, t, xLTy,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN);\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x :\r\n\r\n // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity\r\n ROUNDING_MODE == 3 ? -0 : 0);\r\n }\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Determine which is the bigger number.\r\n if (a = xe - ye) {\r\n\r\n if (xLTy = a < 0) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n\r\n // Prepend zeros to equalise exponents.\r\n for (b = a; b--; t.push(0));\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b;\r\n\r\n for (a = b = 0; b < j; b++) {\r\n\r\n if (xc[b] != yc[b]) {\r\n xLTy = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xLTy) {\r\n t = xc;\r\n xc = yc;\r\n yc = t;\r\n y.s = -y.s;\r\n } \r\n\r\n b = (j = yc.length) - (i = xc.length);\r\n\r\n // Append zeros to xc if shorter.\r\n // No need to add zeros to yc if shorter as subtract only needs to start at yc.length.\r\n if (b > 0) for (; b--; xc[i++] = 0);\r\n b = BASE - 1;\r\n\r\n // Subtract yc from xc.\r\n for (; j > a;) {\r\n\r\n if (xc[--j] < yc[j]) {\r\n for (i = j; i && !xc[--i]; xc[i] = b);\r\n --xc[i];\r\n xc[j] += BASE;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xc[0] == 0; xc.splice(0, 1), --ye);\r\n\r\n // Zero?\r\n if (!xc[0]) {\r\n\r\n // Following IEEE 754 (2008) 6.3,\r\n // n - n = +0 but n - n = -0 when rounding towards -Infinity.\r\n y.s = ROUNDING_MODE == 3 ? -1 : 1;\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity\r\n // for finite x and y.\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * n % 0 = N\r\n * n % N = N\r\n * n % I = n\r\n * 0 % n = 0\r\n * -0 % n = -0\r\n * 0 % 0 = N\r\n * 0 % N = N\r\n * 0 % I = 0\r\n * N % n = N\r\n * N % 0 = N\r\n * N % N = N\r\n * N % I = N\r\n * I % n = N\r\n * I % 0 = N\r\n * I % N = N\r\n * I % I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber modulo the value of\r\n * BigNumber(y, b). The result depends on the value of MODULO_MODE.\r\n */\r\n P.modulo = P.mod = function (y, b) {\r\n var q, s,\r\n x = this;\r\n\r\n y = new BigNumber(y, b);\r\n\r\n // Return NaN if x is Infinity or NaN, or y is NaN or zero.\r\n if (!x.c || !y.s || y.c && !y.c[0]) {\r\n return new BigNumber(NaN);\r\n\r\n // Return x if y is Infinity or x is zero.\r\n } else if (!y.c || x.c && !x.c[0]) {\r\n return new BigNumber(x);\r\n }\r\n\r\n if (MODULO_MODE == 9) {\r\n\r\n // Euclidian division: q = sign(y) * floor(x / abs(y))\r\n // r = x - qy where 0 <= r < abs(y)\r\n s = y.s;\r\n y.s = 1;\r\n q = div(x, y, 0, 3);\r\n y.s = s;\r\n q.s *= s;\r\n } else {\r\n q = div(x, y, 0, MODULO_MODE);\r\n }\r\n\r\n y = x.minus(q.times(y));\r\n\r\n // To match JavaScript %, ensure sign of zero is sign of dividend.\r\n if (!y.c[0] && MODULO_MODE == 1) y.s = x.s;\r\n\r\n return y;\r\n };\r\n\r\n\r\n /*\r\n * n * 0 = 0\r\n * n * N = N\r\n * n * I = I\r\n * 0 * n = 0\r\n * 0 * 0 = 0\r\n * 0 * N = N\r\n * 0 * I = N\r\n * N * n = N\r\n * N * 0 = N\r\n * N * N = N\r\n * N * I = N\r\n * I * n = I\r\n * I * 0 = N\r\n * I * N = N\r\n * I * I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value\r\n * of BigNumber(y, b).\r\n */\r\n P.multipliedBy = P.times = function (y, b) {\r\n var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc,\r\n base, sqrtBase,\r\n x = this,\r\n xc = x.c,\r\n yc = (y = new BigNumber(y, b)).c;\r\n\r\n // Either NaN, ±Infinity or ±0?\r\n if (!xc || !yc || !xc[0] || !yc[0]) {\r\n\r\n // Return NaN if either is NaN, or one is 0 and the other is Infinity.\r\n if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {\r\n y.c = y.e = y.s = null;\r\n } else {\r\n y.s *= x.s;\r\n\r\n // Return ±Infinity if either is ±Infinity.\r\n if (!xc || !yc) {\r\n y.c = y.e = null;\r\n\r\n // Return ±0 if either is ±0.\r\n } else {\r\n y.c = [0];\r\n y.e = 0;\r\n }\r\n }\r\n\r\n return y;\r\n }\r\n\r\n e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE);\r\n y.s *= x.s;\r\n xcL = xc.length;\r\n ycL = yc.length;\r\n\r\n // Ensure xc points to longer array and xcL to its length.\r\n if (xcL < ycL) {\r\n zc = xc;\r\n xc = yc;\r\n yc = zc;\r\n i = xcL;\r\n xcL = ycL;\r\n ycL = i;\r\n } \r\n\r\n // Initialise the result array with zeros.\r\n for (i = xcL + ycL, zc = []; i--; zc.push(0));\r\n\r\n base = BASE;\r\n sqrtBase = SQRT_BASE;\r\n\r\n for (i = ycL; --i >= 0;) {\r\n c = 0;\r\n ylo = yc[i] % sqrtBase;\r\n yhi = yc[i] / sqrtBase | 0;\r\n\r\n for (k = xcL, j = i + k; j > i;) {\r\n xlo = xc[--k] % sqrtBase;\r\n xhi = xc[k] / sqrtBase | 0;\r\n m = yhi * xlo + xhi * ylo;\r\n xlo = ylo * xlo + ((m % sqrtBase) * sqrtBase) + zc[j] + c;\r\n c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi;\r\n zc[j--] = xlo % base;\r\n }\r\n\r\n zc[j] = c;\r\n }\r\n\r\n if (c) {\r\n ++e;\r\n } else {\r\n zc.splice(0, 1);\r\n }\r\n\r\n return normalise(y, zc, e);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber negated,\r\n * i.e. multiplied by -1.\r\n */\r\n P.negated = function () {\r\n var x = new BigNumber(this);\r\n x.s = -x.s || null;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * n + 0 = n\r\n * n + N = N\r\n * n + I = I\r\n * 0 + n = n\r\n * 0 + 0 = 0\r\n * 0 + N = N\r\n * 0 + I = I\r\n * N + n = N\r\n * N + 0 = N\r\n * N + N = N\r\n * N + I = N\r\n * I + n = I\r\n * I + 0 = I\r\n * I + N = N\r\n * I + I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber plus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.plus = function (y, b) {\r\n var t,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Return ±Infinity if either ±Infinity.\r\n if (!xc || !yc) return new BigNumber(a / 0);\r\n\r\n // Either zero?\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : a * 0);\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts.\r\n if (a = xe - ye) {\r\n if (a > 0) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n a = -a;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for (; a--; t.push(0));\r\n t.reverse();\r\n }\r\n\r\n a = xc.length;\r\n b = yc.length;\r\n\r\n // Point xc to the longer array, and b to the shorter length.\r\n if (a - b < 0) {\r\n t = yc;\r\n yc = xc;\r\n xc = t;\r\n b = a;\r\n } \r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be ignored.\r\n for (a = 0; b;) {\r\n a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0;\r\n xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;\r\n }\r\n\r\n if (a) {\r\n xc = [a].concat(xc);\r\n ++ye;\r\n }\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n // ye = MAX_EXP + 1 possible\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * If sd is undefined or null or true or false, return the number of significant digits of\r\n * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.\r\n * If sd is true include integer-part trailing zeros in the count.\r\n *\r\n * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive.\r\n * boolean: whether to count integer-part trailing zeros: true or false.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.precision = P.sd = function (sd, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (sd != null && sd !== !!sd) {\r\n intCheck(sd, 1, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), sd, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n v = c.length - 1;\r\n n = v * LOG_BASE + 1;\r\n\r\n if (v = c[v]) {\r\n\r\n // Subtract the number of trailing zeros of the last element.\r\n for (; v % 10 == 0; v /= 10, n--);\r\n\r\n // Add the number of digits of the first element.\r\n for (v = c[0]; v >= 10; v /= 10, n++);\r\n }\r\n\r\n if (sd && x.e + 1 > n) n = x.e + 1;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber shifted by k places\r\n * (powers of 10). Shift to the right if n > 0, and to the left if n < 0.\r\n *\r\n * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}'\r\n */\r\n P.shiftedBy = function (k) {\r\n intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);\r\n return this.times('1e' + k);\r\n };\r\n\r\n\r\n /*\r\n * sqrt(-n) = N\r\n * sqrt(N) = N\r\n * sqrt(-I) = N\r\n * sqrt(I) = I\r\n * sqrt(0) = 0\r\n * sqrt(-0) = -0\r\n *\r\n * Return a new BigNumber whose value is the square root of the value of this BigNumber,\r\n * rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var m, n, r, rep, t,\r\n x = this,\r\n c = x.c,\r\n s = x.s,\r\n e = x.e,\r\n dp = DECIMAL_PLACES + 4,\r\n half = new BigNumber('0.5');\r\n\r\n // Negative/NaN/Infinity/zero?\r\n if (s !== 1 || !c || !c[0]) {\r\n return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);\r\n }\r\n\r\n // Initial estimate.\r\n s = Math.sqrt(+valueOf(x));\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if (s == 0 || s == 1 / 0) {\r\n n = coeffToString(c);\r\n if ((n.length + e) % 2 == 0) n += '0';\r\n s = Math.sqrt(+n);\r\n e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new BigNumber(n);\r\n } else {\r\n r = new BigNumber(s + '');\r\n }\r\n\r\n // Check for zero.\r\n // r could be zero if MIN_EXP is changed after the this value was created.\r\n // This would cause a division by zero (x/t) and hence Infinity below, which would cause\r\n // coeffToString to throw.\r\n if (r.c[0]) {\r\n e = r.e;\r\n s = e + dp;\r\n if (s < 3) s = 0;\r\n\r\n // Newton-Raphson iteration.\r\n for (; ;) {\r\n t = r;\r\n r = half.times(t.plus(div(x, t, dp, 1)));\r\n\r\n if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) {\r\n\r\n // The exponent of r may here be one less than the final result exponent,\r\n // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits\r\n // are indexed correctly.\r\n if (r.e < e) --s;\r\n n = n.slice(s - 3, s + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits\r\n // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the\r\n // iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the\r\n // exact result as the nines may infinitely repeat.\r\n if (!rep) {\r\n round(t, t.e + DECIMAL_PLACES + 2, 0);\r\n\r\n if (t.times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n dp += 4;\r\n s += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact\r\n // result. If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n round(r, r.e + DECIMAL_PLACES + 2, 1);\r\n m = !r.times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in exponential notation and\r\n * rounded using ROUNDING_MODE to dp fixed decimal places.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toExponential = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp++;\r\n }\r\n return format(this, dp, rm, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounding\r\n * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * Note: as with JavaScript's number type, (-0).toFixed(0) is '0',\r\n * but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toFixed = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp = dp + this.e + 1;\r\n }\r\n return format(this, dp, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounded\r\n * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties\r\n * of the format or FORMAT object (see BigNumber.set).\r\n *\r\n * The formatting object may contain some or all of the properties shown below.\r\n *\r\n * FORMAT = {\r\n * prefix: '',\r\n * groupSize: 3,\r\n * secondaryGroupSize: 0,\r\n * groupSeparator: ',',\r\n * decimalSeparator: '.',\r\n * fractionGroupSize: 0,\r\n * fractionGroupSeparator: '\\xA0', // non-breaking space\r\n * suffix: ''\r\n * };\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n * [format] {object} Formatting options. See FORMAT pbject above.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n * '[BigNumber Error] Argument not an object: {format}'\r\n */\r\n P.toFormat = function (dp, rm, format) {\r\n var str,\r\n x = this;\r\n\r\n if (format == null) {\r\n if (dp != null && rm && typeof rm == 'object') {\r\n format = rm;\r\n rm = null;\r\n } else if (dp && typeof dp == 'object') {\r\n format = dp;\r\n dp = rm = null;\r\n } else {\r\n format = FORMAT;\r\n }\r\n } else if (typeof format != 'object') {\r\n throw Error\r\n (bignumberError + 'Argument not an object: ' + format);\r\n }\r\n\r\n str = x.toFixed(dp, rm);\r\n\r\n if (x.c) {\r\n var i,\r\n arr = str.split('.'),\r\n g1 = +format.groupSize,\r\n g2 = +format.secondaryGroupSize,\r\n groupSeparator = format.groupSeparator || '',\r\n intPart = arr[0],\r\n fractionPart = arr[1],\r\n isNeg = x.s < 0,\r\n intDigits = isNeg ? intPart.slice(1) : intPart,\r\n len = intDigits.length;\r\n\r\n if (g2) {\r\n i = g1;\r\n g1 = g2;\r\n g2 = i;\r\n len -= i;\r\n } \r\n\r\n if (g1 > 0 && len > 0) {\r\n i = len % g1 || g1;\r\n intPart = intDigits.substr(0, i);\r\n for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1);\r\n if (g2 > 0) intPart += groupSeparator + intDigits.slice(i);\r\n if (isNeg) intPart = '-' + intPart;\r\n }\r\n\r\n str = fractionPart\r\n ? intPart + (format.decimalSeparator || '') + ((g2 = +format.fractionGroupSize)\r\n ? fractionPart.replace(new RegExp('\\\\d{' + g2 + '}\\\\B', 'g'),\r\n '$&' + (format.fractionGroupSeparator || ''))\r\n : fractionPart)\r\n : intPart;\r\n }\r\n\r\n return (format.prefix || '') + str + (format.suffix || '');\r\n };\r\n\r\n\r\n /*\r\n * Return an array of two BigNumbers representing the value of this BigNumber as a simple\r\n * fraction with an integer numerator and an integer denominator.\r\n * The denominator will be a positive non-zero value less than or equal to the specified\r\n * maximum denominator. If a maximum denominator is not specified, the denominator will be\r\n * the lowest value necessary to represent the number exactly.\r\n *\r\n * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator.\r\n *\r\n * '[BigNumber Error] Argument {not an integer|out of range} : {md}'\r\n */\r\n P.toFraction = function (md) {\r\n var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s,\r\n x = this,\r\n xc = x.c;\r\n\r\n if (md != null) {\r\n n = new BigNumber(md);\r\n\r\n // Throw if md is less than one or is not an integer, unless it is Infinity.\r\n if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {\r\n throw Error\r\n (bignumberError + 'Argument ' +\r\n (n.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf(n));\r\n }\r\n }\r\n\r\n if (!xc) return new BigNumber(x);\r\n\r\n d = new BigNumber(ONE);\r\n n1 = d0 = new BigNumber(ONE);\r\n d1 = n0 = new BigNumber(ONE);\r\n s = coeffToString(xc);\r\n\r\n // Determine initial denominator.\r\n // d is a power of 10 and the minimum max denominator that specifies the value exactly.\r\n e = d.e = s.length - x.e - 1;\r\n d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];\r\n md = !md || n.comparedTo(d) > 0 ? (e > 0 ? d : n1) : n;\r\n\r\n exp = MAX_EXP;\r\n MAX_EXP = 1 / 0;\r\n n = new BigNumber(s);\r\n\r\n // n0 = d1 = 0\r\n n0.c[0] = 0;\r\n\r\n for (; ;) {\r\n q = div(n, d, 0, 1);\r\n d2 = d0.plus(q.times(d1));\r\n if (d2.comparedTo(md) == 1) break;\r\n d0 = d1;\r\n d1 = d2;\r\n n1 = n0.plus(q.times(d2 = n1));\r\n n0 = d2;\r\n d = n.minus(q.times(d2 = d));\r\n n = d2;\r\n }\r\n\r\n d2 = div(md.minus(d0), d1, 0, 1);\r\n n0 = n0.plus(d2.times(n1));\r\n d0 = d0.plus(d2.times(d1));\r\n n0.s = n1.s = x.s;\r\n e = e * 2;\r\n\r\n // Determine which fraction is closer to x, n0/d0 or n1/d1\r\n r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo(\r\n div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0];\r\n\r\n MAX_EXP = exp;\r\n\r\n return r;\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this BigNumber converted to a number primitive.\r\n */\r\n P.toNumber = function () {\r\n return +valueOf(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber rounded to sd significant digits\r\n * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits\r\n * necessary to represent the integer part of the value in fixed-point notation, then use\r\n * exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.toPrecision = function (sd, rm) {\r\n if (sd != null) intCheck(sd, 1, MAX);\r\n return format(this, sd, rm, 2);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in base b, or base 10 if b is\r\n * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and\r\n * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent\r\n * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than\r\n * TO_EXP_NEG, return exponential notation.\r\n *\r\n * [b] {number} Integer, 2 to ALPHABET.length inclusive.\r\n *\r\n * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n */\r\n P.toString = function (b) {\r\n var str,\r\n n = this,\r\n s = n.s,\r\n e = n.e;\r\n\r\n // Infinity or NaN?\r\n if (e === null) {\r\n if (s) {\r\n str = 'Infinity';\r\n if (s < 0) str = '-' + str;\r\n } else {\r\n str = 'NaN';\r\n }\r\n } else {\r\n if (b == null) {\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(coeffToString(n.c), e)\r\n : toFixedPoint(coeffToString(n.c), e, '0');\r\n } else if (b === 10 && alphabetHasNormalDecimalDigits) {\r\n n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);\r\n str = toFixedPoint(coeffToString(n.c), n.e, '0');\r\n } else {\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n str = convertBase(toFixedPoint(coeffToString(n.c), e, '0'), 10, b, s, true);\r\n }\r\n\r\n if (s < 0 && n.c[0]) str = '-' + str;\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return as toString, but do not accept a base argument, and include the minus sign for\r\n * negative zero.\r\n */\r\n P.valueOf = P.toJSON = function () {\r\n return valueOf(this);\r\n };\r\n\r\n\r\n P._isBigNumber = true;\r\n\r\n if (configObject != null) BigNumber.set(configObject);\r\n\r\n return BigNumber;\r\n }\r\n\r\n\r\n // PRIVATE HELPER FUNCTIONS\r\n\r\n // These functions don't need access to variables,\r\n // e.g. DECIMAL_PLACES, in the scope of the `clone` function above.\r\n\r\n\r\n function bitFloor(n) {\r\n var i = n | 0;\r\n return n > 0 || n === i ? i : i - 1;\r\n }\r\n\r\n\r\n // Return a coefficient array as a string of base 10 digits.\r\n function coeffToString(a) {\r\n var s, z,\r\n i = 1,\r\n j = a.length,\r\n r = a[0] + '';\r\n\r\n for (; i < j;) {\r\n s = a[i++] + '';\r\n z = LOG_BASE - s.length;\r\n for (; z--; s = '0' + s);\r\n r += s;\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (j = r.length; r.charCodeAt(--j) === 48;);\r\n\r\n return r.slice(0, j + 1 || 1);\r\n }\r\n\r\n\r\n // Compare the value of BigNumbers x and y.\r\n function compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }\r\n\r\n\r\n /*\r\n * Check that n is a primitive number, an integer, and in range, otherwise throw.\r\n */\r\n function intCheck(n, min, max, name) {\r\n if (n < min || n > max || n !== mathfloor(n)) {\r\n throw Error\r\n (bignumberError + (name || 'Argument') + (typeof n == 'number'\r\n ? n < min || n > max ? ' out of range: ' : ' not an integer: '\r\n : ' not a primitive number: ') + String(n));\r\n }\r\n }\r\n\r\n\r\n // Assumes finite n.\r\n function isOdd(n) {\r\n var k = n.c.length - 1;\r\n return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0;\r\n }\r\n\r\n\r\n function toExponential(str, e) {\r\n return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) +\r\n (e < 0 ? 'e' : 'e+') + e;\r\n }\r\n\r\n\r\n function toFixedPoint(str, e, z) {\r\n var len, zs;\r\n\r\n // Negative exponent?\r\n if (e < 0) {\r\n\r\n // Prepend zeros.\r\n for (zs = z + '.'; ++e; zs += z);\r\n str = zs + str;\r\n\r\n // Positive exponent\r\n } else {\r\n len = str.length;\r\n\r\n // Append zeros.\r\n if (++e > len) {\r\n for (zs = z, e -= len; --e; zs += z);\r\n str += zs;\r\n } else if (e < len) {\r\n str = str.slice(0, e) + '.' + str.slice(e);\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n\r\n // EXPORT\r\n\r\n\r\n BigNumber = clone();\r\n BigNumber['default'] = BigNumber.BigNumber = BigNumber;\r\n\r\n // AMD.\r\n if (typeof define == 'function' && define.amd) {\r\n define(function () { return BigNumber; });\r\n\r\n // Node.js and other environments that support module.exports.\r\n } else if (typeof module != 'undefined' && module.exports) {\r\n module.exports = BigNumber;\r\n\r\n // Browser.\r\n } else {\r\n if (!globalObject) {\r\n globalObject = typeof self != 'undefined' && self ? self : window;\r\n }\r\n\r\n globalObject.BigNumber = BigNumber;\r\n }\r\n})(this);\r\n","import debounce from 'lodash.debounce';\n\n/**\n * A util function to wrap any action with lodash's `debounce` (https://lodash.com/docs/#debounce).\n * To use this util, wrap it in the util like so: debounceAction(onSearchBoxType.bind(this));\n *\n * By default, this util uses a default time of 300ms, and includes a default config of `{ leading: false }`.\n * These values can be overridden: debounceAction(this.onSearchBoxType.bind(this), { time: 100, config: { leading: true }});\n *\n *\n * @param {Function} action - The function that should be wrapped with `debounce`.\n * @param {Number} [time=300] - The number of milliseconds to wait.\n * @param {Object} [config={ leading: false }] - Any configuration for the debounce function.\n *\n * @returns {Function} A function wrapped in `debounce`.\n */\nexport function debounceAction(\n action,\n { time = 300, config = { leading: false } } = {},\n) {\n const configs = { ...config };\n return debounce(action, time, configs);\n}\n","import { useState, useEffect } from 'preact/hooks';\nimport PropTypes from 'prop-types';\n\n/**\n * Checker that return true if element is a form element\n *\n * @param {node} element to be checked\n *\n * @returns {boolean} isFormField\n */\nfunction isFormField(element) {\n if (element instanceof HTMLElement === false) return false;\n\n const name = element.nodeName.toLowerCase();\n const type = (element.getAttribute('type') || '').toLowerCase();\n return (\n name === 'select' ||\n name === 'textarea' ||\n (name === 'input' &&\n type !== 'submit' &&\n type !== 'reset' &&\n type !== 'checkbox' &&\n type !== 'radio') ||\n element.isContentEditable\n );\n}\n\n/**\n * Function to handle converting key presses to callback functions\n *\n * @param {KeyboardEvent} e Keyboard event\n * @param {String} keys special keys formatted in a string\n * @param {Array} chain array of past keys\n * @param {Object} shortcuts object containing callback functions\n *\n * @returns {Array} New chain\n */\nconst callShortcut = (e, keys, chain, shortcuts) => {\n const shortcut =\n chain && chain.length > 0\n ? shortcuts[`${chain.join('~')}~${e.code}`]\n : shortcuts[`${keys}${e.code}`] ||\n shortcuts[`${keys}${e.key.toLowerCase()}`];\n\n // if a valid shortcut is found call it and reset the chain\n if (shortcut) {\n shortcut(e);\n return [];\n }\n\n // if we have keys don't add to the chain\n if (keys || e.key === 'Shift') {\n return [];\n }\n\n return [...chain, e.code];\n};\n\n// Default options to be used if null\nconst defaultOptions = {\n timeout: 0, // The default is zero as we want no delays between keystrokes by default.\n};\n\n/**\n * hook that can be added to a component to listen\n * for keyboard presses\n *\n * @example\n * const shortcuts = {\n * 'ctrl+alt+KeyG': (e) => {\n * e.preventDefault();\n * alert('Control Alt G has been pressed');\n * },\n * 'KeyG~KeyH': (e) => {\n * e.preventDefault();\n * alert('G has been pressed quickly followed by H');\n * },\n * '?': (e) => {\n * setIsHelpVisible(true);\n * }\n * }\n *\n * useKeyboardShortcuts(shortcuts, someElementOrWindowObject, {timeout: 1500});\n *\n * @param {object} shortcuts List of keyboard shortcuts/event\n * @param {EventTarget} [eventTarget=window] An event target.\n * @param {object} [options = {}] An object for extra options\n *\n */\nexport function useKeyboardShortcuts(\n shortcuts,\n eventTarget = window,\n options = {},\n) {\n const [storedShortcuts] = useState(shortcuts);\n const [keyChain, setKeyChain] = useState([]);\n const [mergedOptions, setMergedOptions] = useState({\n ...defaultOptions,\n ...options,\n });\n\n // update mergedOptions if options prop changes\n useEffect(() => {\n const newOptions = {};\n if (typeof options.timeout === 'number')\n newOptions.timeout = options.timeout;\n setMergedOptions({ ...defaultOptions, ...newOptions });\n }, [options.timeout]);\n\n // clear key chain after timeout is reached\n useEffect(() => {\n if (keyChain.length <= 0) return;\n\n const timeout = window.setTimeout(() => {\n clearTimeout(timeout);\n setKeyChain([]);\n }, mergedOptions.timeout);\n\n return () => clearTimeout(timeout);\n }, [keyChain.length, mergedOptions.timeout]);\n\n // set up event listeners\n useEffect(() => {\n if (!storedShortcuts || Object.keys(storedShortcuts).length === 0) return;\n\n const keyEvent = (e) => {\n if (e.defaultPrevented) return;\n\n const ctrlKeyEntry = e.ctrlKey ? 'ctrl+' : '';\n const cmdKeyEntry = e.metaKey ? 'cmd+' : '';\n const altKeyEntry = e.altKey ? 'alt+' : '';\n const shiftKeyEntry = e.shiftKey ? 'shift+' : '';\n\n // We build the special keys string in an opinionated order to ensure consistency\n const keys = `${ctrlKeyEntry}${cmdKeyEntry}${altKeyEntry}${shiftKeyEntry}`;\n\n // If no special keys, except shift, are pressed and focus is inside a field return\n if (e.target instanceof Node && isFormField(e.target) && !keys) return;\n\n const newChain = callShortcut(e, keys, keyChain, storedShortcuts);\n\n // update keychain with latest chain\n setKeyChain(newChain);\n };\n\n eventTarget?.addEventListener('keydown', keyEvent);\n\n return () => eventTarget?.removeEventListener('keydown', keyEvent);\n }, [keyChain, storedShortcuts, eventTarget]);\n}\n\n/**\n * A component that can be added to a component to listen\n * for keyboard presses using the useKeyboardShortcuts hook\n *\n * @example\n * const shortcuts = {\n * 'ctrl+alt+KeyG': (e) => {\n * e.preventDefault();\n * alert('Control Alt G has been pressed')\n * }\n * }\n *\n * \n * \n *\n * @param {object} shortcuts List of keyboard shortcuts/event\n * @param {EventTarget} [eventTarget=window] An event target.\n * @param {object} [options = {}] An object for extra options\n *\n */\nexport function KeyboardShortcuts({ shortcuts, eventTarget, options }) {\n useKeyboardShortcuts(shortcuts, eventTarget, options);\n\n return null;\n}\n\nKeyboardShortcuts.propTypes = {\n shortcuts: PropTypes.object.isRequired,\n options: PropTypes.shape({\n timeout: PropTypes.number,\n }),\n eventTarget: PropTypes.oneOfType([\n PropTypes.instanceOf(Element),\n PropTypes.instanceOf(Window),\n ]),\n};\n\nKeyboardShortcuts.defaultProps = {\n shortcuts: {},\n options: {},\n eventTarget: window,\n};\n","import { addSnackbarItem } from '../Snackbar';\n\n/**\n * @file Manages logic to validate file uploads client-side. In general, the\n * validations work by looping over input form fields with a type of file and\n * checking the size and format of the files upload by the user.\n */\n\n/**\n * An object containing the top level MIME type as the key and the max file\n * size in MB for the value. To use a different value than these defaults,\n * simply add a data-max-file-mb attribute to the input form field with the\n * max file size in MB. If that attribute is found, it takes priority over these\n * defaults.\n *\n * @constant {Object.}\n */\nconst MAX_FILE_SIZE_MB = Object.freeze({\n image: 25,\n video: 50,\n});\n\n/**\n * Permitted file types using the top level MIME type (i.e. image for\n * image/png). To specify permitted file types, simply add a\n * data-permitted-file-types attribute to the input form field as an Array of\n * strings specifying the top level MIME types that are permitted.\n *\n * @constant {string[]}\n */\nconst PERMITTED_FILE_TYPES = ['image'];\n\n/**\n * The maximum length of the file name to prevent errors on the backend when a\n * file name is too long.\n *\n * @constant {number}\n */\nconst MAX_FILE_NAME_LENGTH = 250;\n\n/**\n * Adds error messages in the form of a div with red text.\n *\n * @param {string} msg - The error message to be displayed to the user\n *\n * @returns {HTMLElement} The error element that was added to the DOM\n */\nfunction addErrorMessage(msg) {\n if (top.addSnackbarItem) {\n // The Comment editor's context (MarkdownToolbar component) doesn't have\n // access to the Snackbar element in the DOM, so it needs to use `top`\n top.addSnackbarItem({\n message: msg,\n addCloseButton: true,\n });\n } else {\n // The Post editor (Toolbar component) doesn't have access to\n // `top.addSnackbarItem` so we need to check to ensure if it's undefined\n addSnackbarItem({\n message: msg,\n addCloseButton: true,\n });\n }\n}\n\n/**\n * Handles errors for files that are too large.\n *\n * @param {object} fileSizeErrorHandler - A custom function to be ran after the default error handling\n * @param {number} fileSizeMb - The size of the file in MB\n * @param {?number} maxFileSizeMb - The max file size limit in MB\n */\nfunction handleFileSizeError(fileSizeErrorHandler, fileSizeMb, maxFileSizeMb) {\n if (fileSizeErrorHandler) {\n fileSizeErrorHandler();\n } else {\n let errorMessage = `File size too large (${fileSizeMb} MB).`;\n\n // If a user uploads a file type that we haven't defined a max size limit for then maxFileSizeMb\n // could be NaN\n if (maxFileSizeMb >= 0) {\n errorMessage += ` The limit is ${maxFileSizeMb} MB.`;\n }\n\n addErrorMessage(errorMessage);\n }\n}\n\n/**\n * Handles errors for files that are not a valid format.\n *\n * @param {object} fileSizeErrorHandler - A custom function to be ran after the default error handling\n * @param {string} fileType - The top level file type (i.e. image for image/png)\n * @param {string[]} permittedFileTypes - The top level file types (i.e. image for image/png) that are permitted\n */\nfunction handleFileTypeError(\n fileTypeErrorHandler,\n fileType,\n permittedFileTypes,\n) {\n if (fileTypeErrorHandler) {\n fileTypeErrorHandler();\n } else {\n const fileTypeBracketed =\n fileType && fileType.length !== 0 ? ` (${fileType})` : '';\n const errorMessage = `Invalid file format${fileTypeBracketed}. Only ${permittedFileTypes.join(\n ', ',\n )} files are permitted.`;\n addErrorMessage(errorMessage);\n }\n}\n\n/**\n * Handles errors for files with names that are too long.\n *\n * @param {object} fileNameLengthErrorHandler - A custom function to be ran after the default error handling\n * @param {number} maxFileNameLength - The max number of characters permitted for a file name\n */\nfunction handleFileNameLengthError(\n fileNameLengthErrorHandler,\n maxFileNameLength,\n) {\n if (fileNameLengthErrorHandler) {\n fileNameLengthErrorHandler();\n } else {\n const errorMessage = `File name is too long. It can't be longer than ${maxFileNameLength} characters.`;\n addErrorMessage(errorMessage);\n }\n}\n\n/**\n * Validates the file size and handles the error if it's invalid.\n *\n * @external File\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/File File}\n *\n * @param {File} file - The file attached by the user\n * @param {string} fileType - The top level file type (i.e. image for image/png)\n * @param {HTMLElement} fileInput - An input form field with type of file\n *\n * @returns {Boolean} Returns false if the file is too big. Otherwise, returns true.\n */\nfunction validateFileSize(file, fileType, fileInput) {\n let { maxFileSizeMb } = fileInput.dataset;\n\n const { fileSizeErrorHandler } = fileInput.dataset;\n\n const fileSizeMb = (file.size / (1024 * 1024)).toFixed(2);\n maxFileSizeMb = Number(maxFileSizeMb || MAX_FILE_SIZE_MB[fileType]);\n\n const isValidFileSize = fileSizeMb <= maxFileSizeMb;\n\n if (!isValidFileSize) {\n handleFileSizeError(fileSizeErrorHandler, fileSizeMb, maxFileSizeMb);\n }\n\n return isValidFileSize;\n}\n\n/**\n * Validates the file type and handles the error if it's invalid.\n *\n * @external File\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/File File}\n *\n * @param {File} file - The file attached by the user\n * @param {string} fileType - The top level file type (i.e. image for image/png)\n * @param {HTMLElement} fileInput - An input form field with type of file\n *\n * @returns {Boolean} Returns false if the files is an invalid format. Otherwise, returns true.\n */\nfunction validateFileType(file, fileType, fileInput) {\n let { permittedFileTypes } = fileInput.dataset;\n\n if (permittedFileTypes) {\n permittedFileTypes = JSON.parse(permittedFileTypes);\n }\n\n permittedFileTypes = permittedFileTypes || PERMITTED_FILE_TYPES;\n\n const { fileTypeErrorHandler } = fileInput.dataset;\n\n const isValidFileType = permittedFileTypes.includes(fileType);\n\n if (!isValidFileType) {\n handleFileTypeError(fileTypeErrorHandler, fileType, permittedFileTypes);\n }\n\n return isValidFileType;\n}\n\n/**\n * Validates the length of the file name and handles the error if it's invalid.\n *\n * @external File\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/File File}\n *\n * @param {File} file - The file attached by the user\n * @param {HTMLElement} fileInput - An input form field with type of file\n *\n * @returns {Boolean} Returns false if the file name is too long. Otherwise, returns true.\n */\nfunction validateFileNameLength(file, fileInput) {\n let { maxFileNameLength } = fileInput.dataset;\n\n maxFileNameLength = Number(maxFileNameLength || MAX_FILE_NAME_LENGTH);\n\n const { fileNameLengthErrorHandler } = fileInput.dataset;\n\n const isValidFileNameLength = file.name.length <= maxFileNameLength;\n\n if (!isValidFileNameLength) {\n handleFileNameLengthError(fileNameLengthErrorHandler, maxFileNameLength);\n }\n\n return isValidFileNameLength;\n}\n\n/**\n * This is the core function to handle validations of uploaded files. It loops\n * through all the uploaded files for the given fileInput and checks the file\n * size, file format, and file name length. If a file fails a validation, the\n * error is handled.\n *\n * @param {HTMLElement} fileInput - An input form field with type of file\n *\n * @returns {Boolean} Returns false if any files failed validations. Otherwise, returns true.\n */\nfunction validateFileInput(fileInput) {\n let isValidFileInput = true;\n\n const files = Array.from(fileInput.files);\n\n for (let i = 0; i < files.length; i += 1) {\n const file = files[i];\n const fileType = file.type.split('/')[0];\n\n const isValidFileSize = validateFileSize(file, fileType, fileInput);\n\n if (!isValidFileSize) {\n isValidFileInput = false;\n break;\n }\n\n const isValidFileType = validateFileType(file, fileType, fileInput);\n\n if (!isValidFileType) {\n isValidFileInput = false;\n break;\n }\n\n const isValidFileNameLength = validateFileNameLength(file, fileInput);\n\n if (!isValidFileNameLength) {\n isValidFileInput = false;\n break;\n }\n }\n\n return isValidFileInput;\n}\n\n/**\n * This function is designed to be exported in areas where we are doing more\n * custom implementations of file uploading using Preact. It can then be used\n * in Preact event handlers. It loops through all file input fields on the DOM\n * and validates any attached files.\n *\n * @returns {Boolean} Returns false if any files failed validations. Otherwise, returns true.\n */\nexport function validateFileInputs() {\n let validFileInputs = true;\n const fileInputs = document.querySelectorAll('input[type=\"file\"]');\n\n for (let i = 0; i < fileInputs.length; i += 1) {\n const fileInput = fileInputs[i];\n const validFileInput = validateFileInput(fileInput);\n\n if (!validFileInput) {\n validFileInputs = false;\n break;\n }\n }\n\n return validFileInputs;\n}\n\n// This is written so that it works automagically by just including this pack\n// in a view.\nconst fileInputs = document.querySelectorAll('input[type=\"file\"]');\n\nfileInputs.forEach((fileInput) => {\n fileInput.addEventListener('change', () => {\n validateFileInput(fileInput);\n });\n});\n","import { h } from 'preact';\nimport PropTypes from 'prop-types';\nimport { defaultChildrenPropTypes } from '../common-prop-types';\nimport { Button } from '@crayons';\n\nexport const snackbarItemProps = {\n children: defaultChildrenPropTypes.isRequired,\n actions: PropTypes.arrayOf(\n PropTypes.shape({\n message: PropTypes.string.isRequired,\n handler: PropTypes.func.isRequired,\n lifespan: PropTypes.number.isRequired,\n }),\n ),\n};\n\nexport const SnackbarItem = ({ message, actions = [] }) => (\n
\n
\n {message}\n
\n
\n {actions.map(({ text, handler }) => (\n \n ))}\n
\n
\n);\n\nSnackbarItem.displayName = 'SnackbarItem';\n\nSnackbarItem.propTypes = snackbarItemProps.isRequired;\n","import PropTypes from 'prop-types';\nimport { h, Fragment } from 'preact';\nimport { useLayoutEffect, useRef, useCallback } from 'preact/hooks';\nimport { createFocusTrap } from 'focus-trap';\nimport { defaultChildrenPropTypes } from '../../common-prop-types';\nimport { KeyboardShortcuts } from './useKeyboardShortcuts';\n\n/**\n * Wrapper component to create a focus trap within the HTML element found by the given selector\n *\n * @example\n * import { FocusTrap } from \"shared/components/FocusTrap\";\n *\n * const ExampleComponent = ({ onClose }) => (\n * \n *
\n * \n *
\n *
\n * )\n *\n * @param {string} selector The CSS selector for the element where focus is to be trapped\n * @param {Array} children Child element(s) passed via composition\n * @param {Function} onDeactivate Callback function to be called when the focus trap is deactivated by navigation or Escape press\n * @param {boolean} clickOutsideDeactivates If true, the focus trap will deactivate when a user clicks outside of the trap area\n */\nexport const FocusTrap = ({\n selector,\n children,\n onDeactivate,\n clickOutsideDeactivates = false,\n document = window.document,\n}) => {\n const focusTrap = useRef(null);\n const deactivate = useCallback(() => onDeactivate(), [onDeactivate]);\n\n useLayoutEffect(() => {\n const currentLocationHref = document.location.href;\n const routeChangeObserver = new MutationObserver((mutations) => {\n const hasRouteChanged = mutations.some(\n () => currentLocationHref !== document.location.href,\n );\n\n // Ensure trap deactivates if user navigates from the page\n if (hasRouteChanged) {\n focusTrap.current?.deactivate();\n routeChangeObserver.disconnect();\n }\n });\n\n focusTrap.current = createFocusTrap(selector, {\n escapeDeactivates: false,\n clickOutsideDeactivates,\n onDeactivate: deactivate,\n document,\n });\n\n focusTrap.current.activate();\n routeChangeObserver.observe(document.querySelector('body'), {\n childList: true,\n });\n\n return () => {\n focusTrap.current.deactivate();\n routeChangeObserver.disconnect();\n };\n }, [clickOutsideDeactivates, selector, deactivate, document]);\n\n const shortcuts = {\n escape: onDeactivate,\n };\n\n return (\n \n {children}\n \n \n );\n};\n\nFocusTrap.defaultProps = {\n selector: '.crayons-modal',\n onDeactivate: () => {},\n};\n\nFocusTrap.propTypes = {\n selector: PropTypes.string,\n children: defaultChildrenPropTypes.isRequired,\n onDeactivate: PropTypes.func,\n};\n","import { h } from 'preact';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames/bind';\nimport { FocusTrap } from '../../shared/components/focusTrap';\nimport { defaultChildrenPropTypes } from '../../common-prop-types';\nimport { ButtonNew as Button } from '@crayons';\nimport CloseIcon from '@images/x.svg';\n\nexport const Modal = ({\n children,\n size,\n className,\n title,\n prompt,\n sheet,\n centered,\n noBackdrop,\n showHeader = true,\n sheetAlign = 'center',\n backdropDismissible = false,\n allowOverflow = false,\n onClose = () => {},\n focusTrapSelector = '.crayons-modal__box',\n document = window.document,\n}) => {\n const classes = classNames('crayons-modal', {\n [`crayons-modal--${size}`]: size && size !== 'medium',\n [`crayons-modal--${sheetAlign}`]: sheet && sheetAlign !== 'center',\n 'crayons-modal--sheet': sheet,\n 'crayons-modal--prompt': prompt,\n 'crayons-modal--centered': centered && prompt,\n 'crayons-modal--bg-dismissible': !noBackdrop && backdropDismissible,\n 'crayons-modal--overflow-visible': allowOverflow,\n [className]: className,\n });\n\n return (\n \n
\n \n {showHeader && (\n
\n

{title}

\n \n
\n )}\n
{children}
\n
\n {!noBackdrop && (\n \n )}\n \n \n );\n};\n\nModal.displayName = 'Modal';\n\nModal.propTypes = {\n children: defaultChildrenPropTypes.isRequired,\n className: PropTypes.string,\n title: PropTypes.string.isRequired,\n backdrop: PropTypes.bool,\n backdropDismissible: PropTypes.bool,\n prompt: PropTypes.bool,\n centered: PropTypes.bool,\n onClose: PropTypes.func,\n size: PropTypes.oneOf(['small', 'medium', 'large']),\n focusTrapSelector: PropTypes.string,\n sheet: PropTypes.bool,\n sheetAlign: PropTypes.oneOf(['center', 'left', 'right']),\n showHeader: PropTypes.bool,\n};\n","import { validateFileInputs } from '../packs/validateFileInputs';\n\nexport function previewArticle(payload, successCb, failureCb) {\n fetch('/articles/preview', {\n method: 'POST',\n headers: {\n Accept: 'application/json',\n 'X-CSRF-Token': window.csrfToken,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n article_body: payload,\n }),\n credentials: 'same-origin',\n })\n .then(async (response) => {\n const payload = await response.json();\n\n if (response.status !== 200) {\n throw payload;\n }\n\n return payload;\n })\n .then(successCb)\n .catch(failureCb);\n}\n\nexport function getArticle() {}\n\nfunction processPayload(payload) {\n const {\n /* eslint-disable no-unused-vars */\n previewShowing,\n helpShowing,\n previewResponse,\n helpHTML,\n imageManagementShowing,\n moreConfigShowing,\n errors,\n /* eslint-enable no-unused-vars */\n ...neededPayload\n } = payload;\n return neededPayload;\n}\n\nexport function submitArticle({ payload, onSuccess, onError }) {\n const method = payload.id ? 'PUT' : 'POST';\n const url = payload.id ? `/articles/${payload.id}` : '/articles';\n fetch(url, {\n method,\n headers: {\n Accept: 'application/json',\n 'X-CSRF-Token': window.csrfToken,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n article: processPayload(payload),\n }),\n credentials: 'same-origin',\n })\n .then((response) => response.json())\n .then((response) => {\n if (response.current_state_path) {\n onSuccess();\n window.location.replace(response.current_state_path);\n } else {\n onError(response);\n }\n })\n .catch(onError);\n}\n\nfunction generateUploadFormdata(payload) {\n const token = window.csrfToken;\n const formData = new FormData();\n formData.append('authenticity_token', token);\n\n Object.entries(payload.image).forEach(([_, value]) =>\n formData.append('image[]', value),\n );\n\n return formData;\n}\n\nexport function generateMainImage({ payload, successCb, failureCb, signal }) {\n fetch('/image_uploads', {\n method: 'POST',\n headers: {\n 'X-CSRF-Token': window.csrfToken,\n },\n body: generateUploadFormdata(payload),\n credentials: 'same-origin',\n signal,\n })\n .then((response) => response.json())\n .then((json) => {\n if (json.error) {\n throw new Error(json.error);\n }\n const { links } = json;\n const { image } = payload;\n return successCb({ links, image });\n })\n .catch((message) => failureCb(message));\n}\n\n/**\n * Processes images for upload.\n *\n * @param {FileList} images Images to be uploaded.\n * @param {Function} handleImageSuccess The handler that runs when the image is uploaded successfully.\n * @param {Function} handleImageFailure The handler that runs when the image upload fails.\n */\nexport function processImageUpload(\n images,\n handleImageUploading,\n handleImageSuccess,\n handleImageFailure,\n) {\n // Currently only one image is supported for upload.\n if (images.length > 0 && validateFileInputs()) {\n const payload = { image: images };\n\n handleImageUploading();\n generateMainImage({\n payload,\n successCb: handleImageSuccess,\n failureCb: handleImageFailure,\n });\n }\n}\n","import PropTypes from 'prop-types';\n\nexport const articleSnippetResultPropTypes = PropTypes.shape({\n body_text: PropTypes.arrayOf(PropTypes.string),\n});\n\nexport const articlePropTypes = PropTypes.shape({\n id: PropTypes.number.isRequired,\n title: PropTypes.string.isRequired,\n path: PropTypes.string.isRequired,\n cloudinary_video_url: PropTypes.string,\n video_duration_in_minutes: PropTypes.string,\n type_of: PropTypes.oneOf(['podcast_episodes']),\n class_name: PropTypes.oneOf(['PodcastEpisode', 'User', 'Article']),\n flare_tag: PropTypes.shape({\n name: PropTypes.string.isRequired,\n bg_color_hex: PropTypes.string,\n text_color_hex: PropTypes.string,\n }),\n tag_list: PropTypes.arrayOf(PropTypes.string),\n cached_tag_list_array: PropTypes.arrayOf(PropTypes.string),\n podcast: PropTypes.shape({\n slug: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n image_url: PropTypes.string.isRequired,\n }),\n user_id: PropTypes.number.isRequired,\n user: PropTypes.shape({\n username: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n }),\n organization: PropTypes.shape({\n name: PropTypes.string.isRequired,\n profile_image_90: PropTypes.string.isRequired,\n slug: PropTypes.string.isRequired,\n }),\n highlight: articleSnippetResultPropTypes,\n public_reactions_count: PropTypes.number,\n reactions_count: PropTypes.number,\n comments_count: PropTypes.number,\n reading_time: PropTypes.number,\n});\n","import { h, Component } from 'preact';\nimport PropTypes from 'prop-types';\nimport { SnackbarItem } from './SnackbarItem';\n\nlet snackbarItems = [];\n\nexport function addSnackbarItem(snackbarItem) {\n if (!Array.isArray(snackbarItem.actions)) {\n snackbarItem.actions = []; // eslint-disable-line no-param-reassign\n }\n\n snackbarItems.push(snackbarItem);\n}\n\nexport class Snackbar extends Component {\n state = {\n snacks: [],\n };\n\n pollingId;\n\n paused = false;\n\n pauseLifespan;\n\n resumeLifespan;\n\n componentDidMount() {\n this.initializePolling();\n }\n\n componentDidUpdate() {\n if (!this.pauseLifespan) {\n this.pauseLifespan = (_event) => {\n this.paused = true;\n };\n\n this.resumeLifespan = (event) => {\n event.stopPropagation();\n this.paused = false;\n };\n\n this.element.addEventListener('mouseover', this.pauseLifespan);\n this.element.addEventListener('mouseout', this.resumeLifespan, true);\n }\n }\n\n componentWillUnmount() {\n if (this.element) {\n this.element.removeEventListener('mouseover', this.pauseLifespan);\n this.element.addEventListener('mouseout', this.resumeLifespan);\n }\n }\n\n initializePolling() {\n const { pollingTime, lifespan } = this.props;\n\n this.pollingId = setInterval(() => {\n if (snackbarItems.length > 0) {\n // Need to add the lifespan to snackbar items because each second that goes by, we\n // decrease the lifespan until it is no more.\n const newSnacks = snackbarItems.map((snackbarItem) => ({\n ...snackbarItem,\n lifespan,\n }));\n\n snackbarItems = [];\n\n this.updateSnackbarItems(newSnacks);\n\n // Start the lifespan countdowns for each new snackbar item.\n newSnacks.forEach((snack) => {\n // eslint-disable-next-line no-param-reassign\n snack.lifespanTimeoutId = setTimeout(() => {\n this.decreaseLifespan(snack);\n }, 1000);\n\n if (snack.addCloseButton) {\n // Adds an optional close button if addDefaultACtion is true.\n snack.actions.push({\n text: 'Dismiss',\n handler: () => {\n this.setState((prevState) => {\n return {\n prevState,\n snacks: prevState.snacks.filter(\n (potentialSnackToFilterOut) =>\n potentialSnackToFilterOut !== snack,\n ),\n };\n });\n },\n });\n }\n });\n }\n }, pollingTime);\n }\n\n updateSnackbarItems(newSnacks) {\n this.setState((prevState) => {\n let updatedSnacks = [...prevState.snacks, ...newSnacks];\n\n if (updatedSnacks.length > 3) {\n const snacksToBeDiscarded = updatedSnacks.slice(\n 0,\n updatedSnacks.length - 3,\n );\n\n snacksToBeDiscarded.forEach(({ lifespanTimeoutId }) => {\n clearTimeout(lifespanTimeoutId);\n });\n\n updatedSnacks = updatedSnacks.slice(updatedSnacks.length - 3);\n }\n\n return { ...prevState, snacks: updatedSnacks };\n });\n }\n\n decreaseLifespan(snack) {\n /* eslint-disable no-param-reassign */\n if (!this.paused && snack.lifespan === 0) {\n clearTimeout(snack.lifespanTimeoutId);\n\n this.setState((prevState) => {\n const snacks = prevState.snacks.filter(\n (currentSnack) => currentSnack !== snack,\n );\n\n return {\n ...prevState,\n snacks,\n };\n });\n\n return;\n }\n\n if (!this.paused) {\n snack.lifespan -= 1;\n }\n\n snack.lifespanTimeoutId = setTimeout(() => {\n this.decreaseLifespan(snack);\n }, 1000);\n /* eslint-enable no-param-reassign */\n }\n\n render() {\n const { snacks } = this.state;\n\n return (\n 0 ? 'crayons-snackbar' : 'hidden'}\n ref={(element) => {\n this.element = element;\n }}\n >\n {snacks.map(({ message, actions = [] }, index) => (\n \n ))}\n \n );\n }\n}\n\nSnackbar.defaultProps = {\n lifespan: 5,\n pollingTime: 300,\n};\n\nSnackbar.displayName = 'Snackbar';\n\nSnackbar.propTypes = {\n lifespan: PropTypes.number,\n pollingTime: PropTypes.number,\n};\n","import { h } from 'preact';\nimport PropTypes from 'prop-types';\nimport { Icon, ButtonNew as Button } from '@crayons';\nimport { Close } from '@images/x.svg';\n\n/**\n * Responsible for the layout of a selected item in the crayons autocomplete and multi input components\n *\n * @param {string} name The selected item name\n * @param {string} buttonVariant Optional button variant\n * @param {string} className Optional classname for selected item\n * @param {Function} onEdit Callback for edit click on the name of the selected item\n * @param {Function} onDeselect Callback for deselect click on the close icon\n */\nexport const DefaultSelectionTemplate = ({\n name,\n enableValidation = false,\n valid = true,\n buttonVariant = 'default',\n className = 'c-autocomplete--multi__selected',\n onEdit,\n onDeselect,\n}) => {\n const conditionalAttributes = () => {\n if (enableValidation) {\n return { 'aria-describedby': `invalid-item-${name}` };\n }\n return {};\n };\n\n return (\n <>\n {enableValidation && (\n \n {!valid ? 'Invalid entry' : ''}\n \n )}\n
\n \n {name}\n \n \n \n \n
\n \n );\n};\n\nDefaultSelectionTemplate.propTypes = {\n name: PropTypes.string.isRequired,\n buttonVariant: PropTypes.string,\n className: PropTypes.string,\n onEdit: PropTypes.func.isRequired,\n onDeselect: PropTypes.func.isRequired,\n};\n","/* eslint-disable jsx-a11y/interactive-supports-focus, jsx-a11y/role-has-required-aria-props */\n// Disabled due to the linter being out of date for combobox role: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/789\nimport { h, Fragment } from 'preact';\nimport PropTypes from 'prop-types';\nimport { useEffect, useRef, useReducer } from 'preact/hooks';\nimport { DefaultSelectionTemplate } from '../../shared/components/defaultSelectionTemplate';\n\nconst KEYS = {\n UP: 'ArrowUp',\n DOWN: 'ArrowDown',\n ENTER: 'Enter',\n ESCAPE: 'Escape',\n DELETE: 'Backspace',\n COMMA: ',',\n SPACE: ' ',\n};\n\nconst ALLOWED_CHARS_REGEX = /([a-zA-Z0-9])/;\nconst PLACEHOLDER_SELECTIONS_MADE = 'Add another...';\n\nconst reducer = (state, action) => {\n switch (action.type) {\n case 'setSelectedItems':\n return {\n ...state,\n selectedItems: action.payload.selectedItems,\n suggestions: action.payload.suggestions ?? state.suggestions,\n activeDescendentIndex: null,\n };\n case 'setSuggestions':\n return {\n ...state,\n suggestions: action.payload,\n activeDescendentIndex: null,\n };\n case 'updateEditState':\n return {\n ...state,\n editValue: action.payload.editValue,\n inputPosition: action.payload.inputPosition,\n };\n case 'setActiveDescendentIndex':\n return { ...state, activeDescendentIndex: action.payload };\n case 'setIgnoreBlur':\n return { ...state, ignoreBlur: action.payload };\n case 'setShowMaxSelectionsReached':\n return { ...state, showMaxSelectionsReached: action.payload };\n default:\n return state;\n }\n};\n\n/**\n * Component allowing users to search and select multiple values\n *\n * @param {Object} props\n * @param {string} props.labelText The text for the input's label\n * @param {boolean} props.showLabel Whether the label text should be visible or hidden (for assistive tech users only)\n * @param {Function} props.fetchSuggestions Callback function which accepts the search term string and returns an array of suggestions\n * @param {Array} props.defaultValue Array of items which should be selected by default\n * @param {Array} props.staticSuggestions Array of items which should be suggested if no search term has been entered yet\n * @param {string} props.staticSuggestionsHeading Optional heading to display when static suggestions are rendered\n * @param {boolean} props.border Whether to show a bordered input\n * @param {string} props.placeholder Input placeholder text\n * @param {string} props.inputId ID to be applied to the input element\n * @param {number} props.maxSelections Optional maximum number of allowed selections\n * @param {Function} props.onSelectionsChanged Callback for when selections are added or removed\n * @param {Function} props.onFocus Callback for when the component receives focus\n * @param {boolean} props.allowUserDefinedSelections Whether a user can create new selections other than the defined suggestions\n * @param {Function} props.SuggestionTemplate Optional Preact component to render suggestion items\n * @param {Function} props.SelectionTemplate Optional Preact component to render selected items\n */\nexport const MultiSelectAutocomplete = ({\n labelText,\n showLabel = true,\n fetchSuggestions,\n defaultValue = [],\n staticSuggestions = [],\n staticSuggestionsHeading,\n border = true,\n placeholder = 'Add...',\n inputId,\n maxSelections,\n onSelectionsChanged,\n onFocus,\n allowUserDefinedSelections = false,\n SuggestionTemplate,\n SelectionTemplate = DefaultSelectionTemplate,\n}) => {\n const [state, dispatch] = useReducer(reducer, {\n suggestions: [],\n selectedItems: defaultValue,\n inputPosition: null,\n editValue: null,\n activeDescendentIndex: null,\n ignoreBlur: false,\n showMaxSelectionsReached: false,\n });\n\n const {\n selectedItems,\n suggestions,\n inputPosition,\n editValue,\n activeDescendentIndex,\n ignoreBlur,\n showMaxSelectionsReached,\n } = state;\n\n const inputRef = useRef(null);\n const inputSizerRef = useRef(null);\n const selectedItemsRef = useRef(null);\n const popoverRef = useRef(null);\n\n const allowSelections =\n !maxSelections || selectedItems.length < maxSelections;\n\n useEffect(() => {\n if (defaultValue.length > 0) {\n dispatch({\n type: 'setSelectedItems',\n payload: {\n selectedItems: defaultValue,\n },\n });\n }\n }, [defaultValue]);\n\n const handleInputBlur = () => {\n dispatch({ type: 'setShowMaxSelectionsReached', payload: false });\n\n const {\n current: { value: currentValue },\n } = inputRef;\n\n // The input will blur when user selects an option from the dropdown via mouse click. The ignoreBlur boolean lets us know we can ignore this event.\n if (!ignoreBlur && allowSelections && currentValue !== '') {\n selectByText({ textValue: currentValue, keepSelecting: false });\n return;\n }\n if (!ignoreBlur) {\n // Clear the suggestions if a genuine blur event\n dispatch({ type: 'setSuggestions', payload: [] });\n }\n exitEditState({ keepSelecting: false });\n dispatch({ type: 'setIgnoreBlur', payload: false });\n };\n\n useEffect(() => {\n // editValue defaults to null when component is first rendered.\n // This ensures we do not autofocus the input before the user has started interacting with the component.\n if (editValue === null) {\n return;\n }\n\n const { current: input } = inputRef;\n if (input && inputPosition !== null) {\n // Entering 'edit' mode\n resizeInputToContentSize();\n\n input.value = editValue;\n const { length: cursorPosition } = editValue;\n\n input.focus();\n input.setSelectionRange(cursorPosition, cursorPosition);\n\n // Trigger the input event to make sure suggestion UI updates correctly\n const changeEvent = new Event('input');\n input.dispatchEvent(changeEvent);\n }\n }, [inputPosition, editValue]);\n\n useEffect(() => {\n if (activeDescendentIndex !== null) {\n const { current: popover } = popoverRef;\n const activeItem = popover?.querySelector('[aria-selected=\"true\"]');\n if (!popover || !activeItem) {\n return;\n }\n\n // Make sure that the active item is scrolled into view, if need be\n const { offsetHeight, offsetTop } = activeItem;\n const { offsetHeight: popoverOffsetHeight, scrollTop } = popover;\n\n const isAbove = offsetTop < scrollTop;\n const isBelow =\n offsetTop + offsetHeight > scrollTop + popoverOffsetHeight;\n\n if (isAbove) {\n popover.scrollTo(0, offsetTop);\n } else if (isBelow) {\n popover.scrollTo(0, offsetTop - popoverOffsetHeight + offsetHeight);\n }\n }\n }, [activeDescendentIndex]);\n\n const selectByText = ({\n textValue,\n nextInputValue = '',\n keepSelecting = true,\n }) => {\n const matchingSuggestion = suggestions.find(\n (suggestion) => suggestion.name === textValue,\n );\n\n if (matchingSuggestion) {\n selectItem({\n selectedItem: matchingSuggestion,\n nextInputValue,\n keepSelecting,\n });\n return;\n }\n\n // If we allow user's own input as a selection, fallback to that\n if (allowUserDefinedSelections) {\n selectItem({\n selectedItem: { name: textValue },\n nextInputValue,\n keepSelecting,\n });\n return;\n }\n\n // If we couldn't select any valid input, and search is terminated, clear the input\n if (!keepSelecting) {\n inputRef.current.value = '';\n dispatch('setSuggestions', { payload: [] });\n }\n };\n\n const enterEditState = (editItem, editItemIndex) => {\n inputSizerRef.current.innerText = editItem.name;\n deselectItem(editItem);\n\n dispatch({\n type: 'updateEditState',\n payload: {\n editValue: editItem.name,\n inputPosition: editItemIndex,\n },\n });\n };\n\n const exitEditState = ({ nextInputValue = '', keepSelecting = true }) => {\n // Reset 'edit mode' input resizing\n inputRef.current?.style?.removeProperty('width');\n inputSizerRef.current.innerText = nextInputValue;\n\n dispatch({\n type: 'updateEditState',\n payload: {\n editValue: nextInputValue,\n inputPosition: nextInputValue === '' ? null : inputPosition + 1,\n },\n });\n\n // Blurring away while clearing the input\n if (!keepSelecting && nextInputValue === '') {\n inputRef.current.value = '';\n }\n };\n\n const resizeInputToContentSize = () => {\n const { current: input } = inputRef;\n\n if (input) {\n input.style.width = `${inputSizerRef.current.clientWidth}px`;\n }\n };\n\n const handleAutocompleteStart = () => {\n // Only show static suggestions when not in edit mode\n if (inputPosition !== null) {\n return;\n }\n\n // If we've already reached max selections, show the message rather than static suggestions\n if (!allowSelections) {\n dispatch({ type: 'setShowMaxSelectionsReached', payload: true });\n return;\n }\n\n // If we have static suggestions, and no search term, show the static suggestions\n if (staticSuggestions.length > 0 && inputRef.current?.value === '') {\n dispatch({\n type: 'setSuggestions',\n payload: staticSuggestions.filter(\n (item) =>\n !selectedItems.some(\n (selectedItem) => selectedItem.name === item.name,\n ),\n ),\n });\n }\n };\n\n const handleInputChange = async ({ target: { value } }) => {\n // When the input appears inline in \"edit\" mode, we need to dynamically calculate the width to ensure it occupies the right space\n // (an input cannot resize based on its text content). We use a hidden to track the size.\n inputSizerRef.current.innerText = value;\n\n if (inputPosition !== null) {\n resizeInputToContentSize();\n }\n\n // If max selections have already been reached, no need to fetch further suggestions\n if (!allowSelections) {\n return;\n }\n\n if (value === '') {\n dispatch({\n type: 'setSuggestions',\n payload: staticSuggestions.filter(\n (item) =>\n !selectedItems.some(\n (selectedItem) => selectedItem.name === item.name,\n ),\n ),\n });\n return;\n }\n\n const results = await fetchSuggestions(value);\n\n // It could be that while waiting on the network fetch, the user has already made a selection or otherwise cleared the input\n if (inputRef.current.value === '') {\n return;\n }\n\n // If no results, and user-generated selections are allowed, display current search term as an option\n if (allowUserDefinedSelections && results.length === 0 && value !== '') {\n results.push({ name: value });\n }\n\n dispatch({\n type: 'setSuggestions',\n payload: results.filter(\n (item) =>\n !selectedItems.some(\n (selectedItem) => selectedItem.name === item.name,\n ),\n ),\n });\n };\n\n const clearInput = () => {\n inputRef.current.value = '';\n dispatch({ type: 'setSuggestions', payload: [] });\n };\n\n const handleKeyDown = (e) => {\n const { selectionStart, value: currentValue } = inputRef.current;\n\n switch (e.key) {\n case KEYS.DOWN:\n e.preventDefault();\n\n if (\n activeDescendentIndex !== null &&\n activeDescendentIndex < suggestions.length - 1\n ) {\n dispatch({\n type: 'setActiveDescendentIndex',\n payload: activeDescendentIndex + 1,\n });\n } else {\n dispatch({ type: 'setActiveDescendentIndex', payload: 0 });\n }\n break;\n case KEYS.UP:\n e.preventDefault();\n\n dispatch({\n type: 'setActiveDescendentIndex',\n payload:\n activeDescendentIndex >= 1\n ? activeDescendentIndex - 1\n : suggestions.length - 1,\n });\n\n break;\n case KEYS.ENTER:\n e.preventDefault();\n if (activeDescendentIndex !== null) {\n selectItem({ selectedItem: suggestions[activeDescendentIndex] });\n }\n break;\n case KEYS.ESCAPE:\n e.preventDefault();\n // Clear the input and suggestions\n clearInput();\n break;\n case KEYS.COMMA:\n case KEYS.SPACE:\n e.preventDefault();\n // Accept whatever is in the input before the comma or space.\n // If any text remains after the comma or space, the edit will continue separately\n if (currentValue !== '' && allowSelections) {\n selectByText({\n textValue: currentValue.slice(0, selectionStart),\n nextInputValue: currentValue.slice(selectionStart),\n });\n }\n break;\n case KEYS.DELETE:\n if (currentValue === '') {\n e.preventDefault();\n editPreviousSelectionIfExists();\n }\n break;\n default:\n if (!ALLOWED_CHARS_REGEX.test(e.key)) {\n e.preventDefault();\n }\n }\n };\n\n // If there is a previous selection, then pop it into edit mode\n const editPreviousSelectionIfExists = () => {\n if (selectedItems.length > 0 && inputPosition !== 0) {\n const nextEditIndex =\n inputPosition !== null ? inputPosition - 1 : selectedItems.length - 1;\n\n const item = selectedItems[nextEditIndex];\n deselectItem(item);\n enterEditState(item, nextEditIndex);\n }\n };\n\n const getEmptyInputSuggestions = ({ currentSelections = selectedItems }) => {\n if (staticSuggestions.length > 0) {\n return staticSuggestions.filter(\n (suggestion) =>\n !currentSelections.some(\n (selection) => selection.name === suggestion.name,\n ),\n );\n }\n\n return [];\n };\n\n const selectItem = ({\n selectedItem,\n nextInputValue = '',\n keepSelecting = true,\n }) => {\n // If a user has manually typed an item already selected, reset\n if (selectedItems.some((item) => item.name === selectedItem.name)) {\n clearInput();\n return;\n }\n\n // If an item was edited, we want to keep it in the same position in the list\n const insertIndex =\n inputPosition !== null ? inputPosition : selectedItems.length;\n const newSelections = [\n ...selectedItems.slice(0, insertIndex),\n selectedItem,\n ...selectedItems.slice(insertIndex),\n ];\n\n // We update the hidden selected items list, so additions are announced to screen reader users\n const listItem = document.createElement('li');\n listItem.innerText = selectedItem.name;\n selectedItemsRef.current.appendChild(listItem);\n\n exitEditState({ nextInputValue, keepSelecting });\n\n dispatch({\n type: 'setSelectedItems',\n payload: {\n selectedItems: newSelections,\n suggestions: keepSelecting\n ? getEmptyInputSuggestions({\n currentSelections: newSelections,\n })\n : [],\n },\n });\n\n onSelectionsChanged?.(newSelections);\n\n // Clear the text input\n const { current: input } = inputRef;\n input.value = nextInputValue;\n\n if (keepSelecting) {\n dispatch({\n type: 'setShowMaxSelectionsReached',\n payload: maxSelections && newSelections.length >= maxSelections,\n });\n\n // setTimeout is used with no delay here to make sure this focus event is executed in the next event cycle.\n // selectItem() happens on mousedown rather than click, because mousedown is handled before the blur event, and we\n // want to ignore some blur events (i.e. when input blurs because user has clicked a dropdown option).\n // By using setTimeout, we make sure that the normal blur event is handled before we try to refocus the input.\n setTimeout(() => {\n input.focus();\n });\n }\n };\n\n const deselectItem = (deselectedItem) => {\n const newSelections = selectedItems.filter(\n (item) => item.name !== deselectedItem.name,\n );\n dispatch({\n type: 'setSelectedItems',\n payload: {\n selectedItems: newSelections,\n suggestions,\n },\n });\n\n dispatch({\n type: 'setShowMaxSelectionsReached',\n payload: maxSelections && newSelections.length >= maxSelections,\n });\n\n onSelectionsChanged?.(newSelections);\n\n // We also update the hidden selected items list, so removals are announced to screen reader users\n selectedItemsRef.current.querySelectorAll('li').forEach((selectionNode) => {\n if (selectionNode.innerText === deselectedItem.name) {\n selectionNode.remove();\n }\n });\n };\n\n const allSelectedItemElements = selectedItems.map((item, index) => {\n // When we are in \"edit mode\" we visually display the input between the other selections\n const defaultPosition = index + 1;\n const appearsBeforeInput = inputPosition === null || index < inputPosition;\n const position = appearsBeforeInput ? defaultPosition : defaultPosition + 1;\n\n const { name: displayName } = item;\n return (\n \n enterEditState(item, index)}\n onDeselect={() => deselectItem(item)}\n />\n \n );\n });\n\n const selectionsPlaceholder =\n selectedItems.length > 0 ? PLACEHOLDER_SELECTIONS_MADE : placeholder;\n\n const inputPlaceholder = allowSelections ? selectionsPlaceholder : null;\n\n return (\n \n \n \n {labelText}\n \n \n {maxSelections ? `Maximum ${maxSelections} selections` : ''}\n \n\n {/* A visually hidden list provides confirmation messages to screen reader users as an item is selected or removed */}\n
\n

Selected items:

\n \n
\n\n
\n {/* disabled as the inner input forms the tab stop (this click handler ensures _any_ click on the wrapper focuses the input which may be less wide) */}\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\n 0}\n aria-owns=\"listbox1\"\n className={`c-autocomplete--multi__wrapper${\n border ? '-border crayons-textfield' : ' border-none p-0'\n } flex items-center cursor-text`}\n onClick={(event) => {\n // Stopping propagation here so that clicks on the 'x' close button\n // don't appear to be \"outside\" of any container (eg, dropdown)\n event.stopPropagation();\n inputRef.current?.focus();\n }}\n >\n
    \n {allSelectedItemElements}\n\n \n {\n onFocus?.(e);\n handleAutocompleteStart();\n }}\n placeholder={inputPosition === null ? inputPlaceholder : null}\n />\n \n
\n
\n {showMaxSelectionsReached ? (\n
\n Only {maxSelections} selections allowed\n
\n ) : null}\n {suggestions.length > 0 && allowSelections ? (\n
\n {inputRef.current?.value === '' ? staticSuggestionsHeading : null}\n \n {suggestions.map((suggestion, index) => {\n const { name: suggestionDisplayName } = suggestion;\n return (\n {\n selectItem({ selectedItem: suggestion });\n dispatch({ type: 'setIgnoreBlur', payload: true });\n }}\n >\n {SuggestionTemplate ? (\n \n ) : (\n suggestionDisplayName\n )}\n \n );\n })}\n \n
\n ) : null}\n \n
\n );\n};\n\nconst optionPropType = PropTypes.shape({ name: PropTypes.string });\n\nMultiSelectAutocomplete.propTypes = {\n labelText: PropTypes.string.isRequired,\n showLabel: PropTypes.bool,\n fetchSuggestions: PropTypes.func.isRequired,\n defaultValue: PropTypes.arrayOf(optionPropType),\n staticSuggestions: PropTypes.arrayOf(optionPropType),\n staticSuggestionsHeading: PropTypes.oneOfType([\n PropTypes.element,\n PropTypes.string,\n ]),\n border: PropTypes.bool,\n placeholder: PropTypes.string,\n inputId: PropTypes.string,\n maxSelections: PropTypes.number,\n onSelectionsChanged: PropTypes.func,\n onFocus: PropTypes.func,\n SuggestionTemplate: PropTypes.func,\n SelectionTemplate: PropTypes.func,\n};\n","export * from './Button';\n","import { h } from 'preact';\n\nexport const Spinner = () => (\n \n \n \n);\n","import { h } from 'preact';\nimport { useState } from 'preact/hooks';\nimport PropTypes from 'prop-types';\nimport { defaultChildrenPropTypes } from '../../common-prop-types';\n\nfunction getAdditionalClassNames({\n variant,\n className,\n contentType,\n size,\n inverted,\n disabled,\n tooltip,\n}) {\n let additionalClassNames = '';\n\n if (variant && variant.length > 0 && variant !== 'primary') {\n additionalClassNames += ` crayons-btn--${variant}`;\n }\n\n if (size && size.length > 0 && size !== 'default') {\n additionalClassNames += ` crayons-btn--${size}`;\n }\n\n if (contentType && contentType.length > 0 && contentType !== 'text') {\n additionalClassNames += ` crayons-btn--${contentType}`;\n }\n\n if (disabled) {\n additionalClassNames += ' crayons-btn--disabled';\n }\n\n if (inverted) {\n additionalClassNames += ' crayons-btn--inverted';\n }\n\n if (className && className.length > 0) {\n additionalClassNames += ` ${className}`;\n }\n\n if (tooltip) {\n additionalClassNames += ` crayons-tooltip__activator`;\n }\n\n return additionalClassNames;\n}\n\nexport const Button = (props) => {\n const {\n children,\n variant = 'primary',\n tagName,\n inverted,\n contentType,\n size,\n className,\n icon,\n url,\n buttonType,\n disabled,\n onClick,\n onMouseOver,\n onMouseOut,\n onFocus,\n onBlur,\n onKeyUp,\n tabIndex,\n title,\n tooltip,\n ...restOfProps\n } = props;\n\n const [suppressTooltip, setSuppressTooltip] = useState(false);\n\n const handleKeyUp = (event) => {\n onKeyUp?.(event);\n if (!tooltip) {\n return;\n }\n setSuppressTooltip(event.key === 'Escape');\n };\n\n const ComponentName = tagName;\n const Icon = icon;\n const otherProps =\n tagName === 'button'\n ? { type: buttonType, disabled }\n : { href: disabled ? undefined : url };\n\n return (\n \n {contentType !== 'text' && contentType !== 'icon-right' && Icon && (\n \n )}\n {(contentType === 'text' ||\n contentType === 'icon-left' ||\n contentType === 'icon-right') &&\n children}\n {contentType !== 'text' && contentType === 'icon-right' && Icon && (\n \n )}\n {tooltip ? (\n \n {tooltip}\n
\n ) : null}\n \n );\n};\n\nButton.displayName = 'Button';\n\nButton.defaultProps = {\n className: undefined,\n icon: undefined,\n url: undefined,\n buttonType: 'button',\n disabled: false,\n inverted: false,\n onClick: undefined,\n onMouseOver: undefined,\n onMouseOut: undefined,\n onFocus: undefined,\n onBlur: undefined,\n tabIndex: undefined,\n title: undefined,\n tagName: 'button',\n size: 'default',\n contentType: 'text',\n variant: 'primary',\n};\n\nButton.propTypes = {\n children: defaultChildrenPropTypes,\n variant: PropTypes.oneOf([\n 'primary',\n 'secondary',\n 'outlined',\n 'danger',\n 'ghost',\n 'ghost-brand',\n 'ghost-success',\n 'ghost-warning',\n 'ghost-danger',\n ]),\n contentType: PropTypes.oneOf([\n 'text',\n 'icon-left',\n 'icon-right',\n 'icon',\n 'icon-rounded',\n ]).isRequired,\n inverted: PropTypes.bool,\n tagName: PropTypes.oneOf(['a', 'button']).isRequired,\n className: PropTypes.string,\n icon: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n url: PropTypes.string,\n buttonType: PropTypes.string,\n disabled: PropTypes.bool,\n size: PropTypes.oneOf(['default', 's', 'l', 'xl']).isRequired,\n onClick: PropTypes.func,\n onMouseOver: PropTypes.func,\n onMouseOut: PropTypes.func,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n tabIndex: PropTypes.number,\n title: PropTypes.string,\n tooltip: PropTypes.node,\n};\n","import { h } from 'preact';\nimport PropTypes from 'prop-types';\n\n/**\n * Component used to display user details in the Autocomplete dropdown\n *\n * @param {object} props\n * @param {string} props.name The user's name\n * @param {string} props.profile_image_90 The src of the user's profile image\n * @param {string} props.username The user's username\n */\nexport const UserListItemContent = ({ name, profile_image_90, username }) => (\n
\n \n \"\"\n \n\n
\n

{name}

\n

{`@${username}`}

\n
\n
\n);\n\nUserListItemContent.propTypes = {\n name: PropTypes.string.isRequired,\n username: PropTypes.string.isRequired,\n profile_image_90: PropTypes.string.isRequired,\n};\n","import { h } from 'preact';\nimport { useRef, useLayoutEffect, useReducer, useEffect } from 'preact/hooks';\nimport { forwardRef, createPortal } from 'preact/compat';\nimport { UserListItemContent } from './UserListItemContent';\nimport { useMediaQuery, BREAKPOINTS } from '@components/useMediaQuery';\nimport { isInViewport } from '@utilities/viewport';\n\nimport {\n useTextAreaAutoResize,\n getAutocompleteWordData,\n getCursorXY,\n} from '@utilities/textAreaUtils';\n\n// Used to ensure dropdown appears just below search text\nconst DROPDOWN_VERTICAL_OFFSET = '1.5rem';\nconst EMPTY_STATE_MESSAGE = 'No results found';\nconst MINIMUM_SEARCH_CHARS = 2;\n\nconst KEYS = {\n UP: 'ArrowUp',\n DOWN: 'ArrowDown',\n ENTER: 'Enter',\n ESCAPE: 'Escape',\n};\n\n/**\n * Helper function to copy all styles and attributes from the original textarea to the new autocomplete one\n *\n * @param {object} options\n * @param {element} options.originalTextArea The textarea DOM element that should be replaced/removed\n * @param {element} options.newTextArea The textarea DOM element containing the autocomplete functionality. It will receive all attributes and styles of the original node.\n */\nconst replaceTextArea = ({ originalTextArea, newTextArea }) => {\n const { attributes } = originalTextArea;\n const { cssText } = document.defaultView.getComputedStyle(\n originalTextArea,\n '',\n );\n\n // Make sure all attributes are copied over\n Object.keys(attributes).forEach((attributeKey) => {\n newTextArea.setAttribute(\n attributes[attributeKey].name,\n attributes[attributeKey].value,\n );\n });\n\n // Make sure all styles are copied over\n newTextArea.style.cssText = cssText;\n // Make sure no transition replays when the new textarea is mounted\n newTextArea.style.transition = 'none';\n // Copy any initial value\n newTextArea.value = originalTextArea.value;\n\n // We need to manually remove the original element, as Preact's diffing algorithm won't replace it in render\n originalTextArea.remove();\n};\n\n/**\n * Helper function to merge any additional ref passed to the textArea with the ref used internally by this component.\n *\n * @param {Array} refs Array of all references\n */\nconst mergeInputRefs = (refs) => (value) => {\n refs.forEach((ref) => {\n if (ref) {\n ref.current = value;\n }\n });\n};\n\nconst reducer = (state, action) => {\n switch (action.type) {\n case 'setIsComboboxMode':\n return { ...state, isComboboxMode: action.payload };\n case 'setSuggestions':\n return { ...state, suggestions: action.payload };\n case 'setDropdownPositionPoints':\n return { ...state, dropdownPositionPoints: action.payload };\n case 'setActiveDescendentIndex':\n return { ...state, activeDescendentIndex: action.payload };\n case 'setSuppressPopover':\n return { ...state, suppressPopover: action.payload };\n case 'setEmptyStateMessage':\n return { ...state, emptyStateMessage: action.payload };\n case 'setIgnoreBlur':\n return { ...state, ignoreBlur: action.payload };\n case 'exitComboboxMode':\n return {\n ...state,\n suggestions: [],\n activeDescendentIndex: null,\n isComboboxMode: false,\n };\n\n default:\n return state;\n }\n};\n\n/**\n * Renders a textarea with enhanced autocomplete functionality.\n * Autocomplete searching will start when user types the given trigger character, with suggestions fetched via fetchSuggestions callback.\n * Can optionally replace an existing textarea, passed as the replaceElement prop.\n */\nexport const AutocompleteTriggerTextArea = forwardRef(\n (\n {\n id,\n triggerCharacter,\n autoResize = false,\n onChange,\n onBlur,\n fetchSuggestions,\n searchInstructionsMessage,\n maxSuggestions,\n replaceElement,\n ...inputProps\n },\n forwardedRef,\n ) => {\n const [state, dispatch] = useReducer(reducer, {\n isComboboxMode: false,\n suggestions: [],\n dropdownPositionPoints: {\n x: 0,\n y: 0,\n },\n activeDescendentIndex: null,\n suppressPopover: false,\n emptyStateMessage: searchInstructionsMessage,\n ignoreBlur: false,\n });\n\n const {\n isComboboxMode,\n suggestions,\n dropdownPositionPoints,\n activeDescendentIndex,\n suppressPopover,\n emptyStateMessage,\n ignoreBlur,\n } = state;\n\n const isSmallScreen = useMediaQuery(`(max-width: ${BREAKPOINTS.Small}px)`);\n\n const inputRef = useRef(null);\n const popoverRef = useRef(null);\n const wrapperRef = useRef(null);\n\n const { setTextArea, setAdditionalElements } = useTextAreaAutoResize();\n\n useEffect(() => {\n if (activeDescendentIndex !== null) {\n const { current: popover } = popoverRef;\n const activeItem = popover?.querySelector('[aria-selected=\"true\"]');\n if (!popover || !activeItem) {\n return;\n }\n\n if (!isInViewport({ element: activeItem })) {\n activeItem.scrollIntoView(false);\n }\n }\n }, [activeDescendentIndex]);\n\n useLayoutEffect(() => {\n if (autoResize && inputRef.current) {\n setTextArea(inputRef.current);\n setAdditionalElements([wrapperRef.current]);\n }\n }, [autoResize, setTextArea, setAdditionalElements]);\n\n useLayoutEffect(() => {\n const { current: enhancedTextArea } = inputRef;\n\n if (enhancedTextArea && replaceElement) {\n replaceTextArea({\n originalTextArea: replaceElement,\n newTextArea: enhancedTextArea,\n });\n enhancedTextArea.focus({ preventScroll: true });\n }\n }, [replaceElement]);\n\n const handleInputChange = () => {\n const { current: currentInput } = inputRef;\n\n const {\n isTriggered: isSearching,\n indexOfAutocompleteStart: indexOfSearchStart,\n } = getAutocompleteWordData({\n textArea: currentInput,\n triggerCharacter,\n });\n\n dispatch({ type: 'setIsComboboxMode', payload: isSearching });\n\n if (!isSearching) {\n dispatch({ type: 'setSuggestions', payload: [] });\n return;\n }\n\n // Fetch suggestions\n const { selectionStart, value: currentValue } = currentInput;\n\n // Search term begins after the triggerCharacter\n const searchTermStartPosition = indexOfSearchStart + 1;\n\n const searchTerm = currentValue.substring(\n searchTermStartPosition,\n selectionStart,\n );\n\n if (searchTerm.length >= MINIMUM_SEARCH_CHARS) {\n fetchSuggestions(searchTerm).then((suggestions) => {\n if (maxSuggestions && suggestions.length > maxSuggestions) {\n dispatch({\n type: 'setSuggestions',\n payload: suggestions.slice(0, maxSuggestions),\n });\n return;\n }\n dispatch({ type: 'setSuggestions', payload: suggestions });\n });\n\n dispatch({\n type: 'setEmptyStateMessage',\n payload: EMPTY_STATE_MESSAGE,\n });\n } else {\n dispatch({\n type: 'setEmptyStateMessage',\n payload: searchInstructionsMessage,\n });\n }\n\n // Ensure dropdown is properly positioned\n const { x: cursorX, y } = getCursorXY({\n input: currentInput,\n selectionPoint: indexOfSearchStart,\n });\n const textAreaX = currentInput.offsetLeft;\n\n // On small screens always show dropdown at start of textarea\n const dropdownX = isSmallScreen ? textAreaX : cursorX;\n\n dispatch({\n type: 'setDropdownPositionPoints',\n payload: { x: dropdownX, y },\n });\n };\n\n const handleKeyDown = (e) => {\n // If we are not in combobox mode, ignore\n if (!isComboboxMode) {\n return;\n }\n\n switch (e.key) {\n case KEYS.DOWN:\n e.preventDefault();\n\n if (\n activeDescendentIndex !== null &&\n activeDescendentIndex < suggestions.length - 1\n ) {\n dispatch({\n type: 'setActiveDescendentIndex',\n payload: activeDescendentIndex + 1,\n });\n } else {\n dispatch({ type: 'setActiveDescendentIndex', payload: 0 });\n }\n break;\n case KEYS.UP:\n e.preventDefault();\n dispatch({\n type: 'setActiveDescendentIndex',\n payload:\n activeDescendentIndex >= 1\n ? activeDescendentIndex - 1\n : suggestions.length - 1,\n });\n\n break;\n case KEYS.ENTER:\n e.preventDefault();\n if (activeDescendentIndex !== null) {\n selectSuggestion(suggestions[activeDescendentIndex]);\n }\n break;\n case KEYS.ESCAPE:\n e.preventDefault();\n // Temporarily close the popover until next keypress\n dispatch({ type: 'setSuppressPopover', payload: true });\n\n return;\n }\n dispatch({ type: 'setSuppressPopover', payload: false });\n };\n\n // If a user clicks away from an in-progress search, we can assume they no longer wish to keep searching\n const handleTextAreaClicked = () => dispatch({ type: 'exitComboboxMode' });\n\n // The textarea blurs when an option is clicked from the dropdown suggestions, in which case we don't want to\n // trigger the behaviour for the user having left the textarea completely, hence the `ignoreBlur` boolean.\n const handleBlur = () => {\n if (!ignoreBlur) {\n dispatch({ type: 'exitComboboxMode' });\n return;\n }\n dispatch({ type: 'setIgnoreBlur', payload: false });\n };\n\n const selectSuggestion = (suggestion) => {\n const { current: currentInput } = inputRef;\n const { indexOfAutocompleteStart: indexOfSearchStart } =\n getAutocompleteWordData({\n textArea: currentInput,\n triggerCharacter,\n });\n\n const currentSearchTerm = currentInput.value.substring(\n indexOfSearchStart,\n currentInput.selectionStart,\n );\n\n // We try to update the textArea with document.execCommand (so that the change is added to undo queue),\n // which requires the contentEditable attribute to be true. The value is later toggled back to 'false'.\n currentInput.contentEditable = 'true';\n // Input blurs when user clicks an option with the mouse\n currentInput.focus();\n currentInput.setSelectionRange(\n indexOfSearchStart,\n indexOfSearchStart + currentSearchTerm.length,\n );\n\n try {\n document.execCommand(\n 'insertText',\n false,\n `${triggerCharacter}${suggestion.value} `,\n );\n } catch {\n // In the event of any error using execCommand, we make sure the text area updates (but undo queue will not)\n const { value: currentValue } = currentInput;\n const newTextAreaValue = `${currentValue.substring(\n 0,\n indexOfSearchStart,\n )}${triggerCharacter}${suggestion.value}${currentValue.substring(\n indexOfSearchStart + currentSearchTerm.length,\n )} `;\n currentInput.value = newTextAreaValue;\n }\n\n currentInput.contentEditable = 'false';\n\n // Clear suggestions\n dispatch({ type: 'exitComboboxMode' });\n };\n\n const comboboxProps = isComboboxMode\n ? {\n role: 'combobox',\n 'aria-haspopup': 'listbox',\n 'aria-expanded': isComboboxMode,\n 'aria-owns': `${id}-listbox`,\n 'aria-activedescendant': `${id}-suggestion-${activeDescendentIndex}`,\n }\n : {};\n\n return (\n \n {/* We use an assertive live region to alert screen reader users typing will now result in a search */}\n \n {isComboboxMode ? searchInstructionsMessage : ''}\n \n\n {\n onChange?.(e);\n handleInputChange(e);\n }}\n onBlur={(e) => {\n onBlur?.(e);\n handleBlur();\n }}\n onKeyDown={handleKeyDown}\n onClick={handleTextAreaClicked}\n />\n {isComboboxMode && !suppressPopover\n ? createPortal(\n \n {suggestions && suggestions.length > 0 ? (\n
    \n {suggestions.map((suggestion, index) => (\n // Disabled as the key handler is attached to the textarea\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n selectSuggestion(suggestion)}\n onMouseDown={() =>\n dispatch({ type: 'setIgnoreBlur', payload: true })\n }\n >\n \n \n ))}\n
\n ) : (\n \n {emptyStateMessage}\n \n )}\n ,\n document.querySelector('body'),\n )\n : null}\n \n );\n },\n);\n","import { h } from 'preact';\nimport PropTypes from 'prop-types';\nimport { ButtonNew as Button } from '@crayons';\nimport CopyIcon from '@images/copy.svg';\n\nfunction linksToMarkdownForm(imageLinks) {\n return imageLinks\n .map((imageLink) => `![Image description](${imageLink})`)\n .join('\\n');\n}\n\nexport const ClipboardButton = ({\n onCopy,\n imageUrls,\n showCopyMessage = false,\n}) => (\n
\n \n \n {showCopyMessage ? 'Copied!' : 'Copy...'}\n \n
\n);\n\nClipboardButton.displayName = 'ClipboardButton';\n\nClipboardButton.propTypes = {\n onCopy: PropTypes.func.isRequired,\n imageUrls: PropTypes.arrayOf(PropTypes.string).isRequired,\n showCopyMessage: PropTypes.bool.isRequired,\n};\n","import { Fragment, h } from 'preact';\nimport { useReducer, useEffect, useState } from 'preact/hooks';\nimport { generateMainImage } from '../actions';\nimport { validateFileInputs } from '../../packs/validateFileInputs';\nimport { addSnackbarItem } from '../../Snackbar';\nimport { ClipboardButton } from './ClipboardButton';\nimport { copyToClipboard, isNativeIOS } from '@utilities/runtime';\nimport { ButtonNew as Button, Spinner, Icon } from '@crayons';\nimport ImageIcon from '@images/image.svg';\nimport CancelIcon from '@images/x.svg';\n\nconst SpinnerOrCancel = () => (\n \n \n \n \n);\n\nfunction imageUploaderReducer(state, action) {\n const { type, payload } = action;\n\n switch (type) {\n case 'uploading_image':\n return {\n ...state,\n uploadErrorMessage: null,\n uploadingImage: true,\n insertionImageUrls: [],\n };\n\n case 'upload_error':\n return {\n ...state,\n insertionImageUrls: [],\n uploadErrorMessage: payload.errorMessage,\n uploadingImage: false,\n };\n\n case 'upload_image_success':\n return {\n ...state,\n insertionImageUrls: payload.insertionImageUrls,\n uploadingImage: false,\n uploadErrorMessage: null,\n };\n\n default:\n return state;\n }\n}\n\nfunction initNativeImagePicker(e) {\n e.preventDefault();\n window.ForemMobile?.injectNativeMessage('imageUpload', {\n action: 'imageUpload',\n });\n}\n\nconst NativeIosV1ImageUpload = ({ uploadingImage }) => (\n \n {!uploadingImage && (\n \n Upload image\n \n )}\n \n);\n\n/**\n * The V2 editor uses a toolbar button press to trigger a visually hidden file input.\n *\n * @param {object} props\n * @param {object} props.buttonProps Any props to be added to the trigger button\n * @param {function} props.handleInsertionImageUpload Callback to handle image upload\n * @param {boolean} props.uploadingImage Is an image currently being uploaded\n * @param {boolean} props.useNativeUpload Should iOS native upload functionality be used\n * @param {function} props.handleNativeMessage Callback for iOS native upload message handling\n * @param {string} props.uploadErrorMessage Error message to be displayed\n *\n */\nconst V2EditorImageUpload = ({\n buttonProps,\n handleInsertionImageUpload,\n uploadingImage,\n useNativeUpload,\n handleNativeMessage,\n uploadErrorMessage,\n}) => {\n useEffect(() => {\n if (uploadErrorMessage) {\n addSnackbarItem({\n message: uploadErrorMessage,\n addCloseButton: true,\n });\n }\n }, [uploadErrorMessage]);\n\n const [abortRequestController, setAbortRequestController] = useState(null);\n\n const startNewRequest = (e) => {\n const controller = new AbortController();\n setAbortRequestController(controller);\n handleInsertionImageUpload(e, controller.signal);\n };\n\n const cancelRequest = () => {\n abortRequestController.abort();\n setAbortRequestController(null);\n };\n\n const { tooltip: actionTooltip } = buttonProps;\n\n return (\n \n {useNativeUpload ? (\n \n ) : (\n \n )}\n {uploadingImage ? (\n \n ) : (\n {\n buttonProps.onClick?.(e);\n useNativeUpload\n ? initNativeImagePicker(e)\n : document.getElementById('image-upload-field').click();\n }}\n aria-label=\"Upload image\"\n tooltip={actionTooltip}\n />\n )}\n \n );\n};\n\n/**\n * The V1 Editor uses a more detailed image upload UI, displaying errors and markdown text inline\n *\n * @param {object} props\n * @param {boolean} props.uploadingImage Is an image currently being uploaded\n * @param {boolean} props.useNativeUpload Should iOS native upload functionality be used\n * @param {function} props.handleNativeMessage Callback for iOS native upload message handling\n * @param {function} props.handleInsertionImageUpload Callback to handle image upload\n * @param {string[]} props.insertionImageUrls URLs of successfully uploaded images\n * @param {string} props.uploadErrorMessage Error message to be displayed\n *\n * @returns\n */\nconst V1EditorImageUpload = ({\n uploadingImage,\n useNativeUpload,\n handleNativeMessage,\n handleInsertionImageUpload,\n insertionImageUrls,\n uploadErrorMessage,\n}) => {\n const [showCopiedImageText, setShowCopiedImageText] = useState(false);\n\n useEffect(() => {\n if (uploadingImage) {\n setShowCopiedImageText(false);\n }\n }, [uploadingImage]);\n\n const copyText = () => {\n const imageMarkdownInput = document.getElementById(\n 'image-markdown-copy-link-input',\n );\n\n copyToClipboard(imageMarkdownInput.value)\n .then(() => {\n setShowCopiedImageText(true);\n })\n .catch((error) => {\n addSnackbarItem({\n message: error,\n addCloseButton: true,\n });\n Honeybadger.notify(error);\n });\n };\n return (\n
\n {uploadingImage && (\n \n Uploading...\n \n )}\n\n {useNativeUpload ? (\n \n ) : uploadingImage ? null : (\n \n \n \n )}\n\n {insertionImageUrls.length > 0 && (\n \n )}\n\n {uploadErrorMessage ? (\n {uploadErrorMessage}\n ) : null}\n
\n );\n};\n\n/**\n * Image Uploader feature for editor forms\n *\n * @param {object} props\n * @param {string} props.editorVersion The current editor version being used\n * @param {object} props.buttonProps Any additional props to be added to upload image button (v2 editor only)\n * @param {function} props.onImageUploadStart Callback for when image upload begins\n * @param {function} props.onImageUploadSuccess Callback for when image upload succeeds\n * @param {function} props.onImageUploadError Callback for when image upload fails\n *\n */\nexport const ImageUploader = ({\n editorVersion = 'v2',\n buttonProps = {},\n onImageUploadStart,\n onImageUploadSuccess,\n onImageUploadError,\n}) => {\n useEffect(() => {\n // Native Bridge messages come through ForemMobile events\n document.addEventListener('ForemMobile', handleNativeMessage);\n\n // Cleanup afterwards\n return () =>\n document.removeEventListener('ForemMobile', handleNativeMessage);\n });\n\n const [state, dispatch] = useReducer(imageUploaderReducer, {\n insertionImageUrls: [],\n uploadErrorMessage: null,\n uploadingImage: false,\n });\n\n const { uploadingImage, uploadErrorMessage, insertionImageUrls } = state;\n\n function onUploadError(error) {\n onImageUploadError?.();\n dispatch({\n type: 'upload_error',\n payload: { errorMessage: error.message },\n });\n }\n\n function handleInsertionImageUpload(e, abortSignal) {\n const { files } = e.target;\n\n if (files.length > 0 && validateFileInputs()) {\n const payload = { image: files };\n dispatch({\n type: 'uploading_image',\n });\n\n onImageUploadStart?.();\n generateMainImage({\n payload,\n successCb: handleInsertImageUploadSuccess,\n failureCb: onUploadError,\n signal: abortSignal,\n });\n }\n }\n\n function handleInsertImageUploadSuccess(response) {\n dispatch({\n type: 'upload_image_success',\n payload: { insertionImageUrls: response.links },\n });\n\n onImageUploadSuccess?.(`![Image description](${response.links})`);\n\n document.getElementById('upload-success-info').innerText =\n 'image upload complete';\n }\n\n function handleNativeMessage(e) {\n const message = JSON.parse(e.detail);\n if (message.namespace !== 'imageUpload') {\n return;\n }\n\n switch (message.action) {\n case 'uploading':\n onImageUploadStart?.();\n dispatch({\n type: 'uploading_image',\n });\n break;\n case 'error':\n onImageUploadError?.();\n dispatch({\n type: 'upload_error',\n payload: { errorMessage: message.error },\n });\n break;\n case 'success':\n onImageUploadSuccess?.(`![Image description](${message.link})`);\n dispatch({\n type: 'upload_image_success',\n payload: { insertionImageUrls: [message.link] },\n });\n break;\n }\n }\n\n // When the component is rendered in an environment that supports a native\n // image picker for image upload we want to add the aria-label attr and the\n // onClick event to the UI button. This event will kick off the native UX.\n // The props are unwrapped (using spread operator) in the button below\n const useNativeUpload = isNativeIOS('imageUpload');\n\n return (\n \n \n\n {editorVersion === 'v2' ? (\n \n ) : (\n \n )}\n \n );\n};\n\nImageUploader.displayName = 'ImageUploader';\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var map = {\n\t\"./af\": 40,\n\t\"./af.js\": 40,\n\t\"./ar\": 41,\n\t\"./ar-dz\": 42,\n\t\"./ar-dz.js\": 42,\n\t\"./ar-kw\": 43,\n\t\"./ar-kw.js\": 43,\n\t\"./ar-ly\": 44,\n\t\"./ar-ly.js\": 44,\n\t\"./ar-ma\": 45,\n\t\"./ar-ma.js\": 45,\n\t\"./ar-sa\": 46,\n\t\"./ar-sa.js\": 46,\n\t\"./ar-tn\": 47,\n\t\"./ar-tn.js\": 47,\n\t\"./ar.js\": 41,\n\t\"./az\": 48,\n\t\"./az.js\": 48,\n\t\"./be\": 49,\n\t\"./be.js\": 49,\n\t\"./bg\": 50,\n\t\"./bg.js\": 50,\n\t\"./bm\": 51,\n\t\"./bm.js\": 51,\n\t\"./bn\": 52,\n\t\"./bn-bd\": 53,\n\t\"./bn-bd.js\": 53,\n\t\"./bn.js\": 52,\n\t\"./bo\": 54,\n\t\"./bo.js\": 54,\n\t\"./br\": 55,\n\t\"./br.js\": 55,\n\t\"./bs\": 56,\n\t\"./bs.js\": 56,\n\t\"./ca\": 57,\n\t\"./ca.js\": 57,\n\t\"./cs\": 58,\n\t\"./cs.js\": 58,\n\t\"./cv\": 59,\n\t\"./cv.js\": 59,\n\t\"./cy\": 60,\n\t\"./cy.js\": 60,\n\t\"./da\": 61,\n\t\"./da.js\": 61,\n\t\"./de\": 62,\n\t\"./de-at\": 63,\n\t\"./de-at.js\": 63,\n\t\"./de-ch\": 64,\n\t\"./de-ch.js\": 64,\n\t\"./de.js\": 62,\n\t\"./dv\": 65,\n\t\"./dv.js\": 65,\n\t\"./el\": 66,\n\t\"./el.js\": 66,\n\t\"./en-au\": 67,\n\t\"./en-au.js\": 67,\n\t\"./en-ca\": 68,\n\t\"./en-ca.js\": 68,\n\t\"./en-gb\": 69,\n\t\"./en-gb.js\": 69,\n\t\"./en-ie\": 70,\n\t\"./en-ie.js\": 70,\n\t\"./en-il\": 71,\n\t\"./en-il.js\": 71,\n\t\"./en-in\": 72,\n\t\"./en-in.js\": 72,\n\t\"./en-nz\": 73,\n\t\"./en-nz.js\": 73,\n\t\"./en-sg\": 74,\n\t\"./en-sg.js\": 74,\n\t\"./eo\": 75,\n\t\"./eo.js\": 75,\n\t\"./es\": 76,\n\t\"./es-do\": 77,\n\t\"./es-do.js\": 77,\n\t\"./es-mx\": 78,\n\t\"./es-mx.js\": 78,\n\t\"./es-us\": 79,\n\t\"./es-us.js\": 79,\n\t\"./es.js\": 76,\n\t\"./et\": 80,\n\t\"./et.js\": 80,\n\t\"./eu\": 81,\n\t\"./eu.js\": 81,\n\t\"./fa\": 82,\n\t\"./fa.js\": 82,\n\t\"./fi\": 83,\n\t\"./fi.js\": 83,\n\t\"./fil\": 84,\n\t\"./fil.js\": 84,\n\t\"./fo\": 85,\n\t\"./fo.js\": 85,\n\t\"./fr\": 86,\n\t\"./fr-ca\": 87,\n\t\"./fr-ca.js\": 87,\n\t\"./fr-ch\": 88,\n\t\"./fr-ch.js\": 88,\n\t\"./fr.js\": 86,\n\t\"./fy\": 89,\n\t\"./fy.js\": 89,\n\t\"./ga\": 90,\n\t\"./ga.js\": 90,\n\t\"./gd\": 91,\n\t\"./gd.js\": 91,\n\t\"./gl\": 92,\n\t\"./gl.js\": 92,\n\t\"./gom-deva\": 93,\n\t\"./gom-deva.js\": 93,\n\t\"./gom-latn\": 94,\n\t\"./gom-latn.js\": 94,\n\t\"./gu\": 95,\n\t\"./gu.js\": 95,\n\t\"./he\": 96,\n\t\"./he.js\": 96,\n\t\"./hi\": 97,\n\t\"./hi.js\": 97,\n\t\"./hr\": 98,\n\t\"./hr.js\": 98,\n\t\"./hu\": 99,\n\t\"./hu.js\": 99,\n\t\"./hy-am\": 100,\n\t\"./hy-am.js\": 100,\n\t\"./id\": 101,\n\t\"./id.js\": 101,\n\t\"./is\": 102,\n\t\"./is.js\": 102,\n\t\"./it\": 103,\n\t\"./it-ch\": 104,\n\t\"./it-ch.js\": 104,\n\t\"./it.js\": 103,\n\t\"./ja\": 105,\n\t\"./ja.js\": 105,\n\t\"./jv\": 106,\n\t\"./jv.js\": 106,\n\t\"./ka\": 107,\n\t\"./ka.js\": 107,\n\t\"./kk\": 108,\n\t\"./kk.js\": 108,\n\t\"./km\": 109,\n\t\"./km.js\": 109,\n\t\"./kn\": 110,\n\t\"./kn.js\": 110,\n\t\"./ko\": 111,\n\t\"./ko.js\": 111,\n\t\"./ku\": 112,\n\t\"./ku.js\": 112,\n\t\"./ky\": 113,\n\t\"./ky.js\": 113,\n\t\"./lb\": 114,\n\t\"./lb.js\": 114,\n\t\"./lo\": 115,\n\t\"./lo.js\": 115,\n\t\"./lt\": 116,\n\t\"./lt.js\": 116,\n\t\"./lv\": 117,\n\t\"./lv.js\": 117,\n\t\"./me\": 118,\n\t\"./me.js\": 118,\n\t\"./mi\": 119,\n\t\"./mi.js\": 119,\n\t\"./mk\": 120,\n\t\"./mk.js\": 120,\n\t\"./ml\": 121,\n\t\"./ml.js\": 121,\n\t\"./mn\": 122,\n\t\"./mn.js\": 122,\n\t\"./mr\": 123,\n\t\"./mr.js\": 123,\n\t\"./ms\": 124,\n\t\"./ms-my\": 125,\n\t\"./ms-my.js\": 125,\n\t\"./ms.js\": 124,\n\t\"./mt\": 126,\n\t\"./mt.js\": 126,\n\t\"./my\": 127,\n\t\"./my.js\": 127,\n\t\"./nb\": 128,\n\t\"./nb.js\": 128,\n\t\"./ne\": 129,\n\t\"./ne.js\": 129,\n\t\"./nl\": 130,\n\t\"./nl-be\": 131,\n\t\"./nl-be.js\": 131,\n\t\"./nl.js\": 130,\n\t\"./nn\": 132,\n\t\"./nn.js\": 132,\n\t\"./oc-lnc\": 133,\n\t\"./oc-lnc.js\": 133,\n\t\"./pa-in\": 134,\n\t\"./pa-in.js\": 134,\n\t\"./pl\": 135,\n\t\"./pl.js\": 135,\n\t\"./pt\": 136,\n\t\"./pt-br\": 137,\n\t\"./pt-br.js\": 137,\n\t\"./pt.js\": 136,\n\t\"./ro\": 138,\n\t\"./ro.js\": 138,\n\t\"./ru\": 139,\n\t\"./ru.js\": 139,\n\t\"./sd\": 140,\n\t\"./sd.js\": 140,\n\t\"./se\": 141,\n\t\"./se.js\": 141,\n\t\"./si\": 142,\n\t\"./si.js\": 142,\n\t\"./sk\": 143,\n\t\"./sk.js\": 143,\n\t\"./sl\": 144,\n\t\"./sl.js\": 144,\n\t\"./sq\": 145,\n\t\"./sq.js\": 145,\n\t\"./sr\": 146,\n\t\"./sr-cyrl\": 147,\n\t\"./sr-cyrl.js\": 147,\n\t\"./sr.js\": 146,\n\t\"./ss\": 148,\n\t\"./ss.js\": 148,\n\t\"./sv\": 149,\n\t\"./sv.js\": 149,\n\t\"./sw\": 150,\n\t\"./sw.js\": 150,\n\t\"./ta\": 151,\n\t\"./ta.js\": 151,\n\t\"./te\": 152,\n\t\"./te.js\": 152,\n\t\"./tet\": 153,\n\t\"./tet.js\": 153,\n\t\"./tg\": 154,\n\t\"./tg.js\": 154,\n\t\"./th\": 155,\n\t\"./th.js\": 155,\n\t\"./tk\": 156,\n\t\"./tk.js\": 156,\n\t\"./tl-ph\": 157,\n\t\"./tl-ph.js\": 157,\n\t\"./tlh\": 158,\n\t\"./tlh.js\": 158,\n\t\"./tr\": 159,\n\t\"./tr.js\": 159,\n\t\"./tzl\": 160,\n\t\"./tzl.js\": 160,\n\t\"./tzm\": 161,\n\t\"./tzm-latn\": 162,\n\t\"./tzm-latn.js\": 162,\n\t\"./tzm.js\": 161,\n\t\"./ug-cn\": 163,\n\t\"./ug-cn.js\": 163,\n\t\"./uk\": 164,\n\t\"./uk.js\": 164,\n\t\"./ur\": 165,\n\t\"./ur.js\": 165,\n\t\"./uz\": 166,\n\t\"./uz-latn\": 167,\n\t\"./uz-latn.js\": 167,\n\t\"./uz.js\": 166,\n\t\"./vi\": 168,\n\t\"./vi.js\": 168,\n\t\"./x-pseudo\": 169,\n\t\"./x-pseudo.js\": 169,\n\t\"./yo\": 170,\n\t\"./yo.js\": 170,\n\t\"./zh-cn\": 171,\n\t\"./zh-cn.js\": 171,\n\t\"./zh-hk\": 172,\n\t\"./zh-hk.js\": 172,\n\t\"./zh-mo\": 173,\n\t\"./zh-mo.js\": 173,\n\t\"./zh-tw\": 174,\n\t\"./zh-tw.js\": 174\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 204;","import { I18n } from 'i18n-js';\n\nconst i18n = new I18n();\n\nconst translationsDiv = document.getElementById('i18n-translations');\nif (translationsDiv) {\n const translations = JSON.parse(translationsDiv.dataset.translations);\n i18n.store(translations);\n}\ni18n.defaultLocale = 'en';\nconst { locale: userLocale } = document.body.dataset;\nif (userLocale) {\n i18n.locale = userLocale;\n}\nexport function locale(term, params = {}) {\n return i18n.t(term, params);\n}\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n return reHasUnicode.test(string);\n}\n\nmodule.exports = hasUnicode;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n","/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n","import uniq from \"lodash/uniq\";\nexport const defaultLocaleResolver = (i18n, locale) => {\n const locales = [];\n const list = [];\n locales.push(locale);\n if (!locale) {\n locales.push(i18n.locale);\n }\n if (i18n.enableFallback) {\n locales.push(i18n.defaultLocale);\n }\n locales\n .filter(Boolean)\n .map((entry) => entry.toString())\n .forEach(function (currentLocale) {\n if (!list.includes(currentLocale)) {\n list.push(currentLocale);\n }\n if (!i18n.enableFallback) {\n return;\n }\n const codes = currentLocale.split(\"-\");\n if (codes.length === 3) {\n list.push(`${codes[0]}-${codes[1]}`);\n }\n list.push(codes[0]);\n });\n return uniq(list);\n};\nexport class Locales {\n constructor(i18n) {\n this.i18n = i18n;\n this.registry = {};\n this.register(\"default\", defaultLocaleResolver);\n }\n register(locale, localeResolver) {\n if (typeof localeResolver !== \"function\") {\n const result = localeResolver;\n localeResolver = (() => result);\n }\n this.registry[locale] = localeResolver;\n }\n get(locale) {\n let locales = this.registry[locale] ||\n this.registry[this.i18n.locale] ||\n this.registry.default;\n if (typeof locales === \"function\") {\n locales = locales(this.i18n, locale);\n }\n if (!(locales instanceof Array)) {\n locales = [locales];\n }\n return locales;\n }\n}\n//# sourceMappingURL=Locales.js.map","import { en } from \"make-plural\";\nexport function useMakePlural({ pluralizer, includeZero = true, ordinal = false, }) {\n return function (_i18n, count) {\n return [\n includeZero && count === 0 ? \"zero\" : \"\",\n pluralizer(count, ordinal),\n ].filter(Boolean);\n };\n}\nexport const defaultPluralizer = useMakePlural({\n pluralizer: en,\n includeZero: true,\n});\nexport class Pluralization {\n constructor(i18n) {\n this.i18n = i18n;\n this.registry = {};\n this.register(\"default\", defaultPluralizer);\n }\n register(locale, pluralizer) {\n this.registry[locale] = pluralizer;\n }\n get(locale) {\n return (this.registry[locale] ||\n this.registry[this.i18n.locale] ||\n this.registry[\"default\"]);\n }\n}\n//# sourceMappingURL=Pluralization.js.map","const a = (n, ord) => {\n if (ord) return 'other';\n return n == 1 ? 'one' : 'other';\n};\nconst b = (n, ord) => {\n if (ord) return 'other';\n return (n == 0 || n == 1) ? 'one' : 'other';\n};\nconst c = (n, ord) => {\n if (ord) return 'other';\n return n >= 0 && n <= 1 ? 'one' : 'other';\n};\nconst d = (n, ord) => {\n const s = String(n).split('.'), v0 = !s[1];\n if (ord) return 'other';\n return n == 1 && v0 ? 'one' : 'other';\n};\nconst e = (n, ord) => 'other';\nconst f = (n, ord) => {\n if (ord) return 'other';\n return n == 1 ? 'one'\n : n == 2 ? 'two'\n : 'other';\n};\n\nexport const af = a;\nexport const ak = b;\nexport const am = c;\nexport const an = a;\nexport const ar = (n, ord) => {\n const s = String(n).split('.'), t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2);\n if (ord) return 'other';\n return n == 0 ? 'zero'\n : n == 1 ? 'one'\n : n == 2 ? 'two'\n : (n100 >= 3 && n100 <= 10) ? 'few'\n : (n100 >= 11 && n100 <= 99) ? 'many'\n : 'other';\n};\nexport const ars = (n, ord) => {\n const s = String(n).split('.'), t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2);\n if (ord) return 'other';\n return n == 0 ? 'zero'\n : n == 1 ? 'one'\n : n == 2 ? 'two'\n : (n100 >= 3 && n100 <= 10) ? 'few'\n : (n100 >= 11 && n100 <= 99) ? 'many'\n : 'other';\n};\nexport const as = (n, ord) => {\n if (ord) return (n == 1 || n == 5 || n == 7 || n == 8 || n == 9 || n == 10) ? 'one'\n : (n == 2 || n == 3) ? 'two'\n : n == 4 ? 'few'\n : n == 6 ? 'many'\n : 'other';\n return n >= 0 && n <= 1 ? 'one' : 'other';\n};\nexport const asa = a;\nexport const ast = d;\nexport const az = (n, ord) => {\n const s = String(n).split('.'), i = s[0], i10 = i.slice(-1), i100 = i.slice(-2), i1000 = i.slice(-3);\n if (ord) return (i10 == 1 || i10 == 2 || i10 == 5 || i10 == 7 || i10 == 8) || (i100 == 20 || i100 == 50 || i100 == 70 || i100 == 80) ? 'one'\n : (i10 == 3 || i10 == 4) || (i1000 == 100 || i1000 == 200 || i1000 == 300 || i1000 == 400 || i1000 == 500 || i1000 == 600 || i1000 == 700 || i1000 == 800 || i1000 == 900) ? 'few'\n : i == 0 || i10 == 6 || (i100 == 40 || i100 == 60 || i100 == 90) ? 'many'\n : 'other';\n return n == 1 ? 'one' : 'other';\n};\nexport const bal = (n, ord) => n == 1 ? 'one' : 'other';\nexport const be = (n, ord) => {\n const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);\n if (ord) return (n10 == 2 || n10 == 3) && n100 != 12 && n100 != 13 ? 'few' : 'other';\n return n10 == 1 && n100 != 11 ? 'one'\n : (n10 >= 2 && n10 <= 4) && (n100 < 12 || n100 > 14) ? 'few'\n : t0 && n10 == 0 || (n10 >= 5 && n10 <= 9) || (n100 >= 11 && n100 <= 14) ? 'many'\n : 'other';\n};\nexport const bem = a;\nexport const bez = a;\nexport const bg = a;\nexport const bho = b;\nexport const bm = e;\nexport const bn = (n, ord) => {\n if (ord) return (n == 1 || n == 5 || n == 7 || n == 8 || n == 9 || n == 10) ? 'one'\n : (n == 2 || n == 3) ? 'two'\n : n == 4 ? 'few'\n : n == 6 ? 'many'\n : 'other';\n return n >= 0 && n <= 1 ? 'one' : 'other';\n};\nexport const bo = e;\nexport const br = (n, ord) => {\n const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2), n1000000 = t0 && s[0].slice(-6);\n if (ord) return 'other';\n return n10 == 1 && n100 != 11 && n100 != 71 && n100 != 91 ? 'one'\n : n10 == 2 && n100 != 12 && n100 != 72 && n100 != 92 ? 'two'\n : ((n10 == 3 || n10 == 4) || n10 == 9) && (n100 < 10 || n100 > 19) && (n100 < 70 || n100 > 79) && (n100 < 90 || n100 > 99) ? 'few'\n : n != 0 && t0 && n1000000 == 0 ? 'many'\n : 'other';\n};\nexport const brx = a;\nexport const bs = (n, ord) => {\n const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2), f10 = f.slice(-1), f100 = f.slice(-2);\n if (ord) return 'other';\n return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one'\n : v0 && (i10 >= 2 && i10 <= 4) && (i100 < 12 || i100 > 14) || (f10 >= 2 && f10 <= 4) && (f100 < 12 || f100 > 14) ? 'few'\n : 'other';\n};\nexport const ca = (n, ord) => {\n const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);\n if (ord) return (n == 1 || n == 3) ? 'one'\n : n == 2 ? 'two'\n : n == 4 ? 'few'\n : 'other';\n return n == 1 && v0 ? 'one'\n : i != 0 && i1000000 == 0 && v0 ? 'many'\n : 'other';\n};\nexport const ce = a;\nexport const ceb = (n, ord) => {\n const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i10 = i.slice(-1), f10 = f.slice(-1);\n if (ord) return 'other';\n return v0 && (i == 1 || i == 2 || i == 3) || v0 && i10 != 4 && i10 != 6 && i10 != 9 || !v0 && f10 != 4 && f10 != 6 && f10 != 9 ? 'one' : 'other';\n};\nexport const cgg = a;\nexport const chr = a;\nexport const ckb = a;\nexport const cs = (n, ord) => {\n const s = String(n).split('.'), i = s[0], v0 = !s[1];\n if (ord) return 'other';\n return n == 1 && v0 ? 'one'\n : (i >= 2 && i <= 4) && v0 ? 'few'\n : !v0 ? 'many'\n : 'other';\n};\nexport const cy = (n, ord) => {\n if (ord) return (n == 0 || n == 7 || n == 8 || n == 9) ? 'zero'\n : n == 1 ? 'one'\n : n == 2 ? 'two'\n : (n == 3 || n == 4) ? 'few'\n : (n == 5 || n == 6) ? 'many'\n : 'other';\n return n == 0 ? 'zero'\n : n == 1 ? 'one'\n : n == 2 ? 'two'\n : n == 3 ? 'few'\n : n == 6 ? 'many'\n : 'other';\n};\nexport const da = (n, ord) => {\n const s = String(n).split('.'), i = s[0], t0 = Number(s[0]) == n;\n if (ord) return 'other';\n return n == 1 || !t0 && (i == 0 || i == 1) ? 'one' : 'other';\n};\nexport const de = d;\nexport const doi = c;\nexport const dsb = (n, ord) => {\n const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i100 = i.slice(-2), f100 = f.slice(-2);\n if (ord) return 'other';\n return v0 && i100 == 1 || f100 == 1 ? 'one'\n : v0 && i100 == 2 || f100 == 2 ? 'two'\n : v0 && (i100 == 3 || i100 == 4) || (f100 == 3 || f100 == 4) ? 'few'\n : 'other';\n};\nexport const dv = a;\nexport const dz = e;\nexport const ee = a;\nexport const el = a;\nexport const en = (n, ord) => {\n const s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);\n if (ord) return n10 == 1 && n100 != 11 ? 'one'\n : n10 == 2 && n100 != 12 ? 'two'\n : n10 == 3 && n100 != 13 ? 'few'\n : 'other';\n return n == 1 && v0 ? 'one' : 'other';\n};\nexport const eo = a;\nexport const es = (n, ord) => {\n const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);\n if (ord) return 'other';\n return n == 1 ? 'one'\n : i != 0 && i1000000 == 0 && v0 ? 'many'\n : 'other';\n};\nexport const et = d;\nexport const eu = a;\nexport const fa = c;\nexport const ff = (n, ord) => {\n if (ord) return 'other';\n return n >= 0 && n < 2 ? 'one' : 'other';\n};\nexport const fi = d;\nexport const fil = (n, ord) => {\n const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i10 = i.slice(-1), f10 = f.slice(-1);\n if (ord) return n == 1 ? 'one' : 'other';\n return v0 && (i == 1 || i == 2 || i == 3) || v0 && i10 != 4 && i10 != 6 && i10 != 9 || !v0 && f10 != 4 && f10 != 6 && f10 != 9 ? 'one' : 'other';\n};\nexport const fo = a;\nexport const fr = (n, ord) => {\n const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);\n if (ord) return n == 1 ? 'one' : 'other';\n return n >= 0 && n < 2 ? 'one'\n : i != 0 && i1000000 == 0 && v0 ? 'many'\n : 'other';\n};\nexport const fur = a;\nexport const fy = d;\nexport const ga = (n, ord) => {\n const s = String(n).split('.'), t0 = Number(s[0]) == n;\n if (ord) return n == 1 ? 'one' : 'other';\n return n == 1 ? 'one'\n : n == 2 ? 'two'\n : (t0 && n >= 3 && n <= 6) ? 'few'\n : (t0 && n >= 7 && n <= 10) ? 'many'\n : 'other';\n};\nexport const gd = (n, ord) => {\n const s = String(n).split('.'), t0 = Number(s[0]) == n;\n if (ord) return (n == 1 || n == 11) ? 'one'\n : (n == 2 || n == 12) ? 'two'\n : (n == 3 || n == 13) ? 'few'\n : 'other';\n return (n == 1 || n == 11) ? 'one'\n : (n == 2 || n == 12) ? 'two'\n : ((t0 && n >= 3 && n <= 10) || (t0 && n >= 13 && n <= 19)) ? 'few'\n : 'other';\n};\nexport const gl = d;\nexport const gsw = a;\nexport const gu = (n, ord) => {\n if (ord) return n == 1 ? 'one'\n : (n == 2 || n == 3) ? 'two'\n : n == 4 ? 'few'\n : n == 6 ? 'many'\n : 'other';\n return n >= 0 && n <= 1 ? 'one' : 'other';\n};\nexport const guw = b;\nexport const gv = (n, ord) => {\n const s = String(n).split('.'), i = s[0], v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2);\n if (ord) return 'other';\n return v0 && i10 == 1 ? 'one'\n : v0 && i10 == 2 ? 'two'\n : v0 && (i100 == 0 || i100 == 20 || i100 == 40 || i100 == 60 || i100 == 80) ? 'few'\n : !v0 ? 'many'\n : 'other';\n};\nexport const ha = a;\nexport const haw = a;\nexport const he = (n, ord) => {\n const s = String(n).split('.'), i = s[0], v0 = !s[1];\n if (ord) return 'other';\n return i == 1 && v0 || i == 0 && !v0 ? 'one'\n : i == 2 && v0 ? 'two'\n : 'other';\n};\nexport const hi = (n, ord) => {\n if (ord) return n == 1 ? 'one'\n : (n == 2 || n == 3) ? 'two'\n : n == 4 ? 'few'\n : n == 6 ? 'many'\n : 'other';\n return n >= 0 && n <= 1 ? 'one' : 'other';\n};\nexport const hnj = e;\nexport const hr = (n, ord) => {\n const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2), f10 = f.slice(-1), f100 = f.slice(-2);\n if (ord) return 'other';\n return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one'\n : v0 && (i10 >= 2 && i10 <= 4) && (i100 < 12 || i100 > 14) || (f10 >= 2 && f10 <= 4) && (f100 < 12 || f100 > 14) ? 'few'\n : 'other';\n};\nexport const hsb = (n, ord) => {\n const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i100 = i.slice(-2), f100 = f.slice(-2);\n if (ord) return 'other';\n return v0 && i100 == 1 || f100 == 1 ? 'one'\n : v0 && i100 == 2 || f100 == 2 ? 'two'\n : v0 && (i100 == 3 || i100 == 4) || (f100 == 3 || f100 == 4) ? 'few'\n : 'other';\n};\nexport const hu = (n, ord) => {\n if (ord) return (n == 1 || n == 5) ? 'one' : 'other';\n return n == 1 ? 'one' : 'other';\n};\nexport const hy = (n, ord) => {\n if (ord) return n == 1 ? 'one' : 'other';\n return n >= 0 && n < 2 ? 'one' : 'other';\n};\nexport const ia = d;\nexport const id = e;\nexport const ig = e;\nexport const ii = e;\nexport const io = d;\nexport const is = (n, ord) => {\n const s = String(n).split('.'), i = s[0], t = (s[1] || '').replace(/0+$/, ''), t0 = Number(s[0]) == n, i10 = i.slice(-1), i100 = i.slice(-2);\n if (ord) return 'other';\n return t0 && i10 == 1 && i100 != 11 || t % 10 == 1 && t % 100 != 11 ? 'one' : 'other';\n};\nexport const it = (n, ord) => {\n const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);\n if (ord) return (n == 11 || n == 8 || n == 80 || n == 800) ? 'many' : 'other';\n return n == 1 && v0 ? 'one'\n : i != 0 && i1000000 == 0 && v0 ? 'many'\n : 'other';\n};\nexport const iu = f;\nexport const ja = e;\nexport const jbo = e;\nexport const jgo = a;\nexport const jmc = a;\nexport const jv = e;\nexport const jw = e;\nexport const ka = (n, ord) => {\n const s = String(n).split('.'), i = s[0], i100 = i.slice(-2);\n if (ord) return i == 1 ? 'one'\n : i == 0 || ((i100 >= 2 && i100 <= 20) || i100 == 40 || i100 == 60 || i100 == 80) ? 'many'\n : 'other';\n return n == 1 ? 'one' : 'other';\n};\nexport const kab = (n, ord) => {\n if (ord) return 'other';\n return n >= 0 && n < 2 ? 'one' : 'other';\n};\nexport const kaj = a;\nexport const kcg = a;\nexport const kde = e;\nexport const kea = e;\nexport const kk = (n, ord) => {\n const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1);\n if (ord) return n10 == 6 || n10 == 9 || t0 && n10 == 0 && n != 0 ? 'many' : 'other';\n return n == 1 ? 'one' : 'other';\n};\nexport const kkj = a;\nexport const kl = a;\nexport const km = e;\nexport const kn = c;\nexport const ko = e;\nexport const ks = a;\nexport const ksb = a;\nexport const ksh = (n, ord) => {\n if (ord) return 'other';\n return n == 0 ? 'zero'\n : n == 1 ? 'one'\n : 'other';\n};\nexport const ku = a;\nexport const kw = (n, ord) => {\n const s = String(n).split('.'), t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2), n1000 = t0 && s[0].slice(-3), n100000 = t0 && s[0].slice(-5), n1000000 = t0 && s[0].slice(-6);\n if (ord) return (t0 && n >= 1 && n <= 4) || ((n100 >= 1 && n100 <= 4) || (n100 >= 21 && n100 <= 24) || (n100 >= 41 && n100 <= 44) || (n100 >= 61 && n100 <= 64) || (n100 >= 81 && n100 <= 84)) ? 'one'\n : n == 5 || n100 == 5 ? 'many'\n : 'other';\n return n == 0 ? 'zero'\n : n == 1 ? 'one'\n : (n100 == 2 || n100 == 22 || n100 == 42 || n100 == 62 || n100 == 82) || t0 && n1000 == 0 && ((n100000 >= 1000 && n100000 <= 20000) || n100000 == 40000 || n100000 == 60000 || n100000 == 80000) || n != 0 && n1000000 == 100000 ? 'two'\n : (n100 == 3 || n100 == 23 || n100 == 43 || n100 == 63 || n100 == 83) ? 'few'\n : n != 1 && (n100 == 1 || n100 == 21 || n100 == 41 || n100 == 61 || n100 == 81) ? 'many'\n : 'other';\n};\nexport const ky = a;\nexport const lag = (n, ord) => {\n const s = String(n).split('.'), i = s[0];\n if (ord) return 'other';\n return n == 0 ? 'zero'\n : (i == 0 || i == 1) && n != 0 ? 'one'\n : 'other';\n};\nexport const lb = a;\nexport const lg = a;\nexport const lij = (n, ord) => {\n const s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n;\n if (ord) return (n == 11 || n == 8 || (t0 && n >= 80 && n <= 89) || (t0 && n >= 800 && n <= 899)) ? 'many' : 'other';\n return n == 1 && v0 ? 'one' : 'other';\n};\nexport const lkt = e;\nexport const ln = b;\nexport const lo = (n, ord) => {\n if (ord) return n == 1 ? 'one' : 'other';\n return 'other';\n};\nexport const lt = (n, ord) => {\n const s = String(n).split('.'), f = s[1] || '', t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);\n if (ord) return 'other';\n return n10 == 1 && (n100 < 11 || n100 > 19) ? 'one'\n : (n10 >= 2 && n10 <= 9) && (n100 < 11 || n100 > 19) ? 'few'\n : f != 0 ? 'many'\n : 'other';\n};\nexport const lv = (n, ord) => {\n const s = String(n).split('.'), f = s[1] || '', v = f.length, t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2), f100 = f.slice(-2), f10 = f.slice(-1);\n if (ord) return 'other';\n return t0 && n10 == 0 || (n100 >= 11 && n100 <= 19) || v == 2 && (f100 >= 11 && f100 <= 19) ? 'zero'\n : n10 == 1 && n100 != 11 || v == 2 && f10 == 1 && f100 != 11 || v != 2 && f10 == 1 ? 'one'\n : 'other';\n};\nexport const mas = a;\nexport const mg = b;\nexport const mgo = a;\nexport const mk = (n, ord) => {\n const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2), f10 = f.slice(-1), f100 = f.slice(-2);\n if (ord) return i10 == 1 && i100 != 11 ? 'one'\n : i10 == 2 && i100 != 12 ? 'two'\n : (i10 == 7 || i10 == 8) && i100 != 17 && i100 != 18 ? 'many'\n : 'other';\n return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one' : 'other';\n};\nexport const ml = a;\nexport const mn = a;\nexport const mo = (n, ord) => {\n const s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2);\n if (ord) return n == 1 ? 'one' : 'other';\n return n == 1 && v0 ? 'one'\n : !v0 || n == 0 || n != 1 && (n100 >= 1 && n100 <= 19) ? 'few'\n : 'other';\n};\nexport const mr = (n, ord) => {\n if (ord) return n == 1 ? 'one'\n : (n == 2 || n == 3) ? 'two'\n : n == 4 ? 'few'\n : 'other';\n return n == 1 ? 'one' : 'other';\n};\nexport const ms = (n, ord) => {\n if (ord) return n == 1 ? 'one' : 'other';\n return 'other';\n};\nexport const mt = (n, ord) => {\n const s = String(n).split('.'), t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2);\n if (ord) return 'other';\n return n == 1 ? 'one'\n : n == 2 ? 'two'\n : n == 0 || (n100 >= 3 && n100 <= 10) ? 'few'\n : (n100 >= 11 && n100 <= 19) ? 'many'\n : 'other';\n};\nexport const my = e;\nexport const nah = a;\nexport const naq = f;\nexport const nb = a;\nexport const nd = a;\nexport const ne = (n, ord) => {\n const s = String(n).split('.'), t0 = Number(s[0]) == n;\n if (ord) return (t0 && n >= 1 && n <= 4) ? 'one' : 'other';\n return n == 1 ? 'one' : 'other';\n};\nexport const nl = d;\nexport const nn = a;\nexport const nnh = a;\nexport const no = a;\nexport const nqo = e;\nexport const nr = a;\nexport const nso = b;\nexport const ny = a;\nexport const nyn = a;\nexport const om = a;\nexport const or = (n, ord) => {\n const s = String(n).split('.'), t0 = Number(s[0]) == n;\n if (ord) return (n == 1 || n == 5 || (t0 && n >= 7 && n <= 9)) ? 'one'\n : (n == 2 || n == 3) ? 'two'\n : n == 4 ? 'few'\n : n == 6 ? 'many'\n : 'other';\n return n == 1 ? 'one' : 'other';\n};\nexport const os = a;\nexport const osa = e;\nexport const pa = b;\nexport const pap = a;\nexport const pcm = c;\nexport const pl = (n, ord) => {\n const s = String(n).split('.'), i = s[0], v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2);\n if (ord) return 'other';\n return n == 1 && v0 ? 'one'\n : v0 && (i10 >= 2 && i10 <= 4) && (i100 < 12 || i100 > 14) ? 'few'\n : v0 && i != 1 && (i10 == 0 || i10 == 1) || v0 && (i10 >= 5 && i10 <= 9) || v0 && (i100 >= 12 && i100 <= 14) ? 'many'\n : 'other';\n};\nexport const prg = (n, ord) => {\n const s = String(n).split('.'), f = s[1] || '', v = f.length, t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2), f100 = f.slice(-2), f10 = f.slice(-1);\n if (ord) return 'other';\n return t0 && n10 == 0 || (n100 >= 11 && n100 <= 19) || v == 2 && (f100 >= 11 && f100 <= 19) ? 'zero'\n : n10 == 1 && n100 != 11 || v == 2 && f10 == 1 && f100 != 11 || v != 2 && f10 == 1 ? 'one'\n : 'other';\n};\nexport const ps = a;\nexport const pt = (n, ord) => {\n const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);\n if (ord) return 'other';\n return (i == 0 || i == 1) ? 'one'\n : i != 0 && i1000000 == 0 && v0 ? 'many'\n : 'other';\n};\nexport const pt_PT = (n, ord) => {\n const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);\n if (ord) return 'other';\n return n == 1 && v0 ? 'one'\n : i != 0 && i1000000 == 0 && v0 ? 'many'\n : 'other';\n};\nexport const rm = a;\nexport const ro = (n, ord) => {\n const s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2);\n if (ord) return n == 1 ? 'one' : 'other';\n return n == 1 && v0 ? 'one'\n : !v0 || n == 0 || n != 1 && (n100 >= 1 && n100 <= 19) ? 'few'\n : 'other';\n};\nexport const rof = a;\nexport const ru = (n, ord) => {\n const s = String(n).split('.'), i = s[0], v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2);\n if (ord) return 'other';\n return v0 && i10 == 1 && i100 != 11 ? 'one'\n : v0 && (i10 >= 2 && i10 <= 4) && (i100 < 12 || i100 > 14) ? 'few'\n : v0 && i10 == 0 || v0 && (i10 >= 5 && i10 <= 9) || v0 && (i100 >= 11 && i100 <= 14) ? 'many'\n : 'other';\n};\nexport const rwk = a;\nexport const sah = e;\nexport const saq = a;\nexport const sat = f;\nexport const sc = (n, ord) => {\n const s = String(n).split('.'), v0 = !s[1];\n if (ord) return (n == 11 || n == 8 || n == 80 || n == 800) ? 'many' : 'other';\n return n == 1 && v0 ? 'one' : 'other';\n};\nexport const scn = (n, ord) => {\n const s = String(n).split('.'), v0 = !s[1];\n if (ord) return (n == 11 || n == 8 || n == 80 || n == 800) ? 'many' : 'other';\n return n == 1 && v0 ? 'one' : 'other';\n};\nexport const sd = a;\nexport const sdh = a;\nexport const se = f;\nexport const seh = a;\nexport const ses = e;\nexport const sg = e;\nexport const sh = (n, ord) => {\n const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2), f10 = f.slice(-1), f100 = f.slice(-2);\n if (ord) return 'other';\n return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one'\n : v0 && (i10 >= 2 && i10 <= 4) && (i100 < 12 || i100 > 14) || (f10 >= 2 && f10 <= 4) && (f100 < 12 || f100 > 14) ? 'few'\n : 'other';\n};\nexport const shi = (n, ord) => {\n const s = String(n).split('.'), t0 = Number(s[0]) == n;\n if (ord) return 'other';\n return n >= 0 && n <= 1 ? 'one'\n : (t0 && n >= 2 && n <= 10) ? 'few'\n : 'other';\n};\nexport const si = (n, ord) => {\n const s = String(n).split('.'), i = s[0], f = s[1] || '';\n if (ord) return 'other';\n return (n == 0 || n == 1) || i == 0 && f == 1 ? 'one' : 'other';\n};\nexport const sk = (n, ord) => {\n const s = String(n).split('.'), i = s[0], v0 = !s[1];\n if (ord) return 'other';\n return n == 1 && v0 ? 'one'\n : (i >= 2 && i <= 4) && v0 ? 'few'\n : !v0 ? 'many'\n : 'other';\n};\nexport const sl = (n, ord) => {\n const s = String(n).split('.'), i = s[0], v0 = !s[1], i100 = i.slice(-2);\n if (ord) return 'other';\n return v0 && i100 == 1 ? 'one'\n : v0 && i100 == 2 ? 'two'\n : v0 && (i100 == 3 || i100 == 4) || !v0 ? 'few'\n : 'other';\n};\nexport const sma = f;\nexport const smi = f;\nexport const smj = f;\nexport const smn = f;\nexport const sms = f;\nexport const sn = a;\nexport const so = a;\nexport const sq = (n, ord) => {\n const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);\n if (ord) return n == 1 ? 'one'\n : n10 == 4 && n100 != 14 ? 'many'\n : 'other';\n return n == 1 ? 'one' : 'other';\n};\nexport const sr = (n, ord) => {\n const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2), f10 = f.slice(-1), f100 = f.slice(-2);\n if (ord) return 'other';\n return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one'\n : v0 && (i10 >= 2 && i10 <= 4) && (i100 < 12 || i100 > 14) || (f10 >= 2 && f10 <= 4) && (f100 < 12 || f100 > 14) ? 'few'\n : 'other';\n};\nexport const ss = a;\nexport const ssy = a;\nexport const st = a;\nexport const su = e;\nexport const sv = (n, ord) => {\n const s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);\n if (ord) return (n10 == 1 || n10 == 2) && n100 != 11 && n100 != 12 ? 'one' : 'other';\n return n == 1 && v0 ? 'one' : 'other';\n};\nexport const sw = d;\nexport const syr = a;\nexport const ta = a;\nexport const te = a;\nexport const teo = a;\nexport const th = e;\nexport const ti = b;\nexport const tig = a;\nexport const tk = (n, ord) => {\n const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1);\n if (ord) return (n10 == 6 || n10 == 9) || n == 10 ? 'few' : 'other';\n return n == 1 ? 'one' : 'other';\n};\nexport const tl = (n, ord) => {\n const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i10 = i.slice(-1), f10 = f.slice(-1);\n if (ord) return n == 1 ? 'one' : 'other';\n return v0 && (i == 1 || i == 2 || i == 3) || v0 && i10 != 4 && i10 != 6 && i10 != 9 || !v0 && f10 != 4 && f10 != 6 && f10 != 9 ? 'one' : 'other';\n};\nexport const tn = a;\nexport const to = e;\nexport const tpi = e;\nexport const tr = a;\nexport const ts = a;\nexport const tzm = (n, ord) => {\n const s = String(n).split('.'), t0 = Number(s[0]) == n;\n if (ord) return 'other';\n return (n == 0 || n == 1) || (t0 && n >= 11 && n <= 99) ? 'one' : 'other';\n};\nexport const ug = a;\nexport const uk = (n, ord) => {\n const s = String(n).split('.'), i = s[0], v0 = !s[1], t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2), i10 = i.slice(-1), i100 = i.slice(-2);\n if (ord) return n10 == 3 && n100 != 13 ? 'few' : 'other';\n return v0 && i10 == 1 && i100 != 11 ? 'one'\n : v0 && (i10 >= 2 && i10 <= 4) && (i100 < 12 || i100 > 14) ? 'few'\n : v0 && i10 == 0 || v0 && (i10 >= 5 && i10 <= 9) || v0 && (i100 >= 11 && i100 <= 14) ? 'many'\n : 'other';\n};\nexport const und = e;\nexport const ur = d;\nexport const uz = a;\nexport const ve = a;\nexport const vec = (n, ord) => {\n const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);\n if (ord) return (n == 11 || n == 8 || n == 80 || n == 800) ? 'many' : 'other';\n return n == 1 && v0 ? 'one'\n : i != 0 && i1000000 == 0 && v0 ? 'many'\n : 'other';\n};\nexport const vi = (n, ord) => {\n if (ord) return n == 1 ? 'one' : 'other';\n return 'other';\n};\nexport const vo = a;\nexport const vun = a;\nexport const wa = b;\nexport const wae = a;\nexport const wo = e;\nexport const xh = a;\nexport const xog = a;\nexport const yi = d;\nexport const yo = e;\nexport const yue = e;\nexport const zh = e;\nexport const zu = c;\n","import camelCase from \"lodash/camelCase\";\nexport function camelCaseKeys(target) {\n if (!target) {\n return {};\n }\n return Object.keys(target).reduce((buffer, key) => {\n buffer[camelCase(key)] = target[key];\n return buffer;\n }, {});\n}\n//# sourceMappingURL=camelCaseKeys.js.map","export function isSet(value) {\n return value !== undefined && value !== null;\n}\n//# sourceMappingURL=isSet.js.map","import BigNumber from \"bignumber.js\";\nvar RoundingModeMap;\n(function (RoundingModeMap) {\n RoundingModeMap[RoundingModeMap[\"up\"] = BigNumber.ROUND_UP] = \"up\";\n RoundingModeMap[RoundingModeMap[\"down\"] = BigNumber.ROUND_DOWN] = \"down\";\n RoundingModeMap[RoundingModeMap[\"truncate\"] = BigNumber.ROUND_DOWN] = \"truncate\";\n RoundingModeMap[RoundingModeMap[\"halfUp\"] = BigNumber.ROUND_HALF_UP] = \"halfUp\";\n RoundingModeMap[RoundingModeMap[\"default\"] = BigNumber.ROUND_HALF_UP] = \"default\";\n RoundingModeMap[RoundingModeMap[\"halfDown\"] = BigNumber.ROUND_HALF_DOWN] = \"halfDown\";\n RoundingModeMap[RoundingModeMap[\"halfEven\"] = BigNumber.ROUND_HALF_EVEN] = \"halfEven\";\n RoundingModeMap[RoundingModeMap[\"banker\"] = BigNumber.ROUND_HALF_EVEN] = \"banker\";\n RoundingModeMap[RoundingModeMap[\"ceiling\"] = BigNumber.ROUND_CEIL] = \"ceiling\";\n RoundingModeMap[RoundingModeMap[\"ceil\"] = BigNumber.ROUND_CEIL] = \"ceil\";\n RoundingModeMap[RoundingModeMap[\"floor\"] = BigNumber.ROUND_FLOOR] = \"floor\";\n})(RoundingModeMap || (RoundingModeMap = {}));\nexport function expandRoundMode(roundMode) {\n var _a;\n return ((_a = RoundingModeMap[roundMode]) !== null && _a !== void 0 ? _a : RoundingModeMap.default);\n}\n//# sourceMappingURL=expandRoundMode.js.map","import BigNumber from \"bignumber.js\";\nimport { expandRoundMode } from \"./expandRoundMode\";\nfunction digitCount(numeric) {\n if (numeric.isZero()) {\n return 1;\n }\n return Math.floor(Math.log10(numeric.abs().toNumber()) + 1);\n}\nfunction getAbsolutePrecision(numeric, { precision, significant }) {\n if (significant && precision !== null && precision > 0) {\n return precision - digitCount(numeric);\n }\n return precision;\n}\nexport function roundNumber(numeric, options) {\n const precision = getAbsolutePrecision(numeric, options);\n if (precision === null) {\n return numeric.toString();\n }\n const roundMode = expandRoundMode(options.roundMode);\n if (precision >= 0) {\n return numeric.toFixed(precision, roundMode);\n }\n const rounder = Math.pow(10, Math.abs(precision));\n numeric = new BigNumber(numeric.div(rounder).toFixed(0, roundMode)).times(rounder);\n return numeric.toString();\n}\n//# sourceMappingURL=roundNumber.js.map","import BigNumber from \"bignumber.js\";\nimport repeat from \"lodash/repeat\";\nimport { roundNumber } from \"./roundNumber\";\nfunction replaceInFormat(format, { formattedNumber, unit }) {\n return format.replace(\"%n\", formattedNumber).replace(\"%u\", unit);\n}\nfunction computeSignificand({ significand, whole, precision, }) {\n if (whole === \"0\" || precision === null) {\n return significand;\n }\n const limit = Math.max(0, precision - whole.length);\n return (significand !== null && significand !== void 0 ? significand : \"\").substr(0, limit);\n}\nexport function formatNumber(input, options) {\n var _a, _b, _c;\n const originalNumber = new BigNumber(input);\n if (options.raise && !originalNumber.isFinite()) {\n throw new Error(`\"${input}\" is not a valid numeric value`);\n }\n const roundedNumber = roundNumber(originalNumber, options);\n const numeric = new BigNumber(roundedNumber);\n const isNegative = numeric.lt(0);\n const isZero = numeric.isZero();\n let [whole, significand] = roundedNumber.split(\".\");\n const buffer = [];\n let formattedNumber;\n const positiveFormat = (_a = options.format) !== null && _a !== void 0 ? _a : \"%n\";\n const negativeFormat = (_b = options.negativeFormat) !== null && _b !== void 0 ? _b : `-${positiveFormat}`;\n const format = isNegative && !isZero ? negativeFormat : positiveFormat;\n whole = whole.replace(\"-\", \"\");\n while (whole.length > 0) {\n buffer.unshift(whole.substr(Math.max(0, whole.length - 3), 3));\n whole = whole.substr(0, whole.length - 3);\n }\n whole = buffer.join(\"\");\n formattedNumber = buffer.join(options.delimiter);\n if (options.significant) {\n significand = computeSignificand({\n whole,\n significand,\n precision: options.precision,\n });\n }\n else {\n significand = significand !== null && significand !== void 0 ? significand : repeat(\"0\", (_c = options.precision) !== null && _c !== void 0 ? _c : 0);\n }\n if (options.stripInsignificantZeros && significand) {\n significand = significand.replace(/0+$/, \"\");\n }\n if (originalNumber.isNaN()) {\n formattedNumber = input.toString();\n }\n if (significand && originalNumber.isFinite()) {\n formattedNumber += (options.separator || \".\") + significand;\n }\n return replaceInFormat(format, {\n formattedNumber,\n unit: options.unit,\n });\n}\n//# sourceMappingURL=formatNumber.js.map","export function getFullScope(i18n, scope, options) {\n let result = \"\";\n if (scope instanceof String || typeof scope === \"string\") {\n result = scope;\n }\n if (scope instanceof Array) {\n result = scope.join(i18n.defaultSeparator);\n }\n if (options.scope) {\n result = [options.scope, result].join(i18n.defaultSeparator);\n }\n return result;\n}\n//# sourceMappingURL=getFullScope.js.map","export function inferType(instance) {\n var _a, _b;\n if (instance === null) {\n return \"null\";\n }\n const type = typeof instance;\n if (type !== \"object\") {\n return type;\n }\n return ((_b = (_a = instance === null || instance === void 0 ? void 0 : instance.constructor) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || \"object\";\n}\n//# sourceMappingURL=inferType.js.map","import { isSet } from \"./isSet\";\nexport function interpolate(i18n, message, options) {\n options = Object.keys(options).reduce((buffer, key) => {\n buffer[i18n.transformKey(key)] = options[key];\n return buffer;\n }, {});\n const matches = message.match(i18n.placeholder);\n if (!matches) {\n return message;\n }\n while (matches.length) {\n let value;\n const placeholder = matches.shift();\n const name = placeholder.replace(i18n.placeholder, \"$1\");\n if (isSet(options[name])) {\n value = options[name].toString().replace(/\\$/gm, \"_#$#_\");\n }\n else if (name in options) {\n value = i18n.nullPlaceholder(i18n, placeholder, message, options);\n }\n else {\n value = i18n.missingPlaceholder(i18n, placeholder, message, options);\n }\n const regex = new RegExp(placeholder.replace(/\\{/gm, \"\\\\{\").replace(/\\}/gm, \"\\\\}\"));\n message = message.replace(regex, value);\n }\n return message.replace(/_#\\$#_/g, \"$\");\n}\n//# sourceMappingURL=interpolate.js.map","import get from \"lodash/get\";\nimport { isSet } from \"./isSet\";\nimport { getFullScope } from \"./getFullScope\";\nimport { inferType } from \"./inferType\";\nexport function lookup(i18n, scope, options = {}) {\n options = Object.assign({}, options);\n const locale = \"locale\" in options ? options.locale : i18n.locale;\n const localeType = inferType(locale);\n const locales = i18n.locales\n .get(localeType === \"string\" ? locale : typeof locale)\n .slice();\n scope = getFullScope(i18n, scope, options)\n .split(i18n.defaultSeparator)\n .map((component) => i18n.transformKey(component))\n .join(\".\");\n const entries = locales.map((locale) => get(i18n.translations, [locale, scope].join(\".\")));\n entries.push(options.defaultValue);\n return entries.find((entry) => isSet(entry));\n}\n//# sourceMappingURL=lookup.js.map","import BigNumber from \"bignumber.js\";\nimport sortBy from \"lodash/sortBy\";\nimport zipObject from \"lodash/zipObject\";\nimport { getFullScope } from \"./getFullScope\";\nimport { lookup } from \"./lookup\";\nimport { roundNumber } from \"./roundNumber\";\nimport { inferType } from \"./inferType\";\nconst DECIMAL_UNITS = {\n \"0\": \"unit\",\n \"1\": \"ten\",\n \"2\": \"hundred\",\n \"3\": \"thousand\",\n \"6\": \"million\",\n \"9\": \"billion\",\n \"12\": \"trillion\",\n \"15\": \"quadrillion\",\n \"-1\": \"deci\",\n \"-2\": \"centi\",\n \"-3\": \"mili\",\n \"-6\": \"micro\",\n \"-9\": \"nano\",\n \"-12\": \"pico\",\n \"-15\": \"femto\",\n};\nconst INVERTED_DECIMAL_UNITS = zipObject(Object.values(DECIMAL_UNITS), Object.keys(DECIMAL_UNITS).map((key) => parseInt(key, 10)));\nexport function numberToHuman(i18n, input, options) {\n const roundOptions = {\n roundMode: options.roundMode,\n precision: options.precision,\n significant: options.significant,\n };\n let units;\n if (inferType(options.units) === \"string\") {\n const scope = options.units;\n units = lookup(i18n, scope);\n if (!units) {\n throw new Error(`The scope \"${i18n.locale}${i18n.defaultSeparator}${getFullScope(i18n, scope, {})}\" couldn't be found`);\n }\n }\n else {\n units = options.units;\n }\n let formattedNumber = roundNumber(new BigNumber(input), roundOptions);\n const unitExponents = (units) => sortBy(Object.keys(units).map((name) => INVERTED_DECIMAL_UNITS[name]), (numeric) => numeric * -1);\n const calculateExponent = (num, units) => {\n const exponent = num.isZero()\n ? 0\n : Math.floor(Math.log10(num.abs().toNumber()));\n return unitExponents(units).find((exp) => exponent >= exp) || 0;\n };\n const determineUnit = (units, exponent) => {\n const expName = DECIMAL_UNITS[exponent.toString()];\n return units[expName] || \"\";\n };\n const exponent = calculateExponent(new BigNumber(formattedNumber), units);\n const unit = determineUnit(units, exponent);\n formattedNumber = roundNumber(new BigNumber(formattedNumber).div(Math.pow(10, exponent)), roundOptions);\n if (options.stripInsignificantZeros) {\n let [whole, significand] = formattedNumber.split(\".\");\n significand = (significand || \"\").replace(/0+$/, \"\");\n formattedNumber = whole;\n if (significand) {\n formattedNumber += `${options.separator}${significand}`;\n }\n }\n return options.format\n .replace(\"%n\", formattedNumber || \"0\")\n .replace(\"%u\", unit)\n .trim();\n}\n//# sourceMappingURL=numberToHuman.js.map","import BigNumber from \"bignumber.js\";\nimport { roundNumber } from \"./roundNumber\";\nimport { expandRoundMode } from \"./expandRoundMode\";\nconst STORAGE_UNITS = [\"byte\", \"kb\", \"mb\", \"gb\", \"tb\", \"pb\", \"eb\"];\nexport function numberToHumanSize(i18n, input, options) {\n const roundMode = expandRoundMode(options.roundMode);\n const base = 1024;\n const num = new BigNumber(input).abs();\n const smallerThanBase = num.lt(base);\n let numberToBeFormatted;\n const computeExponent = (numeric, units) => {\n const max = units.length - 1;\n const exp = new BigNumber(Math.log(numeric.toNumber()))\n .div(Math.log(base))\n .integerValue(BigNumber.ROUND_DOWN)\n .toNumber();\n return Math.min(max, exp);\n };\n const storageUnitKey = (units) => {\n const keyEnd = smallerThanBase ? \"byte\" : units[exponent];\n return `number.human.storage_units.units.${keyEnd}`;\n };\n const exponent = computeExponent(num, STORAGE_UNITS);\n if (smallerThanBase) {\n numberToBeFormatted = num.integerValue();\n }\n else {\n numberToBeFormatted = new BigNumber(roundNumber(num.div(Math.pow(base, exponent)), {\n significant: options.significant,\n precision: options.precision,\n roundMode: options.roundMode,\n }));\n }\n const format = i18n.translate(\"number.human.storage_units.format\", {\n defaultValue: \"%n %u\",\n });\n const unit = i18n.translate(storageUnitKey(STORAGE_UNITS), {\n count: num.integerValue().toNumber(),\n });\n let formattedNumber = numberToBeFormatted.toFixed(options.precision, roundMode);\n if (options.stripInsignificantZeros) {\n formattedNumber = formattedNumber\n .replace(/(\\..*?)0+$/, \"$1\")\n .replace(/\\.$/, \"\");\n }\n return format.replace(\"%n\", formattedNumber).replace(\"%u\", unit);\n}\n//# sourceMappingURL=numberToHumanSize.js.map","export function parseDate(input) {\n if (input instanceof Date) {\n return input;\n }\n if (typeof input === \"number\") {\n const date = new Date();\n date.setTime(input);\n return date;\n }\n const matches = new String(input).match(/(\\d{4})-(\\d{2})-(\\d{2})(?:[ T](\\d{2}):(\\d{2}):(\\d{2})(?:[.,](\\d{1,3}))?)?(Z|\\+00:?00)?/);\n if (matches) {\n const parts = matches.slice(1, 8).map((match) => parseInt(match, 10) || 0);\n parts[1] -= 1;\n const [year, month, day, hour, minute, second, milliseconds] = parts;\n const timezone = matches[8];\n if (timezone) {\n return new Date(Date.UTC(year, month, day, hour, minute, second, milliseconds));\n }\n else {\n return new Date(year, month, day, hour, minute, second, milliseconds);\n }\n }\n if (input.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\\d+) (\\d+:\\d+:\\d+) ([+-]\\d+) (\\d+)/)) {\n const date = new Date();\n date.setTime(Date.parse([RegExp.$1, RegExp.$2, RegExp.$3, RegExp.$6, RegExp.$4, RegExp.$5].join(\" \")));\n }\n const date = new Date();\n date.setTime(Date.parse(input));\n return date;\n}\n//# sourceMappingURL=parseDate.js.map","import { isSet } from \"./isSet\";\nimport { lookup } from \"./lookup\";\nexport function pluralize({ i18n, count, scope, options, baseScope, }) {\n options = Object.assign({}, options);\n let translations;\n let message;\n if (typeof scope === \"object\" && scope) {\n translations = scope;\n }\n else {\n translations = lookup(i18n, scope, options);\n }\n if (!translations) {\n return i18n.missingTranslation.get(scope, options);\n }\n const pluralizer = i18n.pluralization.get(options.locale);\n const keys = pluralizer(i18n, count);\n const missingKeys = [];\n while (keys.length) {\n const key = keys.shift();\n if (isSet(translations[key])) {\n message = translations[key];\n break;\n }\n missingKeys.push(key);\n }\n if (!isSet(message)) {\n return i18n.missingTranslation.get(baseScope.split(i18n.defaultSeparator).concat([missingKeys[0]]), options);\n }\n options.count = count;\n return i18n.interpolate(i18n, message, options);\n}\n//# sourceMappingURL=pluralize.js.map","import isObject from \"lodash/isObject\";\nimport flattenDeep from \"lodash/flattenDeep\";\nclass PropertyFlatList {\n constructor(target) {\n this.target = target;\n }\n call() {\n const keys = flattenDeep(Object.keys(this.target).map((key) => this.compute(this.target[key], key)));\n keys.sort();\n return keys;\n }\n compute(value, path) {\n if (!Array.isArray(value) && isObject(value)) {\n return Object.keys(value).map((key) => this.compute(value[key], `${path}.${key}`));\n }\n else {\n return path;\n }\n }\n}\nexport function propertyFlatList(target) {\n return new PropertyFlatList(target).call();\n}\n//# sourceMappingURL=propertyFlatList.js.map","const DEFAULT_OPTIONS = {\n meridian: { am: \"AM\", pm: \"PM\" },\n dayNames: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n abbrDayNames: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n monthNames: [\n null,\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n abbrMonthNames: [\n null,\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n};\nexport function strftime(date, format, options = {}) {\n const { abbrDayNames, dayNames, abbrMonthNames, monthNames, meridian: AM_PM, } = Object.assign(Object.assign({}, DEFAULT_OPTIONS), options);\n if (isNaN(date.getTime())) {\n throw new Error(\"strftime() requires a valid date object, but received an invalid date.\");\n }\n const weekDay = date.getDay();\n const day = date.getDate();\n const year = date.getFullYear();\n const month = date.getMonth() + 1;\n const hour = date.getHours();\n let hour12 = hour;\n const meridian = hour > 11 ? \"pm\" : \"am\";\n const secs = date.getSeconds();\n const mins = date.getMinutes();\n const offset = date.getTimezoneOffset();\n const absOffsetHours = Math.floor(Math.abs(offset / 60));\n const absOffsetMinutes = Math.abs(offset) - absOffsetHours * 60;\n const timezoneoffset = (offset > 0 ? \"-\" : \"+\") +\n (absOffsetHours.toString().length < 2\n ? \"0\" + absOffsetHours\n : absOffsetHours) +\n (absOffsetMinutes.toString().length < 2\n ? \"0\" + absOffsetMinutes\n : absOffsetMinutes);\n if (hour12 > 12) {\n hour12 = hour12 - 12;\n }\n else if (hour12 === 0) {\n hour12 = 12;\n }\n format = format.replace(\"%a\", abbrDayNames[weekDay]);\n format = format.replace(\"%A\", dayNames[weekDay]);\n format = format.replace(\"%b\", abbrMonthNames[month]);\n format = format.replace(\"%B\", monthNames[month]);\n format = format.replace(\"%d\", day.toString().padStart(2, \"0\"));\n format = format.replace(\"%e\", day.toString());\n format = format.replace(\"%-d\", day.toString());\n format = format.replace(\"%H\", hour.toString().padStart(2, \"0\"));\n format = format.replace(\"%-H\", hour.toString());\n format = format.replace(\"%k\", hour.toString());\n format = format.replace(\"%I\", hour12.toString().padStart(2, \"0\"));\n format = format.replace(\"%-I\", hour12.toString());\n format = format.replace(\"%l\", hour12.toString());\n format = format.replace(\"%m\", month.toString().padStart(2, \"0\"));\n format = format.replace(\"%-m\", month.toString());\n format = format.replace(\"%M\", mins.toString().padStart(2, \"0\"));\n format = format.replace(\"%-M\", mins.toString());\n format = format.replace(\"%p\", AM_PM[meridian]);\n format = format.replace(\"%P\", AM_PM[meridian].toLowerCase());\n format = format.replace(\"%S\", secs.toString().padStart(2, \"0\"));\n format = format.replace(\"%-S\", secs.toString());\n format = format.replace(\"%w\", weekDay.toString());\n format = format.replace(\"%y\", year.toString().padStart(2, \"0\").substr(-2));\n format = format.replace(\"%-y\", year.toString().padStart(2, \"0\").substr(-2).replace(/^0+/, \"\"));\n format = format.replace(\"%Y\", year.toString());\n format = format.replace(/%z/i, timezoneoffset);\n return format;\n}\n//# sourceMappingURL=strftime.js.map","import range from \"lodash/range\";\nimport { parseDate } from \"./parseDate\";\nconst within = (start, end, actual) => actual >= start && actual <= end;\nexport function timeAgoInWords(i18n, fromTime, toTime, options = {}) {\n const scope = options.scope || \"datetime.distance_in_words\";\n const t = (name, count = 0) => i18n.t(name, { count, scope });\n fromTime = parseDate(fromTime);\n toTime = parseDate(toTime);\n let fromInSeconds = fromTime.getTime() / 1000;\n let toInSeconds = toTime.getTime() / 1000;\n if (fromInSeconds > toInSeconds) {\n [fromTime, toTime, fromInSeconds, toInSeconds] = [\n toTime,\n fromTime,\n toInSeconds,\n fromInSeconds,\n ];\n }\n const distanceInSeconds = Math.round(toInSeconds - fromInSeconds);\n const distanceInMinutes = Math.round((toInSeconds - fromInSeconds) / 60);\n const distanceInHours = distanceInMinutes / 60;\n const distanceInDays = distanceInHours / 24;\n const distanceInHoursRounded = Math.round(distanceInMinutes / 60);\n const distanceInDaysRounded = Math.round(distanceInDays);\n const distanceInMonthsRounded = Math.round(distanceInDaysRounded / 30);\n if (within(0, 1, distanceInMinutes)) {\n if (!options.includeSeconds) {\n return distanceInMinutes === 0\n ? t(\"less_than_x_minutes\", 1)\n : t(\"x_minutes\", distanceInMinutes);\n }\n if (within(0, 4, distanceInSeconds)) {\n return t(\"less_than_x_seconds\", 5);\n }\n if (within(5, 9, distanceInSeconds)) {\n return t(\"less_than_x_seconds\", 10);\n }\n if (within(10, 19, distanceInSeconds)) {\n return t(\"less_than_x_seconds\", 20);\n }\n if (within(20, 39, distanceInSeconds)) {\n return t(\"half_a_minute\");\n }\n if (within(40, 59, distanceInSeconds)) {\n return t(\"less_than_x_minutes\", 1);\n }\n return t(\"x_minutes\", 1);\n }\n if (within(2, 44, distanceInMinutes)) {\n return t(\"x_minutes\", distanceInMinutes);\n }\n if (within(45, 89, distanceInMinutes)) {\n return t(\"about_x_hours\", 1);\n }\n if (within(90, 1439, distanceInMinutes)) {\n return t(\"about_x_hours\", distanceInHoursRounded);\n }\n if (within(1440, 2519, distanceInMinutes)) {\n return t(\"x_days\", 1);\n }\n if (within(2520, 43199, distanceInMinutes)) {\n return t(\"x_days\", distanceInDaysRounded);\n }\n if (within(43200, 86399, distanceInMinutes)) {\n return t(\"about_x_months\", Math.round(distanceInMinutes / 43200));\n }\n if (within(86400, 525599, distanceInMinutes)) {\n return t(\"x_months\", distanceInMonthsRounded);\n }\n let fromYear = fromTime.getFullYear();\n if (fromTime.getMonth() + 1 >= 3) {\n fromYear += 1;\n }\n let toYear = toTime.getFullYear();\n if (toTime.getMonth() + 1 < 3) {\n toYear -= 1;\n }\n const leapYears = fromYear > toYear\n ? 0\n : range(fromYear, toYear).filter((year) => new Date(year, 1, 29).getMonth() == 1).length;\n const minutesInYear = 525600;\n const minuteOffsetForLeapYear = leapYears * 1440;\n const minutesWithOffset = distanceInMinutes - minuteOffsetForLeapYear;\n const distanceInYears = Math.trunc(minutesWithOffset / minutesInYear);\n const diff = parseFloat((minutesWithOffset / minutesInYear - distanceInYears).toPrecision(3));\n if (diff < 0.25) {\n return t(\"about_x_years\", distanceInYears);\n }\n if (diff < 0.75) {\n return t(\"over_x_years\", distanceInYears);\n }\n return t(\"almost_x_years\", distanceInYears + 1);\n}\n//# sourceMappingURL=timeAgoInWords.js.map","import { getFullScope, inferType } from \"./helpers\";\nexport const guessStrategy = function (i18n, scope) {\n if (scope instanceof Array) {\n scope = scope.join(i18n.defaultSeparator);\n }\n const message = scope.split(i18n.defaultSeparator).slice(-1)[0];\n return (i18n.missingTranslationPrefix +\n message\n .replace(\"_\", \" \")\n .replace(/([a-z])([A-Z])/g, (_match, p1, p2) => `${p1} ${p2.toLowerCase()}`));\n};\nexport const messageStrategy = (i18n, scope, options) => {\n const fullScope = getFullScope(i18n, scope, options);\n const locale = \"locale\" in options ? options.locale : i18n.locale;\n const localeType = inferType(locale);\n const fullScopeWithLocale = [\n localeType == \"string\" ? locale : localeType,\n fullScope,\n ].join(i18n.defaultSeparator);\n return `[missing \"${fullScopeWithLocale}\" translation]`;\n};\nexport const errorStrategy = (i18n, scope, options) => {\n const fullScope = getFullScope(i18n, scope, options);\n const fullScopeWithLocale = [i18n.locale, fullScope].join(i18n.defaultSeparator);\n throw new Error(`Missing translation: ${fullScopeWithLocale}`);\n};\nexport class MissingTranslation {\n constructor(i18n) {\n this.i18n = i18n;\n this.registry = {};\n this.register(\"guess\", guessStrategy);\n this.register(\"message\", messageStrategy);\n this.register(\"error\", errorStrategy);\n }\n register(name, strategy) {\n this.registry[name] = strategy;\n }\n get(scope, options) {\n var _a;\n return this.registry[(_a = options.missingBehavior) !== null && _a !== void 0 ? _a : this.i18n.missingBehavior](this.i18n, scope, options);\n }\n}\n//# sourceMappingURL=MissingTranslation.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport get from \"lodash/get\";\nimport has from \"lodash/has\";\nimport set from \"lodash/set\";\nimport setWith from \"lodash/setWith\";\nimport { Locales } from \"./Locales\";\nimport { Pluralization } from \"./Pluralization\";\nimport { MissingTranslation } from \"./MissingTranslation\";\nimport { camelCaseKeys, createTranslationOptions, formatNumber, getFullScope, inferType, interpolate, isSet, lookup, numberToDelimited, numberToHuman, numberToHumanSize, parseDate, pluralize, propertyFlatList, strftime, timeAgoInWords, } from \"./helpers\";\nconst DEFAULT_I18N_OPTIONS = {\n defaultLocale: \"en\",\n availableLocales: [\"en\"],\n locale: \"en\",\n defaultSeparator: \".\",\n placeholder: /(?:\\{\\{|%\\{)(.*?)(?:\\}\\}?)/gm,\n enableFallback: false,\n missingBehavior: \"message\",\n missingTranslationPrefix: \"\",\n missingPlaceholder: (_i18n, placeholder) => `[missing \"${placeholder}\" value]`,\n nullPlaceholder: (i18n, placeholder, message, options) => i18n.missingPlaceholder(i18n, placeholder, message, options),\n transformKey: (key) => key,\n};\nexport class I18n {\n constructor(translations = {}, options = {}) {\n this._locale = DEFAULT_I18N_OPTIONS.locale;\n this._defaultLocale = DEFAULT_I18N_OPTIONS.defaultLocale;\n this._version = 0;\n this.onChangeHandlers = [];\n this.translations = {};\n this.availableLocales = [];\n this.t = this.translate;\n this.p = this.pluralize;\n this.l = this.localize;\n this.distanceOfTimeInWords = this.timeAgoInWords;\n const { locale, enableFallback, missingBehavior, missingTranslationPrefix, missingPlaceholder, nullPlaceholder, defaultLocale, defaultSeparator, placeholder, transformKey, } = Object.assign(Object.assign({}, DEFAULT_I18N_OPTIONS), options);\n this.locale = locale;\n this.defaultLocale = defaultLocale;\n this.defaultSeparator = defaultSeparator;\n this.enableFallback = enableFallback;\n this.locale = locale;\n this.missingBehavior = missingBehavior;\n this.missingTranslationPrefix = missingTranslationPrefix;\n this.missingPlaceholder = missingPlaceholder;\n this.nullPlaceholder = nullPlaceholder;\n this.placeholder = placeholder;\n this.pluralization = new Pluralization(this);\n this.locales = new Locales(this);\n this.missingTranslation = new MissingTranslation(this);\n this.transformKey = transformKey;\n this.interpolate = interpolate;\n this.store(translations);\n }\n store(translations) {\n const map = propertyFlatList(translations);\n map.forEach((path) => setWith(this.translations, path, get(translations, path), Object));\n this.hasChanged();\n }\n get locale() {\n return this._locale || this.defaultLocale || \"en\";\n }\n set locale(newLocale) {\n if (typeof newLocale !== \"string\") {\n throw new Error(`Expected newLocale to be a string; got ${inferType(newLocale)}`);\n }\n const changed = this._locale !== newLocale;\n this._locale = newLocale;\n if (changed) {\n this.hasChanged();\n }\n }\n get defaultLocale() {\n return this._defaultLocale || \"en\";\n }\n set defaultLocale(newLocale) {\n if (typeof newLocale !== \"string\") {\n throw new Error(`Expected newLocale to be a string; got ${inferType(newLocale)}`);\n }\n const changed = this._defaultLocale !== newLocale;\n this._defaultLocale = newLocale;\n if (changed) {\n this.hasChanged();\n }\n }\n translate(scope, options) {\n options = Object.assign({}, options);\n const translationOptions = createTranslationOptions(this, scope, options);\n let translation;\n const hasFoundTranslation = translationOptions.some((translationOption) => {\n if (isSet(translationOption.scope)) {\n translation = lookup(this, translationOption.scope, options);\n }\n else if (isSet(translationOption.message)) {\n translation = translationOption.message;\n }\n return translation !== undefined && translation !== null;\n });\n if (!hasFoundTranslation) {\n return this.missingTranslation.get(scope, options);\n }\n if (typeof translation === \"string\") {\n translation = this.interpolate(this, translation, options);\n }\n else if (typeof translation === \"object\" &&\n translation &&\n isSet(options.count)) {\n translation = pluralize({\n i18n: this,\n count: options.count || 0,\n scope: translation,\n options,\n baseScope: getFullScope(this, scope, options),\n });\n }\n if (options && translation instanceof Array) {\n translation = translation.map((entry) => typeof entry === \"string\"\n ? interpolate(this, entry, options)\n : entry);\n }\n return translation;\n }\n pluralize(count, scope, options) {\n return pluralize({\n i18n: this,\n count,\n scope,\n options: Object.assign({}, options),\n baseScope: getFullScope(this, scope, options !== null && options !== void 0 ? options : {}),\n });\n }\n localize(type, value, options) {\n options = Object.assign({}, options);\n if (value === undefined || value === null) {\n return \"\";\n }\n switch (type) {\n case \"currency\":\n return this.numberToCurrency(value);\n case \"number\":\n return formatNumber(value, Object.assign({ delimiter: \",\", precision: 3, separator: \".\", significant: false, stripInsignificantZeros: false }, lookup(this, \"number.format\")));\n case \"percentage\":\n return this.numberToPercentage(value);\n default: {\n let localizedValue;\n if (type.match(/^(date|time)/)) {\n localizedValue = this.toTime(type, value);\n }\n else {\n localizedValue = value.toString();\n }\n return interpolate(this, localizedValue, options);\n }\n }\n }\n toTime(scope, input) {\n const date = parseDate(input);\n const format = lookup(this, scope);\n if (date.toString().match(/invalid/i)) {\n return date.toString();\n }\n if (!format) {\n return date.toString();\n }\n return this.strftime(date, format);\n }\n numberToCurrency(input, options = {}) {\n return formatNumber(input, Object.assign(Object.assign(Object.assign({ delimiter: \",\", format: \"%u%n\", precision: 2, separator: \".\", significant: false, stripInsignificantZeros: false, unit: \"$\" }, camelCaseKeys(this.get(\"number.format\"))), camelCaseKeys(this.get(\"number.currency.format\"))), options));\n }\n numberToPercentage(input, options = {}) {\n return formatNumber(input, Object.assign(Object.assign(Object.assign({ delimiter: \"\", format: \"%n%\", precision: 3, stripInsignificantZeros: false, separator: \".\", significant: false }, camelCaseKeys(this.get(\"number.format\"))), camelCaseKeys(this.get(\"number.percentage.format\"))), options));\n }\n numberToHumanSize(input, options = {}) {\n return numberToHumanSize(this, input, Object.assign(Object.assign(Object.assign({ delimiter: \"\", precision: 3, significant: true, stripInsignificantZeros: true, units: {\n billion: \"Billion\",\n million: \"Million\",\n quadrillion: \"Quadrillion\",\n thousand: \"Thousand\",\n trillion: \"Trillion\",\n unit: \"\",\n } }, camelCaseKeys(this.get(\"number.human.format\"))), camelCaseKeys(this.get(\"number.human.storage_units\"))), options));\n }\n numberToHuman(input, options = {}) {\n return numberToHuman(this, input, Object.assign(Object.assign(Object.assign({ delimiter: \"\", separator: \".\", precision: 3, significant: true, stripInsignificantZeros: true, format: \"%n %u\", roundMode: \"default\", units: {\n billion: \"Billion\",\n million: \"Million\",\n quadrillion: \"Quadrillion\",\n thousand: \"Thousand\",\n trillion: \"Trillion\",\n unit: \"\",\n } }, camelCaseKeys(this.get(\"number.human.format\"))), camelCaseKeys(this.get(\"number.human.decimal_units\"))), options));\n }\n numberToRounded(input, options) {\n return formatNumber(input, Object.assign({ unit: \"\", precision: 3, significant: false, separator: \".\", delimiter: \"\", stripInsignificantZeros: false }, options));\n }\n numberToDelimited(input, options = {}) {\n return numberToDelimited(input, Object.assign({ delimiterPattern: /(\\d)(?=(\\d\\d\\d)+(?!\\d))/g, delimiter: \",\", separator: \".\" }, options));\n }\n withLocale(locale, callback) {\n return __awaiter(this, void 0, void 0, function* () {\n const originalLocale = this.locale;\n try {\n this.locale = locale;\n yield callback();\n }\n finally {\n this.locale = originalLocale;\n }\n });\n }\n strftime(date, format, options = {}) {\n return strftime(date, format, Object.assign(Object.assign(Object.assign({}, camelCaseKeys(lookup(this, \"date\"))), { meridian: {\n am: lookup(this, \"time.am\") || \"AM\",\n pm: lookup(this, \"time.pm\") || \"PM\",\n } }), options));\n }\n update(path, override, options = { strict: false }) {\n if (options.strict && !has(this.translations, path)) {\n throw new Error(`The path \"${path}\" is not currently defined`);\n }\n const currentNode = get(this.translations, path);\n const currentType = inferType(currentNode);\n const overrideType = inferType(override);\n if (options.strict && currentType !== overrideType) {\n throw new Error(`The current type for \"${path}\" is \"${currentType}\", but you're trying to override it with \"${overrideType}\"`);\n }\n let newNode;\n if (overrideType === \"object\") {\n newNode = Object.assign(Object.assign({}, currentNode), override);\n }\n else {\n newNode = override;\n }\n set(this.translations, path, newNode);\n this.hasChanged();\n }\n toSentence(items, options = {}) {\n const { wordsConnector, twoWordsConnector, lastWordConnector } = Object.assign(Object.assign({ wordsConnector: \", \", twoWordsConnector: \" and \", lastWordConnector: \", and \" }, camelCaseKeys(lookup(this, \"support.array\"))), options);\n const size = items.length;\n switch (size) {\n case 0:\n return \"\";\n case 1:\n return `${items[0]}`;\n case 2:\n return items.join(twoWordsConnector);\n default:\n return [\n items.slice(0, size - 1).join(wordsConnector),\n lastWordConnector,\n items[size - 1],\n ].join(\"\");\n }\n }\n timeAgoInWords(fromTime, toTime, options = {}) {\n return timeAgoInWords(this, fromTime, toTime, options);\n }\n onChange(callback) {\n this.onChangeHandlers.push(callback);\n return () => {\n this.onChangeHandlers.splice(this.onChangeHandlers.indexOf(callback), 1);\n };\n }\n get version() {\n return this._version;\n }\n formatNumber(input, options) {\n return formatNumber(input, options);\n }\n get(scope) {\n return lookup(this, scope);\n }\n runCallbacks() {\n this.onChangeHandlers.forEach((callback) => callback(this));\n }\n hasChanged() {\n this._version += 1;\n this.runCallbacks();\n }\n}\n//# sourceMappingURL=I18n.js.map","import { isSet } from \"./isSet\";\nexport function createTranslationOptions(i18n, scope, options) {\n let translationOptions = [{ scope }];\n if (isSet(options.defaults)) {\n translationOptions = translationOptions.concat(options.defaults);\n }\n if (isSet(options.defaultValue)) {\n const message = typeof options.defaultValue === \"function\"\n ? options.defaultValue(i18n, scope, options)\n : options.defaultValue;\n translationOptions.push({ message });\n delete options.defaultValue;\n }\n return translationOptions;\n}\n//# sourceMappingURL=createTranslationOptions.js.map","import BigNumber from \"bignumber.js\";\nexport function numberToDelimited(input, options) {\n const numeric = new BigNumber(input);\n if (!numeric.isFinite()) {\n return input.toString();\n }\n if (!options.delimiterPattern.global) {\n throw new Error(`options.delimiterPattern must be a global regular expression; received ${options.delimiterPattern}`);\n }\n let [left, right] = numeric.toString().split(\".\");\n left = left.replace(options.delimiterPattern, (digitToDelimiter) => `${digitToDelimiter}${options.delimiter}`);\n return [left, right].filter(Boolean).join(options.separator);\n}\n//# sourceMappingURL=numberToDelimited.js.map","var baseHas = require('./_baseHas'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\nfunction has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n}\n\nmodule.exports = has;\n","var baseSet = require('./_baseSet');\n\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\nfunction set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n}\n\nmodule.exports = set;\n","var baseSet = require('./_baseSet');\n\n/**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\nfunction setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n}\n\nmodule.exports = setWith;\n","var baseUniq = require('./_baseUniq');\n\n/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\nfunction uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n}\n\nmodule.exports = uniq;\n","var capitalize = require('./capitalize'),\n createCompounder = require('./_createCompounder');\n\n/**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\nvar camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n});\n\nmodule.exports = camelCase;\n","var baseRepeat = require('./_baseRepeat'),\n isIterateeCall = require('./_isIterateeCall'),\n toInteger = require('./toInteger'),\n toString = require('./toString');\n\n/**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\nfunction repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n}\n\nmodule.exports = repeat;\n","var baseFlatten = require('./_baseFlatten'),\n baseOrderBy = require('./_baseOrderBy'),\n baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\nvar sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n});\n\nmodule.exports = sortBy;\n","var assignValue = require('./_assignValue'),\n baseZipObject = require('./_baseZipObject');\n\n/**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nfunction zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n}\n\nmodule.exports = zipObject;\n","var baseFlatten = require('./_baseFlatten');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\nfunction flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n}\n\nmodule.exports = flattenDeep;\n","var createRange = require('./_createRange');\n\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\nvar range = createRange();\n\nmodule.exports = range;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n}\n\nmodule.exports = baseHas;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n","/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n","var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var toString = require('./toString'),\n upperFirst = require('./upperFirst');\n\n/**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\nfunction capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n}\n\nmodule.exports = capitalize;\n","var createCaseFirst = require('./_createCaseFirst');\n\n/**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\nvar upperFirst = createCaseFirst('toUpperCase');\n\nmodule.exports = upperFirst;\n","var castSlice = require('./_castSlice'),\n hasUnicode = require('./_hasUnicode'),\n stringToArray = require('./_stringToArray'),\n toString = require('./toString');\n\n/**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\nfunction createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n}\n\nmodule.exports = createCaseFirst;\n","var baseSlice = require('./_baseSlice');\n\n/**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\nfunction castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n}\n\nmodule.exports = castSlice;\n","/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nmodule.exports = baseSlice;\n","var asciiToArray = require('./_asciiToArray'),\n hasUnicode = require('./_hasUnicode'),\n unicodeToArray = require('./_unicodeToArray');\n\n/**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n}\n\nmodule.exports = stringToArray;\n","/**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction asciiToArray(string) {\n return string.split('');\n}\n\nmodule.exports = asciiToArray;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction unicodeToArray(string) {\n return string.match(reUnicode) || [];\n}\n\nmodule.exports = unicodeToArray;\n","var arrayReduce = require('./_arrayReduce'),\n deburr = require('./deburr'),\n words = require('./words');\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\";\n\n/** Used to match apostrophes. */\nvar reApos = RegExp(rsApos, 'g');\n\n/**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\nfunction createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n}\n\nmodule.exports = createCompounder;\n","/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n}\n\nmodule.exports = arrayReduce;\n","var deburrLetter = require('./_deburrLetter'),\n toString = require('./toString');\n\n/** Used to match Latin Unicode letters (excluding mathematical operators). */\nvar reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n/** Used to compose unicode character classes. */\nvar rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;\n\n/** Used to compose unicode capture groups. */\nvar rsCombo = '[' + rsComboRange + ']';\n\n/**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\nvar reComboMark = RegExp(rsCombo, 'g');\n\n/**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\nfunction deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n}\n\nmodule.exports = deburr;\n","var basePropertyOf = require('./_basePropertyOf');\n\n/** Used to map Latin Unicode letters to basic Latin letters. */\nvar deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n};\n\n/**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\nvar deburrLetter = basePropertyOf(deburredLetters);\n\nmodule.exports = deburrLetter;\n","/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = basePropertyOf;\n","var asciiWords = require('./_asciiWords'),\n hasUnicodeWord = require('./_hasUnicodeWord'),\n toString = require('./toString'),\n unicodeWords = require('./_unicodeWords');\n\n/**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\nfunction words(string, pattern, guard) {\n string = toString(string);\n pattern = guard ? undefined : pattern;\n\n if (pattern === undefined) {\n return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n }\n return string.match(pattern) || [];\n}\n\nmodule.exports = words;\n","/** Used to match words composed of alphanumeric characters. */\nvar reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n/**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction asciiWords(string) {\n return string.match(reAsciiWord) || [];\n}\n\nmodule.exports = asciiWords;\n","/** Used to detect strings that need a more robust regexp to match words. */\nvar reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n/**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\nfunction hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n}\n\nmodule.exports = hasUnicodeWord;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\",\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;\n\n/** Used to match complex or compound words. */\nvar reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n].join('|'), 'g');\n\n/**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n}\n\nmodule.exports = unicodeWords;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeFloor = Math.floor;\n\n/**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\nfunction baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n}\n\nmodule.exports = baseRepeat;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","var arrayMap = require('./_arrayMap'),\n baseGet = require('./_baseGet'),\n baseIteratee = require('./_baseIteratee'),\n baseMap = require('./_baseMap'),\n baseSortBy = require('./_baseSortBy'),\n baseUnary = require('./_baseUnary'),\n compareMultiple = require('./_compareMultiple'),\n identity = require('./identity'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\nfunction baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(baseIteratee));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n}\n\nmodule.exports = baseOrderBy;\n","var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n","var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n","var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n","var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n","var baseEach = require('./_baseEach'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nmodule.exports = baseMap;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","/**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\nfunction baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n}\n\nmodule.exports = baseSortBy;\n","var compareAscending = require('./_compareAscending');\n\n/**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\nfunction compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n}\n\nmodule.exports = compareMultiple;\n","var isSymbol = require('./isSymbol');\n\n/**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\nfunction compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n}\n\nmodule.exports = compareAscending;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","/**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\nfunction baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n}\n\nmodule.exports = baseZipObject;\n","var baseRange = require('./_baseRange'),\n isIterateeCall = require('./_isIterateeCall'),\n toFinite = require('./toFinite');\n\n/**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\nfunction createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n}\n\nmodule.exports = createRange;\n","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nfunction baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n}\n\nmodule.exports = baseRange;\n","import { addSnackbarItem } from '../Snackbar';\nimport {\n initializeDropdown,\n getDropdownRepositionListener,\n} from '@utilities/dropdownUtils';\nimport { locale } from '@utilities/locale';\nimport { copyToClipboard } from '@utilities/runtime';\n\nconst handleCopyPermalink = (closeDropdown) => {\n return (event) => {\n event.preventDefault();\n const permalink = event.target.href;\n copyToClipboard(permalink).then(() => {\n addSnackbarItem({ message: 'Copied to clipboard' });\n });\n closeDropdown();\n };\n};\n\nconst initializeArticlePageDropdowns = () => {\n // Gather all dropdown triggers for comment options and profile previews\n const dropdownTriggers = document.querySelectorAll(\n 'button[id^=comment-dropdown-trigger], button[id^=comment-profile-preview-trigger-], button[id^=toggle-comments-sort-dropdown]',\n );\n\n for (const dropdownTrigger of dropdownTriggers) {\n if (dropdownTrigger.dataset.initialized) {\n // Make sure we only initialize once\n continue;\n }\n\n const isProfilePreview = dropdownTrigger.id.includes(\n 'comment-profile-preview-trigger',\n );\n\n const dropdownContentId = dropdownTrigger.getAttribute('aria-controls');\n const dropdownElement = document.getElementById(dropdownContentId);\n\n if (dropdownElement) {\n const { closeDropdown } = initializeDropdown({\n triggerElementId: dropdownTrigger.id,\n dropdownContentId,\n onOpen: () => {\n if (isProfilePreview) {\n dropdownElement?.classList.add('showing');\n }\n },\n onClose: () => {\n if (isProfilePreview) {\n dropdownElement?.classList.remove('showing');\n }\n },\n });\n\n // Add actual link location (SEO doesn't like these \"useless\" links, so adding in here instead of in HTML)\n const reportAbuseWrapper = dropdownElement.querySelector(\n '.report-abuse-link-wrapper',\n );\n if (reportAbuseWrapper) {\n reportAbuseWrapper.innerHTML = `${locale(\n 'core.report_abuse',\n )}`;\n }\n\n // Initialize the \"Copy link\" functionality\n dropdownElement\n .querySelector('.permalink-copybtn')\n ?.addEventListener('click', handleCopyPermalink(closeDropdown));\n\n dropdownTrigger.dataset.initialized = true;\n }\n }\n};\n\n/**\n * Function to retrieve the Profile Preview Card for newly added comments, and asynchronously replace the placeholder\n *\n * @param {HTMLElement} placeholderElement The placeholder element to be replaced by the preview dropdown\n */\nconst fetchMissingProfilePreviewCard = async (placeholderElement) => {\n const {\n jsCommentUserId: commentUserId,\n jsDropdownContentId: dropdownContentId,\n } = placeholderElement.dataset;\n const response = await window.fetch(\n `/profile_preview_cards/${commentUserId}`,\n );\n const htmlContent = await response.text();\n\n const generatedElement = document.createElement('div');\n generatedElement.innerHTML = htmlContent;\n\n const { firstElementChild: previewCard } = generatedElement;\n previewCard.id = dropdownContentId;\n\n placeholderElement.parentNode.replaceChild(previewCard, placeholderElement);\n};\n\n/**\n * When a new comment is added to a discussion, the preview card dropdown must be dynamically fetched.\n * This function detects if a preview card placeholder has been added in a given mutation and initiates the profile card fetch.\n **/\nconst checkMutationForProfilePreviewCardPlaceholder = (mutation) => {\n mutation.addedNodes.forEach((node) => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const placeholder = node.getElementsByClassName(\n 'preview-card-placeholder',\n )[0];\n if (placeholder) {\n fetchMissingProfilePreviewCard(placeholder);\n }\n }\n });\n};\n\nconst observer = new MutationObserver((mutationsList) => {\n mutationsList.forEach((mutation) => {\n if (mutation.type === 'childList') {\n checkMutationForProfilePreviewCardPlaceholder(mutation);\n initializeArticlePageDropdowns();\n }\n });\n});\n\nobserver.observe(document.getElementById('comment-trees-container'), {\n childList: true,\n subtree: true,\n});\n\n// Preview card dropdowns reposition on scroll\nconst dropdownRepositionListener = getDropdownRepositionListener();\ndocument.addEventListener('scroll', dropdownRepositionListener);\n\nInstantClick.on('change', () => {\n observer.disconnect();\n document.removeEventListener('scroll', dropdownRepositionListener);\n});\n\nwindow.addEventListener('beforeunload', () => {\n observer.disconnect();\n document.removeEventListener('scroll', dropdownRepositionListener);\n});\n\ninitializeArticlePageDropdowns();\n"],"sourceRoot":""}