openc3-cosmos-tool-tlmgrapher 5.1.1 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/tools/tlmgrapher/js/163.js +24 -0
- data/tools/tlmgrapher/js/163.js.map +1 -0
- data/tools/tlmgrapher/js/463.js +2 -0
- data/tools/tlmgrapher/js/463.js.map +1 -0
- data/tools/tlmgrapher/js/app.js +1 -1
- data/tools/tlmgrapher/js/app.js.map +1 -1
- metadata +6 -6
- data/tools/tlmgrapher/js/569.js +0 -2
- data/tools/tlmgrapher/js/569.js.map +0 -1
- data/tools/tlmgrapher/js/798.js +0 -24
- data/tools/tlmgrapher/js/798.js.map +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"js/798.js","mappings":"oNAAA,IAAIA,EAAW,CACbC,OAAQC,KAAKC,QACbC,UAAWF,KAAKE,WAGdH,EAAS,CACXI,OAAOC,GACDC,KAAKC,UACPF,EAASG,KAAKC,KAAKC,OACnBX,EAASC,OAAOI,IAAI,mBAAoBC,GAE5C,GAGF,MAAMK,EAAM,KAAM,IAAKD,MAAME,UAEvBC,EAAeC,IAASH,IAAQG,GAAQ,IAE9C,MAAMC,EACJC,YAAYC,GACVV,KAAKW,oBAAsBX,KAAKW,oBAAoBC,KAAKZ,MACzDA,KAAKU,WAAaA,EAClBV,KAAKa,kBAAoB,CAC3B,CACAC,QACOd,KAAKe,cACRf,KAAKgB,UAAYZ,WACVJ,KAAKiB,UACZjB,KAAKkB,eACLC,iBAAiB,mBAAoBnB,KAAKW,qBAC1CjB,EAAOI,IAAI,gDAAgDE,KAAKS,YAAYW,oBAEhF,CACAC,OACMrB,KAAKe,cACPf,KAAKiB,UAAYb,IACjBJ,KAAKsB,cACLC,oBAAoB,mBAAoBvB,KAAKW,qBAC7CjB,EAAOI,IAAI,6BAEf,CACAiB,YACE,OAAOf,KAAKgB,YAAchB,KAAKiB,SACjC,CACAO,aACExB,KAAKyB,SAAWrB,GAClB,CACAsB,gBACE1B,KAAKa,kB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G,EACtH,C,sBCFe,SAASiB,IACtB,MAAM,IAAI/mE,UAAU,uIACtB,CCEe,SAASgnE,EAAmBxtG,GACzC,OAAOytG,EAAkBztG,IAAQ0tG,EAAgB1tG,KAAQyoG,EAAAA,EAAAA,GAA2BzoG,IAAQ2tG,GAC9F,C","sources":["webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/@rails/actioncable/app/assets/javascripts/actioncable.esm.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/uplot/dist/uPlot.esm.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/uplot/dist/uPlot.min.css","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/adapters/xhr.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/axios.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/cancel/CancelToken.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/cancel/CanceledError.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/cancel/isCancel.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/core/Axios.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/core/AxiosError.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/core/InterceptorManager.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/core/buildFullPath.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/core/dispatchRequest.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/core/mergeConfig.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/core/settle.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/core/transformData.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/defaults/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/defaults/transitional.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/env/data.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/bind.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/buildURL.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/combineURLs.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/cookies.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/isAxiosError.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/normalizeHeaderName.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/null.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/parseHeaders.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/parseProtocol.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/spread.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/toFormData.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/helpers/validator.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/axios/lib/utils.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/binary-search/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/array-buffer-basic-detection.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/array-buffer-view-core.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/array-buffer.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/array-copy-within.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/array-from-constructor-and-list.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/array-iteration-from-last.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/array-last-index-of.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/collection-strong.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/collection-weak.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/collection.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/define-built-in-accessor.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/define-built-ins.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/ieee754.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/is-big-int-array.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/is-integral-number.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/math-expm1.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/math-log10.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/number-parse-float.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/same-value.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/string-pad-webkit-bug.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/string-pad.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/to-big-int.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/to-index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/to-offset.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/to-positive-integer.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/typed-array-constructor.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/typed-array-constructors-require-wrappers.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/typed-array-from-species-and-list.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/typed-array-from.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/internals/typed-array-species-constructor.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.json.to-string-tag.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.map.constructor.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.map.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.math.asinh.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.math.log10.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.math.log2.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.math.sign.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.math.sinh.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.math.to-string-tag.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.object.entries.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.parse-float.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.regexp.flags.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.set.constructor.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.set.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.string.pad-start.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.string.replace-all.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.string.search.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.symbol.async-iterator.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.symbol.to-string-tag.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.at.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.copy-within.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.every.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.fill.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.filter.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.find-index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.find-last-index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.find-last.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.find.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.for-each.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.includes.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.index-of.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.iterator.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.join.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.last-index-of.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.map.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.reduce-right.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.reduce.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.reverse.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.set.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.slice.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.some.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.sort.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.to-locale-string.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.to-string.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.typed-array.uint8-array.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.weak-map.constructor.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/es.weak-map.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/core-js/modules/web.queue-microtask.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/en-US/_lib/match/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/locale/en-US/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/defaultLocale/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/defaultOptions/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/format/longFormatters/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/getUTCWeek/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/protectedTokens/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/requiredArgs/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/toInteger/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/addLeadingZeros/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/format/lightFormatters/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/format/formatters/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/format/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/isDate/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/isValid/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/assign/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/Setter.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/Parser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/EraParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/constants/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/constants.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/utils.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/YearParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/LocalWeekYearParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/ISOWeekYearParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/ExtendedYearParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/QuarterParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/StandAloneQuarterParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/MonthParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/StandAloneMonthParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/setUTCWeek/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/LocalWeekParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/setUTCISOWeek/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/ISOWeekParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/DateParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/DayOfYearParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/setUTCDay/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/DayParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/LocalDayParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/StandAloneLocalDayParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/_lib/setUTCISODay/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/ISODayParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/AMPMParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/AMPMMidnightParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/DayPeriodParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/Hour1to12Parser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/Hour0to23Parser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/Hour0To11Parser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/Hour1To24Parser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/MinuteParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/SecondParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/FractionOfSecondParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/ISOTimezoneWithZParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/ISOTimezoneParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/TimestampSecondsParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/TimestampMillisecondsParser.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/_lib/parsers/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/parse/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/addMilliseconds/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/subMilliseconds/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/date-fns/esm/toDate/index.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/muuri/dist/muuri.module.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/uplot/dist/uPlot.min.css?5af8","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://@openc3/cosmos-tool-tlmgrapher/../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"],"sourcesContent":["var adapters = {\n logger: self.console,\n WebSocket: self.WebSocket\n};\n\nvar logger = {\n log(...messages) {\n if (this.enabled) {\n messages.push(Date.now());\n adapters.logger.log(\"[ActionCable]\", ...messages);\n }\n }\n};\n\nconst now = () => (new Date).getTime();\n\nconst secondsSince = time => (now() - time) / 1e3;\n\nclass ConnectionMonitor {\n constructor(connection) {\n this.visibilityDidChange = this.visibilityDidChange.bind(this);\n this.connection = connection;\n this.reconnectAttempts = 0;\n }\n start() {\n if (!this.isRunning()) {\n this.startedAt = now();\n delete this.stoppedAt;\n this.startPolling();\n addEventListener(\"visibilitychange\", this.visibilityDidChange);\n logger.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`);\n }\n }\n stop() {\n if (this.isRunning()) {\n this.stoppedAt = now();\n this.stopPolling();\n removeEventListener(\"visibilitychange\", this.visibilityDidChange);\n logger.log(\"ConnectionMonitor stopped\");\n }\n }\n isRunning() {\n return this.startedAt && !this.stoppedAt;\n }\n recordPing() {\n this.pingedAt = now();\n }\n recordConnect() {\n this.reconnectAttempts = 0;\n this.recordPing();\n delete this.disconnectedAt;\n logger.log(\"ConnectionMonitor recorded connect\");\n }\n recordDisconnect() {\n this.disconnectedAt = now();\n logger.log(\"ConnectionMonitor recorded disconnect\");\n }\n startPolling() {\n this.stopPolling();\n this.poll();\n }\n stopPolling() {\n clearTimeout(this.pollTimeout);\n }\n poll() {\n this.pollTimeout = setTimeout((() => {\n this.reconnectIfStale();\n this.poll();\n }), this.getPollInterval());\n }\n getPollInterval() {\n const {staleThreshold: staleThreshold, reconnectionBackoffRate: reconnectionBackoffRate} = this.constructor;\n const backoff = Math.pow(1 + reconnectionBackoffRate, Math.min(this.reconnectAttempts, 10));\n const jitterMax = this.reconnectAttempts === 0 ? 1 : reconnectionBackoffRate;\n const jitter = jitterMax * Math.random();\n return staleThreshold * 1e3 * backoff * (1 + jitter);\n }\n reconnectIfStale() {\n if (this.connectionIsStale()) {\n logger.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${secondsSince(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`);\n this.reconnectAttempts++;\n if (this.disconnectedRecently()) {\n logger.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${secondsSince(this.disconnectedAt)} s`);\n } else {\n logger.log(\"ConnectionMonitor reopening\");\n this.connection.reopen();\n }\n }\n }\n get refreshedAt() {\n return this.pingedAt ? this.pingedAt : this.startedAt;\n }\n connectionIsStale() {\n return secondsSince(this.refreshedAt) > this.constructor.staleThreshold;\n }\n disconnectedRecently() {\n return this.disconnectedAt && secondsSince(this.disconnectedAt) < this.constructor.staleThreshold;\n }\n visibilityDidChange() {\n if (document.visibilityState === \"visible\") {\n setTimeout((() => {\n if (this.connectionIsStale() || !this.connection.isOpen()) {\n logger.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`);\n this.connection.reopen();\n }\n }), 200);\n }\n }\n}\n\nConnectionMonitor.staleThreshold = 6;\n\nConnectionMonitor.reconnectionBackoffRate = .15;\n\nvar INTERNAL = {\n message_types: {\n welcome: \"welcome\",\n disconnect: \"disconnect\",\n ping: \"ping\",\n confirmation: \"confirm_subscription\",\n rejection: \"reject_subscription\"\n },\n disconnect_reasons: {\n unauthorized: \"unauthorized\",\n invalid_request: \"invalid_request\",\n server_restart: \"server_restart\"\n },\n default_mount_path: \"/cable\",\n protocols: [ \"actioncable-v1-json\", \"actioncable-unsupported\" ]\n};\n\nconst {message_types: message_types, protocols: protocols} = INTERNAL;\n\nconst supportedProtocols = protocols.slice(0, protocols.length - 1);\n\nconst indexOf = [].indexOf;\n\nclass Connection {\n constructor(consumer) {\n this.open = this.open.bind(this);\n this.consumer = consumer;\n this.subscriptions = this.consumer.subscriptions;\n this.monitor = new ConnectionMonitor(this);\n this.disconnected = true;\n }\n send(data) {\n if (this.isOpen()) {\n this.webSocket.send(JSON.stringify(data));\n return true;\n } else {\n return false;\n }\n }\n open() {\n if (this.isActive()) {\n logger.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`);\n return false;\n } else {\n logger.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${protocols}`);\n if (this.webSocket) {\n this.uninstallEventHandlers();\n }\n this.webSocket = new adapters.WebSocket(this.consumer.url, protocols);\n this.installEventHandlers();\n this.monitor.start();\n return true;\n }\n }\n close({allowReconnect: allowReconnect} = {\n allowReconnect: true\n }) {\n if (!allowReconnect) {\n this.monitor.stop();\n }\n if (this.isOpen()) {\n return this.webSocket.close();\n }\n }\n reopen() {\n logger.log(`Reopening WebSocket, current state is ${this.getState()}`);\n if (this.isActive()) {\n try {\n return this.close();\n } catch (error) {\n logger.log(\"Failed to reopen WebSocket\", error);\n } finally {\n logger.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`);\n setTimeout(this.open, this.constructor.reopenDelay);\n }\n } else {\n return this.open();\n }\n }\n getProtocol() {\n if (this.webSocket) {\n return this.webSocket.protocol;\n }\n }\n isOpen() {\n return this.isState(\"open\");\n }\n isActive() {\n return this.isState(\"open\", \"connecting\");\n }\n isProtocolSupported() {\n return indexOf.call(supportedProtocols, this.getProtocol()) >= 0;\n }\n isState(...states) {\n return indexOf.call(states, this.getState()) >= 0;\n }\n getState() {\n if (this.webSocket) {\n for (let state in adapters.WebSocket) {\n if (adapters.WebSocket[state] === this.webSocket.readyState) {\n return state.toLowerCase();\n }\n }\n }\n return null;\n }\n installEventHandlers() {\n for (let eventName in this.events) {\n const handler = this.events[eventName].bind(this);\n this.webSocket[`on${eventName}`] = handler;\n }\n }\n uninstallEventHandlers() {\n for (let eventName in this.events) {\n this.webSocket[`on${eventName}`] = function() {};\n }\n }\n}\n\nConnection.reopenDelay = 500;\n\nConnection.prototype.events = {\n message(event) {\n if (!this.isProtocolSupported()) {\n return;\n }\n const {identifier: identifier, message: message, reason: reason, reconnect: reconnect, type: type} = JSON.parse(event.data);\n switch (type) {\n case message_types.welcome:\n this.monitor.recordConnect();\n return this.subscriptions.reload();\n\n case message_types.disconnect:\n logger.log(`Disconnecting. Reason: ${reason}`);\n return this.close({\n allowReconnect: reconnect\n });\n\n case message_types.ping:\n return this.monitor.recordPing();\n\n case message_types.confirmation:\n this.subscriptions.confirmSubscription(identifier);\n return this.subscriptions.notify(identifier, \"connected\");\n\n case message_types.rejection:\n return this.subscriptions.reject(identifier);\n\n default:\n return this.subscriptions.notify(identifier, \"received\", message);\n }\n },\n open() {\n logger.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`);\n this.disconnected = false;\n if (!this.isProtocolSupported()) {\n logger.log(\"Protocol is unsupported. Stopping monitor and disconnecting.\");\n return this.close({\n allowReconnect: false\n });\n }\n },\n close(event) {\n logger.log(\"WebSocket onclose event\");\n if (this.disconnected) {\n return;\n }\n this.disconnected = true;\n this.monitor.recordDisconnect();\n return this.subscriptions.notifyAll(\"disconnected\", {\n willAttemptReconnect: this.monitor.isRunning()\n });\n },\n error() {\n logger.log(\"WebSocket onerror event\");\n }\n};\n\nconst extend = function(object, properties) {\n if (properties != null) {\n for (let key in properties) {\n const value = properties[key];\n object[key] = value;\n }\n }\n return object;\n};\n\nclass Subscription {\n constructor(consumer, params = {}, mixin) {\n this.consumer = consumer;\n this.identifier = JSON.stringify(params);\n extend(this, mixin);\n }\n perform(action, data = {}) {\n data.action = action;\n return this.send(data);\n }\n send(data) {\n return this.consumer.send({\n command: \"message\",\n identifier: this.identifier,\n data: JSON.stringify(data)\n });\n }\n unsubscribe() {\n return this.consumer.subscriptions.remove(this);\n }\n}\n\nclass SubscriptionGuarantor {\n constructor(subscriptions) {\n this.subscriptions = subscriptions;\n this.pendingSubscriptions = [];\n }\n guarantee(subscription) {\n if (this.pendingSubscriptions.indexOf(subscription) == -1) {\n logger.log(`SubscriptionGuarantor guaranteeing ${subscription.identifier}`);\n this.pendingSubscriptions.push(subscription);\n } else {\n logger.log(`SubscriptionGuarantor already guaranteeing ${subscription.identifier}`);\n }\n this.startGuaranteeing();\n }\n forget(subscription) {\n logger.log(`SubscriptionGuarantor forgetting ${subscription.identifier}`);\n this.pendingSubscriptions = this.pendingSubscriptions.filter((s => s !== subscription));\n }\n startGuaranteeing() {\n this.stopGuaranteeing();\n this.retrySubscribing();\n }\n stopGuaranteeing() {\n clearTimeout(this.retryTimeout);\n }\n retrySubscribing() {\n this.retryTimeout = setTimeout((() => {\n if (this.subscriptions && typeof this.subscriptions.subscribe === \"function\") {\n this.pendingSubscriptions.map((subscription => {\n logger.log(`SubscriptionGuarantor resubscribing ${subscription.identifier}`);\n this.subscriptions.subscribe(subscription);\n }));\n }\n }), 500);\n }\n}\n\nclass Subscriptions {\n constructor(consumer) {\n this.consumer = consumer;\n this.guarantor = new SubscriptionGuarantor(this);\n this.subscriptions = [];\n }\n create(channelName, mixin) {\n const channel = channelName;\n const params = typeof channel === \"object\" ? channel : {\n channel: channel\n };\n const subscription = new Subscription(this.consumer, params, mixin);\n return this.add(subscription);\n }\n add(subscription) {\n this.subscriptions.push(subscription);\n this.consumer.ensureActiveConnection();\n this.notify(subscription, \"initialized\");\n this.subscribe(subscription);\n return subscription;\n }\n remove(subscription) {\n this.forget(subscription);\n if (!this.findAll(subscription.identifier).length) {\n this.sendCommand(subscription, \"unsubscribe\");\n }\n return subscription;\n }\n reject(identifier) {\n return this.findAll(identifier).map((subscription => {\n this.forget(subscription);\n this.notify(subscription, \"rejected\");\n return subscription;\n }));\n }\n forget(subscription) {\n this.guarantor.forget(subscription);\n this.subscriptions = this.subscriptions.filter((s => s !== subscription));\n return subscription;\n }\n findAll(identifier) {\n return this.subscriptions.filter((s => s.identifier === identifier));\n }\n reload() {\n return this.subscriptions.map((subscription => this.subscribe(subscription)));\n }\n notifyAll(callbackName, ...args) {\n return this.subscriptions.map((subscription => this.notify(subscription, callbackName, ...args)));\n }\n notify(subscription, callbackName, ...args) {\n let subscriptions;\n if (typeof subscription === \"string\") {\n subscriptions = this.findAll(subscription);\n } else {\n subscriptions = [ subscription ];\n }\n return subscriptions.map((subscription => typeof subscription[callbackName] === \"function\" ? subscription[callbackName](...args) : undefined));\n }\n subscribe(subscription) {\n if (this.sendCommand(subscription, \"subscribe\")) {\n this.guarantor.guarantee(subscription);\n }\n }\n confirmSubscription(identifier) {\n logger.log(`Subscription confirmed ${identifier}`);\n this.findAll(identifier).map((subscription => this.guarantor.forget(subscription)));\n }\n sendCommand(subscription, command) {\n const {identifier: identifier} = subscription;\n return this.consumer.send({\n command: command,\n identifier: identifier\n });\n }\n}\n\nclass Consumer {\n constructor(url) {\n this._url = url;\n this.subscriptions = new Subscriptions(this);\n this.connection = new Connection(this);\n }\n get url() {\n return createWebSocketURL(this._url);\n }\n send(data) {\n return this.connection.send(data);\n }\n connect() {\n return this.connection.open();\n }\n disconnect() {\n return this.connection.close({\n allowReconnect: false\n });\n }\n ensureActiveConnection() {\n if (!this.connection.isActive()) {\n return this.connection.open();\n }\n }\n}\n\nfunction createWebSocketURL(url) {\n if (typeof url === \"function\") {\n url = url();\n }\n if (url && !/^wss?:/i.test(url)) {\n const a = document.createElement(\"a\");\n a.href = url;\n a.href = a.href;\n a.protocol = a.protocol.replace(\"http\", \"ws\");\n return a.href;\n } else {\n return url;\n }\n}\n\nfunction createConsumer(url = getConfig(\"url\") || INTERNAL.default_mount_path) {\n return new Consumer(url);\n}\n\nfunction getConfig(name) {\n const element = document.head.querySelector(`meta[name='action-cable-${name}']`);\n if (element) {\n return element.getAttribute(\"content\");\n }\n}\n\nexport { Connection, ConnectionMonitor, Consumer, INTERNAL, Subscription, SubscriptionGuarantor, Subscriptions, adapters, createConsumer, createWebSocketURL, getConfig, logger };\n","/**\n* Copyright (c) 2022, Leon Sorokin\n* All rights reserved. (MIT Licensed)\n*\n* uPlot.js (μPlot)\n* A small, fast chart for time series, lines, areas, ohlc & bars\n* https://github.com/leeoniya/uPlot (v1.6.22)\n*/\n\nconst FEAT_TIME = true;\n\nconst pre = \"u-\";\n\nconst UPLOT = \"uplot\";\nconst ORI_HZ = pre + \"hz\";\nconst ORI_VT = pre + \"vt\";\nconst TITLE = pre + \"title\";\nconst WRAP = pre + \"wrap\";\nconst UNDER = pre + \"under\";\nconst OVER = pre + \"over\";\nconst AXIS = pre + \"axis\";\nconst OFF = pre + \"off\";\nconst SELECT = pre + \"select\";\nconst CURSOR_X = pre + \"cursor-x\";\nconst CURSOR_Y = pre + \"cursor-y\";\nconst CURSOR_PT = pre + \"cursor-pt\";\nconst LEGEND = pre + \"legend\";\nconst LEGEND_LIVE = pre + \"live\";\nconst LEGEND_INLINE = pre + \"inline\";\nconst LEGEND_THEAD = pre + \"thead\";\nconst LEGEND_SERIES = pre + \"series\";\nconst LEGEND_MARKER = pre + \"marker\";\nconst LEGEND_LABEL = pre + \"label\";\nconst LEGEND_VALUE = pre + \"value\";\n\nconst WIDTH = \"width\";\nconst HEIGHT = \"height\";\nconst TOP = \"top\";\nconst BOTTOM = \"bottom\";\nconst LEFT = \"left\";\nconst RIGHT = \"right\";\nconst hexBlack = \"#000\";\nconst transparent = hexBlack + \"0\";\n\nconst mousemove = \"mousemove\";\nconst mousedown = \"mousedown\";\nconst mouseup = \"mouseup\";\nconst mouseenter = \"mouseenter\";\nconst mouseleave = \"mouseleave\";\nconst dblclick = \"dblclick\";\nconst resize = \"resize\";\nconst scroll = \"scroll\";\n\nconst change = \"change\";\nconst dppxchange = \"dppxchange\";\n\nconst domEnv = typeof window != 'undefined';\n\nconst doc = domEnv ? document : null;\nconst win = domEnv ? window : null;\nconst nav = domEnv ? navigator : null;\n\nlet pxRatio;\n\nlet query;\n\nfunction setPxRatio() {\n\tlet _pxRatio = devicePixelRatio;\n\n\t// during print preview, Chrome fires off these dppx queries even without changes\n\tif (pxRatio != _pxRatio) {\n\t\tpxRatio = _pxRatio;\n\n\t\tquery && off(change, query, setPxRatio);\n\t\tquery = matchMedia(`(min-resolution: ${pxRatio - 0.001}dppx) and (max-resolution: ${pxRatio + 0.001}dppx)`);\n\t\ton(change, query, setPxRatio);\n\n\t\twin.dispatchEvent(new CustomEvent(dppxchange));\n\t}\n}\n\nfunction addClass(el, c) {\n\tif (c != null) {\n\t\tlet cl = el.classList;\n\t\t!cl.contains(c) && cl.add(c);\n\t}\n}\n\nfunction remClass(el, c) {\n\tlet cl = el.classList;\n\tcl.contains(c) && cl.remove(c);\n}\n\nfunction setStylePx(el, name, value) {\n\tel.style[name] = value + \"px\";\n}\n\nfunction placeTag(tag, cls, targ, refEl) {\n\tlet el = doc.createElement(tag);\n\n\tif (cls != null)\n\t\taddClass(el, cls);\n\n\tif (targ != null)\n\t\ttarg.insertBefore(el, refEl);\n\n\treturn el;\n}\n\nfunction placeDiv(cls, targ) {\n\treturn placeTag(\"div\", cls, targ);\n}\n\nconst xformCache = new WeakMap();\n\nfunction elTrans(el, xPos, yPos, xMax, yMax) {\n\tlet xform = \"translate(\" + xPos + \"px,\" + yPos + \"px)\";\n\tlet xformOld = xformCache.get(el);\n\n\tif (xform != xformOld) {\n\t\tel.style.transform = xform;\n\t\txformCache.set(el, xform);\n\n\t\tif (xPos < 0 || yPos < 0 || xPos > xMax || yPos > yMax)\n\t\t\taddClass(el, OFF);\n\t\telse\n\t\t\tremClass(el, OFF);\n\t}\n}\n\nconst colorCache = new WeakMap();\n\nfunction elColor(el, background, borderColor) {\n\tlet newColor = background + borderColor;\n\tlet oldColor = colorCache.get(el);\n\n\tif (newColor != oldColor) {\n\t\tcolorCache.set(el, newColor);\n\t\tel.style.background = background;\n\t\tel.style.borderColor = borderColor;\n\t}\n}\n\nconst sizeCache = new WeakMap();\n\nfunction elSize(el, newWid, newHgt, centered) {\n\tlet newSize = newWid + \"\" + newHgt;\n\tlet oldSize = sizeCache.get(el);\n\n\tif (newSize != oldSize) {\n\t\tsizeCache.set(el, newSize);\n\t\tel.style.height = newHgt + \"px\";\n\t\tel.style.width = newWid + \"px\";\n\t\tel.style.marginLeft = centered ? -newWid/2 + \"px\" : 0;\n\t\tel.style.marginTop = centered ? -newHgt/2 + \"px\" : 0;\n\t}\n}\n\nconst evOpts = {passive: true};\nconst evOpts2 = {...evOpts, capture: true};\n\nfunction on(ev, el, cb, capt) {\n\tel.addEventListener(ev, cb, capt ? evOpts2 : evOpts);\n}\n\nfunction off(ev, el, cb, capt) {\n\tel.removeEventListener(ev, cb, capt ? evOpts2 : evOpts);\n}\n\ndomEnv && setPxRatio();\n\n// binary search for index of closest value\nfunction closestIdx(num, arr, lo, hi) {\n\tlet mid;\n\tlo = lo || 0;\n\thi = hi || arr.length - 1;\n\tlet bitwise = hi <= 2147483647;\n\n\twhile (hi - lo > 1) {\n\t\tmid = bitwise ? (lo + hi) >> 1 : floor((lo + hi) / 2);\n\n\t\tif (arr[mid] < num)\n\t\t\tlo = mid;\n\t\telse\n\t\t\thi = mid;\n\t}\n\n\tif (num - arr[lo] <= arr[hi] - num)\n\t\treturn lo;\n\n\treturn hi;\n}\n\nfunction nonNullIdx(data, _i0, _i1, dir) {\n\tfor (let i = dir == 1 ? _i0 : _i1; i >= _i0 && i <= _i1; i += dir) {\n\t\tif (data[i] != null)\n\t\t\treturn i;\n\t}\n\n\treturn -1;\n}\n\nfunction getMinMax(data, _i0, _i1, sorted) {\n//\tconsole.log(\"getMinMax()\");\n\n\tlet _min = inf;\n\tlet _max = -inf;\n\n\tif (sorted == 1) {\n\t\t_min = data[_i0];\n\t\t_max = data[_i1];\n\t}\n\telse if (sorted == -1) {\n\t\t_min = data[_i1];\n\t\t_max = data[_i0];\n\t}\n\telse {\n\t\tfor (let i = _i0; i <= _i1; i++) {\n\t\t\tif (data[i] != null) {\n\t\t\t\t_min = min(_min, data[i]);\n\t\t\t\t_max = max(_max, data[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn [_min, _max];\n}\n\nfunction getMinMaxLog(data, _i0, _i1) {\n//\tconsole.log(\"getMinMax()\");\n\n\tlet _min = inf;\n\tlet _max = -inf;\n\n\tfor (let i = _i0; i <= _i1; i++) {\n\t\tif (data[i] > 0) {\n\t\t\t_min = min(_min, data[i]);\n\t\t\t_max = max(_max, data[i]);\n\t\t}\n\t}\n\n\treturn [\n\t\t_min == inf ? 1 : _min,\n\t\t_max == -inf ? 10 : _max,\n\t];\n}\n\nconst _fixedTuple = [0, 0];\n\nfunction fixIncr(minIncr, maxIncr, minExp, maxExp) {\n\t_fixedTuple[0] = minExp < 0 ? roundDec(minIncr, -minExp) : minIncr;\n\t_fixedTuple[1] = maxExp < 0 ? roundDec(maxIncr, -maxExp) : maxIncr;\n\treturn _fixedTuple;\n}\n\nfunction rangeLog(min, max, base, fullMags) {\n\tlet minSign = sign(min);\n\n\tlet logFn = base == 10 ? log10 : log2;\n\n\tif (min == max) {\n\t\tif (minSign == -1) {\n\t\t\tmin *= base;\n\t\t\tmax /= base;\n\t\t}\n\t\telse {\n\t\t\tmin /= base;\n\t\t\tmax *= base;\n\t\t}\n\t}\n\n\tlet minExp, maxExp, minMaxIncrs;\n\n\tif (fullMags) {\n\t\tminExp = floor(logFn(min));\n\t\tmaxExp = ceil(logFn(max));\n\n\t\tminMaxIncrs = fixIncr(pow(base, minExp), pow(base, maxExp), minExp, maxExp);\n\n\t\tmin = minMaxIncrs[0];\n\t\tmax = minMaxIncrs[1];\n\t}\n\telse {\n\t\tminExp = floor(logFn(abs(min)));\n\t\tmaxExp = floor(logFn(abs(max)));\n\n\t\tminMaxIncrs = fixIncr(pow(base, minExp), pow(base, maxExp), minExp, maxExp);\n\n\t\tmin = incrRoundDn(min, minMaxIncrs[0]);\n\t\tmax = incrRoundUp(max, minMaxIncrs[1]);\n\t}\n\n\treturn [min, max];\n}\n\nfunction rangeAsinh(min, max, base, fullMags) {\n\tlet minMax = rangeLog(min, max, base, fullMags);\n\n\tif (min == 0)\n\t\tminMax[0] = 0;\n\n\tif (max == 0)\n\t\tminMax[1] = 0;\n\n\treturn minMax;\n}\n\nconst rangePad = 0.1;\n\nconst autoRangePart = {\n\tmode: 3,\n\tpad: rangePad,\n};\n\nconst _eqRangePart = {\n\tpad: 0,\n\tsoft: null,\n\tmode: 0,\n};\n\nconst _eqRange = {\n\tmin: _eqRangePart,\n\tmax: _eqRangePart,\n};\n\n// this ensures that non-temporal/numeric y-axes get multiple-snapped padding added above/below\n// TODO: also account for incrs when snapping to ensure top of axis gets a tick & value\nfunction rangeNum(_min, _max, mult, extra) {\n\tif (isObj(mult))\n\t\treturn _rangeNum(_min, _max, mult);\n\n\t_eqRangePart.pad = mult;\n\t_eqRangePart.soft = extra ? 0 : null;\n\t_eqRangePart.mode = extra ? 3 : 0;\n\n\treturn _rangeNum(_min, _max, _eqRange);\n}\n\n// nullish coalesce\nfunction ifNull(lh, rh) {\n\treturn lh == null ? rh : lh;\n}\n\n// checks if given index range in an array contains a non-null value\n// aka a range-bounded Array.some()\nfunction hasData(data, idx0, idx1) {\n\tidx0 = ifNull(idx0, 0);\n\tidx1 = ifNull(idx1, data.length - 1);\n\n\twhile (idx0 <= idx1) {\n\t\tif (data[idx0] != null)\n\t\t\treturn true;\n\t\tidx0++;\n\t}\n\n\treturn false;\n}\n\nfunction _rangeNum(_min, _max, cfg) {\n\tlet cmin = cfg.min;\n\tlet cmax = cfg.max;\n\n\tlet padMin = ifNull(cmin.pad, 0);\n\tlet padMax = ifNull(cmax.pad, 0);\n\n\tlet hardMin = ifNull(cmin.hard, -inf);\n\tlet hardMax = ifNull(cmax.hard, inf);\n\n\tlet softMin = ifNull(cmin.soft, inf);\n\tlet softMax = ifNull(cmax.soft, -inf);\n\n\tlet softMinMode = ifNull(cmin.mode, 0);\n\tlet softMaxMode = ifNull(cmax.mode, 0);\n\n\tlet delta = _max - _min;\n\n\t// this handles situations like 89.7, 89.69999999999999\n\t// by assuming 0.001x deltas are precision errors\n//\tif (delta > 0 && delta < abs(_max) / 1e3)\n//\t\tdelta = 0;\n\n\t// treat data as flat if delta is less than 1 billionth\n\tif (delta < 1e-9) {\n\t\tdelta = 0;\n\n\t\t// if soft mode is 2 and all vals are flat at 0, avoid the 0.1 * 1e3 fallback\n\t\t// this prevents 0,0,0 from ranging to -100,100 when softMin/softMax are -1,1\n\t\tif (_min == 0 || _max == 0) {\n\t\t\tdelta = 1e-9;\n\n\t\t\tif (softMinMode == 2 && softMin != inf)\n\t\t\t\tpadMin = 0;\n\n\t\t\tif (softMaxMode == 2 && softMax != -inf)\n\t\t\t\tpadMax = 0;\n\t\t}\n\t}\n\n\tlet nonZeroDelta = delta || abs(_max) || 1e3;\n\tlet mag = log10(nonZeroDelta);\n\tlet base = pow(10, floor(mag));\n\n\tlet _padMin = nonZeroDelta * (delta == 0 ? (_min == 0 ? .1 : 1) : padMin);\n\tlet _newMin = roundDec(incrRoundDn(_min - _padMin, base/10), 9);\n\tlet _softMin = _min >= softMin && (softMinMode == 1 || softMinMode == 3 && _newMin <= softMin || softMinMode == 2 && _newMin >= softMin) ? softMin : inf;\n\tlet minLim = max(hardMin, _newMin < _softMin && _min >= _softMin ? _softMin : min(_softMin, _newMin));\n\n\tlet _padMax = nonZeroDelta * (delta == 0 ? (_max == 0 ? .1 : 1) : padMax);\n\tlet _newMax = roundDec(incrRoundUp(_max + _padMax, base/10), 9);\n\tlet _softMax = _max <= softMax && (softMaxMode == 1 || softMaxMode == 3 && _newMax >= softMax || softMaxMode == 2 && _newMax <= softMax) ? softMax : -inf;\n\tlet maxLim = min(hardMax, _newMax > _softMax && _max <= _softMax ? _softMax : max(_softMax, _newMax));\n\n\tif (minLim == maxLim && minLim == 0)\n\t\tmaxLim = 100;\n\n\treturn [minLim, maxLim];\n}\n\n// alternative: https://stackoverflow.com/a/2254896\nconst numFormatter = new Intl.NumberFormat(domEnv ? nav.language : 'en-US');\nconst fmtNum = val => numFormatter.format(val);\n\nconst M = Math;\n\nconst PI = M.PI;\nconst abs = M.abs;\nconst floor = M.floor;\nconst round = M.round;\nconst ceil = M.ceil;\nconst min = M.min;\nconst max = M.max;\nconst pow = M.pow;\nconst sign = M.sign;\nconst log10 = M.log10;\nconst log2 = M.log2;\n// TODO: seems like this needs to match asinh impl if the passed v is tweaked?\nconst sinh = (v, linthresh = 1) => M.sinh(v) * linthresh;\nconst asinh = (v, linthresh = 1) => M.asinh(v / linthresh);\n\nconst inf = Infinity;\n\nfunction numIntDigits(x) {\n\treturn (log10((x ^ (x >> 31)) - (x >> 31)) | 0) + 1;\n}\n\nfunction incrRound(num, incr) {\n\treturn round(num/incr)*incr;\n}\n\nfunction clamp(num, _min, _max) {\n\treturn min(max(num, _min), _max);\n}\n\nfunction fnOrSelf(v) {\n\treturn typeof v == \"function\" ? v : () => v;\n}\n\nconst retArg0 = _0 => _0;\n\nconst retArg1 = (_0, _1) => _1;\n\nconst retNull = _ => null;\n\nconst retTrue = _ => true;\n\nconst retEq = (a, b) => a == b;\n\nfunction incrRoundUp(num, incr) {\n\treturn ceil(num/incr)*incr;\n}\n\nfunction incrRoundDn(num, incr) {\n\treturn floor(num/incr)*incr;\n}\n\nfunction roundDec(val, dec) {\n\treturn round(val * (dec = 10**dec)) / dec;\n}\n\nconst fixedDec = new Map();\n\nfunction guessDec(num) {\n\treturn ((\"\"+num).split(\".\")[1] || \"\").length;\n}\n\nfunction genIncrs(base, minExp, maxExp, mults) {\n\tlet incrs = [];\n\n\tlet multDec = mults.map(guessDec);\n\n\tfor (let exp = minExp; exp < maxExp; exp++) {\n\t\tlet expa = abs(exp);\n\t\tlet mag = roundDec(pow(base, exp), expa);\n\n\t\tfor (let i = 0; i < mults.length; i++) {\n\t\t\tlet _incr = mults[i] * mag;\n\t\t\tlet dec = (_incr >= 0 && exp >= 0 ? 0 : expa) + (exp >= multDec[i] ? 0 : multDec[i]);\n\t\t\tlet incr = roundDec(_incr, dec);\n\t\t\tincrs.push(incr);\n\t\t\tfixedDec.set(incr, dec);\n\t\t}\n\t}\n\n\treturn incrs;\n}\n\n//export const assign = Object.assign;\n\nconst EMPTY_OBJ = {};\nconst EMPTY_ARR = [];\n\nconst nullNullTuple = [null, null];\n\nconst isArr = Array.isArray;\n\nfunction isStr(v) {\n\treturn typeof v == 'string';\n}\n\nfunction isObj(v) {\n\tlet is = false;\n\n\tif (v != null) {\n\t\tlet c = v.constructor;\n\t\tis = c == null || c == Object;\n\t}\n\n\treturn is;\n}\n\nfunction fastIsObj(v) {\n\treturn v != null && typeof v == 'object';\n}\n\nconst TypedArray = Object.getPrototypeOf(Uint8Array);\n\nfunction copy(o, _isObj = isObj) {\n\tlet out;\n\n\tif (isArr(o)) {\n\t\tlet val = o.find(v => v != null);\n\n\t\tif (isArr(val) || _isObj(val)) {\n\t\t\tout = Array(o.length);\n\t\t\tfor (let i = 0; i < o.length; i++)\n\t\t\t\tout[i] = copy(o[i], _isObj);\n\t\t}\n\t\telse\n\t\t\tout = o.slice();\n\t}\n\telse if (o instanceof TypedArray) // also (ArrayBuffer.isView(o) && !(o instanceof DataView))\n\t\tout = o.slice();\n\telse if (_isObj(o)) {\n\t\tout = {};\n\t\tfor (let k in o)\n\t\t\tout[k] = copy(o[k], _isObj);\n\t}\n\telse\n\t\tout = o;\n\n\treturn out;\n}\n\nfunction assign(targ) {\n\tlet args = arguments;\n\n\tfor (let i = 1; i < args.length; i++) {\n\t\tlet src = args[i];\n\n\t\tfor (let key in src) {\n\t\t\tif (isObj(targ[key]))\n\t\t\t\tassign(targ[key], copy(src[key]));\n\t\t\telse\n\t\t\t\ttarg[key] = copy(src[key]);\n\t\t}\n\t}\n\n\treturn targ;\n}\n\n// nullModes\nconst NULL_REMOVE = 0; // nulls are converted to undefined (e.g. for spanGaps: true)\nconst NULL_RETAIN = 1; // nulls are retained, with alignment artifacts set to undefined (default)\nconst NULL_EXPAND = 2; // nulls are expanded to include any adjacent alignment artifacts\n\n// sets undefined values to nulls when adjacent to existing nulls (minesweeper)\nfunction nullExpand(yVals, nullIdxs, alignedLen) {\n\tfor (let i = 0, xi, lastNullIdx = -1; i < nullIdxs.length; i++) {\n\t\tlet nullIdx = nullIdxs[i];\n\n\t\tif (nullIdx > lastNullIdx) {\n\t\t\txi = nullIdx - 1;\n\t\t\twhile (xi >= 0 && yVals[xi] == null)\n\t\t\t\tyVals[xi--] = null;\n\n\t\t\txi = nullIdx + 1;\n\t\t\twhile (xi < alignedLen && yVals[xi] == null)\n\t\t\t\tyVals[lastNullIdx = xi++] = null;\n\t\t}\n\t}\n}\n\n// nullModes is a tables-matched array indicating how to treat nulls in each series\n// output is sorted ASC on the joined field (table[0]) and duplicate join values are collapsed\nfunction join(tables, nullModes) {\n\tlet xVals = new Set();\n\n\tfor (let ti = 0; ti < tables.length; ti++) {\n\t\tlet t = tables[ti];\n\t\tlet xs = t[0];\n\t\tlet len = xs.length;\n\n\t\tfor (let i = 0; i < len; i++)\n\t\t\txVals.add(xs[i]);\n\t}\n\n\tlet data = [Array.from(xVals).sort((a, b) => a - b)];\n\n\tlet alignedLen = data[0].length;\n\n\tlet xIdxs = new Map();\n\n\tfor (let i = 0; i < alignedLen; i++)\n\t\txIdxs.set(data[0][i], i);\n\n\tfor (let ti = 0; ti < tables.length; ti++) {\n\t\tlet t = tables[ti];\n\t\tlet xs = t[0];\n\n\t\tfor (let si = 1; si < t.length; si++) {\n\t\t\tlet ys = t[si];\n\n\t\t\tlet yVals = Array(alignedLen).fill(undefined);\n\n\t\t\tlet nullMode = nullModes ? nullModes[ti][si] : NULL_RETAIN;\n\n\t\t\tlet nullIdxs = [];\n\n\t\t\tfor (let i = 0; i < ys.length; i++) {\n\t\t\t\tlet yVal = ys[i];\n\t\t\t\tlet alignedIdx = xIdxs.get(xs[i]);\n\n\t\t\t\tif (yVal === null) {\n\t\t\t\t\tif (nullMode != NULL_REMOVE) {\n\t\t\t\t\t\tyVals[alignedIdx] = yVal;\n\n\t\t\t\t\t\tif (nullMode == NULL_EXPAND)\n\t\t\t\t\t\t\tnullIdxs.push(alignedIdx);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tyVals[alignedIdx] = yVal;\n\t\t\t}\n\n\t\t\tnullExpand(yVals, nullIdxs, alignedLen);\n\n\t\t\tdata.push(yVals);\n\t\t}\n\t}\n\n\treturn data;\n}\n\nconst microTask = typeof queueMicrotask == \"undefined\" ? fn => Promise.resolve().then(fn) : queueMicrotask;\n\nconst months = [\n\t\"January\",\n\t\"February\",\n\t\"March\",\n\t\"April\",\n\t\"May\",\n\t\"June\",\n\t\"July\",\n\t\"August\",\n\t\"September\",\n\t\"October\",\n\t\"November\",\n\t\"December\",\n];\n\nconst days = [\n\t\"Sunday\",\n\t\"Monday\",\n\t\"Tuesday\",\n\t\"Wednesday\",\n\t\"Thursday\",\n\t\"Friday\",\n\t\"Saturday\",\n];\n\nfunction slice3(str) {\n\treturn str.slice(0, 3);\n}\n\nconst days3 = days.map(slice3);\n\nconst months3 = months.map(slice3);\n\nconst engNames = {\n\tMMMM: months,\n\tMMM: months3,\n\tWWWW: days,\n\tWWW: days3,\n};\n\nfunction zeroPad2(int) {\n\treturn (int < 10 ? '0' : '') + int;\n}\n\nfunction zeroPad3(int) {\n\treturn (int < 10 ? '00' : int < 100 ? '0' : '') + int;\n}\n\n/*\nfunction suffix(int) {\n\tlet mod10 = int % 10;\n\n\treturn int + (\n\t\tmod10 == 1 && int != 11 ? \"st\" :\n\t\tmod10 == 2 && int != 12 ? \"nd\" :\n\t\tmod10 == 3 && int != 13 ? \"rd\" : \"th\"\n\t);\n}\n*/\n\nconst subs = {\n\t// 2019\n\tYYYY:\td => d.getFullYear(),\n\t// 19\n\tYY:\t\td => (d.getFullYear()+'').slice(2),\n\t// July\n\tMMMM:\t(d, names) => names.MMMM[d.getMonth()],\n\t// Jul\n\tMMM:\t(d, names) => names.MMM[d.getMonth()],\n\t// 07\n\tMM:\t\td => zeroPad2(d.getMonth()+1),\n\t// 7\n\tM:\t\td => d.getMonth()+1,\n\t// 09\n\tDD:\t\td => zeroPad2(d.getDate()),\n\t// 9\n\tD:\t\td => d.getDate(),\n\t// Monday\n\tWWWW:\t(d, names) => names.WWWW[d.getDay()],\n\t// Mon\n\tWWW:\t(d, names) => names.WWW[d.getDay()],\n\t// 03\n\tHH:\t\td => zeroPad2(d.getHours()),\n\t// 3\n\tH:\t\td => d.getHours(),\n\t// 9 (12hr, unpadded)\n\th:\t\td => {let h = d.getHours(); return h == 0 ? 12 : h > 12 ? h - 12 : h;},\n\t// AM\n\tAA:\t\td => d.getHours() >= 12 ? 'PM' : 'AM',\n\t// am\n\taa:\t\td => d.getHours() >= 12 ? 'pm' : 'am',\n\t// a\n\ta:\t\td => d.getHours() >= 12 ? 'p' : 'a',\n\t// 09\n\tmm:\t\td => zeroPad2(d.getMinutes()),\n\t// 9\n\tm:\t\td => d.getMinutes(),\n\t// 09\n\tss:\t\td => zeroPad2(d.getSeconds()),\n\t// 9\n\ts:\t\td => d.getSeconds(),\n\t// 374\n\tfff:\td => zeroPad3(d.getMilliseconds()),\n};\n\nfunction fmtDate(tpl, names) {\n\tnames = names || engNames;\n\tlet parts = [];\n\n\tlet R = /\\{([a-z]+)\\}|[^{]+/gi, m;\n\n\twhile (m = R.exec(tpl))\n\t\tparts.push(m[0][0] == '{' ? subs[m[1]] : m[0]);\n\n\treturn d => {\n\t\tlet out = '';\n\n\t\tfor (let i = 0; i < parts.length; i++)\n\t\t\tout += typeof parts[i] == \"string\" ? parts[i] : parts[i](d, names);\n\n\t\treturn out;\n\t}\n}\n\nconst localTz = new Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n// https://stackoverflow.com/questions/15141762/how-to-initialize-a-javascript-date-to-a-particular-time-zone/53652131#53652131\nfunction tzDate(date, tz) {\n\tlet date2;\n\n\t// perf optimization\n\tif (tz == 'UTC' || tz == 'Etc/UTC')\n\t\tdate2 = new Date(+date + date.getTimezoneOffset() * 6e4);\n\telse if (tz == localTz)\n\t\tdate2 = date;\n\telse {\n\t\tdate2 = new Date(date.toLocaleString('en-US', {timeZone: tz}));\n\t\tdate2.setMilliseconds(date.getMilliseconds());\n\t}\n\n\treturn date2;\n}\n\n//export const series = [];\n\n// default formatters:\n\nconst onlyWhole = v => v % 1 == 0;\n\nconst allMults = [1,2,2.5,5];\n\n// ...0.01, 0.02, 0.025, 0.05, 0.1, 0.2, 0.25, 0.5\nconst decIncrs = genIncrs(10, -16, 0, allMults);\n\n// 1, 2, 2.5, 5, 10, 20, 25, 50...\nconst oneIncrs = genIncrs(10, 0, 16, allMults);\n\n// 1, 2, 5, 10, 20, 25, 50...\nconst wholeIncrs = oneIncrs.filter(onlyWhole);\n\nconst numIncrs = decIncrs.concat(oneIncrs);\n\nconst NL = \"\\n\";\n\nconst yyyy = \"{YYYY}\";\nconst NLyyyy = NL + yyyy;\nconst md = \"{M}/{D}\";\nconst NLmd = NL + md;\nconst NLmdyy = NLmd + \"/{YY}\";\n\nconst aa = \"{aa}\";\nconst hmm = \"{h}:{mm}\";\nconst hmmaa = hmm + aa;\nconst NLhmmaa = NL + hmmaa;\nconst ss = \":{ss}\";\n\nconst _ = null;\n\nfunction genTimeStuffs(ms) {\n\tlet\ts = ms * 1e3,\n\t\tm = s * 60,\n\t\th = m * 60,\n\t\td = h * 24,\n\t\tmo = d * 30,\n\t\ty = d * 365;\n\n\t// min of 1e-3 prevents setting a temporal x ticks too small since Date objects cannot advance ticks smaller than 1ms\n\tlet subSecIncrs = ms == 1 ? genIncrs(10, 0, 3, allMults).filter(onlyWhole) : genIncrs(10, -3, 0, allMults);\n\n\tlet timeIncrs = subSecIncrs.concat([\n\t\t// minute divisors (# of secs)\n\t\ts,\n\t\ts * 5,\n\t\ts * 10,\n\t\ts * 15,\n\t\ts * 30,\n\t\t// hour divisors (# of mins)\n\t\tm,\n\t\tm * 5,\n\t\tm * 10,\n\t\tm * 15,\n\t\tm * 30,\n\t\t// day divisors (# of hrs)\n\t\th,\n\t\th * 2,\n\t\th * 3,\n\t\th * 4,\n\t\th * 6,\n\t\th * 8,\n\t\th * 12,\n\t\t// month divisors TODO: need more?\n\t\td,\n\t\td * 2,\n\t\td * 3,\n\t\td * 4,\n\t\td * 5,\n\t\td * 6,\n\t\td * 7,\n\t\td * 8,\n\t\td * 9,\n\t\td * 10,\n\t\td * 15,\n\t\t// year divisors (# months, approx)\n\t\tmo,\n\t\tmo * 2,\n\t\tmo * 3,\n\t\tmo * 4,\n\t\tmo * 6,\n\t\t// century divisors\n\t\ty,\n\t\ty * 2,\n\t\ty * 5,\n\t\ty * 10,\n\t\ty * 25,\n\t\ty * 50,\n\t\ty * 100,\n\t]);\n\n\t// [0]: minimum num secs in the tick incr\n\t// [1]: default tick format\n\t// [2-7]: rollover tick formats\n\t// [8]: mode: 0: replace [1] -> [2-7], 1: concat [1] + [2-7]\n\tconst _timeAxisStamps = [\n\t// tick incr default year month day hour min sec mode\n\t\t[y, yyyy, _, _, _, _, _, _, 1],\n\t\t[d * 28, \"{MMM}\", NLyyyy, _, _, _, _, _, 1],\n\t\t[d, md, NLyyyy, _, _, _, _, _, 1],\n\t\t[h, \"{h}\" + aa, NLmdyy, _, NLmd, _, _, _, 1],\n\t\t[m, hmmaa, NLmdyy, _, NLmd, _, _, _, 1],\n\t\t[s, ss, NLmdyy + \" \" + hmmaa, _, NLmd + \" \" + hmmaa, _, NLhmmaa, _, 1],\n\t\t[ms, ss + \".{fff}\", NLmdyy + \" \" + hmmaa, _, NLmd + \" \" + hmmaa, _, NLhmmaa, _, 1],\n\t];\n\n\t// the ensures that axis ticks, values & grid are aligned to logical temporal breakpoints and not an arbitrary timestamp\n\t// https://www.timeanddate.com/time/dst/\n\t// https://www.timeanddate.com/time/dst/2019.html\n\t// https://www.epochconverter.com/timezones\n\tfunction timeAxisSplits(tzDate) {\n\t\treturn (self, axisIdx, scaleMin, scaleMax, foundIncr, foundSpace) => {\n\t\t\tlet splits = [];\n\t\t\tlet isYr = foundIncr >= y;\n\t\t\tlet isMo = foundIncr >= mo && foundIncr < y;\n\n\t\t\t// get the timezone-adjusted date\n\t\t\tlet minDate = tzDate(scaleMin);\n\t\t\tlet minDateTs = roundDec(minDate * ms, 3);\n\n\t\t\t// get ts of 12am (this lands us at or before the original scaleMin)\n\t\t\tlet minMin = mkDate(minDate.getFullYear(), isYr ? 0 : minDate.getMonth(), isMo || isYr ? 1 : minDate.getDate());\n\t\t\tlet minMinTs = roundDec(minMin * ms, 3);\n\n\t\t\tif (isMo || isYr) {\n\t\t\t\tlet moIncr = isMo ? foundIncr / mo : 0;\n\t\t\t\tlet yrIncr = isYr ? foundIncr / y : 0;\n\t\t\t//\tlet tzOffset = scaleMin - minDateTs;\t\t// needed?\n\t\t\t\tlet split = minDateTs == minMinTs ? minDateTs : roundDec(mkDate(minMin.getFullYear() + yrIncr, minMin.getMonth() + moIncr, 1) * ms, 3);\n\t\t\t\tlet splitDate = new Date(round(split / ms));\n\t\t\t\tlet baseYear = splitDate.getFullYear();\n\t\t\t\tlet baseMonth = splitDate.getMonth();\n\n\t\t\t\tfor (let i = 0; split <= scaleMax; i++) {\n\t\t\t\t\tlet next = mkDate(baseYear + yrIncr * i, baseMonth + moIncr * i, 1);\n\t\t\t\t\tlet offs = next - tzDate(roundDec(next * ms, 3));\n\n\t\t\t\t\tsplit = roundDec((+next + offs) * ms, 3);\n\n\t\t\t\t\tif (split <= scaleMax)\n\t\t\t\t\t\tsplits.push(split);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlet incr0 = foundIncr >= d ? d : foundIncr;\n\t\t\t\tlet tzOffset = floor(scaleMin) - floor(minDateTs);\n\t\t\t\tlet split = minMinTs + tzOffset + incrRoundUp(minDateTs - minMinTs, incr0);\n\t\t\t\tsplits.push(split);\n\n\t\t\t\tlet date0 = tzDate(split);\n\n\t\t\t\tlet prevHour = date0.getHours() + (date0.getMinutes() / m) + (date0.getSeconds() / h);\n\t\t\t\tlet incrHours = foundIncr / h;\n\n\t\t\t\tlet minSpace = self.axes[axisIdx]._space;\n\t\t\t\tlet pctSpace = foundSpace / minSpace;\n\n\t\t\t\twhile (1) {\n\t\t\t\t\tsplit = roundDec(split + foundIncr, ms == 1 ? 0 : 3);\n\n\t\t\t\t\tif (split > scaleMax)\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tif (incrHours > 1) {\n\t\t\t\t\t\tlet expectedHour = floor(roundDec(prevHour + incrHours, 6)) % 24;\n\t\t\t\t\t\tlet splitDate = tzDate(split);\n\t\t\t\t\t\tlet actualHour = splitDate.getHours();\n\n\t\t\t\t\t\tlet dstShift = actualHour - expectedHour;\n\n\t\t\t\t\t\tif (dstShift > 1)\n\t\t\t\t\t\t\tdstShift = -1;\n\n\t\t\t\t\t\tsplit -= dstShift * h;\n\n\t\t\t\t\t\tprevHour = (prevHour + incrHours) % 24;\n\n\t\t\t\t\t\t// add a tick only if it's further than 70% of the min allowed label spacing\n\t\t\t\t\t\tlet prevSplit = splits[splits.length - 1];\n\t\t\t\t\t\tlet pctIncr = roundDec((split - prevSplit) / foundIncr, 3);\n\n\t\t\t\t\t\tif (pctIncr * pctSpace >= .7)\n\t\t\t\t\t\t\tsplits.push(split);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tsplits.push(split);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn splits;\n\t\t}\n\t}\n\n\treturn [\n\t\ttimeIncrs,\n\t\t_timeAxisStamps,\n\t\ttimeAxisSplits,\n\t];\n}\n\nconst [ timeIncrsMs, _timeAxisStampsMs, timeAxisSplitsMs ] = genTimeStuffs(1);\nconst [ timeIncrsS, _timeAxisStampsS, timeAxisSplitsS ] = genTimeStuffs(1e-3);\n\n// base 2\ngenIncrs(2, -53, 53, [1]);\n\n/*\nconsole.log({\n\tdecIncrs,\n\toneIncrs,\n\twholeIncrs,\n\tnumIncrs,\n\ttimeIncrs,\n\tfixedDec,\n});\n*/\n\nfunction timeAxisStamps(stampCfg, fmtDate) {\n\treturn stampCfg.map(s => s.map((v, i) =>\n\t\ti == 0 || i == 8 || v == null ? v : fmtDate(i == 1 || s[8] == 0 ? v : s[1] + v)\n\t));\n}\n\n// TODO: will need to accept spaces[] and pull incr into the loop when grid will be non-uniform, eg for log scales.\n// currently we ignore this for months since they're *nearly* uniform and the added complexity is not worth it\nfunction timeAxisVals(tzDate, stamps) {\n\treturn (self, splits, axisIdx, foundSpace, foundIncr) => {\n\t\tlet s = stamps.find(s => foundIncr >= s[0]) || stamps[stamps.length - 1];\n\n\t\t// these track boundaries when a full label is needed again\n\t\tlet prevYear;\n\t\tlet prevMnth;\n\t\tlet prevDate;\n\t\tlet prevHour;\n\t\tlet prevMins;\n\t\tlet prevSecs;\n\n\t\treturn splits.map(split => {\n\t\t\tlet date = tzDate(split);\n\n\t\t\tlet newYear = date.getFullYear();\n\t\t\tlet newMnth = date.getMonth();\n\t\t\tlet newDate = date.getDate();\n\t\t\tlet newHour = date.getHours();\n\t\t\tlet newMins = date.getMinutes();\n\t\t\tlet newSecs = date.getSeconds();\n\n\t\t\tlet stamp = (\n\t\t\t\tnewYear != prevYear && s[2] ||\n\t\t\t\tnewMnth != prevMnth && s[3] ||\n\t\t\t\tnewDate != prevDate && s[4] ||\n\t\t\t\tnewHour != prevHour && s[5] ||\n\t\t\t\tnewMins != prevMins && s[6] ||\n\t\t\t\tnewSecs != prevSecs && s[7] ||\n\t\t\t\t s[1]\n\t\t\t);\n\n\t\t\tprevYear = newYear;\n\t\t\tprevMnth = newMnth;\n\t\t\tprevDate = newDate;\n\t\t\tprevHour = newHour;\n\t\t\tprevMins = newMins;\n\t\t\tprevSecs = newSecs;\n\n\t\t\treturn stamp(date);\n\t\t});\n\t}\n}\n\n// for when axis.values is defined as a static fmtDate template string\nfunction timeAxisVal(tzDate, dateTpl) {\n\tlet stamp = fmtDate(dateTpl);\n\treturn (self, splits, axisIdx, foundSpace, foundIncr) => splits.map(split => stamp(tzDate(split)));\n}\n\nfunction mkDate(y, m, d) {\n\treturn new Date(y, m, d);\n}\n\nfunction timeSeriesStamp(stampCfg, fmtDate) {\n\treturn fmtDate(stampCfg);\n}\nconst _timeSeriesStamp = '{YYYY}-{MM}-{DD} {h}:{mm}{aa}';\n\nfunction timeSeriesVal(tzDate, stamp) {\n\treturn (self, val) => stamp(tzDate(val));\n}\n\nfunction legendStroke(self, seriesIdx) {\n\tlet s = self.series[seriesIdx];\n\treturn s.width ? s.stroke(self, seriesIdx) : s.points.width ? s.points.stroke(self, seriesIdx) : null;\n}\n\nfunction legendFill(self, seriesIdx) {\n\treturn self.series[seriesIdx].fill(self, seriesIdx);\n}\n\nconst legendOpts = {\n\tshow: true,\n\tlive: true,\n\tisolate: false,\n\tmarkers: {\n\t\tshow: true,\n\t\twidth: 2,\n\t\tstroke: legendStroke,\n\t\tfill: legendFill,\n\t\tdash: \"solid\",\n\t},\n\tidx: null,\n\tidxs: null,\n\tvalues: [],\n};\n\nfunction cursorPointShow(self, si) {\n\tlet o = self.cursor.points;\n\n\tlet pt = placeDiv();\n\n\tlet size = o.size(self, si);\n\tsetStylePx(pt, WIDTH, size);\n\tsetStylePx(pt, HEIGHT, size);\n\n\tlet mar = size / -2;\n\tsetStylePx(pt, \"marginLeft\", mar);\n\tsetStylePx(pt, \"marginTop\", mar);\n\n\tlet width = o.width(self, si, size);\n\twidth && setStylePx(pt, \"borderWidth\", width);\n\n\treturn pt;\n}\n\nfunction cursorPointFill(self, si) {\n\tlet sp = self.series[si].points;\n\treturn sp._fill || sp._stroke;\n}\n\nfunction cursorPointStroke(self, si) {\n\tlet sp = self.series[si].points;\n\treturn sp._stroke || sp._fill;\n}\n\nfunction cursorPointSize(self, si) {\n\tlet sp = self.series[si].points;\n\treturn ptDia(sp.width, 1);\n}\n\nfunction dataIdx(self, seriesIdx, cursorIdx) {\n\treturn cursorIdx;\n}\n\nconst moveTuple = [0,0];\n\nfunction cursorMove(self, mouseLeft1, mouseTop1) {\n\tmoveTuple[0] = mouseLeft1;\n\tmoveTuple[1] = mouseTop1;\n\treturn moveTuple;\n}\n\nfunction filtBtn0(self, targ, handle) {\n\treturn e => {\n\t\te.button == 0 && handle(e);\n\t};\n}\n\nfunction passThru(self, targ, handle) {\n\treturn handle;\n}\n\nconst cursorOpts = {\n\tshow: true,\n\tx: true,\n\ty: true,\n\tlock: false,\n\tmove: cursorMove,\n\tpoints: {\n\t\tshow: cursorPointShow,\n\t\tsize: cursorPointSize,\n\t\twidth: 0,\n\t\tstroke: cursorPointStroke,\n\t\tfill: cursorPointFill,\n\t},\n\n\tbind: {\n\t\tmousedown: filtBtn0,\n\t\tmouseup: filtBtn0,\n\t\tclick: filtBtn0,\n\t\tdblclick: filtBtn0,\n\n\t\tmousemove: passThru,\n\t\tmouseleave: passThru,\n\t\tmouseenter: passThru,\n\t},\n\n\tdrag: {\n\t\tsetScale: true,\n\t\tx: true,\n\t\ty: false,\n\t\tdist: 0,\n\t\tuni: null,\n\t\t_x: false,\n\t\t_y: false,\n\t},\n\n\tfocus: {\n\t\tprox: -1,\n\t},\n\n\tleft: -10,\n\ttop: -10,\n\tidx: null,\n\tdataIdx,\n\tidxs: null,\n};\n\nconst axisLines = {\n\tshow: true,\n\tstroke: \"rgba(0,0,0,0.07)\",\n\twidth: 2,\n//\tdash: [],\n};\n\nconst grid = assign({}, axisLines, {\n\tfilter: retArg1,\n});\n\nconst ticks = assign({}, grid, {\n\tsize: 10,\n});\n\nconst border = assign({}, axisLines, {\n\tshow: false,\n});\n\nconst font = '12px system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"';\nconst labelFont = \"bold \" + font;\nconst lineMult = 1.5;\t\t// font-size multiplier\n\nconst xAxisOpts = {\n\tshow: true,\n\tscale: \"x\",\n\tstroke: hexBlack,\n\tspace: 50,\n\tgap: 5,\n\tsize: 50,\n\tlabelGap: 0,\n\tlabelSize: 30,\n\tlabelFont,\n\tside: 2,\n//\tclass: \"x-vals\",\n//\tincrs: timeIncrs,\n//\tvalues: timeVals,\n//\tfilter: retArg1,\n\tgrid,\n\tticks,\n\tborder,\n\tfont,\n\trotate: 0,\n};\n\nconst numSeriesLabel = \"Value\";\nconst timeSeriesLabel = \"Time\";\n\nconst xSeriesOpts = {\n\tshow: true,\n\tscale: \"x\",\n\tauto: false,\n\tsorted: 1,\n//\tlabel: \"Time\",\n//\tvalue: v => stamp(new Date(v * 1e3)),\n\n\t// internal caches\n\tmin: inf,\n\tmax: -inf,\n\tidxs: [],\n};\n\nfunction numAxisVals(self, splits, axisIdx, foundSpace, foundIncr) {\n\treturn splits.map(v => v == null ? \"\" : fmtNum(v));\n}\n\nfunction numAxisSplits(self, axisIdx, scaleMin, scaleMax, foundIncr, foundSpace, forceMin) {\n\tlet splits = [];\n\n\tlet numDec = fixedDec.get(foundIncr) || 0;\n\n\tscaleMin = forceMin ? scaleMin : roundDec(incrRoundUp(scaleMin, foundIncr), numDec);\n\n\tfor (let val = scaleMin; val <= scaleMax; val = roundDec(val + foundIncr, numDec))\n\t\tsplits.push(Object.is(val, -0) ? 0 : val);\t\t// coalesces -0\n\n\treturn splits;\n}\n\n// this doesnt work for sin, which needs to come off from 0 independently in pos and neg dirs\nfunction logAxisSplits(self, axisIdx, scaleMin, scaleMax, foundIncr, foundSpace, forceMin) {\n\tconst splits = [];\n\n\tconst logBase = self.scales[self.axes[axisIdx].scale].log;\n\n\tconst logFn = logBase == 10 ? log10 : log2;\n\n\tconst exp = floor(logFn(scaleMin));\n\n\tfoundIncr = pow(logBase, exp);\n\n\tif (exp < 0)\n\t\tfoundIncr = roundDec(foundIncr, -exp);\n\n\tlet split = scaleMin;\n\n\tdo {\n\t\tsplits.push(split);\n\t\tsplit = roundDec(split + foundIncr, fixedDec.get(foundIncr));\n\n\t\tif (split >= foundIncr * logBase)\n\t\t\tfoundIncr = split;\n\n\t} while (split <= scaleMax);\n\n\treturn splits;\n}\n\nfunction asinhAxisSplits(self, axisIdx, scaleMin, scaleMax, foundIncr, foundSpace, forceMin) {\n\tlet sc = self.scales[self.axes[axisIdx].scale];\n\n\tlet linthresh = sc.asinh;\n\n\tlet posSplits = scaleMax > linthresh ? logAxisSplits(self, axisIdx, max(linthresh, scaleMin), scaleMax, foundIncr) : [linthresh];\n\tlet zero = scaleMax >= 0 && scaleMin <= 0 ? [0] : [];\n\tlet negSplits = scaleMin < -linthresh ? logAxisSplits(self, axisIdx, max(linthresh, -scaleMax), -scaleMin, foundIncr): [linthresh];\n\n\treturn negSplits.reverse().map(v => -v).concat(zero, posSplits);\n}\n\nconst RE_ALL = /./;\nconst RE_12357 = /[12357]/;\nconst RE_125 = /[125]/;\nconst RE_1 = /1/;\n\nfunction logAxisValsFilt(self, splits, axisIdx, foundSpace, foundIncr) {\n\tlet axis = self.axes[axisIdx];\n\tlet scaleKey = axis.scale;\n\tlet sc = self.scales[scaleKey];\n\n\tif (sc.distr == 3 && sc.log == 2)\n\t\treturn splits;\n\n\tlet valToPos = self.valToPos;\n\n\tlet minSpace = axis._space;\n\n\tlet _10 = valToPos(10, scaleKey);\n\n\tlet re = (\n\t\tvalToPos(9, scaleKey) - _10 >= minSpace ? RE_ALL :\n\t\tvalToPos(7, scaleKey) - _10 >= minSpace ? RE_12357 :\n\t\tvalToPos(5, scaleKey) - _10 >= minSpace ? RE_125 :\n\t\tRE_1\n\t);\n\n\treturn splits.map(v => ((sc.distr == 4 && v == 0) || re.test(v)) ? v : null);\n}\n\nfunction numSeriesVal(self, val) {\n\treturn val == null ? \"\" : fmtNum(val);\n}\n\nconst yAxisOpts = {\n\tshow: true,\n\tscale: \"y\",\n\tstroke: hexBlack,\n\tspace: 30,\n\tgap: 5,\n\tsize: 50,\n\tlabelGap: 0,\n\tlabelSize: 30,\n\tlabelFont,\n\tside: 3,\n//\tclass: \"y-vals\",\n//\tincrs: numIncrs,\n//\tvalues: (vals, space) => vals,\n//\tfilter: retArg1,\n\tgrid,\n\tticks,\n\tborder,\n\tfont,\n\trotate: 0,\n};\n\n// takes stroke width\nfunction ptDia(width, mult) {\n\tlet dia = 3 + (width || 1) * 2;\n\treturn roundDec(dia * mult, 3);\n}\n\nfunction seriesPointsShow(self, si) {\n\tlet { scale, idxs } = self.series[0];\n\tlet xData = self._data[0];\n\tlet p0 = self.valToPos(xData[idxs[0]], scale, true);\n\tlet p1 = self.valToPos(xData[idxs[1]], scale, true);\n\tlet dim = abs(p1 - p0);\n\n\tlet s = self.series[si];\n//\tconst dia = ptDia(s.width, pxRatio);\n\tlet maxPts = dim / (s.points.space * pxRatio);\n\treturn idxs[1] - idxs[0] <= maxPts;\n}\n\nconst facet = {\n\tscale: null,\n\tauto: true,\n\tsorted: 0,\n\n\t// internal caches\n\tmin: inf,\n\tmax: -inf,\n};\n\nconst xySeriesOpts = {\n\tshow: true,\n\tauto: true,\n\tsorted: 0,\n\talpha: 1,\n\tfacets: [\n\t\tassign({}, facet, {scale: 'x'}),\n\t\tassign({}, facet, {scale: 'y'}),\n\t],\n};\n\nconst ySeriesOpts = {\n\tscale: \"y\",\n\tauto: true,\n\tsorted: 0,\n\tshow: true,\n\tspanGaps: false,\n\tgaps: (self, seriesIdx, idx0, idx1, nullGaps) => nullGaps,\n\talpha: 1,\n\tpoints: {\n\t\tshow: seriesPointsShow,\n\t\tfilter: null,\n\t// paths:\n\t//\tstroke: \"#000\",\n\t//\tfill: \"#fff\",\n\t//\twidth: 1,\n\t//\tsize: 10,\n\t},\n//\tlabel: \"Value\",\n//\tvalue: v => v,\n\tvalues: null,\n\n\t// internal caches\n\tmin: inf,\n\tmax: -inf,\n\tidxs: [],\n\n\tpath: null,\n\tclip: null,\n};\n\nfunction clampScale(self, val, scaleMin, scaleMax, scaleKey) {\n/*\n\tif (val < 0) {\n\t\tlet cssHgt = self.bbox.height / pxRatio;\n\t\tlet absPos = self.valToPos(abs(val), scaleKey);\n\t\tlet fromBtm = cssHgt - absPos;\n\t\treturn self.posToVal(cssHgt + fromBtm, scaleKey);\n\t}\n*/\n\treturn scaleMin / 10;\n}\n\nconst xScaleOpts = {\n\ttime: FEAT_TIME,\n\tauto: true,\n\tdistr: 1,\n\tlog: 10,\n\tasinh: 1,\n\tmin: null,\n\tmax: null,\n\tdir: 1,\n\tori: 0,\n};\n\nconst yScaleOpts = assign({}, xScaleOpts, {\n\ttime: false,\n\tori: 1,\n});\n\nconst syncs = {};\n\nfunction _sync(key, opts) {\n\tlet s = syncs[key];\n\n\tif (!s) {\n\t\ts = {\n\t\t\tkey,\n\t\t\tplots: [],\n\t\t\tsub(plot) {\n\t\t\t\ts.plots.push(plot);\n\t\t\t},\n\t\t\tunsub(plot) {\n\t\t\t\ts.plots = s.plots.filter(c => c != plot);\n\t\t\t},\n\t\t\tpub(type, self, x, y, w, h, i) {\n\t\t\t\tfor (let j = 0; j < s.plots.length; j++)\n\t\t\t\t\ts.plots[j] != self && s.plots[j].pub(type, self, x, y, w, h, i);\n\t\t\t},\n\t\t};\n\n\t\tif (key != null)\n\t\t\tsyncs[key] = s;\n\t}\n\n\treturn s;\n}\n\nconst BAND_CLIP_FILL = 1 << 0;\nconst BAND_CLIP_STROKE = 1 << 1;\n\nfunction orient(u, seriesIdx, cb) {\n\tconst series = u.series[seriesIdx];\n\tconst scales = u.scales;\n\tconst bbox = u.bbox;\n\tconst scaleX = u.mode == 2 ? scales[series.facets[0].scale] : scales[u.series[0].scale];\n\n\tlet dx = u._data[0],\n\t\tdy = u._data[seriesIdx],\n\t\tsx = scaleX,\n\t\tsy = u.mode == 2 ? scales[series.facets[1].scale] : scales[series.scale],\n\t\tl = bbox.left,\n\t\tt = bbox.top,\n\t\tw = bbox.width,\n\t\th = bbox.height,\n\t\tH = u.valToPosH,\n\t\tV = u.valToPosV;\n\n\treturn (sx.ori == 0\n\t\t? cb(\n\t\t\tseries,\n\t\t\tdx,\n\t\t\tdy,\n\t\t\tsx,\n\t\t\tsy,\n\t\t\tH,\n\t\t\tV,\n\t\t\tl,\n\t\t\tt,\n\t\t\tw,\n\t\t\th,\n\t\t\tmoveToH,\n\t\t\tlineToH,\n\t\t\trectH,\n\t\t\tarcH,\n\t\t\tbezierCurveToH,\n\t\t)\n\t\t: cb(\n\t\t\tseries,\n\t\t\tdx,\n\t\t\tdy,\n\t\t\tsx,\n\t\t\tsy,\n\t\t\tV,\n\t\t\tH,\n\t\t\tt,\n\t\t\tl,\n\t\t\th,\n\t\t\tw,\n\t\t\tmoveToV,\n\t\t\tlineToV,\n\t\t\trectV,\n\t\t\tarcV,\n\t\t\tbezierCurveToV,\n\t\t)\n\t);\n}\n\nfunction bandFillClipDirs(self, seriesIdx) {\n\tlet fillDir = 0;\n\n\t// 2 bits, -1 | 1\n\tlet clipDirs = 0;\n\n\tlet bands = ifNull(self.bands, EMPTY_ARR);\n\n\tfor (let i = 0; i < bands.length; i++) {\n\t\tlet b = bands[i];\n\n\t\t// is a \"from\" band edge\n\t\tif (b.series[0] == seriesIdx)\n\t\t\tfillDir = b.dir;\n\t\t// is a \"to\" band edge\n\t\telse if (b.series[1] == seriesIdx) {\n\t\t\tif (b.dir == 1)\n\t\t\t\tclipDirs |= 1;\n\t\t\telse\n\t\t\t\tclipDirs |= 2;\n\t\t}\n\t}\n\n\treturn [\n\t\tfillDir,\n\t\t(\n\t\t\tclipDirs == 1 ? -1 : // neg only\n\t\t\tclipDirs == 2 ? 1 : // pos only\n\t\t\tclipDirs == 3 ? 2 : // both\n\t\t\t 0 // neither\n\t\t)\n\t];\n}\n\nfunction seriesFillTo(self, seriesIdx, dataMin, dataMax, bandFillDir) {\n\tlet scale = self.scales[self.series[seriesIdx].scale];\n\n\treturn (\n\t\tbandFillDir == -1 ? scale.min :\n\t\tbandFillDir == 1 ? scale.max :\n\t\tscale.distr == 3 ? (\n\t\t\tscale.dir == 1 ? scale.min :\n\t\t\tscale.max\n\t\t) : 0\n\t);\n}\n\n// creates inverted band clip path (from stroke path -> yMax || yMin)\n// clipDir is always inverse of fillDir\n// default clip dir is upwards (1), since default band fill is downwards/fillBelowTo (-1) (highIdx -> lowIdx)\nfunction clipBandLine(self, seriesIdx, idx0, idx1, strokePath, clipDir) {\n\treturn orient(self, seriesIdx, (series, dataX, dataY, scaleX, scaleY, valToPosX, valToPosY, xOff, yOff, xDim, yDim) => {\n\t\tlet pxRound = series.pxRound;\n\n\t\tconst dir = scaleX.dir * (scaleX.ori == 0 ? 1 : -1);\n\t\tconst lineTo = scaleX.ori == 0 ? lineToH : lineToV;\n\n\t\tlet frIdx, toIdx;\n\n\t\tif (dir == 1) {\n\t\t\tfrIdx = idx0;\n\t\t\ttoIdx = idx1;\n\t\t}\n\t\telse {\n\t\t\tfrIdx = idx1;\n\t\t\ttoIdx = idx0;\n\t\t}\n\n\t\t// path start\n\t\tlet x0 = pxRound(valToPosX(dataX[frIdx], scaleX, xDim, xOff));\n\t\tlet y0 = pxRound(valToPosY(dataY[frIdx], scaleY, yDim, yOff));\n\t\t// path end x\n\t\tlet x1 = pxRound(valToPosX(dataX[toIdx], scaleX, xDim, xOff));\n\t\t// upper or lower y limit\n\t\tlet yLimit = pxRound(valToPosY(clipDir == 1 ? scaleY.max : scaleY.min, scaleY, yDim, yOff));\n\n\t\tlet clip = new Path2D(strokePath);\n\n\t\tlineTo(clip, x1, yLimit);\n\t\tlineTo(clip, x0, yLimit);\n\t\tlineTo(clip, x0, y0);\n\n\t\treturn clip;\n\t});\n}\n\nfunction clipGaps(gaps, ori, plotLft, plotTop, plotWid, plotHgt) {\n\tlet clip = null;\n\n\t// create clip path (invert gaps and non-gaps)\n\tif (gaps.length > 0) {\n\t\tclip = new Path2D();\n\n\t\tconst rect = ori == 0 ? rectH : rectV;\n\n\t\tlet prevGapEnd = plotLft;\n\n\t\tfor (let i = 0; i < gaps.length; i++) {\n\t\t\tlet g = gaps[i];\n\n\t\t\tif (g[1] > g[0]) {\n\t\t\t\tlet w = g[0] - prevGapEnd;\n\n\t\t\t\tw > 0 && rect(clip, prevGapEnd, plotTop, w, plotTop + plotHgt);\n\n\t\t\t\tprevGapEnd = g[1];\n\t\t\t}\n\t\t}\n\n\t\tlet w = plotLft + plotWid - prevGapEnd;\n\n\t\tw > 0 && rect(clip, prevGapEnd, plotTop, w, plotTop + plotHgt);\n\t}\n\n\treturn clip;\n}\n\nfunction addGap(gaps, fromX, toX) {\n\tlet prevGap = gaps[gaps.length - 1];\n\n\tif (prevGap && prevGap[0] == fromX)\t\t\t// TODO: gaps must be encoded at stroke widths?\n\t\tprevGap[1] = toX;\n\telse\n\t\tgaps.push([fromX, toX]);\n}\n\nfunction findGaps(xs, ys, idx0, idx1, dir, pixelForX, align) {\n\tlet gaps = [];\n\n\tfor (let i = dir == 1 ? idx0 : idx1; i >= idx0 && i <= idx1; i += dir) {\n\t\tlet yVal = ys[i];\n\n\t\tif (yVal === null) {\n\t\t\tlet fr = i, to = i;\n\n\t\t\tif (dir == 1) {\n\t\t\t\twhile (++i <= idx1 && ys[i] === null)\n\t\t\t\t\tto = i;\n\t\t\t}\n\t\t\telse {\n\t\t\t\twhile (--i >= idx0 && ys[i] === null)\n\t\t\t\t\tto = i;\n\t\t\t}\n\n\t\t\tlet frPx = pixelForX(xs[fr]);\n\t\t\tlet toPx = to == fr ? frPx : pixelForX(xs[to]);\n\n\t\t\t// if value adjacent to edge null is same pixel, then it's partially\n\t\t\t// filled and gap should start at next pixel\n\t\t\tlet frPx2 = align <= 0 ? pixelForX(xs[fr-dir]) : frPx;\n\t\t//\tif (frPx2 == frPx)\n\t\t//\t\tfrPx++;\n\t\t//\telse\n\t\t\t\tfrPx = frPx2;\n\n\t\t\tlet toPx2 = align >= 0 ? pixelForX(xs[to+dir]) : toPx;\n\t\t//\tif (toPx2 == toPx)\n\t\t//\t\ttoPx--;\n\t\t//\telse\n\t\t\t\ttoPx = toPx2;\n\n\t\t\tif (toPx >= frPx)\n\t\t\t\tgaps.push([frPx, toPx]); // addGap\n\t\t}\n\t}\n\n\treturn gaps;\n}\n\nfunction pxRoundGen(pxAlign) {\n\treturn pxAlign == 0 ? retArg0 : pxAlign == 1 ? round : v => incrRound(v, pxAlign);\n}\n\nfunction rect(ori) {\n\tlet moveTo = ori == 0 ?\n\t\tmoveToH :\n\t\tmoveToV;\n\n\tlet arcTo = ori == 0 ?\n\t\t(p, x1, y1, x2, y2, r) => { p.arcTo(x1, y1, x2, y2, r); } :\n\t\t(p, y1, x1, y2, x2, r) => { p.arcTo(x1, y1, x2, y2, r); };\n\n\tlet rect = ori == 0 ?\n\t\t(p, x, y, w, h) => { p.rect(x, y, w, h); } :\n\t\t(p, y, x, h, w) => { p.rect(x, y, w, h); };\n\n\treturn (p, x, y, w, h, r = 0) => {\n\t\tif (r == 0)\n\t\t\trect(p, x, y, w, h);\n\t\telse {\n\t\t\tr = min(r, w / 2, h / 2);\n\n\t\t\t// adapted from https://stackoverflow.com/questions/1255512/how-to-draw-a-rounded-rectangle-using-html-canvas/7838871#7838871\n\t\t\tmoveTo(p, x + r, y);\n\t\t\tarcTo(p, x + w, y, x + w, y + h, r);\n\t\t\tarcTo(p, x + w, y + h, x, y + h, r);\n\t\t\tarcTo(p, x, y + h, x, y, r);\n\t\t\tarcTo(p, x, y, x + w, y, r);\n\t\t\tp.closePath();\n\t\t}\n\t};\n}\n\n// orientation-inverting canvas functions\nconst moveToH = (p, x, y) => { p.moveTo(x, y); };\nconst moveToV = (p, y, x) => { p.moveTo(x, y); };\nconst lineToH = (p, x, y) => { p.lineTo(x, y); };\nconst lineToV = (p, y, x) => { p.lineTo(x, y); };\nconst rectH = rect(0);\nconst rectV = rect(1);\nconst arcH = (p, x, y, r, startAngle, endAngle) => { p.arc(x, y, r, startAngle, endAngle); };\nconst arcV = (p, y, x, r, startAngle, endAngle) => { p.arc(x, y, r, startAngle, endAngle); };\nconst bezierCurveToH = (p, bp1x, bp1y, bp2x, bp2y, p2x, p2y) => { p.bezierCurveTo(bp1x, bp1y, bp2x, bp2y, p2x, p2y); };\nconst bezierCurveToV = (p, bp1y, bp1x, bp2y, bp2x, p2y, p2x) => { p.bezierCurveTo(bp1x, bp1y, bp2x, bp2y, p2x, p2y); };\n\n// TODO: drawWrap(seriesIdx, drawPoints) (save, restore, translate, clip)\nfunction points(opts) {\n\treturn (u, seriesIdx, idx0, idx1, filtIdxs) => {\n\t//\tlog(\"drawPoints()\", arguments);\n\n\t\treturn orient(u, seriesIdx, (series, dataX, dataY, scaleX, scaleY, valToPosX, valToPosY, xOff, yOff, xDim, yDim) => {\n\t\t\tlet { pxRound, points } = series;\n\n\t\t\tlet moveTo, arc;\n\n\t\t\tif (scaleX.ori == 0) {\n\t\t\t\tmoveTo = moveToH;\n\t\t\t\tarc = arcH;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmoveTo = moveToV;\n\t\t\t\tarc = arcV;\n\t\t\t}\n\n\t\t\tconst width = roundDec(points.width * pxRatio, 3);\n\n\t\t\tlet rad = (points.size - points.width) / 2 * pxRatio;\n\t\t\tlet dia = roundDec(rad * 2, 3);\n\n\t\t\tlet fill = new Path2D();\n\t\t\tlet clip = new Path2D();\n\n\t\t\tlet { left: lft, top: top, width: wid, height: hgt } = u.bbox;\n\n\t\t\trectH(clip,\n\t\t\t\tlft - dia,\n\t\t\t\ttop - dia,\n\t\t\t\twid + dia * 2,\n\t\t\t\thgt + dia * 2,\n\t\t\t);\n\n\t\t\tconst drawPoint = pi => {\n\t\t\t\tif (dataY[pi] != null) {\n\t\t\t\t\tlet x = pxRound(valToPosX(dataX[pi], scaleX, xDim, xOff));\n\t\t\t\t\tlet y = pxRound(valToPosY(dataY[pi], scaleY, yDim, yOff));\n\n\t\t\t\t\tmoveTo(fill, x + rad, y);\n\t\t\t\t\tarc(fill, x, y, rad, 0, PI * 2);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (filtIdxs)\n\t\t\t\tfiltIdxs.forEach(drawPoint);\n\t\t\telse {\n\t\t\t\tfor (let pi = idx0; pi <= idx1; pi++)\n\t\t\t\t\tdrawPoint(pi);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tstroke: width > 0 ? fill : null,\n\t\t\t\tfill,\n\t\t\t\tclip,\n\t\t\t\tflags: BAND_CLIP_FILL | BAND_CLIP_STROKE,\n\t\t\t};\n\t\t});\n\t};\n}\n\nfunction _drawAcc(lineTo) {\n\treturn (stroke, accX, minY, maxY, inY, outY) => {\n\t\tif (minY != maxY) {\n\t\t\tif (inY != minY && outY != minY)\n\t\t\t\tlineTo(stroke, accX, minY);\n\t\t\tif (inY != maxY && outY != maxY)\n\t\t\t\tlineTo(stroke, accX, maxY);\n\n\t\t\tlineTo(stroke, accX, outY);\n\t\t}\n\t};\n}\n\nconst drawAccH = _drawAcc(lineToH);\nconst drawAccV = _drawAcc(lineToV);\n\nfunction linear(opts) {\n\tconst alignGaps = ifNull(opts?.alignGaps, 0);\n\n\treturn (u, seriesIdx, idx0, idx1) => {\n\t\treturn orient(u, seriesIdx, (series, dataX, dataY, scaleX, scaleY, valToPosX, valToPosY, xOff, yOff, xDim, yDim) => {\n\t\t\tlet pxRound = series.pxRound;\n\n\t\t\tlet pixelForX = val => pxRound(valToPosX(val, scaleX, xDim, xOff));\n\t\t\tlet pixelForY = val => pxRound(valToPosY(val, scaleY, yDim, yOff));\n\n\t\t\tlet lineTo, drawAcc;\n\n\t\t\tif (scaleX.ori == 0) {\n\t\t\t\tlineTo = lineToH;\n\t\t\t\tdrawAcc = drawAccH;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlineTo = lineToV;\n\t\t\t\tdrawAcc = drawAccV;\n\t\t\t}\n\n\t\t\tconst dir = scaleX.dir * (scaleX.ori == 0 ? 1 : -1);\n\n\t\t\tconst _paths = {stroke: new Path2D(), fill: null, clip: null, band: null, gaps: null, flags: BAND_CLIP_FILL};\n\t\t\tconst stroke = _paths.stroke;\n\n\t\t\tlet minY = inf,\n\t\t\t\tmaxY = -inf,\n\t\t\t\tinY, outY, drawnAtX;\n\n\t\t\tlet accX = pixelForX(dataX[dir == 1 ? idx0 : idx1]);\n\n\t\t\t// data edges\n\t\t\tlet lftIdx = nonNullIdx(dataY, idx0, idx1, 1 * dir);\n\t\t\tlet rgtIdx = nonNullIdx(dataY, idx0, idx1, -1 * dir);\n\t\t\tlet lftX = pixelForX(dataX[lftIdx]);\n\t\t\tlet rgtX = pixelForX(dataX[rgtIdx]);\n\n\t\t\tfor (let i = dir == 1 ? idx0 : idx1; i >= idx0 && i <= idx1; i += dir) {\n\t\t\t\tlet x = pixelForX(dataX[i]);\n\n\t\t\t\tif (x == accX) {\n\t\t\t\t\tif (dataY[i] != null) {\n\t\t\t\t\t\toutY = pixelForY(dataY[i]);\n\n\t\t\t\t\t\tif (minY == inf) {\n\t\t\t\t\t\t\tlineTo(stroke, x, outY);\n\t\t\t\t\t\t\tinY = outY;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tminY = min(outY, minY);\n\t\t\t\t\t\tmaxY = max(outY, maxY);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (minY != inf) {\n\t\t\t\t\t\tdrawAcc(stroke, accX, minY, maxY, inY, outY);\n\t\t\t\t\t\tdrawnAtX = accX;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (dataY[i] != null) {\n\t\t\t\t\t\toutY = pixelForY(dataY[i]);\n\t\t\t\t\t\tlineTo(stroke, x, outY);\n\t\t\t\t\t\tminY = maxY = inY = outY;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tminY = inf;\n\t\t\t\t\t\tmaxY = -inf;\n\t\t\t\t\t}\n\n\t\t\t\t\taccX = x;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (minY != inf && minY != maxY && drawnAtX != accX)\n\t\t\t\tdrawAcc(stroke, accX, minY, maxY, inY, outY);\n\n\t\t\tlet [ bandFillDir, bandClipDir ] = bandFillClipDirs(u, seriesIdx);\n\n\t\t\tif (series.fill != null || bandFillDir != 0) {\n\t\t\t\tlet fill = _paths.fill = new Path2D(stroke);\n\n\t\t\t\tlet fillToVal = series.fillTo(u, seriesIdx, series.min, series.max, bandFillDir);\n\t\t\t\tlet fillToY = pixelForY(fillToVal);\n\n\t\t\t\tlineTo(fill, rgtX, fillToY);\n\t\t\t\tlineTo(fill, lftX, fillToY);\n\t\t\t}\n\n\t\t\tif (!series.spanGaps) {\n\t\t\t//\tconsole.time('gaps');\n\t\t\t\tlet gaps = [];\n\n\t\t\t\tgaps.push(...findGaps(dataX, dataY, idx0, idx1, dir, pixelForX, alignGaps));\n\n\t\t\t//\tconsole.timeEnd('gaps');\n\n\t\t\t//\tconsole.log('gaps', JSON.stringify(gaps));\n\n\t\t\t\t_paths.gaps = gaps = series.gaps(u, seriesIdx, idx0, idx1, gaps);\n\n\t\t\t\t_paths.clip = clipGaps(gaps, scaleX.ori, xOff, yOff, xDim, yDim);\n\t\t\t}\n\n\t\t\tif (bandClipDir != 0) {\n\t\t\t\t_paths.band = bandClipDir == 2 ? [\n\t\t\t\t\tclipBandLine(u, seriesIdx, idx0, idx1, stroke, -1),\n\t\t\t\t\tclipBandLine(u, seriesIdx, idx0, idx1, stroke, 1),\n\t\t\t\t] : clipBandLine(u, seriesIdx, idx0, idx1, stroke, bandClipDir);\n\t\t\t}\n\n\t\t\treturn _paths;\n\t\t});\n\t};\n}\n\nfunction stepped(opts) {\n\tconst align = ifNull(opts.align, 1);\n\t// whether to draw ascenders/descenders at null/gap bondaries\n\tconst ascDesc = ifNull(opts.ascDesc, false);\n\n\tconst alignGaps = ifNull(opts.alignGaps, 0);\n\n\treturn (u, seriesIdx, idx0, idx1) => {\n\t\treturn orient(u, seriesIdx, (series, dataX, dataY, scaleX, scaleY, valToPosX, valToPosY, xOff, yOff, xDim, yDim) => {\n\t\t\tlet pxRound = series.pxRound;\n\n\t\t\tlet pixelForX = val => pxRound(valToPosX(val, scaleX, xDim, xOff));\n\t\t\tlet pixelForY = val => pxRound(valToPosY(val, scaleY, yDim, yOff));\n\n\t\t\tlet lineTo = scaleX.ori == 0 ? lineToH : lineToV;\n\n\t\t\tconst _paths = {stroke: new Path2D(), fill: null, clip: null, band: null, gaps: null, flags: BAND_CLIP_FILL};\n\t\t\tconst stroke = _paths.stroke;\n\n\t\t\tconst dir = scaleX.dir * (scaleX.ori == 0 ? 1 : -1);\n\n\t\t\tidx0 = nonNullIdx(dataY, idx0, idx1, 1);\n\t\t\tidx1 = nonNullIdx(dataY, idx0, idx1, -1);\n\n\t\t\tlet prevYPos = pixelForY(dataY[dir == 1 ? idx0 : idx1]);\n\t\t\tlet firstXPos = pixelForX(dataX[dir == 1 ? idx0 : idx1]);\n\t\t\tlet prevXPos = firstXPos;\n\n\t\t\tlineTo(stroke, firstXPos, prevYPos);\n\n\t\t\tfor (let i = dir == 1 ? idx0 : idx1; i >= idx0 && i <= idx1; i += dir) {\n\t\t\t\tlet yVal1 = dataY[i];\n\n\t\t\t\tif (yVal1 == null)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tlet x1 = pixelForX(dataX[i]);\n\t\t\t\tlet y1 = pixelForY(yVal1);\n\n\t\t\t\tif (align == 1)\n\t\t\t\t\tlineTo(stroke, x1, prevYPos);\n\t\t\t\telse\n\t\t\t\t\tlineTo(stroke, prevXPos, y1);\n\n\t\t\t\tlineTo(stroke, x1, y1);\n\n\t\t\t\tprevYPos = y1;\n\t\t\t\tprevXPos = x1;\n\t\t\t}\n\n\t\t\tlet [ bandFillDir, bandClipDir ] = bandFillClipDirs(u, seriesIdx);\n\n\t\t\tif (series.fill != null || bandFillDir != 0) {\n\t\t\t\tlet fill = _paths.fill = new Path2D(stroke);\n\n\t\t\t\tlet fillTo = series.fillTo(u, seriesIdx, series.min, series.max, bandFillDir);\n\t\t\t\tlet fillToY = pixelForY(fillTo);\n\n\t\t\t\tlineTo(fill, prevXPos, fillToY);\n\t\t\t\tlineTo(fill, firstXPos, fillToY);\n\t\t\t}\n\n\t\t\tif (!series.spanGaps) {\n\t\t\t//\tconsole.time('gaps');\n\t\t\t\tlet gaps = [];\n\n\t\t\t\tgaps.push(...findGaps(dataX, dataY, idx0, idx1, dir, pixelForX, alignGaps));\n\n\t\t\t//\tconsole.timeEnd('gaps');\n\n\t\t\t//\tconsole.log('gaps', JSON.stringify(gaps));\n\n\t\t\t\t// expand/contract clips for ascenders/descenders\n\t\t\t\tlet halfStroke = (series.width * pxRatio) / 2;\n\t\t\t\tlet startsOffset = (ascDesc || align == 1) ? halfStroke : -halfStroke;\n\t\t\t\tlet endsOffset = (ascDesc || align == -1) ? -halfStroke : halfStroke;\n\n\t\t\t\tgaps.forEach(g => {\n\t\t\t\t\tg[0] += startsOffset;\n\t\t\t\t\tg[1] += endsOffset;\n\t\t\t\t});\n\n\t\t\t\t_paths.gaps = gaps = series.gaps(u, seriesIdx, idx0, idx1, gaps);\n\n\t\t\t\t_paths.clip = clipGaps(gaps, scaleX.ori, xOff, yOff, xDim, yDim);\n\t\t\t}\n\n\t\t\tif (bandClipDir != 0) {\n\t\t\t\t_paths.band = bandClipDir == 2 ? [\n\t\t\t\t\tclipBandLine(u, seriesIdx, idx0, idx1, stroke, -1),\n\t\t\t\t\tclipBandLine(u, seriesIdx, idx0, idx1, stroke, 1),\n\t\t\t\t] : clipBandLine(u, seriesIdx, idx0, idx1, stroke, bandClipDir);\n\t\t\t}\n\n\t\t\treturn _paths;\n\t\t});\n\t};\n}\n\nfunction bars(opts) {\n\topts = opts || EMPTY_OBJ;\n\tconst size = ifNull(opts.size, [0.6, inf, 1]);\n\tconst align = opts.align || 0;\n\tconst extraGap = (opts.gap || 0) * pxRatio;\n\n\tconst radius = ifNull(opts.radius, 0);\n\n\tconst gapFactor = 1 - size[0];\n\tconst maxWidth = ifNull(size[1], inf) * pxRatio;\n\tconst minWidth = ifNull(size[2], 1) * pxRatio;\n\n\tconst disp = ifNull(opts.disp, EMPTY_OBJ);\n\tconst _each = ifNull(opts.each, _ => {});\n\n\tconst { fill: dispFills, stroke: dispStrokes } = disp;\n\n\treturn (u, seriesIdx, idx0, idx1) => {\n\t\treturn orient(u, seriesIdx, (series, dataX, dataY, scaleX, scaleY, valToPosX, valToPosY, xOff, yOff, xDim, yDim) => {\n\t\t\tlet pxRound = series.pxRound;\n\n\t\t\tconst _dirX = scaleX.dir * (scaleX.ori == 0 ? 1 : -1);\n\t\t\tconst _dirY = scaleY.dir * (scaleY.ori == 1 ? 1 : -1);\n\n\t\t\tlet rect = scaleX.ori == 0 ? rectH : rectV;\n\n\t\t\tlet each = scaleX.ori == 0 ? _each : (u, seriesIdx, i, top, lft, hgt, wid) => {\n\t\t\t\t_each(u, seriesIdx, i, lft, top, wid, hgt);\n\t\t\t};\n\n\t\t\tlet [ bandFillDir, bandClipDir ] = bandFillClipDirs(u, seriesIdx);\n\n\t\t//\tlet fillToY = series.fillTo(u, seriesIdx, series.min, series.max, bandFillDir);\n\t\t\tlet fillToY = scaleY.distr == 3 ? (bandFillDir == 1 ? scaleY.max : scaleY.min) : 0;\n\n\t\t\tlet y0Pos = valToPosY(fillToY, scaleY, yDim, yOff);\n\n\t\t\t// barWid is to center of stroke\n\t\t\tlet xShift, barWid;\n\n\t\t\tlet strokeWidth = pxRound(series.width * pxRatio);\n\n\t\t\tlet multiPath = false;\n\n\t\t\tlet fillColors = null;\n\t\t\tlet fillPaths = null;\n\t\t\tlet strokeColors = null;\n\t\t\tlet strokePaths = null;\n\n\t\t\tif (dispFills != null && (strokeWidth == 0 || dispStrokes != null)) {\n\t\t\t\tmultiPath = true;\n\n\t\t\t\tfillColors = dispFills.values(u, seriesIdx, idx0, idx1);\n\t\t\t\tfillPaths = new Map();\n\t\t\t\t(new Set(fillColors)).forEach(color => {\n\t\t\t\t\tif (color != null)\n\t\t\t\t\t\tfillPaths.set(color, new Path2D());\n\t\t\t\t});\n\n\t\t\t\tif (strokeWidth > 0) {\n\t\t\t\t\tstrokeColors = dispStrokes.values(u, seriesIdx, idx0, idx1);\n\t\t\t\t\tstrokePaths = new Map();\n\t\t\t\t\t(new Set(strokeColors)).forEach(color => {\n\t\t\t\t\t\tif (color != null)\n\t\t\t\t\t\t\tstrokePaths.set(color, new Path2D());\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet { x0, size } = disp;\n\n\t\t\tif (x0 != null && size != null) {\n\t\t\t\tdataX = x0.values(u, seriesIdx, idx0, idx1);\n\n\t\t\t\tif (x0.unit == 2)\n\t\t\t\t\tdataX = dataX.map(pct => u.posToVal(xOff + pct * xDim, scaleX.key, true));\n\n\t\t\t\t// assumes uniform sizes, for now\n\t\t\t\tlet sizes = size.values(u, seriesIdx, idx0, idx1);\n\n\t\t\t\tif (size.unit == 2)\n\t\t\t\t\tbarWid = sizes[0] * xDim;\n\t\t\t\telse\n\t\t\t\t\tbarWid = valToPosX(sizes[0], scaleX, xDim, xOff) - valToPosX(0, scaleX, xDim, xOff); // assumes linear scale (delta from 0)\n\n\t\t\t\tbarWid = pxRound(barWid - strokeWidth);\n\n\t\t\t\txShift = (_dirX == 1 ? -strokeWidth / 2 : barWid + strokeWidth / 2);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlet colWid = xDim;\n\n\t\t\t\tif (dataX.length > 1) {\n\t\t\t\t\t// prior index with non-undefined y data\n\t\t\t\t\tlet prevIdx = null;\n\n\t\t\t\t\t// scan full dataset for smallest adjacent delta\n\t\t\t\t\t// will not work properly for non-linear x scales, since does not do expensive valToPosX calcs till end\n\t\t\t\t\tfor (let i = 0, minDelta = Infinity; i < dataX.length; i++) {\n\t\t\t\t\t\tif (dataY[i] !== undefined) {\n\t\t\t\t\t\t\tif (prevIdx != null) {\n\t\t\t\t\t\t\t\tlet delta = abs(dataX[i] - dataX[prevIdx]);\n\n\t\t\t\t\t\t\t\tif (delta < minDelta) {\n\t\t\t\t\t\t\t\t\tminDelta = delta;\n\t\t\t\t\t\t\t\t\tcolWid = abs(valToPosX(dataX[i], scaleX, xDim, xOff) - valToPosX(dataX[prevIdx], scaleX, xDim, xOff));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tprevIdx = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlet gapWid = colWid * gapFactor;\n\n\t\t\t\tbarWid = pxRound(min(maxWidth, max(minWidth, colWid - gapWid)) - strokeWidth - extraGap);\n\n\t\t\t\txShift = (align == 0 ? barWid / 2 : align == _dirX ? 0 : barWid) - align * _dirX * extraGap / 2;\n\t\t\t}\n\n\t\t\tconst _paths = {stroke: null, fill: null, clip: null, band: null, gaps: null, flags: BAND_CLIP_FILL | BAND_CLIP_STROKE}; // disp, geom\n\n\t\t\tlet yLimit;\n\n\t\t\tif (bandClipDir != 0) {\n\t\t\t\t_paths.band = new Path2D();\n\t\t\t\tyLimit = pxRound(valToPosY(bandClipDir == 1 ? scaleY.max : scaleY.min, scaleY, yDim, yOff));\n\t\t\t}\n\n\t\t\tconst stroke = multiPath ? null : new Path2D();\n\t\t\tconst band = _paths.band;\n\n\t\t\tlet { y0, y1 } = disp;\n\n\t\t\tlet dataY0 = null;\n\n\t\t\tif (y0 != null && y1 != null) {\n\t\t\t\tdataY = y1.values(u, seriesIdx, idx0, idx1);\n\t\t\t\tdataY0 = y0.values(u, seriesIdx, idx0, idx1);\n\t\t\t}\n\n\t\t\tfor (let i = _dirX == 1 ? idx0 : idx1; i >= idx0 && i <= idx1; i += _dirX) {\n\t\t\t\tlet yVal = dataY[i];\n\n\t\t\t\t// we can skip both, drawing and band clipping for alignment artifacts\n\t\t\t\tif (yVal === undefined)\n\t\t\t\t\tcontinue;\n\n\t\t\t/*\n\t\t\t\t// interpolate upwards band clips\n\t\t\t\tif (yVal == null) {\n\t\t\t\t//\tif (hasBands)\n\t\t\t\t//\t\tyVal = costlyLerp(i, idx0, idx1, _dirX, dataY);\n\t\t\t\t//\telse\n\t\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t*/\n\n\t\t\t\tlet xVal = scaleX.distr != 2 || disp != null ? dataX[i] : i;\n\n\t\t\t\t// TODO: all xPos can be pre-computed once for all series in aligned set\n\t\t\t\tlet xPos = valToPosX(xVal, scaleX, xDim, xOff);\n\t\t\t\tlet yPos = valToPosY(ifNull(yVal, fillToY), scaleY, yDim, yOff);\n\n\t\t\t\tif (dataY0 != null && yVal != null)\n\t\t\t\t\ty0Pos = valToPosY(dataY0[i], scaleY, yDim, yOff);\n\n\t\t\t\tlet lft = pxRound(xPos - xShift);\n\t\t\t\tlet btm = pxRound(max(yPos, y0Pos));\n\t\t\t\tlet top = pxRound(min(yPos, y0Pos));\n\t\t\t\t// this includes the stroke\n\t\t\t\tlet barHgt = btm - top;\n\n\t\t\t\tlet r = radius * barWid;\n\n\t\t\t\tif (yVal != null) { // && yVal != fillToY (0 height bar)\n\t\t\t\t\tif (multiPath) {\n\t\t\t\t\t\tif (strokeWidth > 0 && strokeColors[i] != null)\n\t\t\t\t\t\t\trect(strokePaths.get(strokeColors[i]), lft, top + floor(strokeWidth / 2), barWid, max(0, barHgt - strokeWidth), r);\n\n\t\t\t\t\t\tif (fillColors[i] != null)\n\t\t\t\t\t\t\trect(fillPaths.get(fillColors[i]), lft, top + floor(strokeWidth / 2), barWid, max(0, barHgt - strokeWidth), r);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\trect(stroke, lft, top + floor(strokeWidth / 2), barWid, max(0, barHgt - strokeWidth), r);\n\n\t\t\t\t\teach(u, seriesIdx, i,\n\t\t\t\t\t\tlft - strokeWidth / 2,\n\t\t\t\t\t\ttop,\n\t\t\t\t\t\tbarWid + strokeWidth,\n\t\t\t\t\t\tbarHgt,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (bandClipDir != 0) {\n\t\t\t\t\tif (_dirY * bandClipDir == 1) {\n\t\t\t\t\t\tbtm = top;\n\t\t\t\t\t\ttop = yLimit;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttop = btm;\n\t\t\t\t\t\tbtm = yLimit;\n\t\t\t\t\t}\n\n\t\t\t\t\tbarHgt = btm - top;\n\n\t\t\t\t\trect(band, lft - strokeWidth / 2, top, barWid + strokeWidth, max(0, barHgt), 0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (strokeWidth > 0)\n\t\t\t\t_paths.stroke = multiPath ? strokePaths : stroke;\n\n\t\t\t_paths.fill = multiPath ? fillPaths : stroke;\n\n\t\t\treturn _paths;\n\t\t});\n\t};\n}\n\nfunction splineInterp(interp, opts) {\n\tconst alignGaps = ifNull(opts?.alignGaps, 0);\n\n\treturn (u, seriesIdx, idx0, idx1) => {\n\t\treturn orient(u, seriesIdx, (series, dataX, dataY, scaleX, scaleY, valToPosX, valToPosY, xOff, yOff, xDim, yDim) => {\n\t\t\tlet pxRound = series.pxRound;\n\n\t\t\tlet pixelForX = val => pxRound(valToPosX(val, scaleX, xDim, xOff));\n\t\t\tlet pixelForY = val => pxRound(valToPosY(val, scaleY, yDim, yOff));\n\n\t\t\tlet moveTo, bezierCurveTo, lineTo;\n\n\t\t\tif (scaleX.ori == 0) {\n\t\t\t\tmoveTo = moveToH;\n\t\t\t\tlineTo = lineToH;\n\t\t\t\tbezierCurveTo = bezierCurveToH;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmoveTo = moveToV;\n\t\t\t\tlineTo = lineToV;\n\t\t\t\tbezierCurveTo = bezierCurveToV;\n\t\t\t}\n\n\t\t\tconst dir = scaleX.dir * (scaleX.ori == 0 ? 1 : -1);\n\n\t\t\tidx0 = nonNullIdx(dataY, idx0, idx1, 1);\n\t\t\tidx1 = nonNullIdx(dataY, idx0, idx1, -1);\n\n\t\t\tlet firstXPos = pixelForX(dataX[dir == 1 ? idx0 : idx1]);\n\t\t\tlet prevXPos = firstXPos;\n\n\t\t\tlet xCoords = [];\n\t\t\tlet yCoords = [];\n\n\t\t\tfor (let i = dir == 1 ? idx0 : idx1; i >= idx0 && i <= idx1; i += dir) {\n\t\t\t\tlet yVal = dataY[i];\n\n\t\t\t\tif (yVal != null) {\n\t\t\t\t\tlet xVal = dataX[i];\n\t\t\t\t\tlet xPos = pixelForX(xVal);\n\n\t\t\t\t\txCoords.push(prevXPos = xPos);\n\t\t\t\t\tyCoords.push(pixelForY(dataY[i]));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst _paths = {stroke: interp(xCoords, yCoords, moveTo, lineTo, bezierCurveTo, pxRound), fill: null, clip: null, band: null, gaps: null, flags: BAND_CLIP_FILL};\n\t\t\tconst stroke = _paths.stroke;\n\n\t\t\tlet [ bandFillDir, bandClipDir ] = bandFillClipDirs(u, seriesIdx);\n\n\t\t\tif (series.fill != null || bandFillDir != 0) {\n\t\t\t\tlet fill = _paths.fill = new Path2D(stroke);\n\n\t\t\t\tlet fillTo = series.fillTo(u, seriesIdx, series.min, series.max, bandFillDir);\n\t\t\t\tlet fillToY = pixelForY(fillTo);\n\n\t\t\t\tlineTo(fill, prevXPos, fillToY);\n\t\t\t\tlineTo(fill, firstXPos, fillToY);\n\t\t\t}\n\n\t\t\tif (!series.spanGaps) {\n\t\t\t//\tconsole.time('gaps');\n\t\t\t\tlet gaps = [];\n\n\t\t\t\tgaps.push(...findGaps(dataX, dataY, idx0, idx1, dir, pixelForX, alignGaps));\n\n\t\t\t//\tconsole.timeEnd('gaps');\n\n\t\t\t//\tconsole.log('gaps', JSON.stringify(gaps));\n\n\t\t\t\t_paths.gaps = gaps = series.gaps(u, seriesIdx, idx0, idx1, gaps);\n\n\t\t\t\t_paths.clip = clipGaps(gaps, scaleX.ori, xOff, yOff, xDim, yDim);\n\t\t\t}\n\n\t\t\tif (bandClipDir != 0) {\n\t\t\t\t_paths.band = bandClipDir == 2 ? [\n\t\t\t\t\tclipBandLine(u, seriesIdx, idx0, idx1, stroke, -1),\n\t\t\t\t\tclipBandLine(u, seriesIdx, idx0, idx1, stroke, 1),\n\t\t\t\t] : clipBandLine(u, seriesIdx, idx0, idx1, stroke, bandClipDir);\n\t\t\t}\n\n\t\t\treturn _paths;\n\n\t\t\t// if FEAT_PATHS: false in rollup.config.js\n\t\t\t//\tu.ctx.save();\n\t\t\t//\tu.ctx.beginPath();\n\t\t\t//\tu.ctx.rect(u.bbox.left, u.bbox.top, u.bbox.width, u.bbox.height);\n\t\t\t//\tu.ctx.clip();\n\t\t\t//\tu.ctx.strokeStyle = u.series[sidx].stroke;\n\t\t\t//\tu.ctx.stroke(stroke);\n\t\t\t//\tu.ctx.fillStyle = u.series[sidx].fill;\n\t\t\t//\tu.ctx.fill(fill);\n\t\t\t//\tu.ctx.restore();\n\t\t\t//\treturn null;\n\t\t});\n\t};\n}\n\nfunction monotoneCubic(opts) {\n\treturn splineInterp(_monotoneCubic, opts);\n}\n\n// Monotone Cubic Spline interpolation, adapted from the Chartist.js implementation:\n// https://github.com/gionkunz/chartist-js/blob/e7e78201bffe9609915e5e53cfafa29a5d6c49f9/src/scripts/interpolation.js#L240-L369\nfunction _monotoneCubic(xs, ys, moveTo, lineTo, bezierCurveTo, pxRound) {\n\tconst n = xs.length;\n\n\tif (n < 2)\n\t\treturn null;\n\n\tconst path = new Path2D();\n\n\tmoveTo(path, xs[0], ys[0]);\n\n\tif (n == 2)\n\t\tlineTo(path, xs[1], ys[1]);\n\telse {\n\t\tlet ms = Array(n),\n\t\t\tds = Array(n - 1),\n\t\t\tdys = Array(n - 1),\n\t\t\tdxs = Array(n - 1);\n\n\t\t// calc deltas and derivative\n\t\tfor (let i = 0; i < n - 1; i++) {\n\t\t\tdys[i] = ys[i + 1] - ys[i];\n\t\t\tdxs[i] = xs[i + 1] - xs[i];\n\t\t\tds[i] = dys[i] / dxs[i];\n\t\t}\n\n\t\t// determine desired slope (m) at each point using Fritsch-Carlson method\n\t\t// http://math.stackexchange.com/questions/45218/implementation-of-monotone-cubic-interpolation\n\t\tms[0] = ds[0];\n\n\t\tfor (let i = 1; i < n - 1; i++) {\n\t\t\tif (ds[i] === 0 || ds[i - 1] === 0 || (ds[i - 1] > 0) !== (ds[i] > 0))\n\t\t\t\tms[i] = 0;\n\t\t\telse {\n\t\t\t\tms[i] = 3 * (dxs[i - 1] + dxs[i]) / (\n\t\t\t\t\t(2 * dxs[i] + dxs[i - 1]) / ds[i - 1] +\n\t\t\t\t\t(dxs[i] + 2 * dxs[i - 1]) / ds[i]\n\t\t\t\t);\n\n\t\t\t\tif (!isFinite(ms[i]))\n\t\t\t\t\tms[i] = 0;\n\t\t\t}\n\t\t}\n\n\t\tms[n - 1] = ds[n - 2];\n\n\t\tfor (let i = 0; i < n - 1; i++) {\n\t\t\tbezierCurveTo(\n\t\t\t\tpath,\n\t\t\t\txs[i] + dxs[i] / 3,\n\t\t\t\tys[i] + ms[i] * dxs[i] / 3,\n\t\t\t\txs[i + 1] - dxs[i] / 3,\n\t\t\t\tys[i + 1] - ms[i + 1] * dxs[i] / 3,\n\t\t\t\txs[i + 1],\n\t\t\t\tys[i + 1],\n\t\t\t);\n\t\t}\n\t}\n\n\treturn path;\n}\n\nconst cursorPlots = new Set();\n\nfunction invalidateRects() {\n\tcursorPlots.forEach(u => {\n\t\tu.syncRect(true);\n\t});\n}\n\nif (domEnv) {\n\ton(resize, win, invalidateRects);\n\ton(scroll, win, invalidateRects, true);\n\ton(dppxchange, win, () => { uPlot.pxRatio = pxRatio; });\n}\n\nconst linearPath = linear() ;\nconst pointsPath = points() ;\n\nfunction setDefaults(d, xo, yo, initY) {\n\tlet d2 = initY ? [d[0], d[1]].concat(d.slice(2)) : [d[0]].concat(d.slice(1));\n\treturn d2.map((o, i) => setDefault(o, i, xo, yo));\n}\n\nfunction setDefaults2(d, xyo) {\n\treturn d.map((o, i) => i == 0 ? null : assign({}, xyo, o)); // todo: assign() will not merge facet arrays\n}\n\nfunction setDefault(o, i, xo, yo) {\n\treturn assign({}, (i == 0 ? xo : yo), o);\n}\n\nfunction snapNumX(self, dataMin, dataMax) {\n\treturn dataMin == null ? nullNullTuple : [dataMin, dataMax];\n}\n\nconst snapTimeX = snapNumX;\n\n// this ensures that non-temporal/numeric y-axes get multiple-snapped padding added above/below\n// TODO: also account for incrs when snapping to ensure top of axis gets a tick & value\nfunction snapNumY(self, dataMin, dataMax) {\n\treturn dataMin == null ? nullNullTuple : rangeNum(dataMin, dataMax, rangePad, true);\n}\n\nfunction snapLogY(self, dataMin, dataMax, scale) {\n\treturn dataMin == null ? nullNullTuple : rangeLog(dataMin, dataMax, self.scales[scale].log, false);\n}\n\nconst snapLogX = snapLogY;\n\nfunction snapAsinhY(self, dataMin, dataMax, scale) {\n\treturn dataMin == null ? nullNullTuple : rangeAsinh(dataMin, dataMax, self.scales[scale].log, false);\n}\n\nconst snapAsinhX = snapAsinhY;\n\n// dim is logical (getClientBoundingRect) pixels, not canvas pixels\nfunction findIncr(minVal, maxVal, incrs, dim, minSpace) {\n\tlet intDigits = max(numIntDigits(minVal), numIntDigits(maxVal));\n\n\tlet delta = maxVal - minVal;\n\n\tlet incrIdx = closestIdx((minSpace / dim) * delta, incrs);\n\n\tdo {\n\t\tlet foundIncr = incrs[incrIdx];\n\t\tlet foundSpace = dim * foundIncr / delta;\n\n\t\tif (foundSpace >= minSpace && intDigits + (foundIncr < 5 ? fixedDec.get(foundIncr) : 0) <= 17)\n\t\t\treturn [foundIncr, foundSpace];\n\t} while (++incrIdx < incrs.length);\n\n\treturn [0, 0];\n}\n\nfunction pxRatioFont(font) {\n\tlet fontSize, fontSizeCss;\n\tfont = font.replace(/(\\d+)px/, (m, p1) => (fontSize = round((fontSizeCss = +p1) * pxRatio)) + 'px');\n\treturn [font, fontSize, fontSizeCss];\n}\n\nfunction syncFontSize(axis) {\n\tif (axis.show) {\n\t\t[axis.font, axis.labelFont].forEach(f => {\n\t\t\tlet size = roundDec(f[2] * pxRatio, 1);\n\t\t\tf[0] = f[0].replace(/[0-9.]+px/, size + 'px');\n\t\t\tf[1] = size;\n\t\t});\n\t}\n}\n\nfunction uPlot(opts, data, then) {\n\tconst self = {\n\t\tmode: ifNull(opts.mode, 1),\n\t};\n\n\tconst mode = self.mode;\n\n\t// TODO: cache denoms & mins scale.cache = {r, min, }\n\tfunction getValPct(val, scale) {\n\t\tlet _val = (\n\t\t\tscale.distr == 3 ? log10(val > 0 ? val : scale.clamp(self, val, scale.min, scale.max, scale.key)) :\n\t\t\tscale.distr == 4 ? asinh(val, scale.asinh) :\n\t\t\tval\n\t\t);\n\n\t\treturn (_val - scale._min) / (scale._max - scale._min);\n\t}\n\n\tfunction getHPos(val, scale, dim, off) {\n\t\tlet pct = getValPct(val, scale);\n\t\treturn off + dim * (scale.dir == -1 ? (1 - pct) : pct);\n\t}\n\n\tfunction getVPos(val, scale, dim, off) {\n\t\tlet pct = getValPct(val, scale);\n\t\treturn off + dim * (scale.dir == -1 ? pct : (1 - pct));\n\t}\n\n\tfunction getPos(val, scale, dim, off) {\n\t\treturn scale.ori == 0 ? getHPos(val, scale, dim, off) : getVPos(val, scale, dim, off);\n\t}\n\n\tself.valToPosH = getHPos;\n\tself.valToPosV = getVPos;\n\n\tlet ready = false;\n\tself.status = 0;\n\n\tconst root = self.root = placeDiv(UPLOT);\n\n\tif (opts.id != null)\n\t\troot.id = opts.id;\n\n\taddClass(root, opts.class);\n\n\tif (opts.title) {\n\t\tlet title = placeDiv(TITLE, root);\n\t\ttitle.textContent = opts.title;\n\t}\n\n\tconst can = placeTag(\"canvas\");\n\tconst ctx = self.ctx = can.getContext(\"2d\");\n\n\tconst wrap = placeDiv(WRAP, root);\n\tconst under = self.under = placeDiv(UNDER, wrap);\n\twrap.appendChild(can);\n\tconst over = self.over = placeDiv(OVER, wrap);\n\n\topts = copy(opts);\n\n\tconst pxAlign = +ifNull(opts.pxAlign, 1);\n\n\tconst pxRound = pxRoundGen(pxAlign);\n\n\t(opts.plugins || []).forEach(p => {\n\t\tif (p.opts)\n\t\t\topts = p.opts(self, opts) || opts;\n\t});\n\n\tconst ms = opts.ms || 1e-3;\n\n\tconst series = self.series = mode == 1 ?\n\t\tsetDefaults(opts.series || [], xSeriesOpts, ySeriesOpts, false) :\n\t\tsetDefaults2(opts.series || [null], xySeriesOpts);\n\tconst axes = self.axes = setDefaults(opts.axes || [], xAxisOpts, yAxisOpts, true);\n\tconst scales = self.scales = {};\n\tconst bands = self.bands = opts.bands || [];\n\n\tbands.forEach(b => {\n\t\tb.fill = fnOrSelf(b.fill || null);\n\t\tb.dir = ifNull(b.dir, -1);\n\t});\n\n\tconst xScaleKey = mode == 2 ? series[1].facets[0].scale : series[0].scale;\n\n\tconst drawOrderMap = {\n\t\taxes: drawAxesGrid,\n\t\tseries: drawSeries,\n\t};\n\n\tconst drawOrder = (opts.drawOrder || [\"axes\", \"series\"]).map(key => drawOrderMap[key]);\n\n\tfunction initScale(scaleKey) {\n\t\tlet sc = scales[scaleKey];\n\n\t\tif (sc == null) {\n\t\t\tlet scaleOpts = (opts.scales || EMPTY_OBJ)[scaleKey] || EMPTY_OBJ;\n\n\t\t\tif (scaleOpts.from != null) {\n\t\t\t\t// ensure parent is initialized\n\t\t\t\tinitScale(scaleOpts.from);\n\t\t\t\t// dependent scales inherit\n\t\t\t\tscales[scaleKey] = assign({}, scales[scaleOpts.from], scaleOpts, {key: scaleKey});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsc = scales[scaleKey] = assign({}, (scaleKey == xScaleKey ? xScaleOpts : yScaleOpts), scaleOpts);\n\n\t\t\t\tsc.key = scaleKey;\n\n\t\t\t\tlet isTime = sc.time;\n\n\t\t\t\tlet rn = sc.range;\n\n\t\t\t\tlet rangeIsArr = isArr(rn);\n\n\t\t\t\tif (scaleKey != xScaleKey || (mode == 2 && !isTime)) {\n\t\t\t\t\t// if range array has null limits, it should be auto\n\t\t\t\t\tif (rangeIsArr && (rn[0] == null || rn[1] == null)) {\n\t\t\t\t\t\trn = {\n\t\t\t\t\t\t\tmin: rn[0] == null ? autoRangePart : {\n\t\t\t\t\t\t\t\tmode: 1,\n\t\t\t\t\t\t\t\thard: rn[0],\n\t\t\t\t\t\t\t\tsoft: rn[0],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tmax: rn[1] == null ? autoRangePart : {\n\t\t\t\t\t\t\t\tmode: 1,\n\t\t\t\t\t\t\t\thard: rn[1],\n\t\t\t\t\t\t\t\tsoft: rn[1],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t};\n\t\t\t\t\t\trangeIsArr = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!rangeIsArr && isObj(rn)) {\n\t\t\t\t\t\tlet cfg = rn;\n\t\t\t\t\t\t// this is similar to snapNumY\n\t\t\t\t\t\trn = (self, dataMin, dataMax) => dataMin == null ? nullNullTuple : rangeNum(dataMin, dataMax, cfg);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tsc.range = fnOrSelf(rn || (isTime ? snapTimeX : scaleKey == xScaleKey ?\n\t\t\t\t\t(sc.distr == 3 ? snapLogX : sc.distr == 4 ? snapAsinhX : snapNumX) :\n\t\t\t\t\t(sc.distr == 3 ? snapLogY : sc.distr == 4 ? snapAsinhY : snapNumY)\n\t\t\t\t));\n\n\t\t\t\tsc.auto = fnOrSelf(rangeIsArr ? false : sc.auto);\n\n\t\t\t\tsc.clamp = fnOrSelf(sc.clamp || clampScale);\n\n\t\t\t\t// caches for expensive ops like asinh() & log()\n\t\t\t\tsc._min = sc._max = null;\n\t\t\t}\n\t\t}\n\t}\n\n\tinitScale(\"x\");\n\tinitScale(\"y\");\n\n\t// TODO: init scales from facets in mode: 2\n\tif (mode == 1) {\n\t\tseries.forEach(s => {\n\t\t\tinitScale(s.scale);\n\t\t});\n\t}\n\n\taxes.forEach(a => {\n\t\tinitScale(a.scale);\n\t});\n\n\tfor (let k in opts.scales)\n\t\tinitScale(k);\n\n\tconst scaleX = scales[xScaleKey];\n\n\tconst xScaleDistr = scaleX.distr;\n\n\tlet valToPosX, valToPosY;\n\n\tif (scaleX.ori == 0) {\n\t\taddClass(root, ORI_HZ);\n\t\tvalToPosX = getHPos;\n\t\tvalToPosY = getVPos;\n\t\t/*\n\t\tupdOriDims = () => {\n\t\t\txDimCan = plotWid;\n\t\t\txOffCan = plotLft;\n\t\t\tyDimCan = plotHgt;\n\t\t\tyOffCan = plotTop;\n\n\t\t\txDimCss = plotWidCss;\n\t\t\txOffCss = plotLftCss;\n\t\t\tyDimCss = plotHgtCss;\n\t\t\tyOffCss = plotTopCss;\n\t\t};\n\t\t*/\n\t}\n\telse {\n\t\taddClass(root, ORI_VT);\n\t\tvalToPosX = getVPos;\n\t\tvalToPosY = getHPos;\n\t\t/*\n\t\tupdOriDims = () => {\n\t\t\txDimCan = plotHgt;\n\t\t\txOffCan = plotTop;\n\t\t\tyDimCan = plotWid;\n\t\t\tyOffCan = plotLft;\n\n\t\t\txDimCss = plotHgtCss;\n\t\t\txOffCss = plotTopCss;\n\t\t\tyDimCss = plotWidCss;\n\t\t\tyOffCss = plotLftCss;\n\t\t};\n\t\t*/\n\t}\n\n\tconst pendScales = {};\n\n\t// explicitly-set initial scales\n\tfor (let k in scales) {\n\t\tlet sc = scales[k];\n\n\t\tif (sc.min != null || sc.max != null) {\n\t\t\tpendScales[k] = {min: sc.min, max: sc.max};\n\t\t\tsc.min = sc.max = null;\n\t\t}\n\t}\n\n//\tself.tz = opts.tz || Intl.DateTimeFormat().resolvedOptions().timeZone;\n\tconst _tzDate = (opts.tzDate || (ts => new Date(round(ts / ms))));\n\tconst _fmtDate = (opts.fmtDate || fmtDate);\n\n\tconst _timeAxisSplits = (ms == 1 ? timeAxisSplitsMs(_tzDate) : timeAxisSplitsS(_tzDate));\n\tconst _timeAxisVals = timeAxisVals(_tzDate, timeAxisStamps((ms == 1 ? _timeAxisStampsMs : _timeAxisStampsS), _fmtDate));\n\tconst _timeSeriesVal = timeSeriesVal(_tzDate, timeSeriesStamp(_timeSeriesStamp, _fmtDate));\n\n\tconst activeIdxs = [];\n\n\tconst legend = (self.legend = assign({}, legendOpts, opts.legend));\n\tconst showLegend = legend.show;\n\tconst markers = legend.markers;\n\n\t{\n\t\tlegend.idxs = activeIdxs;\n\n\t\tmarkers.width = fnOrSelf(markers.width);\n\t\tmarkers.dash = fnOrSelf(markers.dash);\n\t\tmarkers.stroke = fnOrSelf(markers.stroke);\n\t\tmarkers.fill = fnOrSelf(markers.fill);\n\t}\n\n\tlet legendEl;\n\tlet legendRows = [];\n\tlet legendCells = [];\n\tlet legendCols;\n\tlet multiValLegend = false;\n\tlet NULL_LEGEND_VALUES = {};\n\n\tif (legend.live) {\n\t\tconst getMultiVals = series[1] ? series[1].values : null;\n\t\tmultiValLegend = getMultiVals != null;\n\t\tlegendCols = multiValLegend ? getMultiVals(self, 1, 0) : {_: 0};\n\n\t\tfor (let k in legendCols)\n\t\t\tNULL_LEGEND_VALUES[k] = \"--\";\n\t}\n\n\tif (showLegend) {\n\t\tlegendEl = placeTag(\"table\", LEGEND, root);\n\n\t\tif (multiValLegend) {\n\t\t\tlet head = placeTag(\"tr\", LEGEND_THEAD, legendEl);\n\t\t\tplaceTag(\"th\", null, head);\n\n\t\t\tfor (var key in legendCols)\n\t\t\t\tplaceTag(\"th\", LEGEND_LABEL, head).textContent = key;\n\t\t}\n\t\telse {\n\t\t\taddClass(legendEl, LEGEND_INLINE);\n\t\t\tlegend.live && addClass(legendEl, LEGEND_LIVE);\n\t\t}\n\t}\n\n\tconst son = {show: true};\n\tconst soff = {show: false};\n\n\tfunction initLegendRow(s, i) {\n\t\tif (i == 0 && (multiValLegend || !legend.live || mode == 2))\n\t\t\treturn nullNullTuple;\n\n\t\tlet cells = [];\n\n\t\tlet row = placeTag(\"tr\", LEGEND_SERIES, legendEl, legendEl.childNodes[i]);\n\n\t\taddClass(row, s.class);\n\n\t\tif (!s.show)\n\t\t\taddClass(row, OFF);\n\n\t\tlet label = placeTag(\"th\", null, row);\n\n\t\tif (markers.show) {\n\t\t\tlet indic = placeDiv(LEGEND_MARKER, label);\n\n\t\t\tif (i > 0) {\n\t\t\t\tlet width = markers.width(self, i);\n\n\t\t\t\tif (width)\n\t\t\t\t\tindic.style.border = width + \"px \" + markers.dash(self, i) + \" \" + markers.stroke(self, i);\n\n\t\t\t\tindic.style.background = markers.fill(self, i);\n\t\t\t}\n\t\t}\n\n\t\tlet text = placeDiv(LEGEND_LABEL, label);\n\t\ttext.textContent = s.label;\n\n\t\tif (i > 0) {\n\t\t\tif (!markers.show)\n\t\t\t\ttext.style.color = s.width > 0 ? markers.stroke(self, i) : markers.fill(self, i);\n\n\t\t\tonMouse(\"click\", label, e => {\n\t\t\t\tif (cursor._lock)\n\t\t\t\t\treturn;\n\n\t\t\t\tlet seriesIdx = series.indexOf(s);\n\n\t\t\t\tif ((e.ctrlKey || e.metaKey) != legend.isolate) {\n\t\t\t\t\t// if any other series is shown, isolate this one. else show all\n\t\t\t\t\tlet isolate = series.some((s, i) => i > 0 && i != seriesIdx && s.show);\n\n\t\t\t\t\tseries.forEach((s, i) => {\n\t\t\t\t\t\ti > 0 && setSeries(i, isolate ? (i == seriesIdx ? son : soff) : son, true, syncOpts.setSeries);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tsetSeries(seriesIdx, {show: !s.show}, true, syncOpts.setSeries);\n\t\t\t});\n\n\t\t\tif (cursorFocus) {\n\t\t\t\tonMouse(mouseenter, label, e => {\n\t\t\t\t\tif (cursor._lock)\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\tsetSeries(series.indexOf(s), FOCUS_TRUE, true, syncOpts.setSeries);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tfor (var key in legendCols) {\n\t\t\tlet v = placeTag(\"td\", LEGEND_VALUE, row);\n\t\t\tv.textContent = \"--\";\n\t\t\tcells.push(v);\n\t\t}\n\n\t\treturn [row, cells];\n\t}\n\n\tconst mouseListeners = new Map();\n\n\tfunction onMouse(ev, targ, fn) {\n\t\tconst targListeners = mouseListeners.get(targ) || {};\n\t\tconst listener = cursor.bind[ev](self, targ, fn);\n\n\t\tif (listener) {\n\t\t\ton(ev, targ, targListeners[ev] = listener);\n\t\t\tmouseListeners.set(targ, targListeners);\n\t\t}\n\t}\n\n\tfunction offMouse(ev, targ, fn) {\n\t\tconst targListeners = mouseListeners.get(targ) || {};\n\n\t\tfor (let k in targListeners) {\n\t\t\tif (ev == null || k == ev) {\n\t\t\t\toff(k, targ, targListeners[k]);\n\t\t\t\tdelete targListeners[k];\n\t\t\t}\n\t\t}\n\n\t\tif (ev == null)\n\t\t\tmouseListeners.delete(targ);\n\t}\n\n\tlet fullWidCss = 0;\n\tlet fullHgtCss = 0;\n\n\tlet plotWidCss = 0;\n\tlet plotHgtCss = 0;\n\n\t// plot margins to account for axes\n\tlet plotLftCss = 0;\n\tlet plotTopCss = 0;\n\n\tlet plotLft = 0;\n\tlet plotTop = 0;\n\tlet plotWid = 0;\n\tlet plotHgt = 0;\n\n\tself.bbox = {};\n\n\tlet shouldSetScales = false;\n\tlet shouldSetSize = false;\n\tlet shouldConvergeSize = false;\n\tlet shouldSetCursor = false;\n\tlet shouldSetLegend = false;\n\n\tfunction _setSize(width, height, force) {\n\t\tif (force || (width != self.width || height != self.height))\n\t\t\tcalcSize(width, height);\n\n\t\tresetYSeries(false);\n\n\t\tshouldConvergeSize = true;\n\t\tshouldSetSize = true;\n\t\tshouldSetCursor = shouldSetLegend = cursor.left >= 0;\n\t\tcommit();\n\t}\n\n\tfunction calcSize(width, height) {\n\t//\tlog(\"calcSize()\", arguments);\n\n\t\tself.width = fullWidCss = plotWidCss = width;\n\t\tself.height = fullHgtCss = plotHgtCss = height;\n\t\tplotLftCss = plotTopCss = 0;\n\n\t\tcalcPlotRect();\n\t\tcalcAxesRects();\n\n\t\tlet bb = self.bbox;\n\n\t\tplotLft = bb.left = incrRound(plotLftCss * pxRatio, 0.5);\n\t\tplotTop = bb.top = incrRound(plotTopCss * pxRatio, 0.5);\n\t\tplotWid = bb.width = incrRound(plotWidCss * pxRatio, 0.5);\n\t\tplotHgt = bb.height = incrRound(plotHgtCss * pxRatio, 0.5);\n\n\t//\tupdOriDims();\n\t}\n\n\t// ensures size calc convergence\n\tconst CYCLE_LIMIT = 3;\n\n\tfunction convergeSize() {\n\t\tlet converged = false;\n\n\t\tlet cycleNum = 0;\n\n\t\twhile (!converged) {\n\t\t\tcycleNum++;\n\n\t\t\tlet axesConverged = axesCalc(cycleNum);\n\t\t\tlet paddingConverged = paddingCalc(cycleNum);\n\n\t\t\tconverged = cycleNum == CYCLE_LIMIT || (axesConverged && paddingConverged);\n\n\t\t\tif (!converged) {\n\t\t\t\tcalcSize(self.width, self.height);\n\t\t\t\tshouldSetSize = true;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction setSize({width, height}) {\n\t\t_setSize(width, height);\n\t}\n\n\tself.setSize = setSize;\n\n\t// accumulate axis offsets, reduce canvas width\n\tfunction calcPlotRect() {\n\t\t// easements for edge labels\n\t\tlet hasTopAxis = false;\n\t\tlet hasBtmAxis = false;\n\t\tlet hasRgtAxis = false;\n\t\tlet hasLftAxis = false;\n\n\t\taxes.forEach((axis, i) => {\n\t\t\tif (axis.show && axis._show) {\n\t\t\t\tlet {side, _size} = axis;\n\t\t\t\tlet isVt = side % 2;\n\t\t\t\tlet labelSize = axis.label != null ? axis.labelSize : 0;\n\n\t\t\t\tlet fullSize = _size + labelSize;\n\n\t\t\t\tif (fullSize > 0) {\n\t\t\t\t\tif (isVt) {\n\t\t\t\t\t\tplotWidCss -= fullSize;\n\n\t\t\t\t\t\tif (side == 3) {\n\t\t\t\t\t\t\tplotLftCss += fullSize;\n\t\t\t\t\t\t\thasLftAxis = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\thasRgtAxis = true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tplotHgtCss -= fullSize;\n\n\t\t\t\t\t\tif (side == 0) {\n\t\t\t\t\t\t\tplotTopCss += fullSize;\n\t\t\t\t\t\t\thasTopAxis = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\thasBtmAxis = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tsidesWithAxes[0] = hasTopAxis;\n\t\tsidesWithAxes[1] = hasRgtAxis;\n\t\tsidesWithAxes[2] = hasBtmAxis;\n\t\tsidesWithAxes[3] = hasLftAxis;\n\n\t\t// hz padding\n\t\tplotWidCss -= _padding[1] + _padding[3];\n\t\tplotLftCss += _padding[3];\n\n\t\t// vt padding\n\t\tplotHgtCss -= _padding[2] + _padding[0];\n\t\tplotTopCss += _padding[0];\n\t}\n\n\tfunction calcAxesRects() {\n\t\t// will accum +\n\t\tlet off1 = plotLftCss + plotWidCss;\n\t\tlet off2 = plotTopCss + plotHgtCss;\n\t\t// will accum -\n\t\tlet off3 = plotLftCss;\n\t\tlet off0 = plotTopCss;\n\n\t\tfunction incrOffset(side, size) {\n\t\t\tswitch (side) {\n\t\t\t\tcase 1: off1 += size; return off1 - size;\n\t\t\t\tcase 2: off2 += size; return off2 - size;\n\t\t\t\tcase 3: off3 -= size; return off3 + size;\n\t\t\t\tcase 0: off0 -= size; return off0 + size;\n\t\t\t}\n\t\t}\n\n\t\taxes.forEach((axis, i) => {\n\t\t\tif (axis.show && axis._show) {\n\t\t\t\tlet side = axis.side;\n\n\t\t\t\taxis._pos = incrOffset(side, axis._size);\n\n\t\t\t\tif (axis.label != null)\n\t\t\t\t\taxis._lpos = incrOffset(side, axis.labelSize);\n\t\t\t}\n\t\t});\n\t}\n\n\tconst cursor = (self.cursor = assign({}, cursorOpts, {drag: {y: mode == 2}}, opts.cursor));\n\n\t{\n\t\tcursor.idxs = activeIdxs;\n\n\t\tcursor._lock = false;\n\n\t\tlet points = cursor.points;\n\n\t\tpoints.show = fnOrSelf(points.show);\n\t\tpoints.size = fnOrSelf(points.size);\n\t\tpoints.stroke = fnOrSelf(points.stroke);\n\t\tpoints.width = fnOrSelf(points.width);\n\t\tpoints.fill = fnOrSelf(points.fill);\n\t}\n\n\tconst focus = self.focus = assign({}, opts.focus || {alpha: 0.3}, cursor.focus);\n\tconst cursorFocus = focus.prox >= 0;\n\n\t// series-intersection markers\n\tlet cursorPts = [null];\n\n\tfunction initCursorPt(s, si) {\n\t\tif (si > 0) {\n\t\t\tlet pt = cursor.points.show(self, si);\n\n\t\t\tif (pt) {\n\t\t\t\taddClass(pt, CURSOR_PT);\n\t\t\t\taddClass(pt, s.class);\n\t\t\t\telTrans(pt, -10, -10, plotWidCss, plotHgtCss);\n\t\t\t\tover.insertBefore(pt, cursorPts[si]);\n\n\t\t\t\treturn pt;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction initSeries(s, i) {\n\t\tif (mode == 1 || i > 0) {\n\t\t\tlet isTime = mode == 1 && scales[s.scale].time;\n\n\t\t\tlet sv = s.value;\n\t\t\ts.value = isTime ? (isStr(sv) ? timeSeriesVal(_tzDate, timeSeriesStamp(sv, _fmtDate)) : sv || _timeSeriesVal) : sv || numSeriesVal;\n\t\t\ts.label = s.label || (isTime ? timeSeriesLabel : numSeriesLabel);\n\t\t}\n\n\t\tif (i > 0) {\n\t\t\ts.width = s.width == null ? 1 : s.width;\n\t\t\ts.paths = s.paths || linearPath || retNull;\n\t\t\ts.fillTo = fnOrSelf(s.fillTo || seriesFillTo);\n\t\t\ts.pxAlign = +ifNull(s.pxAlign, pxAlign);\n\t\t\ts.pxRound = pxRoundGen(s.pxAlign);\n\n\t\t\ts.stroke = fnOrSelf(s.stroke || null);\n\t\t\ts.fill = fnOrSelf(s.fill || null);\n\t\t\ts._stroke = s._fill = s._paths = s._focus = null;\n\n\t\t\tlet _ptDia = ptDia(s.width, 1);\n\t\t\tlet points = s.points = assign({}, {\n\t\t\t\tsize: _ptDia,\n\t\t\t\twidth: max(1, _ptDia * .2),\n\t\t\t\tstroke: s.stroke,\n\t\t\t\tspace: _ptDia * 2,\n\t\t\t\tpaths: pointsPath,\n\t\t\t\t_stroke: null,\n\t\t\t\t_fill: null,\n\t\t\t}, s.points);\n\t\t\tpoints.show = fnOrSelf(points.show);\n\t\t\tpoints.filter = fnOrSelf(points.filter);\n\t\t\tpoints.fill = fnOrSelf(points.fill);\n\t\t\tpoints.stroke = fnOrSelf(points.stroke);\n\t\t\tpoints.paths = fnOrSelf(points.paths);\n\t\t\tpoints.pxAlign = s.pxAlign;\n\t\t}\n\n\t\tif (showLegend) {\n\t\t\tlet rowCells = initLegendRow(s, i);\n\t\t\tlegendRows.splice(i, 0, rowCells[0]);\n\t\t\tlegendCells.splice(i, 0, rowCells[1]);\n\t\t\tlegend.values.push(null);\t// NULL_LEGEND_VALS not yet avil here :(\n\t\t}\n\n\t\tif (cursor.show) {\n\t\t\tactiveIdxs.splice(i, 0, null);\n\n\t\t\tlet pt = initCursorPt(s, i);\n\t\t\tpt && cursorPts.splice(i, 0, pt);\n\t\t}\n\n\t\tfire(\"addSeries\", i);\n\t}\n\n\tfunction addSeries(opts, si) {\n\t\tsi = si == null ? series.length : si;\n\n\t\topts = setDefault(opts, si, xSeriesOpts, ySeriesOpts);\n\t\tseries.splice(si, 0, opts);\n\t\tinitSeries(series[si], si);\n\t}\n\n\tself.addSeries = addSeries;\n\n\tfunction delSeries(i) {\n\t\tseries.splice(i, 1);\n\n\t\tif (showLegend) {\n\t\t\tlegend.values.splice(i, 1);\n\n\t\t\tlegendCells.splice(i, 1);\n\t\t\tlet tr = legendRows.splice(i, 1)[0];\n\t\t\toffMouse(null, tr.firstChild);\n\t\t\ttr.remove();\n\t\t}\n\n\t\tif (cursor.show) {\n\t\t\tactiveIdxs.splice(i, 1);\n\n\t\t\tcursorPts.length > 1 && cursorPts.splice(i, 1)[0].remove();\n\t\t}\n\n\t\t// TODO: de-init no-longer-needed scales?\n\n\t\tfire(\"delSeries\", i);\n\t}\n\n\tself.delSeries = delSeries;\n\n\tconst sidesWithAxes = [false, false, false, false];\n\n\tfunction initAxis(axis, i) {\n\t\taxis._show = axis.show;\n\n\t\tif (axis.show) {\n\t\t\tlet isVt = axis.side % 2;\n\n\t\t\tlet sc = scales[axis.scale];\n\n\t\t\t// this can occur if all series specify non-default scales\n\t\t\tif (sc == null) {\n\t\t\t\taxis.scale = isVt ? series[1].scale : xScaleKey;\n\t\t\t\tsc = scales[axis.scale];\n\t\t\t}\n\n\t\t\t// also set defaults for incrs & values based on axis distr\n\t\t\tlet isTime = sc.time;\n\n\t\t\taxis.size = fnOrSelf(axis.size);\n\t\t\taxis.space = fnOrSelf(axis.space);\n\t\t\taxis.rotate = fnOrSelf(axis.rotate);\n\t\t\taxis.incrs = fnOrSelf(axis.incrs || ( sc.distr == 2 ? wholeIncrs : (isTime ? (ms == 1 ? timeIncrsMs : timeIncrsS) : numIncrs)));\n\t\t\taxis.splits = fnOrSelf(axis.splits || (isTime && sc.distr == 1 ? _timeAxisSplits : sc.distr == 3 ? logAxisSplits : sc.distr == 4 ? asinhAxisSplits : numAxisSplits));\n\n\t\t\taxis.stroke = fnOrSelf(axis.stroke);\n\t\t\taxis.grid.stroke = fnOrSelf(axis.grid.stroke);\n\t\t\taxis.ticks.stroke = fnOrSelf(axis.ticks.stroke);\n\t\t\taxis.border.stroke = fnOrSelf(axis.border.stroke);\n\n\t\t\tlet av = axis.values;\n\n\t\t\taxis.values = (\n\t\t\t\t// static array of tick values\n\t\t\t\tisArr(av) && !isArr(av[0]) ? fnOrSelf(av) :\n\t\t\t\t// temporal\n\t\t\t\tisTime ? (\n\t\t\t\t\t// config array of fmtDate string tpls\n\t\t\t\t\tisArr(av) ?\n\t\t\t\t\t\ttimeAxisVals(_tzDate, timeAxisStamps(av, _fmtDate)) :\n\t\t\t\t\t// fmtDate string tpl\n\t\t\t\t\tisStr(av) ?\n\t\t\t\t\t\ttimeAxisVal(_tzDate, av) :\n\t\t\t\t\tav || _timeAxisVals\n\t\t\t\t) : av || numAxisVals\n\t\t\t);\n\n\t\t\taxis.filter = fnOrSelf(axis.filter || ( sc.distr >= 3 ? logAxisValsFilt : retArg1));\n\n\t\t\taxis.font = pxRatioFont(axis.font);\n\t\t\taxis.labelFont = pxRatioFont(axis.labelFont);\n\n\t\t\taxis._size = axis.size(self, null, i, 0);\n\n\t\t\taxis._space =\n\t\t\taxis._rotate =\n\t\t\taxis._incrs =\n\t\t\taxis._found =\t// foundIncrSpace\n\t\t\taxis._splits =\n\t\t\taxis._values = null;\n\n\t\t\tif (axis._size > 0) {\n\t\t\t\tsidesWithAxes[i] = true;\n\t\t\t\taxis._el = placeDiv(AXIS, wrap);\n\t\t\t}\n\n\t\t\t// debug\n\t\t//\taxis._el.style.background = \"#\" + Math.floor(Math.random()*16777215).toString(16) + '80';\n\t\t}\n\t}\n\n\tfunction autoPadSide(self, side, sidesWithAxes, cycleNum) {\n\t\tlet [hasTopAxis, hasRgtAxis, hasBtmAxis, hasLftAxis] = sidesWithAxes;\n\n\t\tlet ori = side % 2;\n\t\tlet size = 0;\n\n\t\tif (ori == 0 && (hasLftAxis || hasRgtAxis))\n\t\t\tsize = (side == 0 && !hasTopAxis || side == 2 && !hasBtmAxis ? round(xAxisOpts.size / 3) : 0);\n\t\tif (ori == 1 && (hasTopAxis || hasBtmAxis))\n\t\t\tsize = (side == 1 && !hasRgtAxis || side == 3 && !hasLftAxis ? round(yAxisOpts.size / 2) : 0);\n\n\t\treturn size;\n\t}\n\n\tconst padding = self.padding = (opts.padding || [autoPadSide,autoPadSide,autoPadSide,autoPadSide]).map(p => fnOrSelf(ifNull(p, autoPadSide)));\n\tconst _padding = self._padding = padding.map((p, i) => p(self, i, sidesWithAxes, 0));\n\n\tlet dataLen;\n\n\t// rendered data window\n\tlet i0 = null;\n\tlet i1 = null;\n\tconst idxs = mode == 1 ? series[0].idxs : null;\n\n\tlet data0 = null;\n\n\tlet viaAutoScaleX = false;\n\n\tfunction setData(_data, _resetScales) {\n\t\tdata = _data == null ? [] : copy(_data, fastIsObj);\n\n\t\tif (mode == 2) {\n\t\t\tdataLen = 0;\n\t\t\tfor (let i = 1; i < series.length; i++)\n\t\t\t\tdataLen += data[i][0].length;\n\t\t\tself.data = data = _data;\n\t\t}\n\t\telse {\n\t\t\tif (data[0] == null)\n\t\t\t\tdata[0] = [];\n\n\t\t\tself.data = data.slice();\n\n\t\t\tdata0 = data[0];\n\t\t\tdataLen = data0.length;\n\n\t\t\tif (xScaleDistr == 2) {\n\t\t\t\tdata[0] = Array(dataLen);\n\t\t\t\tfor (let i = 0; i < dataLen; i++)\n\t\t\t\t\tdata[0][i] = i;\n\t\t\t}\n\t\t}\n\n\t\tself._data = data;\n\n\t\tresetYSeries(true);\n\n\t\tfire(\"setData\");\n\n\t\t// forces x axis tick values to re-generate when neither x scale nor y scale changes\n\t\t// in ordinal mode, scale range is by index, so will not change if new data has same length, but tick values are from data\n\t\tif (xScaleDistr == 2) {\n\t\t\tshouldConvergeSize = true;\n\n\t\t\t/* or somewhat cheaper, and uglier:\n\t\t\tif (ready) {\n\t\t\t\t// logic extracted from axesCalc()\n\t\t\t\tlet i = 0;\n\t\t\t\tlet axis = axes[i];\n\t\t\t\tlet _splits = axis._splits.map(i => data0[i]);\n\t\t\t\tlet [_incr, _space] = axis._found;\n\t\t\t\tlet incr = data0[_splits[1]] - data0[_splits[0]];\n\t\t\t\taxis._values = axis.values(self, axis.filter(self, _splits, i, _space, incr), i, _space, incr);\n\t\t\t}\n\t\t\t*/\n\t\t}\n\n\t\tif (_resetScales !== false) {\n\t\t\tlet xsc = scaleX;\n\n\t\t\tif (xsc.auto(self, viaAutoScaleX))\n\t\t\t\tautoScaleX();\n\t\t\telse\n\t\t\t\t_setScale(xScaleKey, xsc.min, xsc.max);\n\n\t\t\tshouldSetCursor = cursor.left >= 0;\n\t\t\tshouldSetLegend = true;\n\t\t\tcommit();\n\t\t}\n\t}\n\n\tself.setData = setData;\n\n\tfunction autoScaleX() {\n\t\tviaAutoScaleX = true;\n\n\t\tlet _min, _max;\n\n\t\tif (mode == 1) {\n\t\t\tif (dataLen > 0) {\n\t\t\t\ti0 = idxs[0] = 0;\n\t\t\t\ti1 = idxs[1] = dataLen - 1;\n\n\t\t\t\t_min = data[0][i0];\n\t\t\t\t_max = data[0][i1];\n\n\t\t\t\tif (xScaleDistr == 2) {\n\t\t\t\t\t_min = i0;\n\t\t\t\t\t_max = i1;\n\t\t\t\t}\n\t\t\t\telse if (dataLen == 1) {\n\t\t\t\t\tif (xScaleDistr == 3)\n\t\t\t\t\t\t[_min, _max] = rangeLog(_min, _min, scaleX.log, false);\n\t\t\t\t\telse if (xScaleDistr == 4)\n\t\t\t\t\t\t[_min, _max] = rangeAsinh(_min, _min, scaleX.log, false);\n\t\t\t\t\telse if (scaleX.time)\n\t\t\t\t\t\t_max = _min + round(86400 / ms);\n\t\t\t\t\telse\n\t\t\t\t\t\t[_min, _max] = rangeNum(_min, _max, rangePad, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\ti0 = idxs[0] = _min = null;\n\t\t\t\ti1 = idxs[1] = _max = null;\n\t\t\t}\n\t\t}\n\n\t\t_setScale(xScaleKey, _min, _max);\n\t}\n\n\tlet ctxStroke, ctxFill, ctxWidth, ctxDash, ctxJoin, ctxCap, ctxFont, ctxAlign, ctxBaseline;\n\tlet ctxAlpha;\n\n\tfunction setCtxStyle(stroke = transparent, width, dash = EMPTY_ARR, cap = \"butt\", fill = transparent, join = \"round\") {\n\t\tif (stroke != ctxStroke)\n\t\t\tctx.strokeStyle = ctxStroke = stroke;\n\t\tif (fill != ctxFill)\n\t\t\tctx.fillStyle = ctxFill = fill;\n\t\tif (width != ctxWidth)\n\t\t\tctx.lineWidth = ctxWidth = width;\n\t\tif (join != ctxJoin)\n\t\t\tctx.lineJoin = ctxJoin = join;\n\t\tif (cap != ctxCap)\n\t\t\tctx.lineCap = ctxCap = cap; // (‿|‿)\n\t\tif (dash != ctxDash)\n\t\t\tctx.setLineDash(ctxDash = dash);\n\t}\n\n\tfunction setFontStyle(font, fill, align, baseline) {\n\t\tif (fill != ctxFill)\n\t\t\tctx.fillStyle = ctxFill = fill;\n\t\tif (font != ctxFont)\n\t\t\tctx.font = ctxFont = font;\n\t\tif (align != ctxAlign)\n\t\t\tctx.textAlign = ctxAlign = align;\n\t\tif (baseline != ctxBaseline)\n\t\t\tctx.textBaseline = ctxBaseline = baseline;\n\t}\n\n\tfunction accScale(wsc, psc, facet, data, sorted = 0) {\n\t\tif (data.length > 0 && wsc.auto(self, viaAutoScaleX) && (psc == null || psc.min == null)) {\n\t\t\tlet _i0 = ifNull(i0, 0);\n\t\t\tlet _i1 = ifNull(i1, data.length - 1);\n\n\t\t\t// only run getMinMax() for invalidated series data, else reuse\n\t\t\tlet minMax = facet.min == null ? (wsc.distr == 3 ? getMinMaxLog(data, _i0, _i1) : getMinMax(data, _i0, _i1, sorted)) : [facet.min, facet.max];\n\n\t\t\t// initial min/max\n\t\t\twsc.min = min(wsc.min, facet.min = minMax[0]);\n\t\t\twsc.max = max(wsc.max, facet.max = minMax[1]);\n\t\t}\n\t}\n\n\tfunction setScales() {\n\t//\tlog(\"setScales()\", arguments);\n\n\t\t// wip scales\n\t\tlet wipScales = copy(scales, fastIsObj);\n\n\t\tfor (let k in wipScales) {\n\t\t\tlet wsc = wipScales[k];\n\t\t\tlet psc = pendScales[k];\n\n\t\t\tif (psc != null && psc.min != null) {\n\t\t\t\tassign(wsc, psc);\n\n\t\t\t\t// explicitly setting the x-scale invalidates everything (acts as redraw)\n\t\t\t\tif (k == xScaleKey)\n\t\t\t\t\tresetYSeries(true);\n\t\t\t}\n\t\t\telse if (k != xScaleKey || mode == 2) {\n\t\t\t\tif (dataLen == 0 && wsc.from == null) {\n\t\t\t\t\tlet minMax = wsc.range(self, null, null, k);\n\t\t\t\t\twsc.min = minMax[0];\n\t\t\t\t\twsc.max = minMax[1];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\twsc.min = inf;\n\t\t\t\t\twsc.max = -inf;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (dataLen > 0) {\n\t\t\t// pre-range y-scales from y series' data values\n\t\t\tseries.forEach((s, i) => {\n\t\t\t\tif (mode == 1) {\n\t\t\t\t\tlet k = s.scale;\n\t\t\t\t\tlet wsc = wipScales[k];\n\t\t\t\t\tlet psc = pendScales[k];\n\n\t\t\t\t\tif (i == 0) {\n\t\t\t\t\t\tlet minMax = wsc.range(self, wsc.min, wsc.max, k);\n\n\t\t\t\t\t\twsc.min = minMax[0];\n\t\t\t\t\t\twsc.max = minMax[1];\n\n\t\t\t\t\t\ti0 = closestIdx(wsc.min, data[0]);\n\t\t\t\t\t\ti1 = closestIdx(wsc.max, data[0]);\n\n\t\t\t\t\t\t// closest indices can be outside of view\n\t\t\t\t\t\tif (data[0][i0] < wsc.min)\n\t\t\t\t\t\t\ti0++;\n\t\t\t\t\t\tif (data[0][i1] > wsc.max)\n\t\t\t\t\t\t\ti1--;\n\n\t\t\t\t\t\ts.min = data0[i0];\n\t\t\t\t\t\ts.max = data0[i1];\n\t\t\t\t\t}\n\t\t\t\t\telse if (s.show && s.auto)\n\t\t\t\t\t\taccScale(wsc, psc, s, data[i], s.sorted);\n\n\t\t\t\t\ts.idxs[0] = i0;\n\t\t\t\t\ts.idxs[1] = i1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (i > 0) {\n\t\t\t\t\t\tif (s.show && s.auto) {\n\t\t\t\t\t\t\t// TODO: only handles, assumes and requires facets[0] / 'x' scale, and facets[1] / 'y' scale\n\t\t\t\t\t\t\tlet [ xFacet, yFacet ] = s.facets;\n\t\t\t\t\t\t\tlet xScaleKey = xFacet.scale;\n\t\t\t\t\t\t\tlet yScaleKey = yFacet.scale;\n\t\t\t\t\t\t\tlet [ xData, yData ] = data[i];\n\n\t\t\t\t\t\t\taccScale(wipScales[xScaleKey], pendScales[xScaleKey], xFacet, xData, xFacet.sorted);\n\t\t\t\t\t\t\taccScale(wipScales[yScaleKey], pendScales[yScaleKey], yFacet, yData, yFacet.sorted);\n\n\t\t\t\t\t\t\t// temp\n\t\t\t\t\t\t\ts.min = yFacet.min;\n\t\t\t\t\t\t\ts.max = yFacet.max;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// range independent scales\n\t\t\tfor (let k in wipScales) {\n\t\t\t\tlet wsc = wipScales[k];\n\t\t\t\tlet psc = pendScales[k];\n\n\t\t\t\tif (wsc.from == null && (psc == null || psc.min == null)) {\n\t\t\t\t\tlet minMax = wsc.range(\n\t\t\t\t\t\tself,\n\t\t\t\t\t\twsc.min == inf ? null : wsc.min,\n\t\t\t\t\t\twsc.max == -inf ? null : wsc.max,\n\t\t\t\t\t\tk\n\t\t\t\t\t);\n\t\t\t\t\twsc.min = minMax[0];\n\t\t\t\t\twsc.max = minMax[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// range dependent scales\n\t\tfor (let k in wipScales) {\n\t\t\tlet wsc = wipScales[k];\n\n\t\t\tif (wsc.from != null) {\n\t\t\t\tlet base = wipScales[wsc.from];\n\n\t\t\t\tif (base.min == null)\n\t\t\t\t\twsc.min = wsc.max = null;\n\t\t\t\telse {\n\t\t\t\t\tlet minMax = wsc.range(self, base.min, base.max, k);\n\t\t\t\t\twsc.min = minMax[0];\n\t\t\t\t\twsc.max = minMax[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlet changed = {};\n\t\tlet anyChanged = false;\n\n\t\tfor (let k in wipScales) {\n\t\t\tlet wsc = wipScales[k];\n\t\t\tlet sc = scales[k];\n\n\t\t\tif (sc.min != wsc.min || sc.max != wsc.max) {\n\t\t\t\tsc.min = wsc.min;\n\t\t\t\tsc.max = wsc.max;\n\n\t\t\t\tlet distr = sc.distr;\n\n\t\t\t\tsc._min = distr == 3 ? log10(sc.min) : distr == 4 ? asinh(sc.min, sc.asinh) : sc.min;\n\t\t\t\tsc._max = distr == 3 ? log10(sc.max) : distr == 4 ? asinh(sc.max, sc.asinh) : sc.max;\n\n\t\t\t\tchanged[k] = anyChanged = true;\n\t\t\t}\n\t\t}\n\n\t\tif (anyChanged) {\n\t\t\t// invalidate paths of all series on changed scales\n\t\t\tseries.forEach((s, i) => {\n\t\t\t\tif (mode == 2) {\n\t\t\t\t\tif (i > 0 && changed.y)\n\t\t\t\t\t\ts._paths = null;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (changed[s.scale])\n\t\t\t\t\t\ts._paths = null;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tfor (let k in changed) {\n\t\t\t\tshouldConvergeSize = true;\n\t\t\t\tfire(\"setScale\", k);\n\t\t\t}\n\n\t\t\tif (cursor.show)\n\t\t\t\tshouldSetCursor = shouldSetLegend = cursor.left >= 0;\n\t\t}\n\n\t\tfor (let k in pendScales)\n\t\t\tpendScales[k] = null;\n\t}\n\n\t// grabs the nearest indices with y data outside of x-scale limits\n\tfunction getOuterIdxs(ydata) {\n\t\tlet _i0 = clamp(i0 - 1, 0, dataLen - 1);\n\t\tlet _i1 = clamp(i1 + 1, 0, dataLen - 1);\n\n\t\twhile (ydata[_i0] == null && _i0 > 0)\n\t\t\t_i0--;\n\n\t\twhile (ydata[_i1] == null && _i1 < dataLen - 1)\n\t\t\t_i1++;\n\n\t\treturn [_i0, _i1];\n\t}\n\n\tfunction drawSeries() {\n\t\tif (dataLen > 0) {\n\t\t\tseries.forEach((s, i) => {\n\t\t\t\tif (i > 0 && s.show && s._paths == null) {\n\t\t\t\t\tlet _idxs = getOuterIdxs(data[i]);\n\t\t\t\t\ts._paths = s.paths(self, i, _idxs[0], _idxs[1]);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tseries.forEach((s, i) => {\n\t\t\t\tif (i > 0 && s.show) {\n\t\t\t\t\tif (ctxAlpha != s.alpha)\n\t\t\t\t\t\tctx.globalAlpha = ctxAlpha = s.alpha;\n\n\t\t\t\t\t{\n\t\t\t\t\t\tcacheStrokeFill(i, false);\n\t\t\t\t\t\ts._paths && drawPath(i, false);\n\t\t\t\t\t}\n\n\t\t\t\t\t{\n\t\t\t\t\t\tcacheStrokeFill(i, true);\n\n\t\t\t\t\t\tlet show = s.points.show(self, i, i0, i1);\n\t\t\t\t\t\tlet idxs = s.points.filter(self, i, show, s._paths ? s._paths.gaps : null);\n\n\t\t\t\t\t\tif (show || idxs) {\n\t\t\t\t\t\t\ts.points._paths = s.points.paths(self, i, i0, i1, idxs);\n\t\t\t\t\t\t\tdrawPath(i, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (ctxAlpha != 1)\n\t\t\t\t\t\tctx.globalAlpha = ctxAlpha = 1;\n\n\t\t\t\t\tfire(\"drawSeries\", i);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tfunction cacheStrokeFill(si, _points) {\n\t\tlet s = _points ? series[si].points : series[si];\n\n\t\ts._stroke = s.stroke(self, si);\n\t\ts._fill = s.fill(self, si);\n\t}\n\n\tfunction drawPath(si, _points) {\n\t\tlet s = _points ? series[si].points : series[si];\n\n\t\tlet strokeStyle = s._stroke;\n\t\tlet fillStyle = s._fill;\n\n\t\tlet { stroke, fill, clip: gapsClip, flags } = s._paths;\n\t\tlet boundsClip = null;\n\t\tlet width = roundDec(s.width * pxRatio, 3);\n\t\tlet offset = (width % 2) / 2;\n\n\t\tif (_points && fillStyle == null)\n\t\t\tfillStyle = width > 0 ? \"#fff\" : strokeStyle;\n\n\t\tlet _pxAlign = s.pxAlign == 1;\n\n\t\t_pxAlign && ctx.translate(offset, offset);\n\n\t\tif (!_points) {\n\t\t\tlet lft = plotLft,\n\t\t\t\ttop = plotTop,\n\t\t\t\twid = plotWid,\n\t\t\t\thgt = plotHgt;\n\n\t\t\tlet halfWid = width * pxRatio / 2;\n\n\t\t\tif (s.min == 0)\n\t\t\t\thgt += halfWid;\n\n\t\t\tif (s.max == 0) {\n\t\t\t\ttop -= halfWid;\n\t\t\t\thgt += halfWid;\n\t\t\t}\n\n\t\t\tboundsClip = new Path2D();\n\t\t\tboundsClip.rect(lft, top, wid, hgt);\n\t\t}\n\n\t\t// the points pathbuilder's gapsClip is its boundsClip, since points dont need gaps clipping, and bounds depend on point size\n\t\tif (_points)\n\t\t\tstrokeFill(strokeStyle, width, s.dash, s.cap, fillStyle, stroke, fill, flags, gapsClip);\n\t\telse\n\t\t\tfillStroke(si, strokeStyle, width, s.dash, s.cap, fillStyle, stroke, fill, flags, boundsClip, gapsClip);\n\n\t\t_pxAlign && ctx.translate(-offset, -offset);\n\t}\n\n\tfunction fillStroke(si, strokeStyle, lineWidth, lineDash, lineCap, fillStyle, strokePath, fillPath, flags, boundsClip, gapsClip) {\n\t\tlet didStrokeFill = false;\n\n\t\t// for all bands where this series is the top edge, create upwards clips using the bottom edges\n\t\t// and apply clips + fill with band fill or dfltFill\n\t\tbands.forEach((b, bi) => {\n\t\t\t// isUpperEdge?\n\t\t\tif (b.series[0] == si) {\n\t\t\t\tlet lowerEdge = series[b.series[1]];\n\t\t\t\tlet lowerData = data[b.series[1]];\n\n\t\t\t\tlet bandClip = (lowerEdge._paths || EMPTY_OBJ).band;\n\n\t\t\t\tif (isArr(bandClip))\n\t\t\t\t\tbandClip = b.dir == 1 ? bandClip[0] : bandClip[1];\n\n\t\t\t\tlet gapsClip2;\n\n\t\t\t\tlet _fillStyle = null;\n\n\t\t\t\t// hasLowerEdge?\n\t\t\t\tif (lowerEdge.show && bandClip && hasData(lowerData, i0, i1)) {\n\t\t\t\t\t_fillStyle = b.fill(self, bi) || fillStyle;\n\t\t\t\t\tgapsClip2 = lowerEdge._paths.clip;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tbandClip = null;\n\n\t\t\t\tstrokeFill(strokeStyle, lineWidth, lineDash, lineCap, _fillStyle, strokePath, fillPath, flags, boundsClip, gapsClip, gapsClip2, bandClip);\n\n\t\t\t\tdidStrokeFill = true;\n\t\t\t}\n\t\t});\n\n\t\tif (!didStrokeFill)\n\t\t\tstrokeFill(strokeStyle, lineWidth, lineDash, lineCap, fillStyle, strokePath, fillPath, flags, boundsClip, gapsClip);\n\t}\n\n\tconst CLIP_FILL_STROKE = BAND_CLIP_FILL | BAND_CLIP_STROKE;\n\n\tfunction strokeFill(strokeStyle, lineWidth, lineDash, lineCap, fillStyle, strokePath, fillPath, flags, boundsClip, gapsClip, gapsClip2, bandClip) {\n\t\tsetCtxStyle(strokeStyle, lineWidth, lineDash, lineCap, fillStyle);\n\n\t\tif (boundsClip || gapsClip || bandClip) {\n\t\t\tctx.save();\n\t\t\tboundsClip && ctx.clip(boundsClip);\n\t\t\tgapsClip && ctx.clip(gapsClip);\n\t\t}\n\n\t\tif (bandClip) {\n\t\t\tif ((flags & CLIP_FILL_STROKE) == CLIP_FILL_STROKE) {\n\t\t\t\tctx.clip(bandClip);\n\t\t\t\tgapsClip2 && ctx.clip(gapsClip2);\n\t\t\t\tdoFill(fillStyle, fillPath);\n\t\t\t\tdoStroke(strokeStyle, strokePath, lineWidth);\n\t\t\t}\n\t\t\telse if (flags & BAND_CLIP_STROKE) {\n\t\t\t\tdoFill(fillStyle, fillPath);\n\t\t\t\tctx.clip(bandClip);\n\t\t\t\tdoStroke(strokeStyle, strokePath, lineWidth);\n\t\t\t}\n\t\t\telse if (flags & BAND_CLIP_FILL) {\n\t\t\t\tctx.save();\n\t\t\t\tctx.clip(bandClip);\n\t\t\t\tgapsClip2 && ctx.clip(gapsClip2);\n\t\t\t\tdoFill(fillStyle, fillPath);\n\t\t\t\tctx.restore();\n\t\t\t\tdoStroke(strokeStyle, strokePath, lineWidth);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tdoFill(fillStyle, fillPath);\n\t\t\tdoStroke(strokeStyle, strokePath, lineWidth);\n\t\t}\n\n\t\tif (boundsClip || gapsClip || bandClip)\n\t\t\tctx.restore();\n\t}\n\n\tfunction doStroke(strokeStyle, strokePath, lineWidth) {\n\t\tif (lineWidth > 0) {\n\t\t\tif (strokePath instanceof Map) {\n\t\t\t\tstrokePath.forEach((strokePath, strokeStyle) => {\n\t\t\t\t\tctx.strokeStyle = ctxStroke = strokeStyle;\n\t\t\t\t\tctx.stroke(strokePath);\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\t\tstrokePath != null && strokeStyle && ctx.stroke(strokePath);\n\t\t}\n\t}\n\n\tfunction doFill(fillStyle, fillPath) {\n\t\tif (fillPath instanceof Map) {\n\t\t\tfillPath.forEach((fillPath, fillStyle) => {\n\t\t\t\tctx.fillStyle = ctxFill = fillStyle;\n\t\t\t\tctx.fill(fillPath);\n\t\t\t});\n\t\t}\n\t\telse\n\t\t\tfillPath != null && fillStyle && ctx.fill(fillPath);\n\t}\n\n\tfunction getIncrSpace(axisIdx, min, max, fullDim) {\n\t\tlet axis = axes[axisIdx];\n\n\t\tlet incrSpace;\n\n\t\tif (fullDim <= 0)\n\t\t\tincrSpace = [0, 0];\n\t\telse {\n\t\t\tlet minSpace = axis._space = axis.space(self, axisIdx, min, max, fullDim);\n\t\t\tlet incrs = axis._incrs = axis.incrs(self, axisIdx, min, max, fullDim, minSpace);\n\t\t\tincrSpace = findIncr(min, max, incrs, fullDim, minSpace);\n\t\t}\n\n\t\treturn (axis._found = incrSpace);\n\t}\n\n\tfunction drawOrthoLines(offs, filts, ori, side, pos0, len, width, stroke, dash, cap) {\n\t\tlet offset = (width % 2) / 2;\n\n\t\tpxAlign == 1 && ctx.translate(offset, offset);\n\n\t\tsetCtxStyle(stroke, width, dash, cap, stroke);\n\n\t\tctx.beginPath();\n\n\t\tlet x0, y0, x1, y1, pos1 = pos0 + (side == 0 || side == 3 ? -len : len);\n\n\t\tif (ori == 0) {\n\t\t\ty0 = pos0;\n\t\t\ty1 = pos1;\n\t\t}\n\t\telse {\n\t\t\tx0 = pos0;\n\t\t\tx1 = pos1;\n\t\t}\n\n\t\tfor (let i = 0; i < offs.length; i++) {\n\t\t\tif (filts[i] != null) {\n\t\t\t\tif (ori == 0)\n\t\t\t\t\tx0 = x1 = offs[i];\n\t\t\t\telse\n\t\t\t\t\ty0 = y1 = offs[i];\n\n\t\t\t\tctx.moveTo(x0, y0);\n\t\t\t\tctx.lineTo(x1, y1);\n\t\t\t}\n\t\t}\n\n\t\tctx.stroke();\n\n\t\tpxAlign == 1 && ctx.translate(-offset, -offset);\n\t}\n\n\tfunction axesCalc(cycleNum) {\n\t//\tlog(\"axesCalc()\", arguments);\n\n\t\tlet converged = true;\n\n\t\taxes.forEach((axis, i) => {\n\t\t\tif (!axis.show)\n\t\t\t\treturn;\n\n\t\t\tlet scale = scales[axis.scale];\n\n\t\t\tif (scale.min == null) {\n\t\t\t\tif (axis._show) {\n\t\t\t\t\tconverged = false;\n\t\t\t\t\taxis._show = false;\n\t\t\t\t\tresetYSeries(false);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!axis._show) {\n\t\t\t\t\tconverged = false;\n\t\t\t\t\taxis._show = true;\n\t\t\t\t\tresetYSeries(false);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet side = axis.side;\n\t\t\tlet ori = side % 2;\n\n\t\t\tlet {min, max} = scale;\t\t// \t\t// should this toggle them ._show = false\n\n\t\t\tlet [_incr, _space] = getIncrSpace(i, min, max, ori == 0 ? plotWidCss : plotHgtCss);\n\n\t\t\tif (_space == 0)\n\t\t\t\treturn;\n\n\t\t\t// if we're using index positions, force first tick to match passed index\n\t\t\tlet forceMin = scale.distr == 2;\n\n\t\t\tlet _splits = axis._splits = axis.splits(self, i, min, max, _incr, _space, forceMin);\n\n\t\t\t// tick labels\n\t\t\t// BOO this assumes a specific data/series\n\t\t\tlet splits = scale.distr == 2 ? _splits.map(i => data0[i]) : _splits;\n\t\t\tlet incr = scale.distr == 2 ? data0[_splits[1]] - data0[_splits[0]] : _incr;\n\n\t\t\tlet values = axis._values = axis.values(self, axis.filter(self, splits, i, _space, incr), i, _space, incr);\n\n\t\t\t// rotating of labels only supported on bottom x axis\n\t\t\taxis._rotate = side == 2 ? axis.rotate(self, values, i, _space) : 0;\n\n\t\t\tlet oldSize = axis._size;\n\n\t\t\taxis._size = ceil(axis.size(self, values, i, cycleNum));\n\n\t\t\tif (oldSize != null && axis._size != oldSize)\t\t\t// ready && ?\n\t\t\t\tconverged = false;\n\t\t});\n\n\t\treturn converged;\n\t}\n\n\tfunction paddingCalc(cycleNum) {\n\t\tlet converged = true;\n\n\t\tpadding.forEach((p, i) => {\n\t\t\tlet _p = p(self, i, sidesWithAxes, cycleNum);\n\n\t\t\tif (_p != _padding[i])\n\t\t\t\tconverged = false;\n\n\t\t\t_padding[i] = _p;\n\t\t});\n\n\t\treturn converged;\n\t}\n\n\tfunction drawAxesGrid() {\n\t\tfor (let i = 0; i < axes.length; i++) {\n\t\t\tlet axis = axes[i];\n\n\t\t\tif (!axis.show || !axis._show)\n\t\t\t\tcontinue;\n\n\t\t\tlet side = axis.side;\n\t\t\tlet ori = side % 2;\n\n\t\t\tlet x, y;\n\n\t\t\tlet fillStyle = axis.stroke(self, i);\n\n\t\t\tlet shiftDir = side == 0 || side == 3 ? -1 : 1;\n\n\t\t\t// axis label\n\t\t\tif (axis.label) {\n\t\t\t\tlet shiftAmt = axis.labelGap * shiftDir;\n\t\t\t\tlet baseLpos = round((axis._lpos + shiftAmt) * pxRatio);\n\n\t\t\t\tsetFontStyle(axis.labelFont[0], fillStyle, \"center\", side == 2 ? TOP : BOTTOM);\n\n\t\t\t\tctx.save();\n\n\t\t\t\tif (ori == 1) {\n\t\t\t\t\tx = y = 0;\n\n\t\t\t\t\tctx.translate(\n\t\t\t\t\t\tbaseLpos,\n\t\t\t\t\t\tround(plotTop + plotHgt / 2),\n\t\t\t\t\t);\n\t\t\t\t\tctx.rotate((side == 3 ? -PI : PI) / 2);\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tx = round(plotLft + plotWid / 2);\n\t\t\t\t\ty = baseLpos;\n\t\t\t\t}\n\n\t\t\t\tctx.fillText(axis.label, x, y);\n\n\t\t\t\tctx.restore();\n\t\t\t}\n\n\t\t\tlet [_incr, _space] = axis._found;\n\n\t\t\tif (_space == 0)\n\t\t\t\tcontinue;\n\n\t\t\tlet scale = scales[axis.scale];\n\n\t\t\tlet plotDim = ori == 0 ? plotWid : plotHgt;\n\t\t\tlet plotOff = ori == 0 ? plotLft : plotTop;\n\n\t\t\tlet axisGap = round(axis.gap * pxRatio);\n\n\t\t\tlet _splits = axis._splits;\n\n\t\t\t// tick labels\n\t\t\t// BOO this assumes a specific data/series\n\t\t\tlet splits = scale.distr == 2 ? _splits.map(i => data0[i]) : _splits;\n\t\t\tlet incr = scale.distr == 2 ? data0[_splits[1]] - data0[_splits[0]] : _incr;\n\n\t\t\tlet ticks = axis.ticks;\n\t\t\tlet border = axis.border;\n\t\t\tlet tickSize = ticks.show ? round(ticks.size * pxRatio) : 0;\n\n\t\t\t// rotating of labels only supported on bottom x axis\n\t\t\tlet angle = axis._rotate * -PI/180;\n\n\t\t\tlet basePos = pxRound(axis._pos * pxRatio);\n\t\t\tlet shiftAmt = (tickSize + axisGap) * shiftDir;\n\t\t\tlet finalPos = basePos + shiftAmt;\n\t\t\t y = ori == 0 ? finalPos : 0;\n\t\t\t x = ori == 1 ? finalPos : 0;\n\n\t\t\tlet font = axis.font[0];\n\t\t\tlet textAlign = axis.align == 1 ? LEFT :\n\t\t\t axis.align == 2 ? RIGHT :\n\t\t\t angle > 0 ? LEFT :\n\t\t\t angle < 0 ? RIGHT :\n\t\t\t ori == 0 ? \"center\" : side == 3 ? RIGHT : LEFT;\n\t\t\tlet textBaseline = angle ||\n\t\t\t ori == 1 ? \"middle\" : side == 2 ? TOP : BOTTOM;\n\n\t\t\tsetFontStyle(font, fillStyle, textAlign, textBaseline);\n\n\t\t\tlet lineHeight = axis.font[1] * lineMult;\n\n\t\t\tlet canOffs = _splits.map(val => pxRound(getPos(val, scale, plotDim, plotOff)));\n\n\t\t\tlet _values = axis._values;\n\n\t\t\tfor (let i = 0; i < _values.length; i++) {\n\t\t\t\tlet val = _values[i];\n\n\t\t\t\tif (val != null) {\n\t\t\t\t\tif (ori == 0)\n\t\t\t\t\t\tx = canOffs[i];\n\t\t\t\t\telse\n\t\t\t\t\t\ty = canOffs[i];\n\n\t\t\t\t\tval = \"\" + val;\n\n\t\t\t\t\tlet _parts = val.indexOf(\"\\n\") == -1 ? [val] : val.split(/\\n/gm);\n\n\t\t\t\t\tfor (let j = 0; j < _parts.length; j++) {\n\t\t\t\t\t\tlet text = _parts[j];\n\n\t\t\t\t\t\tif (angle) {\n\t\t\t\t\t\t\tctx.save();\n\t\t\t\t\t\t\tctx.translate(x, y + j * lineHeight); // can this be replaced with position math?\n\t\t\t\t\t\t\tctx.rotate(angle); // can this be done once?\n\t\t\t\t\t\t\tctx.fillText(text, 0, 0);\n\t\t\t\t\t\t\tctx.restore();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tctx.fillText(text, x, y + j * lineHeight);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ticks\n\t\t\tif (ticks.show) {\n\t\t\t\tdrawOrthoLines(\n\t\t\t\t\tcanOffs,\n\t\t\t\t\tticks.filter(self, splits, i, _space, incr),\n\t\t\t\t\tori,\n\t\t\t\t\tside,\n\t\t\t\t\tbasePos,\n\t\t\t\t\ttickSize,\n\t\t\t\t\troundDec(ticks.width * pxRatio, 3),\n\t\t\t\t\tticks.stroke(self, i),\n\t\t\t\t\tticks.dash,\n\t\t\t\t\tticks.cap,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// grid\n\t\t\tlet grid = axis.grid;\n\n\t\t\tif (grid.show) {\n\t\t\t\tdrawOrthoLines(\n\t\t\t\t\tcanOffs,\n\t\t\t\t\tgrid.filter(self, splits, i, _space, incr),\n\t\t\t\t\tori,\n\t\t\t\t\tori == 0 ? 2 : 1,\n\t\t\t\t\tori == 0 ? plotTop : plotLft,\n\t\t\t\t\tori == 0 ? plotHgt : plotWid,\n\t\t\t\t\troundDec(grid.width * pxRatio, 3),\n\t\t\t\t\tgrid.stroke(self, i),\n\t\t\t\t\tgrid.dash,\n\t\t\t\t\tgrid.cap,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (border.show) {\n\t\t\t\tdrawOrthoLines(\n\t\t\t\t\t[basePos],\n\t\t\t\t\t[1],\n\t\t\t\t\tori == 0 ? 1 : 0,\n\t\t\t\t\tori == 0 ? 1 : 2,\n\t\t\t\t\tori == 1 ? plotTop : plotLft,\n\t\t\t\t\tori == 1 ? plotHgt : plotWid,\n\t\t\t\t\troundDec(border.width * pxRatio, 3),\n\t\t\t\t\tborder.stroke(self, i),\n\t\t\t\t\tborder.dash,\n\t\t\t\t\tborder.cap,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tfire(\"drawAxes\");\n\t}\n\n\tfunction resetYSeries(minMax) {\n\t//\tlog(\"resetYSeries()\", arguments);\n\n\t\tseries.forEach((s, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\ts._paths = null;\n\n\t\t\t\tif (minMax) {\n\t\t\t\t\tif (mode == 1) {\n\t\t\t\t\t\ts.min = null;\n\t\t\t\t\t\ts.max = null;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ts.facets.forEach(f => {\n\t\t\t\t\t\t\tf.min = null;\n\t\t\t\t\t\t\tf.max = null;\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tlet queuedCommit = false;\n\n\tfunction commit() {\n\t\tif (!queuedCommit) {\n\t\t\tmicroTask(_commit);\n\t\t\tqueuedCommit = true;\n\t\t}\n\t}\n\n\tfunction _commit() {\n\t//\tlog(\"_commit()\", arguments);\n\n\t\tif (shouldSetScales) {\n\t\t\tsetScales();\n\t\t\tshouldSetScales = false;\n\t\t}\n\n\t\tif (shouldConvergeSize) {\n\t\t\tconvergeSize();\n\t\t\tshouldConvergeSize = false;\n\t\t}\n\n\t\tif (shouldSetSize) {\n\t\t\tsetStylePx(under, LEFT, plotLftCss);\n\t\t\tsetStylePx(under, TOP, plotTopCss);\n\t\t\tsetStylePx(under, WIDTH, plotWidCss);\n\t\t\tsetStylePx(under, HEIGHT, plotHgtCss);\n\n\t\t\tsetStylePx(over, LEFT, plotLftCss);\n\t\t\tsetStylePx(over, TOP, plotTopCss);\n\t\t\tsetStylePx(over, WIDTH, plotWidCss);\n\t\t\tsetStylePx(over, HEIGHT, plotHgtCss);\n\n\t\t\tsetStylePx(wrap, WIDTH, fullWidCss);\n\t\t\tsetStylePx(wrap, HEIGHT, fullHgtCss);\n\n\t\t\t// NOTE: mutating this during print preview in Chrome forces transparent\n\t\t\t// canvas pixels to white, even when followed up with clearRect() below\n\t\t\tcan.width = round(fullWidCss * pxRatio);\n\t\t\tcan.height = round(fullHgtCss * pxRatio);\n\n\t\t\taxes.forEach(({ _el, _show, _size, _pos, side }) => {\n\t\t\t\tif (_el != null) {\n\t\t\t\t\tif (_show) {\n\t\t\t\t\t\tlet posOffset = (side === 3 || side === 0 ? _size : 0);\n\t\t\t\t\t\tlet isVt = side % 2 == 1;\n\n\t\t\t\t\t\tsetStylePx(_el, isVt ? \"left\" : \"top\", _pos - posOffset);\n\t\t\t\t\t\tsetStylePx(_el, isVt ? \"width\" : \"height\", _size);\n\t\t\t\t\t\tsetStylePx(_el, isVt ? \"top\" : \"left\", isVt ? plotTopCss : plotLftCss);\n\t\t\t\t\t\tsetStylePx(_el, isVt ? \"height\" : \"width\", isVt ? plotHgtCss : plotWidCss);\n\n\t\t\t\t\t\tremClass(_el, OFF);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\taddClass(_el, OFF);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// invalidate ctx style cache\n\t\t\tctxStroke = ctxFill = ctxWidth = ctxJoin = ctxCap = ctxFont = ctxAlign = ctxBaseline = ctxDash = null;\n\t\t\tctxAlpha = 1;\n\n\t\t\tsyncRect(true);\n\n\t\t\tfire(\"setSize\");\n\n\t\t\tshouldSetSize = false;\n\t\t}\n\n\t\tif (fullWidCss > 0 && fullHgtCss > 0) {\n\t\t\tctx.clearRect(0, 0, can.width, can.height);\n\t\t\tfire(\"drawClear\");\n\t\t\tdrawOrder.forEach(fn => fn());\n\t\t\tfire(\"draw\");\n\t\t}\n\n\t//\tif (shouldSetSelect) {\n\t\t// TODO: update .u-select metrics (if visible)\n\t\t//\tsetStylePx(selectDiv, TOP, select.top = 0);\n\t\t//\tsetStylePx(selectDiv, LEFT, select.left = 0);\n\t\t//\tsetStylePx(selectDiv, WIDTH, select.width = 0);\n\t\t//\tsetStylePx(selectDiv, HEIGHT, select.height = 0);\n\t\t//\tshouldSetSelect = false;\n\t//\t}\n\n\t\tif (cursor.show && shouldSetCursor) {\n\t\t\tupdateCursor(null, true, false);\n\t\t\tshouldSetCursor = false;\n\t\t}\n\n\t//\tif (FEAT_LEGEND && legend.show && legend.live && shouldSetLegend) {}\n\n\t\tif (!ready) {\n\t\t\tready = true;\n\t\t\tself.status = 1;\n\n\t\t\tfire(\"ready\");\n\t\t}\n\n\t\tviaAutoScaleX = false;\n\n\t\tqueuedCommit = false;\n\t}\n\n\tself.redraw = (rebuildPaths, recalcAxes) => {\n\t\tshouldConvergeSize = recalcAxes || false;\n\n\t\tif (rebuildPaths !== false)\n\t\t\t_setScale(xScaleKey, scaleX.min, scaleX.max);\n\t\telse\n\t\t\tcommit();\n\t};\n\n\t// redraw() => setScale('x', scales.x.min, scales.x.max);\n\n\t// explicit, never re-ranged (is this actually true? for x and y)\n\tfunction setScale(key, opts) {\n\t\tlet sc = scales[key];\n\n\t\tif (sc.from == null) {\n\t\t\tif (dataLen == 0) {\n\t\t\t\tlet minMax = sc.range(self, opts.min, opts.max, key);\n\t\t\t\topts.min = minMax[0];\n\t\t\t\topts.max = minMax[1];\n\t\t\t}\n\n\t\t\tif (opts.min > opts.max) {\n\t\t\t\tlet _min = opts.min;\n\t\t\t\topts.min = opts.max;\n\t\t\t\topts.max = _min;\n\t\t\t}\n\n\t\t\tif (dataLen > 1 && opts.min != null && opts.max != null && opts.max - opts.min < 1e-16)\n\t\t\t\treturn;\n\n\t\t\tif (key == xScaleKey) {\n\t\t\t\tif (sc.distr == 2 && dataLen > 0) {\n\t\t\t\t\topts.min = closestIdx(opts.min, data[0]);\n\t\t\t\t\topts.max = closestIdx(opts.max, data[0]);\n\n\t\t\t\t\tif (opts.min == opts.max)\n\t\t\t\t\t\topts.max++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t//\tlog(\"setScale()\", arguments);\n\n\t\t\tpendScales[key] = opts;\n\n\t\t\tshouldSetScales = true;\n\t\t\tcommit();\n\t\t}\n\t}\n\n\tself.setScale = setScale;\n\n//\tINTERACTION\n\n\tlet xCursor;\n\tlet yCursor;\n\tlet vCursor;\n\tlet hCursor;\n\n\t// starting position before cursor.move\n\tlet rawMouseLeft0;\n\tlet rawMouseTop0;\n\n\t// starting position\n\tlet mouseLeft0;\n\tlet mouseTop0;\n\n\t// current position before cursor.move\n\tlet rawMouseLeft1;\n\tlet rawMouseTop1;\n\n\t// current position\n\tlet mouseLeft1;\n\tlet mouseTop1;\n\n\tlet dragging = false;\n\n\tconst drag = cursor.drag;\n\n\tlet dragX = drag.x;\n\tlet dragY = drag.y;\n\n\tif (cursor.show) {\n\t\tif (cursor.x)\n\t\t\txCursor = placeDiv(CURSOR_X, over);\n\t\tif (cursor.y)\n\t\t\tyCursor = placeDiv(CURSOR_Y, over);\n\n\t\tif (scaleX.ori == 0) {\n\t\t\tvCursor = xCursor;\n\t\t\thCursor = yCursor;\n\t\t}\n\t\telse {\n\t\t\tvCursor = yCursor;\n\t\t\thCursor = xCursor;\n\t\t}\n\n\t\tmouseLeft1 = cursor.left;\n\t\tmouseTop1 = cursor.top;\n\t}\n\n\tconst select = self.select = assign({\n\t\tshow: true,\n\t\tover: true,\n\t\tleft: 0,\n\t\twidth: 0,\n\t\ttop: 0,\n\t\theight: 0,\n\t}, opts.select);\n\n\tconst selectDiv = select.show ? placeDiv(SELECT, select.over ? over : under) : null;\n\n\tfunction setSelect(opts, _fire) {\n\t\tif (select.show) {\n\t\t\tfor (let prop in opts)\n\t\t\t\tsetStylePx(selectDiv, prop, select[prop] = opts[prop]);\n\n\t\t\t_fire !== false && fire(\"setSelect\");\n\t\t}\n\t}\n\n\tself.setSelect = setSelect;\n\n\tfunction toggleDOM(i, onOff) {\n\t\tlet s = series[i];\n\t\tlet label = showLegend ? legendRows[i] : null;\n\n\t\tif (s.show)\n\t\t\tlabel && remClass(label, OFF);\n\t\telse {\n\t\t\tlabel && addClass(label, OFF);\n\t\t\tcursorPts.length > 1 && elTrans(cursorPts[i], -10, -10, plotWidCss, plotHgtCss);\n\t\t}\n\t}\n\n\tfunction _setScale(key, min, max) {\n\t\tsetScale(key, {min, max});\n\t}\n\n\tfunction setSeries(i, opts, _fire, _pub) {\n\t//\tlog(\"setSeries()\", arguments);\n\n\t\tif (opts.focus != null)\n\t\t\tsetFocus(i);\n\n\t\tif (opts.show != null) {\n\t\t\tseries.forEach((s, si) => {\n\t\t\t\tif (si > 0 && (i == si || i == null)) {\n\t\t\t\t\ts.show = opts.show;\n\t\t\t\t\ttoggleDOM(si, opts.show);\n\n\t\t\t\t\t_setScale(mode == 2 ? s.facets[1].scale : s.scale, null, null);\n\t\t\t\t\tcommit();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t_fire !== false && fire(\"setSeries\", i, opts);\n\n\t\t_pub && pubSync(\"setSeries\", self, i, opts);\n\t}\n\n\tself.setSeries = setSeries;\n\n\tfunction setBand(bi, opts) {\n\t\tassign(bands[bi], opts);\n\t}\n\n\tfunction addBand(opts, bi) {\n\t\topts.fill = fnOrSelf(opts.fill || null);\n\t\topts.dir = ifNull(opts.dir, -1);\n\t\tbi = bi == null ? bands.length : bi;\n\t\tbands.splice(bi, 0, opts);\n\t}\n\n\tfunction delBand(bi) {\n\t\tif (bi == null)\n\t\t\tbands.length = 0;\n\t\telse\n\t\t\tbands.splice(bi, 1);\n\t}\n\n\tself.addBand = addBand;\n\tself.setBand = setBand;\n\tself.delBand = delBand;\n\n\tfunction setAlpha(i, value) {\n\t\tseries[i].alpha = value;\n\n\t\tif (cursor.show && cursorPts[i])\n\t\t\tcursorPts[i].style.opacity = value;\n\n\t\tif (showLegend && legendRows[i])\n\t\t\tlegendRows[i].style.opacity = value;\n\t}\n\n\t// y-distance\n\tlet closestDist;\n\tlet closestSeries;\n\tlet focusedSeries;\n\tconst FOCUS_TRUE = {focus: true};\n\n\tfunction setFocus(i) {\n\t\tif (i != focusedSeries) {\n\t\t//\tlog(\"setFocus()\", arguments);\n\n\t\t\tlet allFocused = i == null;\n\n\t\t\tlet _setAlpha = focus.alpha != 1;\n\n\t\t\tseries.forEach((s, i2) => {\n\t\t\t\tlet isFocused = allFocused || i2 == 0 || i2 == i;\n\t\t\t\ts._focus = allFocused ? null : isFocused;\n\t\t\t\t_setAlpha && setAlpha(i2, isFocused ? 1 : focus.alpha);\n\t\t\t});\n\n\t\t\tfocusedSeries = i;\n\t\t\t_setAlpha && commit();\n\t\t}\n\t}\n\n\tif (showLegend && cursorFocus) {\n\t\ton(mouseleave, legendEl, e => {\n\t\t\tif (cursor._lock)\n\t\t\t\treturn;\n\n\t\t\tif (focusedSeries != null)\n\t\t\t\tsetSeries(null, FOCUS_TRUE, true, syncOpts.setSeries);\n\t\t});\n\t}\n\n\tfunction posToVal(pos, scale, can) {\n\t\tlet sc = scales[scale];\n\n\t\tif (can)\n\t\t\tpos = pos / pxRatio - (sc.ori == 1 ? plotTopCss : plotLftCss);\n\n\t\tlet dim = plotWidCss;\n\n\t\tif (sc.ori == 1) {\n\t\t\tdim = plotHgtCss;\n\t\t\tpos = dim - pos;\n\t\t}\n\n\t\tif (sc.dir == -1)\n\t\t\tpos = dim - pos;\n\n\t\tlet _min = sc._min,\n\t\t\t_max = sc._max,\n\t\t\tpct = pos / dim;\n\n\t\tlet sv = _min + (_max - _min) * pct;\n\n\t\tlet distr = sc.distr;\n\n\t\treturn (\n\t\t\tdistr == 3 ? pow(10, sv) :\n\t\t\tdistr == 4 ? sinh(sv, sc.asinh) :\n\t\t\tsv\n\t\t);\n\t}\n\n\tfunction closestIdxFromXpos(pos, can) {\n\t\tlet v = posToVal(pos, xScaleKey, can);\n\t\treturn closestIdx(v, data[0], i0, i1);\n\t}\n\n\tself.valToIdx = val => closestIdx(val, data[0]);\n\tself.posToIdx = closestIdxFromXpos;\n\tself.posToVal = posToVal;\n\tself.valToPos = (val, scale, can) => (\n\t\tscales[scale].ori == 0 ?\n\t\tgetHPos(val, scales[scale],\n\t\t\tcan ? plotWid : plotWidCss,\n\t\t\tcan ? plotLft : 0,\n\t\t) :\n\t\tgetVPos(val, scales[scale],\n\t\t\tcan ? plotHgt : plotHgtCss,\n\t\t\tcan ? plotTop : 0,\n\t\t)\n\t);\n\n\t// defers calling expensive functions\n\tfunction batch(fn) {\n\t\tfn(self);\n\t\tcommit();\n\t}\n\n\tself.batch = batch;\n\n\t(self.setCursor = (opts, _fire, _pub) => {\n\t\tmouseLeft1 = opts.left;\n\t\tmouseTop1 = opts.top;\n\t//\tassign(cursor, opts);\n\t\tupdateCursor(null, _fire, _pub);\n\t});\n\n\tfunction setSelH(off, dim) {\n\t\tsetStylePx(selectDiv, LEFT, select.left = off);\n\t\tsetStylePx(selectDiv, WIDTH, select.width = dim);\n\t}\n\n\tfunction setSelV(off, dim) {\n\t\tsetStylePx(selectDiv, TOP, select.top = off);\n\t\tsetStylePx(selectDiv, HEIGHT, select.height = dim);\n\t}\n\n\tlet setSelX = scaleX.ori == 0 ? setSelH : setSelV;\n\tlet setSelY = scaleX.ori == 1 ? setSelH : setSelV;\n\n\tfunction syncLegend() {\n\t\tif (showLegend && legend.live) {\n\t\t\tfor (let i = mode == 2 ? 1 : 0; i < series.length; i++) {\n\t\t\t\tif (i == 0 && multiValLegend)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tlet vals = legend.values[i];\n\n\t\t\t\tlet j = 0;\n\n\t\t\t\tfor (let k in vals)\n\t\t\t\t\tlegendCells[i][j++].firstChild.nodeValue = vals[k];\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction setLegend(opts, _fire) {\n\t\tif (opts != null) {\n\t\t\tlet idx = opts.idx;\n\n\t\t\tlegend.idx = idx;\n\t\t\tseries.forEach((s, sidx) => {\n\t\t\t\t(sidx > 0 || !multiValLegend) && setLegendValues(sidx, idx);\n\t\t\t});\n\t\t}\n\n\t\tif (showLegend && legend.live)\n\t\t\tsyncLegend();\n\n\t\tshouldSetLegend = false;\n\n\t\t_fire !== false && fire(\"setLegend\");\n\t}\n\n\tself.setLegend = setLegend;\n\n\tfunction setLegendValues(sidx, idx) {\n\t\tlet val;\n\n\t\tif (idx == null)\n\t\t\tval = NULL_LEGEND_VALUES;\n\t\telse {\n\t\t\tlet s = series[sidx];\n\t\t\tlet src = sidx == 0 && xScaleDistr == 2 ? data0 : data[sidx];\n\t\t\tval = multiValLegend ? s.values(self, sidx, idx) : {_: s.value(self, src[idx], sidx, idx)};\n\t\t}\n\n\t\tlegend.values[sidx] = val;\n\t}\n\n\tfunction updateCursor(src, _fire, _pub) {\n\t//\tts == null && log(\"updateCursor()\", arguments);\n\n\t\trawMouseLeft1 = mouseLeft1;\n\t\trawMouseTop1 = mouseTop1;\n\n\t\t[mouseLeft1, mouseTop1] = cursor.move(self, mouseLeft1, mouseTop1);\n\n\t\tif (cursor.show) {\n\t\t\tvCursor && elTrans(vCursor, round(mouseLeft1), 0, plotWidCss, plotHgtCss);\n\t\t\thCursor && elTrans(hCursor, 0, round(mouseTop1), plotWidCss, plotHgtCss);\n\t\t}\n\n\t\tlet idx;\n\n\t\t// when zooming to an x scale range between datapoints the binary search\n\t\t// for nearest min/max indices results in this condition. cheap hack :D\n\t\tlet noDataInRange = i0 > i1; // works for mode 1 only\n\n\t\tclosestDist = inf;\n\n\t\t// TODO: extract\n\t\tlet xDim = scaleX.ori == 0 ? plotWidCss : plotHgtCss;\n\t\tlet yDim = scaleX.ori == 1 ? plotWidCss : plotHgtCss;\n\n\t\t// if cursor hidden, hide points & clear legend vals\n\t\tif (mouseLeft1 < 0 || dataLen == 0 || noDataInRange) {\n\t\t\tidx = null;\n\n\t\t\tfor (let i = 0; i < series.length; i++) {\n\t\t\t\tif (i > 0) {\n\t\t\t\t\tcursorPts.length > 1 && elTrans(cursorPts[i], -10, -10, plotWidCss, plotHgtCss);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (cursorFocus)\n\t\t\t\tsetSeries(null, FOCUS_TRUE, true, src == null && syncOpts.setSeries);\n\n\t\t\tif (legend.live) {\n\t\t\t\tactiveIdxs.fill(null);\n\t\t\t\tshouldSetLegend = true;\n\n\t\t\t\tfor (let i = 0; i < series.length; i++)\n\t\t\t\t\tlegend.values[i] = NULL_LEGEND_VALUES;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t//\tlet pctY = 1 - (y / rect.height);\n\n\t\t\tlet mouseXPos, valAtPosX, xPos;\n\n\t\t\tif (mode == 1) {\n\t\t\t\tmouseXPos = scaleX.ori == 0 ? mouseLeft1 : mouseTop1;\n\t\t\t\tvalAtPosX = posToVal(mouseXPos, xScaleKey);\n\t\t\t\tidx = closestIdx(valAtPosX, data[0], i0, i1);\n\t\t\t\txPos = incrRoundUp(valToPosX(data[0][idx], scaleX, xDim, 0), 0.5);\n\t\t\t}\n\n\t\t\tfor (let i = mode == 2 ? 1 : 0; i < series.length; i++) {\n\t\t\t\tlet s = series[i];\n\n\t\t\t\tlet idx1 = activeIdxs[i];\n\t\t\t\tlet yVal1 = mode == 1 ? data[i][idx1] : data[i][1][idx1];\n\n\t\t\t\tlet idx2 = cursor.dataIdx(self, i, idx, valAtPosX);\n\t\t\t\tlet yVal2 = mode == 1 ? data[i][idx2] : data[i][1][idx2];\n\n\t\t\t\tshouldSetLegend = shouldSetLegend || yVal2 != yVal1 || idx2 != idx1;\n\n\t\t\t\tactiveIdxs[i] = idx2;\n\n\t\t\t\tlet xPos2 = idx2 == idx ? xPos : incrRoundUp(valToPosX(mode == 1 ? data[0][idx2] : data[i][0][idx2], scaleX, xDim, 0), 0.5);\n\n\t\t\t\tif (i > 0 && s.show) {\n\t\t\t\t\tlet yPos = yVal2 == null ? -10 : incrRoundUp(valToPosY(yVal2, mode == 1 ? scales[s.scale] : scales[s.facets[1].scale], yDim, 0), 0.5);\n\n\t\t\t\t\tif (yPos > 0 && mode == 1) {\n\t\t\t\t\t\tlet dist = abs(yPos - mouseTop1);\n\n\t\t\t\t\t\tif (dist <= closestDist) {\n\t\t\t\t\t\t\tclosestDist = dist;\n\t\t\t\t\t\t\tclosestSeries = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tlet hPos, vPos;\n\n\t\t\t\t\tif (scaleX.ori == 0) {\n\t\t\t\t\t\thPos = xPos2;\n\t\t\t\t\t\tvPos = yPos;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\thPos = yPos;\n\t\t\t\t\t\tvPos = xPos2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (shouldSetLegend && cursorPts.length > 1) {\n\t\t\t\t\t\telColor(cursorPts[i], cursor.points.fill(self, i), cursor.points.stroke(self, i));\n\n\t\t\t\t\t\tlet ptWid, ptHgt, ptLft, ptTop,\n\t\t\t\t\t\t\tcentered = true,\n\t\t\t\t\t\t\tgetBBox = cursor.points.bbox;\n\n\t\t\t\t\t\tif (getBBox != null) {\n\t\t\t\t\t\t\tcentered = false;\n\n\t\t\t\t\t\t\tlet bbox = getBBox(self, i);\n\n\t\t\t\t\t\t\tptLft = bbox.left;\n\t\t\t\t\t\t\tptTop = bbox.top;\n\t\t\t\t\t\t\tptWid = bbox.width;\n\t\t\t\t\t\t\tptHgt = bbox.height;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tptLft = hPos;\n\t\t\t\t\t\t\tptTop = vPos;\n\t\t\t\t\t\t\tptWid = ptHgt = cursor.points.size(self, i);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telSize(cursorPts[i], ptWid, ptHgt, centered);\n\t\t\t\t\t\telTrans(cursorPts[i], ptLft, ptTop, plotWidCss, plotHgtCss);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (legend.live) {\n\t\t\t\t\tif (!shouldSetLegend || i == 0 && multiValLegend)\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tsetLegendValues(i, idx2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tcursor.idx = idx;\n\t\tcursor.left = mouseLeft1;\n\t\tcursor.top = mouseTop1;\n\n\t\tif (shouldSetLegend) {\n\t\t\tlegend.idx = idx;\n\t\t\tsetLegend();\n\t\t}\n\n\t\t// nit: cursor.drag.setSelect is assumed always true\n\t\tif (select.show && dragging) {\n\t\t\tif (src != null) {\n\t\t\t\tlet [xKey, yKey] = syncOpts.scales;\n\t\t\t\tlet [matchXKeys, matchYKeys] = syncOpts.match;\n\t\t\t\tlet [xKeySrc, yKeySrc] = src.cursor.sync.scales;\n\n\t\t\t\t// match the dragX/dragY implicitness/explicitness of src\n\t\t\t\tlet sdrag = src.cursor.drag;\n\t\t\t\tdragX = sdrag._x;\n\t\t\t\tdragY = sdrag._y;\n\n\t\t\t\tif (dragX || dragY) {\n\t\t\t\t\tlet { left, top, width, height } = src.select;\n\n\t\t\t\t\tlet sori = src.scales[xKey].ori;\n\t\t\t\t\tlet sPosToVal = src.posToVal;\n\n\t\t\t\t\tlet sOff, sDim, sc, a, b;\n\n\t\t\t\t\tlet matchingX = xKey != null && matchXKeys(xKey, xKeySrc);\n\t\t\t\t\tlet matchingY = yKey != null && matchYKeys(yKey, yKeySrc);\n\n\t\t\t\t\tif (matchingX && dragX) {\n\t\t\t\t\t\tif (sori == 0) {\n\t\t\t\t\t\t\tsOff = left;\n\t\t\t\t\t\t\tsDim = width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tsOff = top;\n\t\t\t\t\t\t\tsDim = height;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsc = scales[xKey];\n\n\t\t\t\t\t\ta = valToPosX(sPosToVal(sOff, xKeySrc), sc, xDim, 0);\n\t\t\t\t\t\tb = valToPosX(sPosToVal(sOff + sDim, xKeySrc), sc, xDim, 0);\n\n\t\t\t\t\t\tsetSelX(min(a,b), abs(b-a));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tsetSelX(0, xDim);\n\n\t\t\t\t\tif (matchingY && dragY) {\n\t\t\t\t\t\tif (sori == 1) {\n\t\t\t\t\t\t\tsOff = left;\n\t\t\t\t\t\t\tsDim = width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tsOff = top;\n\t\t\t\t\t\t\tsDim = height;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsc = scales[yKey];\n\n\t\t\t\t\t\ta = valToPosY(sPosToVal(sOff, yKeySrc), sc, yDim, 0);\n\t\t\t\t\t\tb = valToPosY(sPosToVal(sOff + sDim, yKeySrc), sc, yDim, 0);\n\n\t\t\t\t\t\tsetSelY(min(a,b), abs(b-a));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tsetSelY(0, yDim);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\thideSelect();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlet rawDX = abs(rawMouseLeft1 - rawMouseLeft0);\n\t\t\t\tlet rawDY = abs(rawMouseTop1 - rawMouseTop0);\n\n\t\t\t\tif (scaleX.ori == 1) {\n\t\t\t\t\tlet _rawDX = rawDX;\n\t\t\t\t\trawDX = rawDY;\n\t\t\t\t\trawDY = _rawDX;\n\t\t\t\t}\n\n\t\t\t\tdragX = drag.x && rawDX >= drag.dist;\n\t\t\t\tdragY = drag.y && rawDY >= drag.dist;\n\n\t\t\t\tlet uni = drag.uni;\n\n\t\t\t\tif (uni != null) {\n\t\t\t\t\t// only calc drag status if they pass the dist thresh\n\t\t\t\t\tif (dragX && dragY) {\n\t\t\t\t\t\tdragX = rawDX >= uni;\n\t\t\t\t\t\tdragY = rawDY >= uni;\n\n\t\t\t\t\t\t// force unidirectionality when both are under uni limit\n\t\t\t\t\t\tif (!dragX && !dragY) {\n\t\t\t\t\t\t\tif (rawDY > rawDX)\n\t\t\t\t\t\t\t\tdragY = true;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tdragX = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (drag.x && drag.y && (dragX || dragY))\n\t\t\t\t\t// if omni with no uni then both dragX / dragY should be true if either is true\n\t\t\t\t\tdragX = dragY = true;\n\n\t\t\t\tlet p0, p1;\n\n\t\t\t\tif (dragX) {\n\t\t\t\t\tif (scaleX.ori == 0) {\n\t\t\t\t\t\tp0 = mouseLeft0;\n\t\t\t\t\t\tp1 = mouseLeft1;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tp0 = mouseTop0;\n\t\t\t\t\t\tp1 = mouseTop1;\n\t\t\t\t\t}\n\n\t\t\t\t\tsetSelX(min(p0, p1), abs(p1 - p0));\n\n\t\t\t\t\tif (!dragY)\n\t\t\t\t\t\tsetSelY(0, yDim);\n\t\t\t\t}\n\n\t\t\t\tif (dragY) {\n\t\t\t\t\tif (scaleX.ori == 1) {\n\t\t\t\t\t\tp0 = mouseLeft0;\n\t\t\t\t\t\tp1 = mouseLeft1;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tp0 = mouseTop0;\n\t\t\t\t\t\tp1 = mouseTop1;\n\t\t\t\t\t}\n\n\t\t\t\t\tsetSelY(min(p0, p1), abs(p1 - p0));\n\n\t\t\t\t\tif (!dragX)\n\t\t\t\t\t\tsetSelX(0, xDim);\n\t\t\t\t}\n\n\t\t\t\t// the drag didn't pass the dist requirement\n\t\t\t\tif (!dragX && !dragY) {\n\t\t\t\t\tsetSelX(0, 0);\n\t\t\t\t\tsetSelY(0, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdrag._x = dragX;\n\t\tdrag._y = dragY;\n\n\t\tif (src == null) {\n\t\t\tif (_pub) {\n\t\t\t\tif (syncKey != null) {\n\t\t\t\t\tlet [xSyncKey, ySyncKey] = syncOpts.scales;\n\n\t\t\t\t\tsyncOpts.values[0] = xSyncKey != null ? posToVal(scaleX.ori == 0 ? mouseLeft1 : mouseTop1, xSyncKey) : null;\n\t\t\t\t\tsyncOpts.values[1] = ySyncKey != null ? posToVal(scaleX.ori == 1 ? mouseLeft1 : mouseTop1, ySyncKey) : null;\n\t\t\t\t}\n\n\t\t\t\tpubSync(mousemove, self, mouseLeft1, mouseTop1, plotWidCss, plotHgtCss, idx);\n\t\t\t}\n\n\t\t\tif (cursorFocus) {\n\t\t\t\tlet shouldPub = _pub && syncOpts.setSeries;\n\t\t\t\tlet p = focus.prox;\n\n\t\t\t\tif (focusedSeries == null) {\n\t\t\t\t\tif (closestDist <= p)\n\t\t\t\t\t\tsetSeries(closestSeries, FOCUS_TRUE, true, shouldPub);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (closestDist > p)\n\t\t\t\t\t\tsetSeries(null, FOCUS_TRUE, true, shouldPub);\n\t\t\t\t\telse if (closestSeries != focusedSeries)\n\t\t\t\t\t\tsetSeries(closestSeries, FOCUS_TRUE, true, shouldPub);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tready && _fire !== false && fire(\"setCursor\");\n\t}\n\n\tlet rect = null;\n\n\tfunction syncRect(defer) {\n\t\tif (defer === true)\n\t\t\trect = null;\n\t\telse {\n\t\t\trect = over.getBoundingClientRect();\n\t\t\tfire(\"syncRect\", rect);\n\t\t}\n\t}\n\n\tfunction mouseMove(e, src, _l, _t, _w, _h, _i) {\n\t\tif (cursor._lock)\n\t\t\treturn;\n\n\t\tcacheMouse(e, src, _l, _t, _w, _h, _i, false, e != null);\n\n\t\tif (e != null)\n\t\t\tupdateCursor(null, true, true);\n\t\telse\n\t\t\tupdateCursor(src, true, false);\n\t}\n\n\tfunction cacheMouse(e, src, _l, _t, _w, _h, _i, initial, snap) {\n\t\tif (rect == null)\n\t\t\tsyncRect(false);\n\n\t\tif (e != null) {\n\t\t\t_l = e.clientX - rect.left;\n\t\t\t_t = e.clientY - rect.top;\n\t\t}\n\t\telse {\n\t\t\tif (_l < 0 || _t < 0) {\n\t\t\t\tmouseLeft1 = -10;\n\t\t\t\tmouseTop1 = -10;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet [xKey, yKey] = syncOpts.scales;\n\n\t\t\tlet syncOptsSrc = src.cursor.sync;\n\t\t\tlet [xValSrc, yValSrc] = syncOptsSrc.values;\n\t\t\tlet [xKeySrc, yKeySrc] = syncOptsSrc.scales;\n\t\t\tlet [matchXKeys, matchYKeys] = syncOpts.match;\n\n\t\t\tlet rotSrc = src.axes[0].side % 2 == 1;\n\n\t\t\tlet xDim = scaleX.ori == 0 ? plotWidCss : plotHgtCss,\n\t\t\t\tyDim = scaleX.ori == 1 ? plotWidCss : plotHgtCss,\n\t\t\t\t_xDim = rotSrc ? _h : _w,\n\t\t\t\t_yDim = rotSrc ? _w : _h,\n\t\t\t\t_xPos = rotSrc ? _t : _l,\n\t\t\t\t_yPos = rotSrc ? _l : _t;\n\n\t\t\tif (xKeySrc != null)\n\t\t\t\t_l = matchXKeys(xKey, xKeySrc) ? getPos(xValSrc, scales[xKey], xDim, 0) : -10;\n\t\t\telse\n\t\t\t\t_l = xDim * (_xPos/_xDim);\n\n\t\t\tif (yKeySrc != null)\n\t\t\t\t_t = matchYKeys(yKey, yKeySrc) ? getPos(yValSrc, scales[yKey], yDim, 0) : -10;\n\t\t\telse\n\t\t\t\t_t = yDim * (_yPos/_yDim);\n\n\t\t\tif (scaleX.ori == 1) {\n\t\t\t\tlet __l = _l;\n\t\t\t\t_l = _t;\n\t\t\t\t_t = __l;\n\t\t\t}\n\t\t}\n\n\t\tif (snap) {\n\t\t\tif (_l <= 1 || _l >= plotWidCss - 1)\n\t\t\t\t_l = incrRound(_l, plotWidCss);\n\n\t\t\tif (_t <= 1 || _t >= plotHgtCss - 1)\n\t\t\t\t_t = incrRound(_t, plotHgtCss);\n\t\t}\n\n\t\tif (initial) {\n\t\t\trawMouseLeft0 = _l;\n\t\t\trawMouseTop0 = _t;\n\n\t\t\t[mouseLeft0, mouseTop0] = cursor.move(self, _l, _t);\n\t\t}\n\t\telse {\n\t\t\tmouseLeft1 = _l;\n\t\t\tmouseTop1 = _t;\n\t\t}\n\t}\n\n\tconst _hideProps = {\n\t\twidth: 0,\n\t\theight: 0,\n\t};\n\n\tfunction hideSelect() {\n\t\tsetSelect(_hideProps, false);\n\t}\n\n\tfunction mouseDown(e, src, _l, _t, _w, _h, _i) {\n\t\tdragging = true;\n\t\tdragX = dragY = drag._x = drag._y = false;\n\n\t\tcacheMouse(e, src, _l, _t, _w, _h, _i, true, false);\n\n\t\tif (e != null) {\n\t\t\tonMouse(mouseup, doc, mouseUp);\n\t\t\tpubSync(mousedown, self, mouseLeft0, mouseTop0, plotWidCss, plotHgtCss, null);\n\t\t}\n\t}\n\n\tfunction mouseUp(e, src, _l, _t, _w, _h, _i) {\n\t\tdragging = drag._x = drag._y = false;\n\n\t\tcacheMouse(e, src, _l, _t, _w, _h, _i, false, true);\n\n\t\tlet { left, top, width, height } = select;\n\n\t\tlet hasSelect = width > 0 || height > 0;\n\n\t\thasSelect && setSelect(select);\n\n\t\tif (drag.setScale && hasSelect) {\n\t\t//\tif (syncKey != null) {\n\t\t//\t\tdragX = drag.x;\n\t\t//\t\tdragY = drag.y;\n\t\t//\t}\n\n\t\t\tlet xOff = left,\n\t\t\t\txDim = width,\n\t\t\t\tyOff = top,\n\t\t\t\tyDim = height;\n\n\t\t\tif (scaleX.ori == 1) {\n\t\t\t\txOff = top,\n\t\t\t\txDim = height,\n\t\t\t\tyOff = left,\n\t\t\t\tyDim = width;\n\t\t\t}\n\n\t\t\tif (dragX) {\n\t\t\t\t_setScale(xScaleKey,\n\t\t\t\t\tposToVal(xOff, xScaleKey),\n\t\t\t\t\tposToVal(xOff + xDim, xScaleKey)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (dragY) {\n\t\t\t\tfor (let k in scales) {\n\t\t\t\t\tlet sc = scales[k];\n\n\t\t\t\t\tif (k != xScaleKey && sc.from == null && sc.min != inf) {\n\t\t\t\t\t\t_setScale(k,\n\t\t\t\t\t\t\tposToVal(yOff + yDim, k),\n\t\t\t\t\t\t\tposToVal(yOff, k)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\thideSelect();\n\t\t}\n\t\telse if (cursor.lock) {\n\t\t\tcursor._lock = !cursor._lock;\n\n\t\t\tif (!cursor._lock)\n\t\t\t\tupdateCursor(null, true, false);\n\t\t}\n\n\t\tif (e != null) {\n\t\t\toffMouse(mouseup, doc);\n\t\t\tpubSync(mouseup, self, mouseLeft1, mouseTop1, plotWidCss, plotHgtCss, null);\n\t\t}\n\t}\n\n\tfunction mouseLeave(e, src, _l, _t, _w, _h, _i) {\n\t\tif (!cursor._lock) {\n\t\t\tlet _dragging = dragging;\n\n\t\t\tif (dragging) {\n\t\t\t\t// handle case when mousemove aren't fired all the way to edges by browser\n\t\t\t\tlet snapH = true;\n\t\t\t\tlet snapV = true;\n\t\t\t\tlet snapProx = 10;\n\n\t\t\t\tlet dragH, dragV;\n\n\t\t\t\tif (scaleX.ori == 0) {\n\t\t\t\t\tdragH = dragX;\n\t\t\t\t\tdragV = dragY;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdragH = dragY;\n\t\t\t\t\tdragV = dragX;\n\t\t\t\t}\n\n\t\t\t\tif (dragH && dragV) {\n\t\t\t\t\t// maybe omni corner snap\n\t\t\t\t\tsnapH = mouseLeft1 <= snapProx || mouseLeft1 >= plotWidCss - snapProx;\n\t\t\t\t\tsnapV = mouseTop1 <= snapProx || mouseTop1 >= plotHgtCss - snapProx;\n\t\t\t\t}\n\n\t\t\t\tif (dragH && snapH)\n\t\t\t\t\tmouseLeft1 = mouseLeft1 < mouseLeft0 ? 0 : plotWidCss;\n\n\t\t\t\tif (dragV && snapV)\n\t\t\t\t\tmouseTop1 = mouseTop1 < mouseTop0 ? 0 : plotHgtCss;\n\n\t\t\t\tupdateCursor(null, true, true);\n\n\t\t\t\tdragging = false;\n\t\t\t}\n\n\t\t\tmouseLeft1 = -10;\n\t\t\tmouseTop1 = -10;\n\n\t\t\t// passing a non-null timestamp to force sync/mousemove event\n\t\t\tupdateCursor(null, true, true);\n\n\t\t\tif (_dragging)\n\t\t\t\tdragging = _dragging;\n\t\t}\n\t}\n\n\tfunction dblClick(e, src, _l, _t, _w, _h, _i) {\n\t\tautoScaleX();\n\n\t\thideSelect();\n\n\t\tif (e != null)\n\t\t\tpubSync(dblclick, self, mouseLeft1, mouseTop1, plotWidCss, plotHgtCss, null);\n\t}\n\n\tfunction syncPxRatio() {\n\t\taxes.forEach(syncFontSize);\n\t\t_setSize(self.width, self.height, true);\n\t}\n\n\ton(dppxchange, win, syncPxRatio);\n\n\t// internal pub/sub\n\tconst events = {};\n\n\tevents.mousedown = mouseDown;\n\tevents.mousemove = mouseMove;\n\tevents.mouseup = mouseUp;\n\tevents.dblclick = dblClick;\n\tevents[\"setSeries\"] = (e, src, idx, opts) => {\n\t\tsetSeries(idx, opts, true, false);\n\t};\n\n\tif (cursor.show) {\n\t\tonMouse(mousedown, over, mouseDown);\n\t\tonMouse(mousemove, over, mouseMove);\n\t\tonMouse(mouseenter, over, syncRect);\n\t\tonMouse(mouseleave, over, mouseLeave);\n\n\t\tonMouse(dblclick, over, dblClick);\n\n\t\tcursorPlots.add(self);\n\n\t\tself.syncRect = syncRect;\n\t}\n\n\t// external on/off\n\tconst hooks = self.hooks = opts.hooks || {};\n\n\tfunction fire(evName, a1, a2) {\n\t\tif (evName in hooks) {\n\t\t\thooks[evName].forEach(fn => {\n\t\t\t\tfn.call(null, self, a1, a2);\n\t\t\t});\n\t\t}\n\t}\n\n\t(opts.plugins || []).forEach(p => {\n\t\tfor (let evName in p.hooks)\n\t\t\thooks[evName] = (hooks[evName] || []).concat(p.hooks[evName]);\n\t});\n\n\tconst syncOpts = assign({\n\t\tkey: null,\n\t\tsetSeries: false,\n\t\tfilters: {\n\t\t\tpub: retTrue,\n\t\t\tsub: retTrue,\n\t\t},\n\t\tscales: [xScaleKey, series[1] ? series[1].scale : null],\n\t\tmatch: [retEq, retEq],\n\t\tvalues: [null, null],\n\t}, cursor.sync);\n\n\t(cursor.sync = syncOpts);\n\n\tconst syncKey = syncOpts.key;\n\n\tconst sync = _sync(syncKey);\n\n\tfunction pubSync(type, src, x, y, w, h, i) {\n\t\tif (syncOpts.filters.pub(type, src, x, y, w, h, i))\n\t\t\tsync.pub(type, src, x, y, w, h, i);\n\t}\n\n\tsync.sub(self);\n\n\tfunction pub(type, src, x, y, w, h, i) {\n\t\tif (syncOpts.filters.sub(type, src, x, y, w, h, i))\n\t\t\tevents[type](null, src, x, y, w, h, i);\n\t}\n\n\t(self.pub = pub);\n\n\tfunction destroy() {\n\t\tsync.unsub(self);\n\t\tcursorPlots.delete(self);\n\t\tmouseListeners.clear();\n\t\toff(dppxchange, win, syncPxRatio);\n\t\troot.remove();\n\t\tfire(\"destroy\");\n\t}\n\n\tself.destroy = destroy;\n\n\tfunction _init() {\n\t\tfire(\"init\", opts, data);\n\n\t\tsetData(data || opts.data, false);\n\n\t\tif (pendScales[xScaleKey])\n\t\t\tsetScale(xScaleKey, pendScales[xScaleKey]);\n\t\telse\n\t\t\tautoScaleX();\n\n\t\t_setSize(opts.width, opts.height);\n\n\t\tupdateCursor(null, true, false);\n\n\t\tsetSelect(select, false);\n\t}\n\n\tseries.forEach(initSeries);\n\n\taxes.forEach(initAxis);\n\n\tif (then) {\n\t\tif (then instanceof HTMLElement) {\n\t\t\tthen.appendChild(root);\n\t\t\t_init();\n\t\t}\n\t\telse\n\t\t\tthen(self, _init);\n\t}\n\telse\n\t\t_init();\n\n\treturn self;\n}\n\nuPlot.assign = assign;\nuPlot.fmtNum = fmtNum;\nuPlot.rangeNum = rangeNum;\nuPlot.rangeLog = rangeLog;\nuPlot.rangeAsinh = rangeAsinh;\nuPlot.orient = orient;\nuPlot.pxRatio = pxRatio;\n\n{\n\tuPlot.join = join;\n}\n\n{\n\tuPlot.fmtDate = fmtDate;\n\tuPlot.tzDate = tzDate;\n}\n\n{\n\tuPlot.sync = _sync;\n}\n\n{\n\tuPlot.addGap = addGap;\n\tuPlot.clipGaps = clipGaps;\n\n\tlet paths = uPlot.paths = {\n\t\tpoints,\n\t};\n\n\t(paths.linear = linear);\n\t(paths.stepped = stepped);\n\t(paths.bars = bars);\n\t(paths.spline = monotoneCubic);\n}\n\nexport { uPlot as default };\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../@vue/cli-service/node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../@vue/cli-service/node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;width:-moz-min-content;width:min-content}.u-title{text-align:center;font-size:18px;font-weight:700}.u-wrap{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;position:relative;width:100%;height:100%}.u-axis{position:absolute}.u-legend{font-size:14px;margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{vertical-align:middle;display:inline-block}.u-legend .u-marker{width:1em;height:1em;margin-right:4px;background-clip:padding-box!important}.u-inline.u-live th:after{content:\\\":\\\";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:rgba(0,0,0,.07)}.u-cursor-x,.u-cursor-y,.u-select{position:absolute;pointer-events:none}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform;z-index:100}.u-hz .u-cursor-x,.u-vt .u-cursor-y{height:100%;border-right:1px dashed #607d8b}.u-hz .u-cursor-y,.u-vt .u-cursor-x{width:100%;border-bottom:1px dashed #607d8b}.u-cursor-pt{position:absolute;top:0;left:0;border-radius:50%;border:0 solid;pointer-events:none;will-change:transform;z-index:100;background-clip:padding-box!important}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","module.exports = require('./lib/axios');","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar transitionalDefaults = require('../defaults/transitional');\nvar AxiosError = require('../core/AxiosError');\nvar CanceledError = require('../cancel/CanceledError');\nvar parseProtocol = require('../helpers/parseProtocol');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n var onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n if (utils.isFormData(requestData) && utils.isStandardBrowserEnv()) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n var transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = function(cancel) {\n if (!request) {\n return;\n }\n reject(!cancel || (cancel && cancel.type) ? new CanceledError() : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n var protocol = parseProtocol(fullPath);\n\n if (protocol && [ 'http', 'https', 'file' ].indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = require('./cancel/CanceledError');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\naxios.VERSION = require('./env/data').version;\naxios.toFormData = require('./helpers/toFormData');\n\n// Expose AxiosError class\naxios.AxiosError = require('../lib/core/AxiosError');\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","'use strict';\n\nvar CanceledError = require('./CanceledError');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(function(cancel) {\n if (!token._listeners) return;\n\n var i;\n var l = token._listeners.length;\n\n for (i = 0; i < l; i++) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = function(onfulfilled) {\n var _resolve;\n // eslint-disable-next-line func-names\n var promise = new Promise(function(resolve) {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Subscribe to the cancel signal\n */\n\nCancelToken.prototype.subscribe = function subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n};\n\n/**\n * Unsubscribe from the cancel signal\n */\n\nCancelToken.prototype.unsubscribe = function unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n var index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\nvar AxiosError = require('../core/AxiosError');\nvar utils = require('../utils');\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction CanceledError(message) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nmodule.exports = CanceledError;\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar buildFullPath = require('./buildFullPath');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n var fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url: url,\n data: data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nmodule.exports = Axios;\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nvar prototype = AxiosError.prototype;\nvar descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED'\n// eslint-disable-next-line func-names\n].forEach(function(code) {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = function(error, code, config, request, response, customProps) {\n var axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nmodule.exports = AxiosError;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar CanceledError = require('../cancel/CanceledError');\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(prop) {\n if (prop in config2) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n var mergeMap = {\n 'url': valueFromConfig2,\n 'method': valueFromConfig2,\n 'data': valueFromConfig2,\n 'baseURL': defaultToConfig2,\n 'transformRequest': defaultToConfig2,\n 'transformResponse': defaultToConfig2,\n 'paramsSerializer': defaultToConfig2,\n 'timeout': defaultToConfig2,\n 'timeoutMessage': defaultToConfig2,\n 'withCredentials': defaultToConfig2,\n 'adapter': defaultToConfig2,\n 'responseType': defaultToConfig2,\n 'xsrfCookieName': defaultToConfig2,\n 'xsrfHeaderName': defaultToConfig2,\n 'onUploadProgress': defaultToConfig2,\n 'onDownloadProgress': defaultToConfig2,\n 'decompress': defaultToConfig2,\n 'maxContentLength': defaultToConfig2,\n 'maxBodyLength': defaultToConfig2,\n 'beforeRedirect': defaultToConfig2,\n 'transport': defaultToConfig2,\n 'httpAgent': defaultToConfig2,\n 'httpsAgent': defaultToConfig2,\n 'cancelToken': defaultToConfig2,\n 'socketPath': defaultToConfig2,\n 'responseEncoding': defaultToConfig2,\n 'validateStatus': mergeDirectKeys\n };\n\n utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {\n var merge = mergeMap[prop] || mergeDeepProperties;\n var configValue = merge(prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n};\n","'use strict';\n\nvar AxiosError = require('./AxiosError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar normalizeHeaderName = require('../helpers/normalizeHeaderName');\nvar AxiosError = require('../core/AxiosError');\nvar transitionalDefaults = require('./transitional');\nvar toFormData = require('../helpers/toFormData');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('../adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('../adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n\n var isObjectPayload = utils.isObject(data);\n var contentType = headers && headers['Content-Type'];\n\n var isFileList;\n\n if ((isFileList = utils.isFileList(data)) || (isObjectPayload && contentType === 'multipart/form-data')) {\n var _FormData = this.env && this.env.FormData;\n return toFormData(isFileList ? {'files[]': data} : data, _FormData && new _FormData());\n } else if (isObjectPayload || contentType === 'application/json') {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional || defaults.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: require('./env/FormData')\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nmodule.exports = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","module.exports = {\n \"version\": \"0.27.2\"\n};","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","// eslint-disable-next-line strict\nmodule.exports = null;\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nmodule.exports = function parseProtocol(url) {\n var match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n};\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Convert a data object to FormData\n * @param {Object} obj\n * @param {?Object} [formData]\n * @returns {Object}\n **/\n\nfunction toFormData(obj, formData) {\n // eslint-disable-next-line no-param-reassign\n formData = formData || new FormData();\n\n var stack = [];\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n function build(data, parentKey) {\n if (utils.isPlainObject(data) || utils.isArray(data)) {\n if (stack.indexOf(data) !== -1) {\n throw Error('Circular reference detected in ' + parentKey);\n }\n\n stack.push(data);\n\n utils.forEach(data, function each(value, key) {\n if (utils.isUndefined(value)) return;\n var fullKey = parentKey ? parentKey + '.' + key : key;\n var arr;\n\n if (value && !parentKey && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (utils.endsWith(key, '[]') && (arr = utils.toArray(value))) {\n // eslint-disable-next-line func-names\n arr.forEach(function(el) {\n !utils.isUndefined(el) && formData.append(fullKey, convertValue(el));\n });\n return;\n }\n }\n\n build(value, fullKey);\n });\n\n stack.pop();\n } else {\n formData.append(parentKey, convertValue(data));\n }\n }\n\n build(obj);\n\n return formData;\n}\n\nmodule.exports = toFormData;\n","'use strict';\n\nvar VERSION = require('../env/data').version;\nvar AxiosError = require('../core/AxiosError');\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nmodule.exports = {\n assertOptions: assertOptions,\n validators: validators\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n// eslint-disable-next-line func-names\nvar kindOf = (function(cache) {\n // eslint-disable-next-line func-names\n return function(thing) {\n var str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n };\n})(Object.create(null));\n\nfunction kindOfTest(type) {\n type = type.toLowerCase();\n return function isKindOf(thing) {\n return kindOf(thing) === type;\n };\n}\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return Array.isArray(val);\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @function\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nvar isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @function\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nvar isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @function\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nvar isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @function\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nvar isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @function\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nvar isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} thing The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(thing) {\n var pattern = '[object FormData]';\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) ||\n toString.call(thing) === pattern ||\n (isFunction(thing.toString) && thing.toString() === pattern)\n );\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n * @function\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nvar isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n */\n\nfunction inherits(constructor, superConstructor, props, descriptors) {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function} [filter]\n * @returns {Object}\n */\n\nfunction toFlatObject(sourceObj, destObj, filter) {\n var props;\n var i;\n var prop;\n var merged = {};\n\n destObj = destObj || {};\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if (!merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = Object.getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/*\n * determines whether a string ends with the characters of a specified string\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n * @returns {boolean}\n */\nfunction endsWith(str, searchString, position) {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n var lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object\n * @param {*} [thing]\n * @returns {Array}\n */\nfunction toArray(thing) {\n if (!thing) return null;\n var i = thing.length;\n if (isUndefined(i)) return null;\n var arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n// eslint-disable-next-line func-names\nvar isTypedArray = (function(TypedArray) {\n // eslint-disable-next-line func-names\n return function(thing) {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && Object.getPrototypeOf(Uint8Array));\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM,\n inherits: inherits,\n toFlatObject: toFlatObject,\n kindOf: kindOf,\n kindOfTest: kindOfTest,\n endsWith: endsWith,\n toArray: toArray,\n isTypedArray: isTypedArray,\n isFileList: isFileList\n};\n","module.exports = function(haystack, needle, comparator, low, high) {\n var mid, cmp;\n\n if(low === undefined)\n low = 0;\n\n else {\n low = low|0;\n if(low < 0 || low >= haystack.length)\n throw new RangeError(\"invalid lower bound\");\n }\n\n if(high === undefined)\n high = haystack.length - 1;\n\n else {\n high = high|0;\n if(high < low || high >= haystack.length)\n throw new RangeError(\"invalid upper bound\");\n }\n\n while(low <= high) {\n // The naive `low + high >>> 1` could fail for array lengths > 2**31\n // because `>>>` converts its operands to int32. `low + (high - low >>> 1)`\n // works for array lengths <= 2**32-1 which is also Javascript's max array\n // length.\n mid = low + ((high - low) >>> 1);\n cmp = +comparator(haystack[mid], needle, mid, haystack);\n\n // Too low.\n if(cmp < 0.0)\n low = mid + 1;\n\n // Too high.\n else if(cmp > 0.0)\n high = mid - 1;\n\n // Key found.\n else\n return mid;\n }\n\n // Key not found.\n return ~low;\n}\n","// eslint-disable-next-line es/no-typed-arrays -- safe\nmodule.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';\n","'use strict';\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-basic-detection');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar hasOwn = require('../internals/has-own-property');\nvar classof = require('../internals/classof');\nvar tryToString = require('../internals/try-to-string');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineProperty = require('../internals/object-define-property').f;\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar uid = require('../internals/uid');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar enforceInternalState = InternalStateModule.enforce;\nvar getInternalState = InternalStateModule.get;\nvar Int8Array = global.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar Uint8ClampedArray = global.Uint8ClampedArray;\nvar Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;\nvar TypedArray = Int8Array && getPrototypeOf(Int8Array);\nvar TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);\nvar ObjectPrototype = Object.prototype;\nvar TypeError = global.TypeError;\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');\nvar TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';\n// Fixing native typed arrays in Opera Presto crashes the browser, see #595\nvar NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';\nvar TYPED_ARRAY_TAG_REQUIRED = false;\nvar NAME, Constructor, Prototype;\n\nvar TypedArrayConstructorsList = {\n Int8Array: 1,\n Uint8Array: 1,\n Uint8ClampedArray: 1,\n Int16Array: 2,\n Uint16Array: 2,\n Int32Array: 4,\n Uint32Array: 4,\n Float32Array: 4,\n Float64Array: 8\n};\n\nvar BigIntArrayConstructorsList = {\n BigInt64Array: 8,\n BigUint64Array: 8\n};\n\nvar isView = function isView(it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return klass === 'DataView'\n || hasOwn(TypedArrayConstructorsList, klass)\n || hasOwn(BigIntArrayConstructorsList, klass);\n};\n\nvar getTypedArrayConstructor = function (it) {\n var proto = getPrototypeOf(it);\n if (!isObject(proto)) return;\n var state = getInternalState(proto);\n return (state && hasOwn(state, TYPED_ARRAY_CONSTRUCTOR)) ? state[TYPED_ARRAY_CONSTRUCTOR] : getTypedArrayConstructor(proto);\n};\n\nvar isTypedArray = function (it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return hasOwn(TypedArrayConstructorsList, klass)\n || hasOwn(BigIntArrayConstructorsList, klass);\n};\n\nvar aTypedArray = function (it) {\n if (isTypedArray(it)) return it;\n throw TypeError('Target is not a typed array');\n};\n\nvar aTypedArrayConstructor = function (C) {\n if (isCallable(C) && (!setPrototypeOf || isPrototypeOf(TypedArray, C))) return C;\n throw TypeError(tryToString(C) + ' is not a typed array constructor');\n};\n\nvar exportTypedArrayMethod = function (KEY, property, forced, options) {\n if (!DESCRIPTORS) return;\n if (forced) for (var ARRAY in TypedArrayConstructorsList) {\n var TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && hasOwn(TypedArrayConstructor.prototype, KEY)) try {\n delete TypedArrayConstructor.prototype[KEY];\n } catch (error) {\n // old WebKit bug - some methods are non-configurable\n try {\n TypedArrayConstructor.prototype[KEY] = property;\n } catch (error2) { /* empty */ }\n }\n }\n if (!TypedArrayPrototype[KEY] || forced) {\n defineBuiltIn(TypedArrayPrototype, KEY, forced ? property\n : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options);\n }\n};\n\nvar exportTypedArrayStaticMethod = function (KEY, property, forced) {\n var ARRAY, TypedArrayConstructor;\n if (!DESCRIPTORS) return;\n if (setPrototypeOf) {\n if (forced) for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && hasOwn(TypedArrayConstructor, KEY)) try {\n delete TypedArrayConstructor[KEY];\n } catch (error) { /* empty */ }\n }\n if (!TypedArray[KEY] || forced) {\n // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable\n try {\n return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);\n } catch (error) { /* empty */ }\n } else return;\n }\n for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {\n defineBuiltIn(TypedArrayConstructor, KEY, property);\n }\n }\n};\n\nfor (NAME in TypedArrayConstructorsList) {\n Constructor = global[NAME];\n Prototype = Constructor && Constructor.prototype;\n if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;\n else NATIVE_ARRAY_BUFFER_VIEWS = false;\n}\n\nfor (NAME in BigIntArrayConstructorsList) {\n Constructor = global[NAME];\n Prototype = Constructor && Constructor.prototype;\n if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;\n}\n\n// WebKit bug - typed arrays constructors prototype is Object.prototype\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {\n // eslint-disable-next-line no-shadow -- safe\n TypedArray = function TypedArray() {\n throw TypeError('Incorrect invocation');\n };\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);\n }\n}\n\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {\n TypedArrayPrototype = TypedArray.prototype;\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);\n }\n}\n\n// WebKit bug - one more object in Uint8ClampedArray prototype chain\nif (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {\n setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);\n}\n\nif (DESCRIPTORS && !hasOwn(TypedArrayPrototype, TO_STRING_TAG)) {\n TYPED_ARRAY_TAG_REQUIRED = true;\n defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () {\n return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;\n } });\n for (NAME in TypedArrayConstructorsList) if (global[NAME]) {\n createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);\n }\n}\n\nmodule.exports = {\n NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,\n TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,\n aTypedArray: aTypedArray,\n aTypedArrayConstructor: aTypedArrayConstructor,\n exportTypedArrayMethod: exportTypedArrayMethod,\n exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,\n getTypedArrayConstructor: getTypedArrayConstructor,\n isView: isView,\n isTypedArray: isTypedArray,\n TypedArray: TypedArray,\n TypedArrayPrototype: TypedArrayPrototype\n};\n","'use strict';\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-basic-detection');\nvar FunctionName = require('../internals/function-name');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar fails = require('../internals/fails');\nvar anInstance = require('../internals/an-instance');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar IEEE754 = require('../internals/ieee754');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar arrayFill = require('../internals/array-fill');\nvar arraySlice = require('../internals/array-slice-simple');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length';\nvar WRONG_INDEX = 'Wrong index';\nvar NativeArrayBuffer = global[ARRAY_BUFFER];\nvar $ArrayBuffer = NativeArrayBuffer;\nvar ArrayBufferPrototype = $ArrayBuffer && $ArrayBuffer[PROTOTYPE];\nvar $DataView = global[DATA_VIEW];\nvar DataViewPrototype = $DataView && $DataView[PROTOTYPE];\nvar ObjectPrototype = Object.prototype;\nvar Array = global.Array;\nvar RangeError = global.RangeError;\nvar fill = uncurryThis(arrayFill);\nvar reverse = uncurryThis([].reverse);\n\nvar packIEEE754 = IEEE754.pack;\nvar unpackIEEE754 = IEEE754.unpack;\n\nvar packInt8 = function (number) {\n return [number & 0xFF];\n};\n\nvar packInt16 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF];\n};\n\nvar packInt32 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];\n};\n\nvar unpackInt32 = function (buffer) {\n return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];\n};\n\nvar packFloat32 = function (number) {\n return packIEEE754(number, 23, 4);\n};\n\nvar packFloat64 = function (number) {\n return packIEEE754(number, 52, 8);\n};\n\nvar addGetter = function (Constructor, key) {\n defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } });\n};\n\nvar get = function (view, count, index, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = arraySlice(bytes, start, start + count);\n return isLittleEndian ? pack : reverse(pack);\n};\n\nvar set = function (view, count, index, conversion, value, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = conversion(+value);\n for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];\n};\n\nif (!NATIVE_ARRAY_BUFFER) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, ArrayBufferPrototype);\n var byteLength = toIndex(length);\n setInternalState(this, {\n bytes: fill(Array(byteLength), 0),\n byteLength: byteLength\n });\n if (!DESCRIPTORS) this.byteLength = byteLength;\n };\n\n ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE];\n\n $DataView = function DataView(buffer, byteOffset, byteLength) {\n anInstance(this, DataViewPrototype);\n anInstance(buffer, ArrayBufferPrototype);\n var bufferLength = getInternalState(buffer).byteLength;\n var offset = toIntegerOrInfinity(byteOffset);\n if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');\n byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n setInternalState(this, {\n buffer: buffer,\n byteLength: byteLength,\n byteOffset: offset\n });\n if (!DESCRIPTORS) {\n this.buffer = buffer;\n this.byteLength = byteLength;\n this.byteOffset = offset;\n }\n };\n\n DataViewPrototype = $DataView[PROTOTYPE];\n\n if (DESCRIPTORS) {\n addGetter($ArrayBuffer, 'byteLength');\n addGetter($DataView, 'buffer');\n addGetter($DataView, 'byteLength');\n addGetter($DataView, 'byteOffset');\n }\n\n defineBuiltIns(DataViewPrototype, {\n getInt8: function getInt8(byteOffset) {\n return get(this, 1, byteOffset)[0] << 24 >> 24;\n },\n getUint8: function getUint8(byteOffset) {\n return get(this, 1, byteOffset)[0];\n },\n getInt16: function getInt16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n },\n getUint16: function getUint16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return bytes[1] << 8 | bytes[0];\n },\n getInt32: function getInt32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));\n },\n getUint32: function getUint32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;\n },\n getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);\n },\n getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);\n },\n setInt8: function setInt8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setUint8: function setUint8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);\n }\n });\n} else {\n var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME && NativeArrayBuffer.name !== ARRAY_BUFFER;\n /* eslint-disable no-new -- required for testing */\n if (!fails(function () {\n NativeArrayBuffer(1);\n }) || !fails(function () {\n new NativeArrayBuffer(-1);\n }) || fails(function () {\n new NativeArrayBuffer();\n new NativeArrayBuffer(1.5);\n new NativeArrayBuffer(NaN);\n return NativeArrayBuffer.length != 1 || INCORRECT_ARRAY_BUFFER_NAME && !CONFIGURABLE_FUNCTION_NAME;\n })) {\n /* eslint-enable no-new -- required for testing */\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, ArrayBufferPrototype);\n return new NativeArrayBuffer(toIndex(length));\n };\n\n $ArrayBuffer[PROTOTYPE] = ArrayBufferPrototype;\n\n for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {\n if (!((key = keys[j++]) in $ArrayBuffer)) {\n createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);\n }\n }\n\n ArrayBufferPrototype.constructor = $ArrayBuffer;\n } else if (INCORRECT_ARRAY_BUFFER_NAME && CONFIGURABLE_FUNCTION_NAME) {\n createNonEnumerableProperty(NativeArrayBuffer, 'name', ARRAY_BUFFER);\n }\n\n // WebKit bug - the same parent prototype for typed arrays and data view\n if (setPrototypeOf && getPrototypeOf(DataViewPrototype) !== ObjectPrototype) {\n setPrototypeOf(DataViewPrototype, ObjectPrototype);\n }\n\n // iOS Safari 7.x bug\n var testView = new $DataView(new $ArrayBuffer(2));\n var $setInt8 = uncurryThis(DataViewPrototype.setInt8);\n testView.setInt8(0, 2147483648);\n testView.setInt8(1, 2147483649);\n if (testView.getInt8(0) || !testView.getInt8(1)) defineBuiltIns(DataViewPrototype, {\n setInt8: function setInt8(byteOffset, value) {\n $setInt8(this, byteOffset, value << 24 >> 24);\n },\n setUint8: function setUint8(byteOffset, value) {\n $setInt8(this, byteOffset, value << 24 >> 24);\n }\n }, { unsafe: true });\n}\n\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\n\nmodule.exports = {\n ArrayBuffer: $ArrayBuffer,\n DataView: $DataView\n};\n","'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar deletePropertyOrThrow = require('../internals/delete-property-or-throw');\n\nvar min = Math.min;\n\n// `Array.prototype.copyWithin` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.copywithin\n// eslint-disable-next-line es/no-array-prototype-copywithin -- safe\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n var O = toObject(this);\n var len = lengthOfArrayLike(O);\n var to = toAbsoluteIndex(target, len);\n var from = toAbsoluteIndex(start, len);\n var end = arguments.length > 2 ? arguments[2] : undefined;\n var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else deletePropertyOrThrow(O, to);\n to += inc;\n from += inc;\n } return O;\n};\n","var lengthOfArrayLike = require('../internals/length-of-array-like');\n\nmodule.exports = function (Constructor, list) {\n var index = 0;\n var length = lengthOfArrayLike(list);\n var result = new Constructor(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n","var bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.{ findLast, findLastIndex }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_FIND_LAST_INDEX = TYPE == 1;\n return function ($this, callbackfn, that) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that);\n var index = lengthOfArrayLike(self);\n var value, result;\n while (index-- > 0) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (result) switch (TYPE) {\n case 0: return value; // findLast\n case 1: return index; // findLastIndex\n }\n }\n return IS_FIND_LAST_INDEX ? -1 : undefined;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.findLast` method\n // https://github.com/tc39/proposal-array-find-from-last\n findLast: createMethod(0),\n // `Array.prototype.findLastIndex` method\n // https://github.com/tc39/proposal-array-find-from-last\n findLastIndex: createMethod(1)\n};\n","'use strict';\n/* eslint-disable es/no-array-prototype-lastindexof -- safe */\nvar apply = require('../internals/function-apply');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar min = Math.min;\nvar $lastIndexOf = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');\nvar FORCED = NEGATIVE_ZERO || !STRICT_METHOD;\n\n// `Array.prototype.lastIndexOf` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.lastindexof\nmodule.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n // convert -0 to +0\n if (NEGATIVE_ZERO) return apply($lastIndexOf, this, arguments) || 0;\n var O = toIndexedObject(this);\n var length = lengthOfArrayLike(O);\n var index = length - 1;\n if (arguments.length > 1) index = min(index, toIntegerOrInfinity(arguments[1]));\n if (index < 0) index = length + index;\n for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;\n return -1;\n} : $lastIndexOf;\n","'use strict';\nvar defineProperty = require('../internals/object-define-property').f;\nvar create = require('../internals/object-create');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar bind = require('../internals/function-bind-context');\nvar anInstance = require('../internals/an-instance');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar iterate = require('../internals/iterate');\nvar defineIterator = require('../internals/iterator-define');\nvar createIterResultObject = require('../internals/create-iter-result-object');\nvar setSpecies = require('../internals/set-species');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fastKey = require('../internals/internal-metadata').fastKey;\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\n\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var Constructor = wrapper(function (that, iterable) {\n anInstance(that, Prototype);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n index: create(null),\n first: undefined,\n last: undefined,\n size: 0\n });\n if (!DESCRIPTORS) that.size = 0;\n if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n });\n\n var Prototype = Constructor.prototype;\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n var previous, index;\n // change existing entry\n if (entry) {\n entry.value = value;\n // create new entry\n } else {\n state.last = entry = {\n index: index = fastKey(key, true),\n key: key,\n value: value,\n previous: previous = state.last,\n next: undefined,\n removed: false\n };\n if (!state.first) state.first = entry;\n if (previous) previous.next = entry;\n if (DESCRIPTORS) state.size++;\n else that.size++;\n // add to index\n if (index !== 'F') state.index[index] = entry;\n } return that;\n };\n\n var getEntry = function (that, key) {\n var state = getInternalState(that);\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return state.index[index];\n // frozen object case\n for (entry = state.first; entry; entry = entry.next) {\n if (entry.key == key) return entry;\n }\n };\n\n defineBuiltIns(Prototype, {\n // `{ Map, Set }.prototype.clear()` methods\n // https://tc39.es/ecma262/#sec-map.prototype.clear\n // https://tc39.es/ecma262/#sec-set.prototype.clear\n clear: function clear() {\n var that = this;\n var state = getInternalState(that);\n var data = state.index;\n var entry = state.first;\n while (entry) {\n entry.removed = true;\n if (entry.previous) entry.previous = entry.previous.next = undefined;\n delete data[entry.index];\n entry = entry.next;\n }\n state.first = state.last = undefined;\n if (DESCRIPTORS) state.size = 0;\n else that.size = 0;\n },\n // `{ Map, Set }.prototype.delete(key)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.delete\n // https://tc39.es/ecma262/#sec-set.prototype.delete\n 'delete': function (key) {\n var that = this;\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.next;\n var prev = entry.previous;\n delete state.index[entry.index];\n entry.removed = true;\n if (prev) prev.next = next;\n if (next) next.previous = prev;\n if (state.first == entry) state.first = next;\n if (state.last == entry) state.last = prev;\n if (DESCRIPTORS) state.size--;\n else that.size--;\n } return !!entry;\n },\n // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.foreach\n // https://tc39.es/ecma262/#sec-set.prototype.foreach\n forEach: function forEach(callbackfn /* , that = undefined */) {\n var state = getInternalState(this);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n var entry;\n while (entry = entry ? entry.next : state.first) {\n boundFunction(entry.value, entry.key, this);\n // revert to the last existing entry\n while (entry && entry.removed) entry = entry.previous;\n }\n },\n // `{ Map, Set}.prototype.has(key)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.has\n // https://tc39.es/ecma262/#sec-set.prototype.has\n has: function has(key) {\n return !!getEntry(this, key);\n }\n });\n\n defineBuiltIns(Prototype, IS_MAP ? {\n // `Map.prototype.get(key)` method\n // https://tc39.es/ecma262/#sec-map.prototype.get\n get: function get(key) {\n var entry = getEntry(this, key);\n return entry && entry.value;\n },\n // `Map.prototype.set(key, value)` method\n // https://tc39.es/ecma262/#sec-map.prototype.set\n set: function set(key, value) {\n return define(this, key === 0 ? 0 : key, value);\n }\n } : {\n // `Set.prototype.add(value)` method\n // https://tc39.es/ecma262/#sec-set.prototype.add\n add: function add(value) {\n return define(this, value = value === 0 ? 0 : value, value);\n }\n });\n if (DESCRIPTORS) defineProperty(Prototype, 'size', {\n get: function () {\n return getInternalState(this).size;\n }\n });\n return Constructor;\n },\n setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) {\n var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);\n var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);\n // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods\n // https://tc39.es/ecma262/#sec-map.prototype.entries\n // https://tc39.es/ecma262/#sec-map.prototype.keys\n // https://tc39.es/ecma262/#sec-map.prototype.values\n // https://tc39.es/ecma262/#sec-map.prototype-@@iterator\n // https://tc39.es/ecma262/#sec-set.prototype.entries\n // https://tc39.es/ecma262/#sec-set.prototype.keys\n // https://tc39.es/ecma262/#sec-set.prototype.values\n // https://tc39.es/ecma262/#sec-set.prototype-@@iterator\n defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) {\n setInternalState(this, {\n type: ITERATOR_NAME,\n target: iterated,\n state: getInternalCollectionState(iterated),\n kind: kind,\n last: undefined\n });\n }, function () {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var entry = state.last;\n // revert to the last existing entry\n while (entry && entry.removed) entry = entry.previous;\n // get next entry\n if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n // or finish the iteration\n state.target = undefined;\n return createIterResultObject(undefined, true);\n }\n // return step by kind\n if (kind == 'keys') return createIterResultObject(entry.key, false);\n if (kind == 'values') return createIterResultObject(entry.value, false);\n return createIterResultObject([entry.key, entry.value], false);\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // `{ Map, Set }.prototype[@@species]` accessors\n // https://tc39.es/ecma262/#sec-get-map-@@species\n // https://tc39.es/ecma262/#sec-get-set-@@species\n setSpecies(CONSTRUCTOR_NAME);\n }\n};\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar getWeakData = require('../internals/internal-metadata').getWeakData;\nvar anInstance = require('../internals/an-instance');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar isObject = require('../internals/is-object');\nvar iterate = require('../internals/iterate');\nvar ArrayIterationModule = require('../internals/array-iteration');\nvar hasOwn = require('../internals/has-own-property');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\nvar find = ArrayIterationModule.find;\nvar findIndex = ArrayIterationModule.findIndex;\nvar splice = uncurryThis([].splice);\nvar id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function (store) {\n return store.frozen || (store.frozen = new UncaughtFrozenStore());\n};\n\nvar UncaughtFrozenStore = function () {\n this.entries = [];\n};\n\nvar findUncaughtFrozen = function (store, key) {\n return find(store.entries, function (it) {\n return it[0] === key;\n });\n};\n\nUncaughtFrozenStore.prototype = {\n get: function (key) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) return entry[1];\n },\n has: function (key) {\n return !!findUncaughtFrozen(this, key);\n },\n set: function (key, value) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) entry[1] = value;\n else this.entries.push([key, value]);\n },\n 'delete': function (key) {\n var index = findIndex(this.entries, function (it) {\n return it[0] === key;\n });\n if (~index) splice(this.entries, index, 1);\n return !!~index;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var Constructor = wrapper(function (that, iterable) {\n anInstance(that, Prototype);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n id: id++,\n frozen: undefined\n });\n if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n });\n\n var Prototype = Constructor.prototype;\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var data = getWeakData(anObject(key), true);\n if (data === true) uncaughtFrozenStore(state).set(key, value);\n else data[state.id] = value;\n return that;\n };\n\n defineBuiltIns(Prototype, {\n // `{ WeakMap, WeakSet }.prototype.delete(key)` methods\n // https://tc39.es/ecma262/#sec-weakmap.prototype.delete\n // https://tc39.es/ecma262/#sec-weakset.prototype.delete\n 'delete': function (key) {\n var state = getInternalState(this);\n if (!isObject(key)) return false;\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state)['delete'](key);\n return data && hasOwn(data, state.id) && delete data[state.id];\n },\n // `{ WeakMap, WeakSet }.prototype.has(key)` methods\n // https://tc39.es/ecma262/#sec-weakmap.prototype.has\n // https://tc39.es/ecma262/#sec-weakset.prototype.has\n has: function has(key) {\n var state = getInternalState(this);\n if (!isObject(key)) return false;\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state).has(key);\n return data && hasOwn(data, state.id);\n }\n });\n\n defineBuiltIns(Prototype, IS_MAP ? {\n // `WeakMap.prototype.get(key)` method\n // https://tc39.es/ecma262/#sec-weakmap.prototype.get\n get: function get(key) {\n var state = getInternalState(this);\n if (isObject(key)) {\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state).get(key);\n return data ? data[state.id] : undefined;\n }\n },\n // `WeakMap.prototype.set(key, value)` method\n // https://tc39.es/ecma262/#sec-weakmap.prototype.set\n set: function set(key, value) {\n return define(this, key, value);\n }\n } : {\n // `WeakSet.prototype.add(value)` method\n // https://tc39.es/ecma262/#sec-weakset.prototype.add\n add: function add(value) {\n return define(this, value, true);\n }\n });\n\n return Constructor;\n }\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isForced = require('../internals/is-forced');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar iterate = require('../internals/iterate');\nvar anInstance = require('../internals/an-instance');\nvar isCallable = require('../internals/is-callable');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar isObject = require('../internals/is-object');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common) {\n var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n var ADDER = IS_MAP ? 'set' : 'add';\n var NativeConstructor = global[CONSTRUCTOR_NAME];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n var Constructor = NativeConstructor;\n var exported = {};\n\n var fixMethod = function (KEY) {\n var uncurriedNativeMethod = uncurryThis(NativePrototype[KEY]);\n defineBuiltIn(NativePrototype, KEY,\n KEY == 'add' ? function add(value) {\n uncurriedNativeMethod(this, value === 0 ? 0 : value);\n return this;\n } : KEY == 'delete' ? function (key) {\n return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);\n } : KEY == 'get' ? function get(key) {\n return IS_WEAK && !isObject(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key);\n } : KEY == 'has' ? function has(key) {\n return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);\n } : function set(key, value) {\n uncurriedNativeMethod(this, key === 0 ? 0 : key, value);\n return this;\n }\n );\n };\n\n var REPLACE = isForced(\n CONSTRUCTOR_NAME,\n !isCallable(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails(function () {\n new NativeConstructor().entries().next();\n }))\n );\n\n if (REPLACE) {\n // create collection constructor\n Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n InternalMetadataModule.enable();\n } else if (isForced(CONSTRUCTOR_NAME, true)) {\n var instance = new Constructor();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n // eslint-disable-next-line no-new -- required for testing\n var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new NativeConstructor();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n\n if (!ACCEPT_ITERABLES) {\n Constructor = wrapper(function (dummy, iterable) {\n anInstance(dummy, NativePrototype);\n var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);\n if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n return that;\n });\n Constructor.prototype = NativePrototype;\n NativePrototype.constructor = Constructor;\n }\n\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n\n // weak collections should not contains .clear method\n if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;\n }\n\n exported[CONSTRUCTOR_NAME] = Constructor;\n $({ global: true, constructor: true, forced: Constructor != NativeConstructor }, exported);\n\n setToStringTag(Constructor, CONSTRUCTOR_NAME);\n\n if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n return Constructor;\n};\n","var makeBuiltIn = require('../internals/make-built-in');\nvar defineProperty = require('../internals/object-define-property');\n\nmodule.exports = function (target, name, descriptor) {\n if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });\n if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });\n return defineProperty.f(target, name, descriptor);\n};\n","var defineBuiltIn = require('../internals/define-built-in');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) defineBuiltIn(target, key, src[key], options);\n return target;\n};\n","// IEEE754 conversions based on https://github.com/feross/ieee754\nvar $Array = Array;\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nvar pack = function (number, mantissaLength, bytes) {\n var buffer = $Array(bytes);\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;\n var index = 0;\n var exponent, mantissa, c;\n number = abs(number);\n // eslint-disable-next-line no-self-compare -- NaN check\n if (number != number || number === Infinity) {\n // eslint-disable-next-line no-self-compare -- NaN check\n mantissa = number != number ? 1 : 0;\n exponent = eMax;\n } else {\n exponent = floor(log(number) / LN2);\n c = pow(2, -exponent);\n if (number * c < 1) {\n exponent--;\n c *= 2;\n }\n if (exponent + eBias >= 1) {\n number += rt / c;\n } else {\n number += rt * pow(2, 1 - eBias);\n }\n if (number * c >= 2) {\n exponent++;\n c /= 2;\n }\n if (exponent + eBias >= eMax) {\n mantissa = 0;\n exponent = eMax;\n } else if (exponent + eBias >= 1) {\n mantissa = (number * c - 1) * pow(2, mantissaLength);\n exponent = exponent + eBias;\n } else {\n mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);\n exponent = 0;\n }\n }\n while (mantissaLength >= 8) {\n buffer[index++] = mantissa & 255;\n mantissa /= 256;\n mantissaLength -= 8;\n }\n exponent = exponent << mantissaLength | mantissa;\n exponentLength += mantissaLength;\n while (exponentLength > 0) {\n buffer[index++] = exponent & 255;\n exponent /= 256;\n exponentLength -= 8;\n }\n buffer[--index] |= sign * 128;\n return buffer;\n};\n\nvar unpack = function (buffer, mantissaLength) {\n var bytes = buffer.length;\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var nBits = exponentLength - 7;\n var index = bytes - 1;\n var sign = buffer[index--];\n var exponent = sign & 127;\n var mantissa;\n sign >>= 7;\n while (nBits > 0) {\n exponent = exponent * 256 + buffer[index--];\n nBits -= 8;\n }\n mantissa = exponent & (1 << -nBits) - 1;\n exponent >>= -nBits;\n nBits += mantissaLength;\n while (nBits > 0) {\n mantissa = mantissa * 256 + buffer[index--];\n nBits -= 8;\n }\n if (exponent === 0) {\n exponent = 1 - eBias;\n } else if (exponent === eMax) {\n return mantissa ? NaN : sign ? -Infinity : Infinity;\n } else {\n mantissa = mantissa + pow(2, mantissaLength);\n exponent = exponent - eBias;\n } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);\n};\n\nmodule.exports = {\n pack: pack,\n unpack: unpack\n};\n","var classof = require('../internals/classof');\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar slice = uncurryThis(''.slice);\n\nmodule.exports = function (it) {\n return slice(classof(it), 0, 3) === 'Big';\n};\n","var isObject = require('../internals/is-object');\n\nvar floor = Math.floor;\n\n// `IsIntegralNumber` abstract operation\n// https://tc39.es/ecma262/#sec-isintegralnumber\n// eslint-disable-next-line es/no-number-isinteger -- safe\nmodule.exports = Number.isInteger || function isInteger(it) {\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n","// eslint-disable-next-line es/no-math-expm1 -- safe\nvar $expm1 = Math.expm1;\nvar exp = Math.exp;\n\n// `Math.expm1` method implementation\n// https://tc39.es/ecma262/#sec-math.expm1\nmodule.exports = (!$expm1\n // Old FF bug\n || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168\n // Tor Browser bug\n || $expm1(-2e-17) != -2e-17\n) ? function expm1(x) {\n var n = +x;\n return n == 0 ? n : n > -1e-6 && n < 1e-6 ? n + n * n / 2 : exp(n) - 1;\n} : $expm1;\n","var log = Math.log;\nvar LOG10E = Math.LOG10E;\n\n// eslint-disable-next-line es/no-math-log10 -- safe\nmodule.exports = Math.log10 || function log10(x) {\n return log(x) * LOG10E;\n};\n","var global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toString = require('../internals/to-string');\nvar trim = require('../internals/string-trim').trim;\nvar whitespaces = require('../internals/whitespaces');\n\nvar charAt = uncurryThis(''.charAt);\nvar $parseFloat = global.parseFloat;\nvar Symbol = global.Symbol;\nvar ITERATOR = Symbol && Symbol.iterator;\nvar FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity\n // MS Edge 18- broken with boxed symbols\n || (ITERATOR && !fails(function () { $parseFloat(Object(ITERATOR)); }));\n\n// `parseFloat` method\n// https://tc39.es/ecma262/#sec-parsefloat-string\nmodule.exports = FORCED ? function parseFloat(string) {\n var trimmedString = trim(toString(string));\n var result = $parseFloat(trimmedString);\n return result === 0 && charAt(trimmedString, 0) == '-' ? -0 : result;\n} : $parseFloat;\n","// `SameValue` abstract operation\n// https://tc39.es/ecma262/#sec-samevalue\n// eslint-disable-next-line es/no-object-is -- safe\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare -- NaN check\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n","// https://github.com/zloirock/core-js/issues/280\nvar userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /Version\\/10(?:\\.\\d+){1,2}(?: [\\w./]+)?(?: Mobile\\/\\w+)? Safari\\//.test(userAgent);\n","// https://github.com/tc39/proposal-string-pad-start-end\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar $repeat = require('../internals/string-repeat');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar repeat = uncurryThis($repeat);\nvar stringSlice = uncurryThis(''.slice);\nvar ceil = Math.ceil;\n\n// `String.prototype.{ padStart, padEnd }` methods implementation\nvar createMethod = function (IS_END) {\n return function ($this, maxLength, fillString) {\n var S = toString(requireObjectCoercible($this));\n var intMaxLength = toLength(maxLength);\n var stringLength = S.length;\n var fillStr = fillString === undefined ? ' ' : toString(fillString);\n var fillLen, stringFiller;\n if (intMaxLength <= stringLength || fillStr == '') return S;\n fillLen = intMaxLength - stringLength;\n stringFiller = repeat(fillStr, ceil(fillLen / fillStr.length));\n if (stringFiller.length > fillLen) stringFiller = stringSlice(stringFiller, 0, fillLen);\n return IS_END ? S + stringFiller : stringFiller + S;\n };\n};\n\nmodule.exports = {\n // `String.prototype.padStart` method\n // https://tc39.es/ecma262/#sec-string.prototype.padstart\n start: createMethod(false),\n // `String.prototype.padEnd` method\n // https://tc39.es/ecma262/#sec-string.prototype.padend\n end: createMethod(true)\n};\n","var toPrimitive = require('../internals/to-primitive');\n\nvar $TypeError = TypeError;\n\n// `ToBigInt` abstract operation\n// https://tc39.es/ecma262/#sec-tobigint\nmodule.exports = function (argument) {\n var prim = toPrimitive(argument, 'number');\n if (typeof prim == 'number') throw $TypeError(\"Can't convert number to bigint\");\n // eslint-disable-next-line es/no-bigint -- safe\n return BigInt(prim);\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toLength = require('../internals/to-length');\n\nvar $RangeError = RangeError;\n\n// `ToIndex` abstract operation\n// https://tc39.es/ecma262/#sec-toindex\nmodule.exports = function (it) {\n if (it === undefined) return 0;\n var number = toIntegerOrInfinity(it);\n var length = toLength(number);\n if (number !== length) throw $RangeError('Wrong length or index');\n return length;\n};\n","var toPositiveInteger = require('../internals/to-positive-integer');\n\nvar $RangeError = RangeError;\n\nmodule.exports = function (it, BYTES) {\n var offset = toPositiveInteger(it);\n if (offset % BYTES) throw $RangeError('Wrong offset');\n return offset;\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar $RangeError = RangeError;\n\nmodule.exports = function (it) {\n var result = toIntegerOrInfinity(it);\n if (result < 0) throw $RangeError(\"The argument can't be less than 0\");\n return result;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar call = require('../internals/function-call');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayBufferModule = require('../internals/array-buffer');\nvar anInstance = require('../internals/an-instance');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar isIntegralNumber = require('../internals/is-integral-number');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar toOffset = require('../internals/to-offset');\nvar toPropertyKey = require('../internals/to-property-key');\nvar hasOwn = require('../internals/has-own-property');\nvar classof = require('../internals/classof');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar create = require('../internals/object-create');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar typedArrayFrom = require('../internals/typed-array-from');\nvar forEach = require('../internals/array-iteration').forEach;\nvar setSpecies = require('../internals/set-species');\nvar definePropertyModule = require('../internals/object-define-property');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar InternalStateModule = require('../internals/internal-state');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar enforceInternalState = InternalStateModule.enforce;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar round = Math.round;\nvar RangeError = global.RangeError;\nvar ArrayBuffer = ArrayBufferModule.ArrayBuffer;\nvar ArrayBufferPrototype = ArrayBuffer.prototype;\nvar DataView = ArrayBufferModule.DataView;\nvar NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;\nvar TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;\nvar TypedArray = ArrayBufferViewCore.TypedArray;\nvar TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar isTypedArray = ArrayBufferViewCore.isTypedArray;\nvar BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\nvar WRONG_LENGTH = 'Wrong length';\n\nvar fromList = function (C, list) {\n aTypedArrayConstructor(C);\n var index = 0;\n var length = list.length;\n var result = new C(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n\nvar addGetter = function (it, key) {\n nativeDefineProperty(it, key, { get: function () {\n return getInternalState(this)[key];\n } });\n};\n\nvar isArrayBuffer = function (it) {\n var klass;\n return isPrototypeOf(ArrayBufferPrototype, it) || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';\n};\n\nvar isTypedArrayIndex = function (target, key) {\n return isTypedArray(target)\n && !isSymbol(key)\n && key in target\n && isIntegralNumber(+key)\n && key >= 0;\n};\n\nvar wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {\n key = toPropertyKey(key);\n return isTypedArrayIndex(target, key)\n ? createPropertyDescriptor(2, target[key])\n : nativeGetOwnPropertyDescriptor(target, key);\n};\n\nvar wrappedDefineProperty = function defineProperty(target, key, descriptor) {\n key = toPropertyKey(key);\n if (isTypedArrayIndex(target, key)\n && isObject(descriptor)\n && hasOwn(descriptor, 'value')\n && !hasOwn(descriptor, 'get')\n && !hasOwn(descriptor, 'set')\n // TODO: add validation descriptor w/o calling accessors\n && !descriptor.configurable\n && (!hasOwn(descriptor, 'writable') || descriptor.writable)\n && (!hasOwn(descriptor, 'enumerable') || descriptor.enumerable)\n ) {\n target[key] = descriptor.value;\n return target;\n } return nativeDefineProperty(target, key, descriptor);\n};\n\nif (DESCRIPTORS) {\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;\n definePropertyModule.f = wrappedDefineProperty;\n addGetter(TypedArrayPrototype, 'buffer');\n addGetter(TypedArrayPrototype, 'byteOffset');\n addGetter(TypedArrayPrototype, 'byteLength');\n addGetter(TypedArrayPrototype, 'length');\n }\n\n $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {\n getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,\n defineProperty: wrappedDefineProperty\n });\n\n module.exports = function (TYPE, wrapper, CLAMPED) {\n var BYTES = TYPE.match(/\\d+$/)[0] / 8;\n var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';\n var GETTER = 'get' + TYPE;\n var SETTER = 'set' + TYPE;\n var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];\n var TypedArrayConstructor = NativeTypedArrayConstructor;\n var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;\n var exported = {};\n\n var getter = function (that, index) {\n var data = getInternalState(that);\n return data.view[GETTER](index * BYTES + data.byteOffset, true);\n };\n\n var setter = function (that, index, value) {\n var data = getInternalState(that);\n if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;\n data.view[SETTER](index * BYTES + data.byteOffset, value, true);\n };\n\n var addElement = function (that, index) {\n nativeDefineProperty(that, index, {\n get: function () {\n return getter(this, index);\n },\n set: function (value) {\n return setter(this, index, value);\n },\n enumerable: true\n });\n };\n\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n TypedArrayConstructor = wrapper(function (that, data, offset, $length) {\n anInstance(that, TypedArrayConstructorPrototype);\n var index = 0;\n var byteOffset = 0;\n var buffer, byteLength, length;\n if (!isObject(data)) {\n length = toIndex(data);\n byteLength = length * BYTES;\n buffer = new ArrayBuffer(byteLength);\n } else if (isArrayBuffer(data)) {\n buffer = data;\n byteOffset = toOffset(offset, BYTES);\n var $len = data.byteLength;\n if ($length === undefined) {\n if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n byteLength = $len - byteOffset;\n if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n } else {\n byteLength = toLength($length) * BYTES;\n if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);\n }\n length = byteLength / BYTES;\n } else if (isTypedArray(data)) {\n return fromList(TypedArrayConstructor, data);\n } else {\n return call(typedArrayFrom, TypedArrayConstructor, data);\n }\n setInternalState(that, {\n buffer: buffer,\n byteOffset: byteOffset,\n byteLength: byteLength,\n length: length,\n view: new DataView(buffer)\n });\n while (index < length) addElement(that, index++);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);\n } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {\n TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {\n anInstance(dummy, TypedArrayConstructorPrototype);\n return inheritIfRequired(function () {\n if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));\n if (isArrayBuffer(data)) return $length !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)\n : typedArrayOffset !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))\n : new NativeTypedArrayConstructor(data);\n if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);\n return call(typedArrayFrom, TypedArrayConstructor, data);\n }(), dummy, TypedArrayConstructor);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {\n if (!(key in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);\n }\n });\n TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;\n }\n\n if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);\n }\n\n enforceInternalState(TypedArrayConstructorPrototype).TypedArrayConstructor = TypedArrayConstructor;\n\n if (TYPED_ARRAY_TAG) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);\n }\n\n var FORCED = TypedArrayConstructor != NativeTypedArrayConstructor;\n\n exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;\n\n $({ global: true, constructor: true, forced: FORCED, sham: !NATIVE_ARRAY_BUFFER_VIEWS }, exported);\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);\n }\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);\n }\n\n setSpecies(CONSTRUCTOR_NAME);\n };\n} else module.exports = function () { /* empty */ };\n","/* eslint-disable no-new -- required for testing */\nvar global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar NATIVE_ARRAY_BUFFER_VIEWS = require('../internals/array-buffer-view-core').NATIVE_ARRAY_BUFFER_VIEWS;\n\nvar ArrayBuffer = global.ArrayBuffer;\nvar Int8Array = global.Int8Array;\n\nmodule.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {\n Int8Array(1);\n}) || !fails(function () {\n new Int8Array(-1);\n}) || !checkCorrectnessOfIteration(function (iterable) {\n new Int8Array();\n new Int8Array(null);\n new Int8Array(1.5);\n new Int8Array(iterable);\n}, true) || fails(function () {\n // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill\n return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;\n});\n","var arrayFromConstructorAndList = require('../internals/array-from-constructor-and-list');\nvar typedArraySpeciesConstructor = require('../internals/typed-array-species-constructor');\n\nmodule.exports = function (instance, list) {\n return arrayFromConstructorAndList(typedArraySpeciesConstructor(instance), list);\n};\n","var bind = require('../internals/function-bind-context');\nvar call = require('../internals/function-call');\nvar aConstructor = require('../internals/a-constructor');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar isBigIntArray = require('../internals/is-big-int-array');\nvar aTypedArrayConstructor = require('../internals/array-buffer-view-core').aTypedArrayConstructor;\nvar toBigInt = require('../internals/to-big-int');\n\nmodule.exports = function from(source /* , mapfn, thisArg */) {\n var C = aConstructor(this);\n var O = toObject(source);\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iteratorMethod = getIteratorMethod(O);\n var i, length, result, thisIsBigIntArray, value, step, iterator, next;\n if (iteratorMethod && !isArrayIteratorMethod(iteratorMethod)) {\n iterator = getIterator(O, iteratorMethod);\n next = iterator.next;\n O = [];\n while (!(step = call(next, iterator)).done) {\n O.push(step.value);\n }\n }\n if (mapping && argumentsLength > 2) {\n mapfn = bind(mapfn, arguments[2]);\n }\n length = lengthOfArrayLike(O);\n result = new (aTypedArrayConstructor(C))(length);\n thisIsBigIntArray = isBigIntArray(result);\n for (i = 0; length > i; i++) {\n value = mapping ? mapfn(O[i], i) : O[i];\n // FF30- typed arrays doesn't properly convert objects to typed array values\n result[i] = thisIsBigIntArray ? toBigInt(value) : +value;\n }\n return result;\n};\n","var ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar speciesConstructor = require('../internals/species-constructor');\n\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor;\n\n// a part of `TypedArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#typedarray-species-create\nmodule.exports = function (originalArray) {\n return aTypedArrayConstructor(speciesConstructor(originalArray, getTypedArrayConstructor(originalArray)));\n};\n","var global = require('../internals/global');\nvar setToStringTag = require('../internals/set-to-string-tag');\n\n// JSON[@@toStringTag] property\n// https://tc39.es/ecma262/#sec-json-@@tostringtag\nsetToStringTag(global.JSON, 'JSON', true);\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Map` constructor\n// https://tc39.es/ecma262/#sec-map-objects\ncollection('Map', function (init) {\n return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n","// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/es.map.constructor');\n","var $ = require('../internals/export');\n\n// eslint-disable-next-line es/no-math-asinh -- required for testing\nvar $asinh = Math.asinh;\nvar log = Math.log;\nvar sqrt = Math.sqrt;\n\nfunction asinh(x) {\n var n = +x;\n return !isFinite(n) || n == 0 ? n : n < 0 ? -asinh(-n) : log(n + sqrt(n * n + 1));\n}\n\n// `Math.asinh` method\n// https://tc39.es/ecma262/#sec-math.asinh\n// Tor Browser bug: Math.asinh(0) -> -0\n$({ target: 'Math', stat: true, forced: !($asinh && 1 / $asinh(0) > 0) }, {\n asinh: asinh\n});\n","var $ = require('../internals/export');\nvar log10 = require('../internals/math-log10');\n\n// `Math.log10` method\n// https://tc39.es/ecma262/#sec-math.log10\n$({ target: 'Math', stat: true }, {\n log10: log10\n});\n","var $ = require('../internals/export');\n\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\n// `Math.log2` method\n// https://tc39.es/ecma262/#sec-math.log2\n$({ target: 'Math', stat: true }, {\n log2: function log2(x) {\n return log(x) / LN2;\n }\n});\n","var $ = require('../internals/export');\nvar sign = require('../internals/math-sign');\n\n// `Math.sign` method\n// https://tc39.es/ecma262/#sec-math.sign\n$({ target: 'Math', stat: true }, {\n sign: sign\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar expm1 = require('../internals/math-expm1');\n\nvar abs = Math.abs;\nvar exp = Math.exp;\nvar E = Math.E;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line es/no-math-sinh -- required for testing\n return Math.sinh(-2e-17) != -2e-17;\n});\n\n// `Math.sinh` method\n// https://tc39.es/ecma262/#sec-math.sinh\n// V8 near Chromium 38 has a problem with very small numbers\n$({ target: 'Math', stat: true, forced: FORCED }, {\n sinh: function sinh(x) {\n var n = +x;\n return abs(n) < 1 ? (expm1(n) - expm1(-n)) / 2 : (exp(n - 1) - exp(-n - 1)) * (E / 2);\n }\n});\n","var setToStringTag = require('../internals/set-to-string-tag');\n\n// Math[@@toStringTag] property\n// https://tc39.es/ecma262/#sec-math-@@tostringtag\nsetToStringTag(Math, 'Math', true);\n","var $ = require('../internals/export');\nvar $entries = require('../internals/object-to-array').entries;\n\n// `Object.entries` method\n// https://tc39.es/ecma262/#sec-object.entries\n$({ target: 'Object', stat: true }, {\n entries: function entries(O) {\n return $entries(O);\n }\n});\n","var $ = require('../internals/export');\nvar $parseFloat = require('../internals/number-parse-float');\n\n// `parseFloat` method\n// https://tc39.es/ecma262/#sec-parsefloat-string\n$({ global: true, forced: parseFloat != $parseFloat }, {\n parseFloat: $parseFloat\n});\n","var global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar regExpFlags = require('../internals/regexp-flags');\nvar fails = require('../internals/fails');\n\n// babel-minify and Closure Compiler transpiles RegExp('.', 'd') -> /./d and it causes SyntaxError\nvar RegExp = global.RegExp;\nvar RegExpPrototype = RegExp.prototype;\n\nvar FORCED = DESCRIPTORS && fails(function () {\n var INDICES_SUPPORT = true;\n try {\n RegExp('.', 'd');\n } catch (error) {\n INDICES_SUPPORT = false;\n }\n\n var O = {};\n // modern V8 bug\n var calls = '';\n var expected = INDICES_SUPPORT ? 'dgimsy' : 'gimsy';\n\n var addGetter = function (key, chr) {\n // eslint-disable-next-line es/no-object-defineproperty -- safe\n Object.defineProperty(O, key, { get: function () {\n calls += chr;\n return true;\n } });\n };\n\n var pairs = {\n dotAll: 's',\n global: 'g',\n ignoreCase: 'i',\n multiline: 'm',\n sticky: 'y'\n };\n\n if (INDICES_SUPPORT) pairs.hasIndices = 'd';\n\n for (var key in pairs) addGetter(key, pairs[key]);\n\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n var result = Object.getOwnPropertyDescriptor(RegExpPrototype, 'flags').get.call(O);\n\n return result !== expected || calls !== expected;\n});\n\n// `RegExp.prototype.flags` getter\n// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags\nif (FORCED) defineBuiltInAccessor(RegExpPrototype, 'flags', {\n configurable: true,\n get: regExpFlags\n});\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Set` constructor\n// https://tc39.es/ecma262/#sec-set-objects\ncollection('Set', function (init) {\n return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n","// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/es.set.constructor');\n","'use strict';\nvar $ = require('../internals/export');\nvar $padStart = require('../internals/string-pad').start;\nvar WEBKIT_BUG = require('../internals/string-pad-webkit-bug');\n\n// `String.prototype.padStart` method\n// https://tc39.es/ecma262/#sec-string.prototype.padstart\n$({ target: 'String', proto: true, forced: WEBKIT_BUG }, {\n padStart: function padStart(maxLength /* , fillString = ' ' */) {\n return $padStart(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar isCallable = require('../internals/is-callable');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar isRegExp = require('../internals/is-regexp');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar getRegExpFlags = require('../internals/regexp-get-flags');\nvar getSubstitution = require('../internals/get-substitution');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar REPLACE = wellKnownSymbol('replace');\nvar $TypeError = TypeError;\nvar indexOf = uncurryThis(''.indexOf);\nvar replace = uncurryThis(''.replace);\nvar stringSlice = uncurryThis(''.slice);\nvar max = Math.max;\n\nvar stringIndexOf = function (string, searchValue, fromIndex) {\n if (fromIndex > string.length) return -1;\n if (searchValue === '') return fromIndex;\n return indexOf(string, searchValue, fromIndex);\n};\n\n// `String.prototype.replaceAll` method\n// https://tc39.es/ecma262/#sec-string.prototype.replaceall\n$({ target: 'String', proto: true }, {\n replaceAll: function replaceAll(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var IS_REG_EXP, flags, replacer, string, searchString, functionalReplace, searchLength, advanceBy, replacement;\n var position = 0;\n var endOfLastMatch = 0;\n var result = '';\n if (!isNullOrUndefined(searchValue)) {\n IS_REG_EXP = isRegExp(searchValue);\n if (IS_REG_EXP) {\n flags = toString(requireObjectCoercible(getRegExpFlags(searchValue)));\n if (!~indexOf(flags, 'g')) throw $TypeError('`.replaceAll` does not allow non-global regexes');\n }\n replacer = getMethod(searchValue, REPLACE);\n if (replacer) {\n return call(replacer, searchValue, O, replaceValue);\n } else if (IS_PURE && IS_REG_EXP) {\n return replace(toString(O), searchValue, replaceValue);\n }\n }\n string = toString(O);\n searchString = toString(searchValue);\n functionalReplace = isCallable(replaceValue);\n if (!functionalReplace) replaceValue = toString(replaceValue);\n searchLength = searchString.length;\n advanceBy = max(1, searchLength);\n position = stringIndexOf(string, searchString, 0);\n while (position !== -1) {\n replacement = functionalReplace\n ? toString(replaceValue(searchString, position, string))\n : getSubstitution(searchString, string, position, [], undefined, replaceValue);\n result += stringSlice(string, endOfLastMatch, position) + replacement;\n endOfLastMatch = position + searchLength;\n position = stringIndexOf(string, searchString, position + advanceBy);\n }\n if (endOfLastMatch < string.length) {\n result += stringSlice(string, endOfLastMatch);\n }\n return result;\n }\n});\n","'use strict';\nvar call = require('../internals/function-call');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar sameValue = require('../internals/same-value');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@search logic\nfixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {\n return [\n // `String.prototype.search` method\n // https://tc39.es/ecma262/#sec-string.prototype.search\n function search(regexp) {\n var O = requireObjectCoercible(this);\n var searcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, SEARCH);\n return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));\n },\n // `RegExp.prototype[@@search]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@search\n function (string) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(nativeSearch, rx, S);\n\n if (res.done) return res.value;\n\n var previousLastIndex = rx.lastIndex;\n if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;\n var result = regExpExec(rx, S);\n if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;\n return result === null ? -1 : result.index;\n }\n ];\n});\n","var defineWellKnownSymbol = require('../internals/well-known-symbol-define');\n\n// `Symbol.asyncIterator` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.asynciterator\ndefineWellKnownSymbol('asyncIterator');\n","var getBuiltIn = require('../internals/get-built-in');\nvar defineWellKnownSymbol = require('../internals/well-known-symbol-define');\nvar setToStringTag = require('../internals/set-to-string-tag');\n\n// `Symbol.toStringTag` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.tostringtag\ndefineWellKnownSymbol('toStringTag');\n\n// `Symbol.prototype[@@toStringTag]` property\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag\nsetToStringTag(getBuiltIn('Symbol'), 'Symbol');\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.at` method\n// https://github.com/tc39/proposal-relative-indexing-method\nexportTypedArrayMethod('at', function at(index) {\n var O = aTypedArray(this);\n var len = lengthOfArrayLike(O);\n var relativeIndex = toIntegerOrInfinity(index);\n var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;\n return (k < 0 || k >= len) ? undefined : O[k];\n});\n","'use strict';\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $ArrayCopyWithin = require('../internals/array-copy-within');\n\nvar u$ArrayCopyWithin = uncurryThis($ArrayCopyWithin);\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.copyWithin` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin\nexportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) {\n return u$ArrayCopyWithin(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $every = require('../internals/array-iteration').every;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.every` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.every\nexportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) {\n return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $fill = require('../internals/array-fill');\nvar toBigInt = require('../internals/to-big-int');\nvar classof = require('../internals/classof');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar slice = uncurryThis(''.slice);\n\n// V8 ~ Chrome < 59, Safari < 14.1, FF < 55, Edge <=18\nvar CONVERSION_BUG = fails(function () {\n var count = 0;\n // eslint-disable-next-line es/no-typed-arrays -- safe\n new Int8Array(2).fill({ valueOf: function () { return count++; } });\n return count !== 1;\n});\n\n// `%TypedArray%.prototype.fill` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill\nexportTypedArrayMethod('fill', function fill(value /* , start, end */) {\n var length = arguments.length;\n aTypedArray(this);\n var actualValue = slice(classof(this), 0, 3) === 'Big' ? toBigInt(value) : +value;\n return call($fill, this, actualValue, length > 1 ? arguments[1] : undefined, length > 2 ? arguments[2] : undefined);\n}, CONVERSION_BUG);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $filter = require('../internals/array-iteration').filter;\nvar fromSpeciesAndList = require('../internals/typed-array-from-species-and-list');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.filter` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter\nexportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {\n var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n return fromSpeciesAndList(this, list);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $findIndex = require('../internals/array-iteration').findIndex;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.findIndex` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex\nexportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) {\n return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $findLastIndex = require('../internals/array-iteration-from-last').findLastIndex;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.findLastIndex` method\n// https://github.com/tc39/proposal-array-find-from-last\nexportTypedArrayMethod('findLastIndex', function findLastIndex(predicate /* , thisArg */) {\n return $findLastIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $findLast = require('../internals/array-iteration-from-last').findLast;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.findLast` method\n// https://github.com/tc39/proposal-array-find-from-last\nexportTypedArrayMethod('findLast', function findLast(predicate /* , thisArg */) {\n return $findLast(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $find = require('../internals/array-iteration').find;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.find` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.find\nexportTypedArrayMethod('find', function find(predicate /* , thisArg */) {\n return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.forEach` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach\nexportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) {\n $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $includes = require('../internals/array-includes').includes;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.includes` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes\nexportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) {\n return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $indexOf = require('../internals/array-includes').indexOf;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.indexOf` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof\nexportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) {\n return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayIterators = require('../modules/es.array.iterator');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar Uint8Array = global.Uint8Array;\nvar arrayValues = uncurryThis(ArrayIterators.values);\nvar arrayKeys = uncurryThis(ArrayIterators.keys);\nvar arrayEntries = uncurryThis(ArrayIterators.entries);\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar TypedArrayPrototype = Uint8Array && Uint8Array.prototype;\n\nvar GENERIC = !fails(function () {\n TypedArrayPrototype[ITERATOR].call([1]);\n});\n\nvar ITERATOR_IS_VALUES = !!TypedArrayPrototype\n && TypedArrayPrototype.values\n && TypedArrayPrototype[ITERATOR] === TypedArrayPrototype.values\n && TypedArrayPrototype.values.name === 'values';\n\nvar typedArrayValues = function values() {\n return arrayValues(aTypedArray(this));\n};\n\n// `%TypedArray%.prototype.entries` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries\nexportTypedArrayMethod('entries', function entries() {\n return arrayEntries(aTypedArray(this));\n}, GENERIC);\n// `%TypedArray%.prototype.keys` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys\nexportTypedArrayMethod('keys', function keys() {\n return arrayKeys(aTypedArray(this));\n}, GENERIC);\n// `%TypedArray%.prototype.values` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values\nexportTypedArrayMethod('values', typedArrayValues, GENERIC || !ITERATOR_IS_VALUES, { name: 'values' });\n// `%TypedArray%.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator\nexportTypedArrayMethod(ITERATOR, typedArrayValues, GENERIC || !ITERATOR_IS_VALUES, { name: 'values' });\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $join = uncurryThis([].join);\n\n// `%TypedArray%.prototype.join` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join\nexportTypedArrayMethod('join', function join(separator) {\n return $join(aTypedArray(this), separator);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar apply = require('../internals/function-apply');\nvar $lastIndexOf = require('../internals/array-last-index-of');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.lastIndexOf` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof\nexportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {\n var length = arguments.length;\n return apply($lastIndexOf, aTypedArray(this), length > 1 ? [searchElement, arguments[1]] : [searchElement]);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $map = require('../internals/array-iteration').map;\nvar typedArraySpeciesConstructor = require('../internals/typed-array-species-constructor');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.map` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map\nexportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {\n return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {\n return new (typedArraySpeciesConstructor(O))(length);\n });\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $reduceRight = require('../internals/array-reduce').right;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.reduceRight` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright\nexportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) {\n var length = arguments.length;\n return $reduceRight(aTypedArray(this), callbackfn, length, length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $reduce = require('../internals/array-reduce').left;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.reduce` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce\nexportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) {\n var length = arguments.length;\n return $reduce(aTypedArray(this), callbackfn, length, length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar floor = Math.floor;\n\n// `%TypedArray%.prototype.reverse` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse\nexportTypedArrayMethod('reverse', function reverse() {\n var that = this;\n var length = aTypedArray(that).length;\n var middle = floor(length / 2);\n var index = 0;\n var value;\n while (index < middle) {\n value = that[index];\n that[index++] = that[--length];\n that[length] = value;\n } return that;\n});\n","'use strict';\nvar global = require('../internals/global');\nvar call = require('../internals/function-call');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toOffset = require('../internals/to-offset');\nvar toIndexedObject = require('../internals/to-object');\nvar fails = require('../internals/fails');\n\nvar RangeError = global.RangeError;\nvar Int8Array = global.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar $set = Int8ArrayPrototype && Int8ArrayPrototype.set;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS = !fails(function () {\n // eslint-disable-next-line es/no-typed-arrays -- required for testing\n var array = new Uint8ClampedArray(2);\n call($set, array, { length: 1, 0: 3 }, 1);\n return array[1] !== 3;\n});\n\n// https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other\nvar TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {\n var array = new Int8Array(2);\n array.set(1);\n array.set('2', 1);\n return array[0] !== 0 || array[1] !== 2;\n});\n\n// `%TypedArray%.prototype.set` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set\nexportTypedArrayMethod('set', function set(arrayLike /* , offset */) {\n aTypedArray(this);\n var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);\n var src = toIndexedObject(arrayLike);\n if (WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset);\n var length = this.length;\n var len = lengthOfArrayLike(src);\n var index = 0;\n if (len + offset > length) throw RangeError('Wrong length');\n while (index < len) this[offset + index] = src[index++];\n}, !WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar typedArraySpeciesConstructor = require('../internals/typed-array-species-constructor');\nvar fails = require('../internals/fails');\nvar arraySlice = require('../internals/array-slice');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line es/no-typed-arrays -- required for testing\n new Int8Array(1).slice();\n});\n\n// `%TypedArray%.prototype.slice` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice\nexportTypedArrayMethod('slice', function slice(start, end) {\n var list = arraySlice(aTypedArray(this), start, end);\n var C = typedArraySpeciesConstructor(this);\n var index = 0;\n var length = list.length;\n var result = new C(length);\n while (length > index) result[index] = list[index++];\n return result;\n}, FORCED);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $some = require('../internals/array-iteration').some;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.some` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.some\nexportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) {\n return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar fails = require('../internals/fails');\nvar aCallable = require('../internals/a-callable');\nvar internalSort = require('../internals/array-sort');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar FF = require('../internals/engine-ff-version');\nvar IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');\nvar V8 = require('../internals/engine-v8-version');\nvar WEBKIT = require('../internals/engine-webkit-version');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar Uint16Array = global.Uint16Array;\nvar nativeSort = Uint16Array && uncurryThis(Uint16Array.prototype.sort);\n\n// WebKit\nvar ACCEPT_INCORRECT_ARGUMENTS = !!nativeSort && !(fails(function () {\n nativeSort(new Uint16Array(2), null);\n}) && fails(function () {\n nativeSort(new Uint16Array(2), {});\n}));\n\nvar STABLE_SORT = !!nativeSort && !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 74;\n if (FF) return FF < 67;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 602;\n\n var array = new Uint16Array(516);\n var expected = Array(516);\n var index, mod;\n\n for (index = 0; index < 516; index++) {\n mod = index % 4;\n array[index] = 515 - index;\n expected[index] = index - 2 * mod + 3;\n }\n\n nativeSort(array, function (a, b) {\n return (a / 4 | 0) - (b / 4 | 0);\n });\n\n for (index = 0; index < 516; index++) {\n if (array[index] !== expected[index]) return true;\n }\n});\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (y !== y) return -1;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (x !== x) return 1;\n if (x === 0 && y === 0) return 1 / x > 0 && 1 / y < 0 ? 1 : -1;\n return x > y;\n };\n};\n\n// `%TypedArray%.prototype.sort` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort\nexportTypedArrayMethod('sort', function sort(comparefn) {\n if (comparefn !== undefined) aCallable(comparefn);\n if (STABLE_SORT) return nativeSort(this, comparefn);\n\n return internalSort(aTypedArray(this), getSortCompare(comparefn));\n}, !STABLE_SORT || ACCEPT_INCORRECT_ARGUMENTS);\n","'use strict';\nvar global = require('../internals/global');\nvar apply = require('../internals/function-apply');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar fails = require('../internals/fails');\nvar arraySlice = require('../internals/array-slice');\n\nvar Int8Array = global.Int8Array;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $toLocaleString = [].toLocaleString;\n\n// iOS Safari 6.x fails here\nvar TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {\n $toLocaleString.call(new Int8Array(1));\n});\n\nvar FORCED = fails(function () {\n return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();\n}) || !fails(function () {\n Int8Array.prototype.toLocaleString.call([1, 2]);\n});\n\n// `%TypedArray%.prototype.toLocaleString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring\nexportTypedArrayMethod('toLocaleString', function toLocaleString() {\n return apply(\n $toLocaleString,\n TO_LOCALE_STRING_BUG ? arraySlice(aTypedArray(this)) : aTypedArray(this),\n arraySlice(arguments)\n );\n}, FORCED);\n","'use strict';\nvar exportTypedArrayMethod = require('../internals/array-buffer-view-core').exportTypedArrayMethod;\nvar fails = require('../internals/fails');\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar Uint8Array = global.Uint8Array;\nvar Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};\nvar arrayToString = [].toString;\nvar join = uncurryThis([].join);\n\nif (fails(function () { arrayToString.call({}); })) {\n arrayToString = function toString() {\n return join(this);\n };\n}\n\nvar IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;\n\n// `%TypedArray%.prototype.toString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring\nexportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint8Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint8', function (init) {\n return function Uint8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","'use strict';\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar collection = require('../internals/collection');\nvar collectionWeak = require('../internals/collection-weak');\nvar isObject = require('../internals/is-object');\nvar isExtensible = require('../internals/object-is-extensible');\nvar enforceInternalState = require('../internals/internal-state').enforce;\nvar NATIVE_WEAK_MAP = require('../internals/weak-map-basic-detection');\n\nvar IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;\nvar InternalWeakMap;\n\nvar wrapper = function (init) {\n return function WeakMap() {\n return init(this, arguments.length ? arguments[0] : undefined);\n };\n};\n\n// `WeakMap` constructor\n// https://tc39.es/ecma262/#sec-weakmap-constructor\nvar $WeakMap = collection('WeakMap', wrapper, collectionWeak);\n\n// IE11 WeakMap frozen keys fix\n// We can't use feature detection because it crash some old IE builds\n// https://github.com/zloirock/core-js/issues/485\nif (NATIVE_WEAK_MAP && IS_IE11) {\n InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);\n InternalMetadataModule.enable();\n var WeakMapPrototype = $WeakMap.prototype;\n var nativeDelete = uncurryThis(WeakMapPrototype['delete']);\n var nativeHas = uncurryThis(WeakMapPrototype.has);\n var nativeGet = uncurryThis(WeakMapPrototype.get);\n var nativeSet = uncurryThis(WeakMapPrototype.set);\n defineBuiltIns(WeakMapPrototype, {\n 'delete': function (key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeDelete(this, key) || state.frozen['delete'](key);\n } return nativeDelete(this, key);\n },\n has: function has(key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeHas(this, key) || state.frozen.has(key);\n } return nativeHas(this, key);\n },\n get: function get(key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeHas(this, key) ? nativeGet(this, key) : state.frozen.get(key);\n } return nativeGet(this, key);\n },\n set: function set(key, value) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n nativeHas(this, key) ? nativeSet(this, key, value) : state.frozen.set(key, value);\n } else nativeSet(this, key, value);\n return this;\n }\n });\n}\n","// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/es.weak-map.constructor');\n","var $ = require('../internals/export');\nvar global = require('../internals/global');\nvar microtask = require('../internals/microtask');\nvar aCallable = require('../internals/a-callable');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar process = global.process;\n\n// `queueMicrotask` method\n// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask\n$({ global: true, enumerable: true, dontCallGetSet: true }, {\n queueMicrotask: function queueMicrotask(fn) {\n validateArgumentsLength(arguments.length, 1);\n aCallable(fn);\n var domain = IS_NODE && process.domain;\n microtask(domain ? domain.bind(fn) : fn);\n }\n});\n","var formatDistanceLocale = {\n lessThanXSeconds: {\n one: 'less than a second',\n other: 'less than {{count}} seconds'\n },\n xSeconds: {\n one: '1 second',\n other: '{{count}} seconds'\n },\n halfAMinute: 'half a minute',\n lessThanXMinutes: {\n one: 'less than a minute',\n other: 'less than {{count}} minutes'\n },\n xMinutes: {\n one: '1 minute',\n other: '{{count}} minutes'\n },\n aboutXHours: {\n one: 'about 1 hour',\n other: 'about {{count}} hours'\n },\n xHours: {\n one: '1 hour',\n other: '{{count}} hours'\n },\n xDays: {\n one: '1 day',\n other: '{{count}} days'\n },\n aboutXWeeks: {\n one: 'about 1 week',\n other: 'about {{count}} weeks'\n },\n xWeeks: {\n one: '1 week',\n other: '{{count}} weeks'\n },\n aboutXMonths: {\n one: 'about 1 month',\n other: 'about {{count}} months'\n },\n xMonths: {\n one: '1 month',\n other: '{{count}} months'\n },\n aboutXYears: {\n one: 'about 1 year',\n other: 'about {{count}} years'\n },\n xYears: {\n one: '1 year',\n other: '{{count}} years'\n },\n overXYears: {\n one: 'over 1 year',\n other: 'over {{count}} years'\n },\n almostXYears: {\n one: 'almost 1 year',\n other: 'almost {{count}} years'\n }\n};\n\nvar formatDistance = function formatDistance(token, count, options) {\n var result;\n var tokenValue = formatDistanceLocale[token];\n\n if (typeof tokenValue === 'string') {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace('{{count}}', count.toString());\n }\n\n if (options !== null && options !== void 0 && options.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return 'in ' + result;\n } else {\n return result + ' ago';\n }\n }\n\n return result;\n};\n\nexport default formatDistance;","export default function buildFormatLongFn(args) {\n return function () {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // TODO: Remove String()\n var width = options.width ? String(options.width) : args.defaultWidth;\n var format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n full: 'EEEE, MMMM do, y',\n long: 'MMMM do, y',\n medium: 'MMM d, y',\n short: 'MM/dd/yyyy'\n};\nvar timeFormats = {\n full: 'h:mm:ss a zzzz',\n long: 'h:mm:ss a z',\n medium: 'h:mm:ss a',\n short: 'h:mm a'\n};\nvar dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: '{{date}}, {{time}}',\n short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: 'full'\n }),\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: 'full'\n }),\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: 'full'\n })\n};\nexport default formatLong;","var formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: 'P'\n};\n\nvar formatRelative = function formatRelative(token, _date, _baseDate, _options) {\n return formatRelativeLocale[token];\n};\n\nexport default formatRelative;","export default function buildLocalizeFn(args) {\n return function (dirtyIndex, options) {\n var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';\n var valuesArray;\n\n if (context === 'formatting' && args.formattingValues) {\n var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;\n valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n var _defaultWidth = args.defaultWidth;\n\n var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[_width] || args.values[_defaultWidth];\n }\n\n var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n\n return valuesArray[index];\n };\n}","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n narrow: ['B', 'A'],\n abbreviated: ['BC', 'AD'],\n wide: ['Before Christ', 'Anno Domini']\n};\nvar quarterValues = {\n narrow: ['1', '2', '3', '4'],\n abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],\n wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']\n}; // Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\n\nvar monthValues = {\n narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n};\nvar dayValues = {\n narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n};\nvar dayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n }\n};\nvar formattingDayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n }\n};\n\nvar ordinalNumber = function ordinalNumber(dirtyNumber, _options) {\n var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n var rem100 = number % 100;\n\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + 'st';\n\n case 2:\n return number + 'nd';\n\n case 3:\n return number + 'rd';\n }\n }\n\n return number + 'th';\n};\n\nvar localize = {\n ordinalNumber: ordinalNumber,\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: 'wide'\n }),\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: 'wide',\n argumentCallback: function argumentCallback(quarter) {\n return quarter - 1;\n }\n }),\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: 'wide'\n }),\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: 'wide'\n }),\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: 'wide',\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: 'wide'\n })\n};\nexport default localize;","export default function buildMatchFn(args) {\n return function (string) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var width = options.width;\n var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];\n var matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n\n var matchedString = matchResult[0];\n var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];\n var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n }) : findKey(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n });\n var value;\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback ? options.valueCallback(value) : value;\n var rest = string.slice(matchedString.length);\n return {\n value: value,\n rest: rest\n };\n };\n}\n\nfunction findKey(object, predicate) {\n for (var key in object) {\n if (object.hasOwnProperty(key) && predicate(object[key])) {\n return key;\n }\n }\n\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (var key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n\n return undefined;\n}","export default function buildMatchPatternFn(args) {\n return function (string) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n var matchedString = matchResult[0];\n var parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];\n value = options.valueCallback ? options.valueCallback(value) : value;\n var rest = string.slice(matchedString.length);\n return {\n value: value,\n rest: rest\n };\n };\n}","import buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nimport buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i\n};\nvar parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i]\n};\nvar matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i\n};\nvar parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i\n};\nvar parseMonthPatterns = {\n narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]\n};\nvar matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i\n};\nvar parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]\n};\nvar matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i\n};\nvar parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i\n }\n};\nvar match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: function valueCallback(value) {\n return parseInt(value, 10);\n }\n }),\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseEraPatterns,\n defaultParseWidth: 'any'\n }),\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: 'any',\n valueCallback: function valueCallback(index) {\n return index + 1;\n }\n }),\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: 'any'\n }),\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseDayPatterns,\n defaultParseWidth: 'any'\n }),\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: 'any',\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: 'any'\n })\n};\nexport default match;","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n\n/**\n * @type {Locale}\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}\n * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}\n */\nvar locale = {\n code: 'en-US',\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0\n /* Sunday */\n ,\n firstWeekContainsDate: 1\n }\n};\nexport default locale;","import defaultLocale from \"../../locale/en-US/index.js\";\nexport default defaultLocale;","var defaultOptions = {};\nexport function getDefaultOptions() {\n return defaultOptions;\n}\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}","var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'P':\n return formatLong.date({\n width: 'short'\n });\n\n case 'PP':\n return formatLong.date({\n width: 'medium'\n });\n\n case 'PPP':\n return formatLong.date({\n width: 'long'\n });\n\n case 'PPPP':\n default:\n return formatLong.date({\n width: 'full'\n });\n }\n};\n\nvar timeLongFormatter = function timeLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'p':\n return formatLong.time({\n width: 'short'\n });\n\n case 'pp':\n return formatLong.time({\n width: 'medium'\n });\n\n case 'ppp':\n return formatLong.time({\n width: 'long'\n });\n\n case 'pppp':\n default:\n return formatLong.time({\n width: 'full'\n });\n }\n};\n\nvar dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {\n var matchResult = pattern.match(/(P+)(p+)?/) || [];\n var datePattern = matchResult[1];\n var timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n var dateTimeFormat;\n\n switch (datePattern) {\n case 'P':\n dateTimeFormat = formatLong.dateTime({\n width: 'short'\n });\n break;\n\n case 'PP':\n dateTimeFormat = formatLong.dateTime({\n width: 'medium'\n });\n break;\n\n case 'PPP':\n dateTimeFormat = formatLong.dateTime({\n width: 'long'\n });\n break;\n\n case 'PPPP':\n default:\n dateTimeFormat = formatLong.dateTime({\n width: 'full'\n });\n break;\n }\n\n return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));\n};\n\nvar longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter\n};\nexport default longFormatters;","/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport default function getTimezoneOffsetInMilliseconds(date) {\n var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));\n utcDate.setUTCFullYear(date.getFullYear());\n return date.getTime() - utcDate.getTime();\n}","import getUTCISOWeekYear from \"../getUTCISOWeekYear/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var year = getUTCISOWeekYear(dirtyDate);\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setUTCFullYear(year, 0, 4);\n fourthOfJanuary.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCISOWeek(fourthOfJanuary);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport startOfUTCISOWeekYear from \"../startOfUTCISOWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nexport default function getUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getUTCFullYear();\n var fourthOfJanuaryOfNextYear = new Date(0);\n fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);\n var fourthOfJanuaryOfThisYear = new Date(0);\n fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","import getUTCWeekYear from \"../getUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeekYear(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);\n var year = getUTCWeekYear(dirtyDate, options);\n var firstWeek = new Date(0);\n firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCWeek(firstWeek, options);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport startOfUTCWeekYear from \"../startOfUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCWeek(dirtyDate, options) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function getUTCWeekYear(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getUTCFullYear();\n var defaultOptions = getDefaultOptions();\n var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var firstWeekOfNextYear = new Date(0);\n firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);\n var firstWeekOfThisYear = new Date(0);\n firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","var protectedDayOfYearTokens = ['D', 'DD'];\nvar protectedWeekYearTokens = ['YY', 'YYYY'];\nexport function isProtectedDayOfYearToken(token) {\n return protectedDayOfYearTokens.indexOf(token) !== -1;\n}\nexport function isProtectedWeekYearToken(token) {\n return protectedWeekYearTokens.indexOf(token) !== -1;\n}\nexport function throwProtectedError(token, format, input) {\n if (token === 'YYYY') {\n throw new RangeError(\"Use `yyyy` instead of `YYYY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n } else if (token === 'YY') {\n throw new RangeError(\"Use `yy` instead of `YY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n } else if (token === 'D') {\n throw new RangeError(\"Use `d` instead of `D` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n } else if (token === 'DD') {\n throw new RangeError(\"Use `dd` instead of `DD` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n }\n}","export default function requiredArgs(required, args) {\n if (args.length < required) {\n throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n }\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var weekStartsOn = 1;\n var date = toDate(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeek(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}","export default function toInteger(dirtyNumber) {\n if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {\n return NaN;\n }\n\n var number = Number(dirtyNumber);\n\n if (isNaN(number)) {\n return number;\n }\n\n return number < 0 ? Math.ceil(number) : Math.floor(number);\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 86400000;\nexport default function getUTCDayOfYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var timestamp = date.getTime();\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n var startOfYearTimestamp = date.getTime();\n var difference = timestamp - startOfYearTimestamp;\n return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;\n}","export default function addLeadingZeros(number, targetLength) {\n var sign = number < 0 ? '-' : '';\n var output = Math.abs(number).toString();\n\n while (output.length < targetLength) {\n output = '0' + output;\n }\n\n return sign + output;\n}","import addLeadingZeros from \"../../addLeadingZeros/index.js\";\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nvar formatters = {\n // Year\n y: function y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);\n },\n // Month\n M: function M(date, token) {\n var month = date.getUTCMonth();\n return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n // Day of the month\n d: function d(date, token) {\n return addLeadingZeros(date.getUTCDate(), token.length);\n },\n // AM or PM\n a: function a(date, token) {\n var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n return dayPeriodEnumValue.toUpperCase();\n\n case 'aaa':\n return dayPeriodEnumValue;\n\n case 'aaaaa':\n return dayPeriodEnumValue[0];\n\n case 'aaaa':\n default:\n return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';\n }\n },\n // Hour [1-12]\n h: function h(date, token) {\n return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);\n },\n // Hour [0-23]\n H: function H(date, token) {\n return addLeadingZeros(date.getUTCHours(), token.length);\n },\n // Minute\n m: function m(date, token) {\n return addLeadingZeros(date.getUTCMinutes(), token.length);\n },\n // Second\n s: function s(date, token) {\n return addLeadingZeros(date.getUTCSeconds(), token.length);\n },\n // Fraction of second\n S: function S(date, token) {\n var numberOfDigits = token.length;\n var milliseconds = date.getUTCMilliseconds();\n var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));\n return addLeadingZeros(fractionalSeconds, token.length);\n }\n};\nexport default formatters;","import getUTCDayOfYear from \"../../../_lib/getUTCDayOfYear/index.js\";\nimport getUTCISOWeek from \"../../../_lib/getUTCISOWeek/index.js\";\nimport getUTCISOWeekYear from \"../../../_lib/getUTCISOWeekYear/index.js\";\nimport getUTCWeek from \"../../../_lib/getUTCWeek/index.js\";\nimport getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport addLeadingZeros from \"../../addLeadingZeros/index.js\";\nimport lightFormatters from \"../lightFormatters/index.js\";\nvar dayPeriodEnum = {\n am: 'am',\n pm: 'pm',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\nvar formatters = {\n // Era\n G: function G(date, token, localize) {\n var era = date.getUTCFullYear() > 0 ? 1 : 0;\n\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return localize.era(era, {\n width: 'abbreviated'\n });\n // A, B\n\n case 'GGGGG':\n return localize.era(era, {\n width: 'narrow'\n });\n // Anno Domini, Before Christ\n\n case 'GGGG':\n default:\n return localize.era(era, {\n width: 'wide'\n });\n }\n },\n // Year\n y: function y(date, token, localize) {\n // Ordinal number\n if (token === 'yo') {\n var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, {\n unit: 'year'\n });\n }\n\n return lightFormatters.y(date, token);\n },\n // Local week-numbering year\n Y: function Y(date, token, localize, options) {\n var signedWeekYear = getUTCWeekYear(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year\n\n if (token === 'YY') {\n var twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n } // Ordinal number\n\n\n if (token === 'Yo') {\n return localize.ordinalNumber(weekYear, {\n unit: 'year'\n });\n } // Padding\n\n\n return addLeadingZeros(weekYear, token.length);\n },\n // ISO week-numbering year\n R: function R(date, token) {\n var isoWeekYear = getUTCISOWeekYear(date); // Padding\n\n return addLeadingZeros(isoWeekYear, token.length);\n },\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function u(date, token) {\n var year = date.getUTCFullYear();\n return addLeadingZeros(year, token.length);\n },\n // Quarter\n Q: function Q(date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n return String(quarter);\n // 01, 02, 03, 04\n\n case 'QQ':\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n\n case 'Qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'QQQ':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'QQQQQ':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'QQQQ':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone quarter\n q: function q(date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n return String(quarter);\n // 01, 02, 03, 04\n\n case 'qq':\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n\n case 'qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'qqq':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'qqqqq':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'qqqq':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Month\n M: function M(date, token, localize) {\n var month = date.getUTCMonth();\n\n switch (token) {\n case 'M':\n case 'MM':\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n\n case 'Mo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n\n case 'MMM':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // J, F, ..., D\n\n case 'MMMMM':\n return localize.month(month, {\n width: 'narrow',\n context: 'formatting'\n });\n // January, February, ..., December\n\n case 'MMMM':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone month\n L: function L(date, token, localize) {\n var month = date.getUTCMonth();\n\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return String(month + 1);\n // 01, 02, ..., 12\n\n case 'LL':\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n\n case 'Lo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n\n case 'LLL':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // J, F, ..., D\n\n case 'LLLLL':\n return localize.month(month, {\n width: 'narrow',\n context: 'standalone'\n });\n // January, February, ..., December\n\n case 'LLLL':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Local week of year\n w: function w(date, token, localize, options) {\n var week = getUTCWeek(date, options);\n\n if (token === 'wo') {\n return localize.ordinalNumber(week, {\n unit: 'week'\n });\n }\n\n return addLeadingZeros(week, token.length);\n },\n // ISO week of year\n I: function I(date, token, localize) {\n var isoWeek = getUTCISOWeek(date);\n\n if (token === 'Io') {\n return localize.ordinalNumber(isoWeek, {\n unit: 'week'\n });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n // Day of the month\n d: function d(date, token, localize) {\n if (token === 'do') {\n return localize.ordinalNumber(date.getUTCDate(), {\n unit: 'date'\n });\n }\n\n return lightFormatters.d(date, token);\n },\n // Day of year\n D: function D(date, token, localize) {\n var dayOfYear = getUTCDayOfYear(date);\n\n if (token === 'Do') {\n return localize.ordinalNumber(dayOfYear, {\n unit: 'dayOfYear'\n });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n // Day of week\n E: function E(date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'EEEEE':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'EEEEEE':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'EEEE':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Local day of week\n e: function e(date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case 'e':\n return String(localDayOfWeek);\n // Padded numerical value\n\n case 'ee':\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n\n case 'eo':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n\n case 'eee':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'eeeee':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'eeeeee':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'eeee':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone local day of week\n c: function c(date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n switch (token) {\n // Numerical value (same as in `e`)\n case 'c':\n return String(localDayOfWeek);\n // Padded numerical value\n\n case 'cc':\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n\n case 'co':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n\n case 'ccc':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // T\n\n case 'ccccc':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tu\n\n case 'cccccc':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'standalone'\n });\n // Tuesday\n\n case 'cccc':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // ISO day of week\n i: function i(date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n\n switch (token) {\n // 2\n case 'i':\n return String(isoDayOfWeek);\n // 02\n\n case 'ii':\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n\n case 'io':\n return localize.ordinalNumber(isoDayOfWeek, {\n unit: 'day'\n });\n // Tue\n\n case 'iii':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'iiiii':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'iiiiii':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'iiii':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM or PM\n a: function a(date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'aaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n\n case 'aaaaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'aaaa':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM, PM, midnight, noon\n b: function b(date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n }\n\n switch (token) {\n case 'b':\n case 'bb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'bbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n\n case 'bbbbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'bbbb':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // in the morning, in the afternoon, in the evening, at night\n B: function B(date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'BBBBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'BBBB':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Hour [1-12]\n h: function h(date, token, localize) {\n if (token === 'ho') {\n var hours = date.getUTCHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return lightFormatters.h(date, token);\n },\n // Hour [0-23]\n H: function H(date, token, localize) {\n if (token === 'Ho') {\n return localize.ordinalNumber(date.getUTCHours(), {\n unit: 'hour'\n });\n }\n\n return lightFormatters.H(date, token);\n },\n // Hour [0-11]\n K: function K(date, token, localize) {\n var hours = date.getUTCHours() % 12;\n\n if (token === 'Ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n // Hour [1-24]\n k: function k(date, token, localize) {\n var hours = date.getUTCHours();\n if (hours === 0) hours = 24;\n\n if (token === 'ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n // Minute\n m: function m(date, token, localize) {\n if (token === 'mo') {\n return localize.ordinalNumber(date.getUTCMinutes(), {\n unit: 'minute'\n });\n }\n\n return lightFormatters.m(date, token);\n },\n // Second\n s: function s(date, token, localize) {\n if (token === 'so') {\n return localize.ordinalNumber(date.getUTCSeconds(), {\n unit: 'second'\n });\n }\n\n return lightFormatters.s(date, token);\n },\n // Fraction of second\n S: function S(date, token) {\n return lightFormatters.S(date, token);\n },\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function X(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return 'Z';\n }\n\n switch (token) {\n // Hours and optional minutes\n case 'X':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n\n case 'XXXX':\n case 'XX':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n\n case 'XXXXX':\n case 'XXX': // Hours and minutes with `:` delimiter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function x(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case 'x':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n\n case 'xxxx':\n case 'xx':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n\n case 'xxxxx':\n case 'xxx': // Hours and minutes with `:` delimiter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (GMT)\n O: function O(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'O':\n case 'OO':\n case 'OOO':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'OOOO':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (specific non-location)\n z: function z(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'z':\n case 'zz':\n case 'zzz':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'zzzz':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Seconds timestamp\n t: function t(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = Math.floor(originalDate.getTime() / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n // Milliseconds timestamp\n T: function T(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = originalDate.getTime();\n return addLeadingZeros(timestamp, token.length);\n }\n};\n\nfunction formatTimezoneShort(offset, dirtyDelimiter) {\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = Math.floor(absOffset / 60);\n var minutes = absOffset % 60;\n\n if (minutes === 0) {\n return sign + String(hours);\n }\n\n var delimiter = dirtyDelimiter || '';\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {\n if (offset % 60 === 0) {\n var sign = offset > 0 ? '-' : '+';\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n\n return formatTimezone(offset, dirtyDelimiter);\n}\n\nfunction formatTimezone(offset, dirtyDelimiter) {\n var delimiter = dirtyDelimiter || '';\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);\n var minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n\nexport default formatters;","import isValid from \"../isValid/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport formatters from \"../_lib/format/formatters/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport defaultLocale from \"../_lib/defaultLocale/index.js\"; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\n\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\n\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n/**\n * @name format\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}\n * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param {Date|Number} date - the original date\n * @param {String} format - the string of tokens\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @returns {String} the formatted date string\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `localize` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\n\nexport default function format(dirtyDate, dirtyFormatStr, options) {\n var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;\n\n requiredArgs(2, arguments);\n var formatStr = String(dirtyFormatStr);\n var defaultOptions = getDefaultOptions();\n var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;\n var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n if (!locale.localize) {\n throw new RangeError('locale must contain localize property');\n }\n\n if (!locale.formatLong) {\n throw new RangeError('locale must contain formatLong property');\n }\n\n var originalDate = toDate(dirtyDate);\n\n if (!isValid(originalDate)) {\n throw new RangeError('Invalid time value');\n } // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n // This ensures that when UTC functions will be implemented, locales will be compatible with them.\n // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376\n\n\n var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);\n var utcDate = subMilliseconds(originalDate, timezoneOffset);\n var formatterOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale,\n _originalDate: originalDate\n };\n var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {\n var firstCharacter = substring[0];\n\n if (firstCharacter === 'p' || firstCharacter === 'P') {\n var longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n\n return substring;\n }).join('').match(formattingTokensRegExp).map(function (substring) {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return \"'\";\n }\n\n var firstCharacter = substring[0];\n\n if (firstCharacter === \"'\") {\n return cleanEscapedString(substring);\n }\n\n var formatter = formatters[firstCharacter];\n\n if (formatter) {\n if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {\n throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));\n }\n\n if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {\n throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));\n }\n\n return formatter(utcDate, substring, locale.localize, formatterOptions);\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n }\n\n return substring;\n }).join('');\n return result;\n}\n\nfunction cleanEscapedString(input) {\n var matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param {*} value - the value to check\n * @returns {boolean} true if the given value is a date\n * @throws {TypeError} 1 arguments required\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\n\nexport default function isDate(value) {\n requiredArgs(1, arguments);\n return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';\n}","import isDate from \"../isDate/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {*} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertable into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\n\nexport default function isValid(dirtyDate) {\n requiredArgs(1, arguments);\n\n if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {\n return false;\n }\n\n var date = toDate(dirtyDate);\n return !isNaN(Number(date));\n}","export default function assign(target, object) {\n if (target == null) {\n throw new TypeError('assign requires that input parameter not be null or undefined');\n }\n\n for (var property in object) {\n if (Object.prototype.hasOwnProperty.call(object, property)) {\n ;\n target[property] = object[property];\n }\n }\n\n return target;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar TIMEZONE_UNIT_PRIORITY = 10;\nexport var Setter = /*#__PURE__*/function () {\n function Setter() {\n _classCallCheck(this, Setter);\n\n _defineProperty(this, \"subPriority\", 0);\n }\n\n _createClass(Setter, [{\n key: \"validate\",\n value: function validate(_utcDate, _options) {\n return true;\n }\n }]);\n\n return Setter;\n}();\nexport var ValueSetter = /*#__PURE__*/function (_Setter) {\n _inherits(ValueSetter, _Setter);\n\n var _super = _createSuper(ValueSetter);\n\n function ValueSetter(value, validateValue, setValue, priority, subPriority) {\n var _this;\n\n _classCallCheck(this, ValueSetter);\n\n _this = _super.call(this);\n _this.value = value;\n _this.validateValue = validateValue;\n _this.setValue = setValue;\n _this.priority = priority;\n\n if (subPriority) {\n _this.subPriority = subPriority;\n }\n\n return _this;\n }\n\n _createClass(ValueSetter, [{\n key: \"validate\",\n value: function validate(utcDate, options) {\n return this.validateValue(utcDate, this.value, options);\n }\n }, {\n key: \"set\",\n value: function set(utcDate, flags, options) {\n return this.setValue(utcDate, flags, this.value, options);\n }\n }]);\n\n return ValueSetter;\n}(Setter);\nexport var DateToSystemTimezoneSetter = /*#__PURE__*/function (_Setter2) {\n _inherits(DateToSystemTimezoneSetter, _Setter2);\n\n var _super2 = _createSuper(DateToSystemTimezoneSetter);\n\n function DateToSystemTimezoneSetter() {\n var _this2;\n\n _classCallCheck(this, DateToSystemTimezoneSetter);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this2 = _super2.call.apply(_super2, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this2), \"priority\", TIMEZONE_UNIT_PRIORITY);\n\n _defineProperty(_assertThisInitialized(_this2), \"subPriority\", -1);\n\n return _this2;\n }\n\n _createClass(DateToSystemTimezoneSetter, [{\n key: \"set\",\n value: function set(date, flags) {\n if (flags.timestampIsSet) {\n return date;\n }\n\n var convertedDate = new Date(0);\n convertedDate.setFullYear(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n convertedDate.setHours(date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds());\n return convertedDate;\n }\n }]);\n\n return DateToSystemTimezoneSetter;\n}(Setter);","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nimport { ValueSetter } from \"./Setter.js\";\nexport var Parser = /*#__PURE__*/function () {\n function Parser() {\n _classCallCheck(this, Parser);\n }\n\n _createClass(Parser, [{\n key: \"run\",\n value: function run(dateString, token, match, options) {\n var result = this.parse(dateString, token, match, options);\n\n if (!result) {\n return null;\n }\n\n return {\n setter: new ValueSetter(result.value, this.validate, this.set, this.priority, this.subPriority),\n rest: result.rest\n };\n }\n }, {\n key: \"validate\",\n value: function validate(_utcDate, _value, _options) {\n return true;\n }\n }]);\n\n return Parser;\n}();","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nexport var EraParser = /*#__PURE__*/function (_Parser) {\n _inherits(EraParser, _Parser);\n\n var _super = _createSuper(EraParser);\n\n function EraParser() {\n var _this;\n\n _classCallCheck(this, EraParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 140);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['R', 'u', 't', 'T']);\n\n return _this;\n }\n\n _createClass(EraParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return match.era(dateString, {\n width: 'abbreviated'\n }) || match.era(dateString, {\n width: 'narrow'\n });\n // A, B\n\n case 'GGGGG':\n return match.era(dateString, {\n width: 'narrow'\n });\n // Anno Domini, Before Christ\n\n case 'GGGG':\n default:\n return match.era(dateString, {\n width: 'wide'\n }) || match.era(dateString, {\n width: 'abbreviated'\n }) || match.era(dateString, {\n width: 'narrow'\n });\n }\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value) {\n flags.era = value;\n date.setUTCFullYear(value, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return EraParser;\n}(Parser);","/**\n * Days in 1 week.\n *\n * @name daysInWeek\n * @constant\n * @type {number}\n * @default\n */\nexport var daysInWeek = 7;\n/**\n * Days in 1 year\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n *\n * @name daysInYear\n * @constant\n * @type {number}\n * @default\n */\n\nexport var daysInYear = 365.2425;\n/**\n * Maximum allowed time.\n *\n * @name maxTime\n * @constant\n * @type {number}\n * @default\n */\n\nexport var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n/**\n * Milliseconds in 1 minute\n *\n * @name millisecondsInMinute\n * @constant\n * @type {number}\n * @default\n */\n\nexport var millisecondsInMinute = 60000;\n/**\n * Milliseconds in 1 hour\n *\n * @name millisecondsInHour\n * @constant\n * @type {number}\n * @default\n */\n\nexport var millisecondsInHour = 3600000;\n/**\n * Milliseconds in 1 second\n *\n * @name millisecondsInSecond\n * @constant\n * @type {number}\n * @default\n */\n\nexport var millisecondsInSecond = 1000;\n/**\n * Minimum allowed time.\n *\n * @name minTime\n * @constant\n * @type {number}\n * @default\n */\n\nexport var minTime = -maxTime;\n/**\n * Minutes in 1 hour\n *\n * @name minutesInHour\n * @constant\n * @type {number}\n * @default\n */\n\nexport var minutesInHour = 60;\n/**\n * Months in 1 quarter\n *\n * @name monthsInQuarter\n * @constant\n * @type {number}\n * @default\n */\n\nexport var monthsInQuarter = 3;\n/**\n * Months in 1 year\n *\n * @name monthsInYear\n * @constant\n * @type {number}\n * @default\n */\n\nexport var monthsInYear = 12;\n/**\n * Quarters in 1 year\n *\n * @name quartersInYear\n * @constant\n * @type {number}\n * @default\n */\n\nexport var quartersInYear = 4;\n/**\n * Seconds in 1 hour\n *\n * @name secondsInHour\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInHour = 3600;\n/**\n * Seconds in 1 minute\n *\n * @name secondsInMinute\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInMinute = 60;\n/**\n * Seconds in 1 day\n *\n * @name secondsInDay\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInDay = secondsInHour * 24;\n/**\n * Seconds in 1 week\n *\n * @name secondsInWeek\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInWeek = secondsInDay * 7;\n/**\n * Seconds in 1 year\n *\n * @name secondsInYear\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInYear = secondsInDay * daysInYear;\n/**\n * Seconds in 1 month\n *\n * @name secondsInMonth\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInMonth = secondsInYear / 12;\n/**\n * Seconds in 1 quarter\n *\n * @name secondsInQuarter\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInQuarter = secondsInMonth * 3;","export var numericPatterns = {\n month: /^(1[0-2]|0?\\d)/,\n // 0 to 12\n date: /^(3[0-1]|[0-2]?\\d)/,\n // 0 to 31\n dayOfYear: /^(36[0-6]|3[0-5]\\d|[0-2]?\\d?\\d)/,\n // 0 to 366\n week: /^(5[0-3]|[0-4]?\\d)/,\n // 0 to 53\n hour23h: /^(2[0-3]|[0-1]?\\d)/,\n // 0 to 23\n hour24h: /^(2[0-4]|[0-1]?\\d)/,\n // 0 to 24\n hour11h: /^(1[0-1]|0?\\d)/,\n // 0 to 11\n hour12h: /^(1[0-2]|0?\\d)/,\n // 0 to 12\n minute: /^[0-5]?\\d/,\n // 0 to 59\n second: /^[0-5]?\\d/,\n // 0 to 59\n singleDigit: /^\\d/,\n // 0 to 9\n twoDigits: /^\\d{1,2}/,\n // 0 to 99\n threeDigits: /^\\d{1,3}/,\n // 0 to 999\n fourDigits: /^\\d{1,4}/,\n // 0 to 9999\n anyDigitsSigned: /^-?\\d+/,\n singleDigitSigned: /^-?\\d/,\n // 0 to 9, -0 to -9\n twoDigitsSigned: /^-?\\d{1,2}/,\n // 0 to 99, -0 to -99\n threeDigitsSigned: /^-?\\d{1,3}/,\n // 0 to 999, -0 to -999\n fourDigitsSigned: /^-?\\d{1,4}/ // 0 to 9999, -0 to -9999\n\n};\nexport var timezonePatterns = {\n basicOptionalMinutes: /^([+-])(\\d{2})(\\d{2})?|Z/,\n basic: /^([+-])(\\d{2})(\\d{2})|Z/,\n basicOptionalSeconds: /^([+-])(\\d{2})(\\d{2})((\\d{2}))?|Z/,\n extended: /^([+-])(\\d{2}):(\\d{2})|Z/,\n extendedOptionalSeconds: /^([+-])(\\d{2}):(\\d{2})(:(\\d{2}))?|Z/\n};","import { millisecondsInHour, millisecondsInMinute, millisecondsInSecond } from \"../../constants/index.js\";\nimport { numericPatterns } from \"./constants.js\";\nexport function mapValue(parseFnResult, mapFn) {\n if (!parseFnResult) {\n return parseFnResult;\n }\n\n return {\n value: mapFn(parseFnResult.value),\n rest: parseFnResult.rest\n };\n}\nexport function parseNumericPattern(pattern, dateString) {\n var matchResult = dateString.match(pattern);\n\n if (!matchResult) {\n return null;\n }\n\n return {\n value: parseInt(matchResult[0], 10),\n rest: dateString.slice(matchResult[0].length)\n };\n}\nexport function parseTimezonePattern(pattern, dateString) {\n var matchResult = dateString.match(pattern);\n\n if (!matchResult) {\n return null;\n } // Input is 'Z'\n\n\n if (matchResult[0] === 'Z') {\n return {\n value: 0,\n rest: dateString.slice(1)\n };\n }\n\n var sign = matchResult[1] === '+' ? 1 : -1;\n var hours = matchResult[2] ? parseInt(matchResult[2], 10) : 0;\n var minutes = matchResult[3] ? parseInt(matchResult[3], 10) : 0;\n var seconds = matchResult[5] ? parseInt(matchResult[5], 10) : 0;\n return {\n value: sign * (hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * millisecondsInSecond),\n rest: dateString.slice(matchResult[0].length)\n };\n}\nexport function parseAnyDigitsSigned(dateString) {\n return parseNumericPattern(numericPatterns.anyDigitsSigned, dateString);\n}\nexport function parseNDigits(n, dateString) {\n switch (n) {\n case 1:\n return parseNumericPattern(numericPatterns.singleDigit, dateString);\n\n case 2:\n return parseNumericPattern(numericPatterns.twoDigits, dateString);\n\n case 3:\n return parseNumericPattern(numericPatterns.threeDigits, dateString);\n\n case 4:\n return parseNumericPattern(numericPatterns.fourDigits, dateString);\n\n default:\n return parseNumericPattern(new RegExp('^\\\\d{1,' + n + '}'), dateString);\n }\n}\nexport function parseNDigitsSigned(n, dateString) {\n switch (n) {\n case 1:\n return parseNumericPattern(numericPatterns.singleDigitSigned, dateString);\n\n case 2:\n return parseNumericPattern(numericPatterns.twoDigitsSigned, dateString);\n\n case 3:\n return parseNumericPattern(numericPatterns.threeDigitsSigned, dateString);\n\n case 4:\n return parseNumericPattern(numericPatterns.fourDigitsSigned, dateString);\n\n default:\n return parseNumericPattern(new RegExp('^-?\\\\d{1,' + n + '}'), dateString);\n }\n}\nexport function dayPeriodEnumToHours(dayPeriod) {\n switch (dayPeriod) {\n case 'morning':\n return 4;\n\n case 'evening':\n return 17;\n\n case 'pm':\n case 'noon':\n case 'afternoon':\n return 12;\n\n case 'am':\n case 'midnight':\n case 'night':\n default:\n return 0;\n }\n}\nexport function normalizeTwoDigitYear(twoDigitYear, currentYear) {\n var isCommonEra = currentYear > 0; // Absolute number of the current year:\n // 1 -> 1 AC\n // 0 -> 1 BC\n // -1 -> 2 BC\n\n var absCurrentYear = isCommonEra ? currentYear : 1 - currentYear;\n var result;\n\n if (absCurrentYear <= 50) {\n result = twoDigitYear || 100;\n } else {\n var rangeEnd = absCurrentYear + 50;\n var rangeEndCentury = Math.floor(rangeEnd / 100) * 100;\n var isPreviousCentury = twoDigitYear >= rangeEnd % 100;\n result = twoDigitYear + rangeEndCentury - (isPreviousCentury ? 100 : 0);\n }\n\n return isCommonEra ? result : 1 - result;\n}\nexport function isLeapYearIndex(year) {\n return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, normalizeTwoDigitYear, parseNDigits } from \"../utils.js\";\n// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns\n// | Year | y | yy | yyy | yyyy | yyyyy |\n// |----------|-------|----|-------|-------|-------|\n// | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n// | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n// | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\nexport var YearParser = /*#__PURE__*/function (_Parser) {\n _inherits(YearParser, _Parser);\n\n var _super = _createSuper(YearParser);\n\n function YearParser() {\n var _this;\n\n _classCallCheck(this, YearParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 130);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'u', 'w', 'I', 'i', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(YearParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(year) {\n return {\n year: year,\n isTwoDigitYear: token === 'yy'\n };\n };\n\n switch (token) {\n case 'y':\n return mapValue(parseNDigits(4, dateString), valueCallback);\n\n case 'yo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'year'\n }), valueCallback);\n\n default:\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value.isTwoDigitYear || value.year > 0;\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value) {\n var currentYear = date.getUTCFullYear();\n\n if (value.isTwoDigitYear) {\n var normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);\n date.setUTCFullYear(normalizedTwoDigitYear, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n\n var year = !('era' in flags) || flags.era === 1 ? value.year : 1 - value.year;\n date.setUTCFullYear(year, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return YearParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigits, normalizeTwoDigitYear, mapValue } from \"../utils.js\";\nimport getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport startOfUTCWeek from \"../../../_lib/startOfUTCWeek/index.js\";\n// Local week-numbering year\nexport var LocalWeekYearParser = /*#__PURE__*/function (_Parser) {\n _inherits(LocalWeekYearParser, _Parser);\n\n var _super = _createSuper(LocalWeekYearParser);\n\n function LocalWeekYearParser() {\n var _this;\n\n _classCallCheck(this, LocalWeekYearParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 130);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'R', 'u', 'Q', 'q', 'M', 'L', 'I', 'd', 'D', 'i', 't', 'T']);\n\n return _this;\n }\n\n _createClass(LocalWeekYearParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(year) {\n return {\n year: year,\n isTwoDigitYear: token === 'YY'\n };\n };\n\n switch (token) {\n case 'Y':\n return mapValue(parseNDigits(4, dateString), valueCallback);\n\n case 'Yo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'year'\n }), valueCallback);\n\n default:\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value.isTwoDigitYear || value.year > 0;\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value, options) {\n var currentYear = getUTCWeekYear(date, options);\n\n if (value.isTwoDigitYear) {\n var normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);\n date.setUTCFullYear(normalizedTwoDigitYear, 0, options.firstWeekContainsDate);\n date.setUTCHours(0, 0, 0, 0);\n return startOfUTCWeek(date, options);\n }\n\n var year = !('era' in flags) || flags.era === 1 ? value.year : 1 - value.year;\n date.setUTCFullYear(year, 0, options.firstWeekContainsDate);\n date.setUTCHours(0, 0, 0, 0);\n return startOfUTCWeek(date, options);\n }\n }]);\n\n return LocalWeekYearParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigitsSigned } from \"../utils.js\";\nimport startOfUTCISOWeek from \"../../../_lib/startOfUTCISOWeek/index.js\"; // ISO week-numbering year\n\nexport var ISOWeekYearParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISOWeekYearParser, _Parser);\n\n var _super = _createSuper(ISOWeekYearParser);\n\n function ISOWeekYearParser() {\n var _this;\n\n _classCallCheck(this, ISOWeekYearParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 130);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['G', 'y', 'Y', 'u', 'Q', 'q', 'M', 'L', 'w', 'd', 'D', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(ISOWeekYearParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n if (token === 'R') {\n return parseNDigitsSigned(4, dateString);\n }\n\n return parseNDigitsSigned(token.length, dateString);\n }\n }, {\n key: \"set\",\n value: function set(_date, _flags, value) {\n var firstWeekOfYear = new Date(0);\n firstWeekOfYear.setUTCFullYear(value, 0, 4);\n firstWeekOfYear.setUTCHours(0, 0, 0, 0);\n return startOfUTCISOWeek(firstWeekOfYear);\n }\n }]);\n\n return ISOWeekYearParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigitsSigned } from \"../utils.js\";\nexport var ExtendedYearParser = /*#__PURE__*/function (_Parser) {\n _inherits(ExtendedYearParser, _Parser);\n\n var _super = _createSuper(ExtendedYearParser);\n\n function ExtendedYearParser() {\n var _this;\n\n _classCallCheck(this, ExtendedYearParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 130);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['G', 'y', 'Y', 'R', 'w', 'I', 'i', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(ExtendedYearParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n if (token === 'u') {\n return parseNDigitsSigned(4, dateString);\n }\n\n return parseNDigitsSigned(token.length, dateString);\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCFullYear(value, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return ExtendedYearParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigits } from \"../utils.js\";\nexport var QuarterParser = /*#__PURE__*/function (_Parser) {\n _inherits(QuarterParser, _Parser);\n\n var _super = _createSuper(QuarterParser);\n\n function QuarterParser() {\n var _this;\n\n _classCallCheck(this, QuarterParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 120);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'M', 'L', 'w', 'I', 'd', 'D', 'i', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(QuarterParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n case 'QQ':\n // 01, 02, 03, 04\n return parseNDigits(token.length, dateString);\n // 1st, 2nd, 3rd, 4th\n\n case 'Qo':\n return match.ordinalNumber(dateString, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'QQQ':\n return match.quarter(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.quarter(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'QQQQQ':\n return match.quarter(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'QQQQ':\n default:\n return match.quarter(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.quarter(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.quarter(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 4;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth((value - 1) * 3, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return QuarterParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigits } from \"../utils.js\";\nexport var StandAloneQuarterParser = /*#__PURE__*/function (_Parser) {\n _inherits(StandAloneQuarterParser, _Parser);\n\n var _super = _createSuper(StandAloneQuarterParser);\n\n function StandAloneQuarterParser() {\n var _this;\n\n _classCallCheck(this, StandAloneQuarterParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 120);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'Q', 'M', 'L', 'w', 'I', 'd', 'D', 'i', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(StandAloneQuarterParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n case 'qq':\n // 01, 02, 03, 04\n return parseNDigits(token.length, dateString);\n // 1st, 2nd, 3rd, 4th\n\n case 'qo':\n return match.ordinalNumber(dateString, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'qqq':\n return match.quarter(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.quarter(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'qqqqq':\n return match.quarter(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'qqqq':\n default:\n return match.quarter(dateString, {\n width: 'wide',\n context: 'standalone'\n }) || match.quarter(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.quarter(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 4;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth((value - 1) * 3, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return StandAloneQuarterParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { mapValue, parseNDigits, parseNumericPattern } from \"../utils.js\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nexport var MonthParser = /*#__PURE__*/function (_Parser) {\n _inherits(MonthParser, _Parser);\n\n var _super = _createSuper(MonthParser);\n\n function MonthParser() {\n var _this;\n\n _classCallCheck(this, MonthParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'L', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']);\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 110);\n\n return _this;\n }\n\n _createClass(MonthParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(value) {\n return value - 1;\n };\n\n switch (token) {\n // 1, 2, ..., 12\n case 'M':\n return mapValue(parseNumericPattern(numericPatterns.month, dateString), valueCallback);\n // 01, 02, ..., 12\n\n case 'MM':\n return mapValue(parseNDigits(2, dateString), valueCallback);\n // 1st, 2nd, ..., 12th\n\n case 'Mo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'month'\n }), valueCallback);\n // Jan, Feb, ..., Dec\n\n case 'MMM':\n return match.month(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.month(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // J, F, ..., D\n\n case 'MMMMM':\n return match.month(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // January, February, ..., December\n\n case 'MMMM':\n default:\n return match.month(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.month(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.month(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 11;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth(value, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return MonthParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits, mapValue } from \"../utils.js\";\nexport var StandAloneMonthParser = /*#__PURE__*/function (_Parser) {\n _inherits(StandAloneMonthParser, _Parser);\n\n var _super = _createSuper(StandAloneMonthParser);\n\n function StandAloneMonthParser() {\n var _this;\n\n _classCallCheck(this, StandAloneMonthParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 110);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'M', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(StandAloneMonthParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(value) {\n return value - 1;\n };\n\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return mapValue(parseNumericPattern(numericPatterns.month, dateString), valueCallback);\n // 01, 02, ..., 12\n\n case 'LL':\n return mapValue(parseNDigits(2, dateString), valueCallback);\n // 1st, 2nd, ..., 12th\n\n case 'Lo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'month'\n }), valueCallback);\n // Jan, Feb, ..., Dec\n\n case 'LLL':\n return match.month(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.month(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // J, F, ..., D\n\n case 'LLLLL':\n return match.month(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // January, February, ..., December\n\n case 'LLLL':\n default:\n return match.month(dateString, {\n width: 'wide',\n context: 'standalone'\n }) || match.month(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.month(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 11;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth(value, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return StandAloneMonthParser;\n}(Parser);","import toInteger from \"../toInteger/index.js\";\nimport toDate from \"../../toDate/index.js\";\nimport getUTCWeek from \"../getUTCWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function setUTCWeek(dirtyDate, dirtyWeek, options) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var week = toInteger(dirtyWeek);\n var diff = getUTCWeek(date, options) - week;\n date.setUTCDate(date.getUTCDate() - diff * 7);\n return date;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nimport setUTCWeek from \"../../../_lib/setUTCWeek/index.js\";\nimport startOfUTCWeek from \"../../../_lib/startOfUTCWeek/index.js\"; // Local week of year\n\nexport var LocalWeekParser = /*#__PURE__*/function (_Parser) {\n _inherits(LocalWeekParser, _Parser);\n\n var _super = _createSuper(LocalWeekParser);\n\n function LocalWeekParser() {\n var _this;\n\n _classCallCheck(this, LocalWeekParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 100);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'i', 't', 'T']);\n\n return _this;\n }\n\n _createClass(LocalWeekParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'w':\n return parseNumericPattern(numericPatterns.week, dateString);\n\n case 'wo':\n return match.ordinalNumber(dateString, {\n unit: 'week'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 53;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value, options) {\n return startOfUTCWeek(setUTCWeek(date, value, options), options);\n }\n }]);\n\n return LocalWeekParser;\n}(Parser);","import toInteger from \"../toInteger/index.js\";\nimport toDate from \"../../toDate/index.js\";\nimport getUTCISOWeek from \"../getUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function setUTCISOWeek(dirtyDate, dirtyISOWeek) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var isoWeek = toInteger(dirtyISOWeek);\n var diff = getUTCISOWeek(date) - isoWeek;\n date.setUTCDate(date.getUTCDate() - diff * 7);\n return date;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nimport setUTCISOWeek from \"../../../_lib/setUTCISOWeek/index.js\";\nimport startOfUTCISOWeek from \"../../../_lib/startOfUTCISOWeek/index.js\"; // ISO week of year\n\nexport var ISOWeekParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISOWeekParser, _Parser);\n\n var _super = _createSuper(ISOWeekParser);\n\n function ISOWeekParser() {\n var _this;\n\n _classCallCheck(this, ISOWeekParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 100);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'Y', 'u', 'q', 'Q', 'M', 'L', 'w', 'd', 'D', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(ISOWeekParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'I':\n return parseNumericPattern(numericPatterns.week, dateString);\n\n case 'Io':\n return match.ordinalNumber(dateString, {\n unit: 'week'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 53;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n return startOfUTCISOWeek(setUTCISOWeek(date, value));\n }\n }]);\n\n return ISOWeekParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { isLeapYearIndex, parseNDigits, parseNumericPattern } from \"../utils.js\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nvar DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nvar DAYS_IN_MONTH_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; // Day of the month\n\nexport var DateParser = /*#__PURE__*/function (_Parser) {\n _inherits(DateParser, _Parser);\n\n var _super = _createSuper(DateParser);\n\n function DateParser() {\n var _this;\n\n _classCallCheck(this, DateParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n\n _defineProperty(_assertThisInitialized(_this), \"subPriority\", 1);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(DateParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'd':\n return parseNumericPattern(numericPatterns.date, dateString);\n\n case 'do':\n return match.ordinalNumber(dateString, {\n unit: 'date'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(date, value) {\n var year = date.getUTCFullYear();\n var isLeapYear = isLeapYearIndex(year);\n var month = date.getUTCMonth();\n\n if (isLeapYear) {\n return value >= 1 && value <= DAYS_IN_MONTH_LEAP_YEAR[month];\n } else {\n return value >= 1 && value <= DAYS_IN_MONTH[month];\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCDate(value);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return DateParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits, isLeapYearIndex } from \"../utils.js\";\nexport var DayOfYearParser = /*#__PURE__*/function (_Parser) {\n _inherits(DayOfYearParser, _Parser);\n\n var _super = _createSuper(DayOfYearParser);\n\n function DayOfYearParser() {\n var _this;\n\n _classCallCheck(this, DayOfYearParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n\n _defineProperty(_assertThisInitialized(_this), \"subpriority\", 1);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'M', 'L', 'w', 'I', 'd', 'E', 'i', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(DayOfYearParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'D':\n case 'DD':\n return parseNumericPattern(numericPatterns.dayOfYear, dateString);\n\n case 'Do':\n return match.ordinalNumber(dateString, {\n unit: 'date'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(date, value) {\n var year = date.getUTCFullYear();\n var isLeapYear = isLeapYearIndex(year);\n\n if (isLeapYear) {\n return value >= 1 && value <= 366;\n } else {\n return value >= 1 && value <= 365;\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth(0, value);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return DayOfYearParser;\n}(Parser);","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function setUTCDay(dirtyDate, dirtyDay, options) {\n var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n requiredArgs(2, arguments);\n var defaultOptions = getDefaultOptions();\n var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = toInteger(dirtyDay);\n var currentDay = date.getUTCDay();\n var remainder = day % 7;\n var dayIndex = (remainder + 7) % 7;\n var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport setUTCDay from \"../../../_lib/setUTCDay/index.js\"; // Day of week\n\nexport var DayParser = /*#__PURE__*/function (_Parser) {\n _inherits(DayParser, _Parser);\n\n var _super = _createSuper(DayParser);\n\n function DayParser() {\n var _this;\n\n _classCallCheck(this, DayParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['D', 'i', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(DayParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // T\n\n case 'EEEEE':\n return match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'EEEEEE':\n return match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tuesday\n\n case 'EEEE':\n default:\n return match.day(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 6;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return DayParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nimport setUTCDay from \"../../../_lib/setUTCDay/index.js\"; // Local day of week\n\nexport var LocalDayParser = /*#__PURE__*/function (_Parser) {\n _inherits(LocalDayParser, _Parser);\n\n var _super = _createSuper(LocalDayParser);\n\n function LocalDayParser() {\n var _this;\n\n _classCallCheck(this, LocalDayParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'E', 'i', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(LocalDayParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match, options) {\n var valueCallback = function valueCallback(value) {\n var wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;\n };\n\n switch (token) {\n // 3\n case 'e':\n case 'ee':\n // 03\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n // 3rd\n\n case 'eo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'day'\n }), valueCallback);\n // Tue\n\n case 'eee':\n return match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // T\n\n case 'eeeee':\n return match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'eeeeee':\n return match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tuesday\n\n case 'eeee':\n default:\n return match.day(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 6;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return LocalDayParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nimport setUTCDay from \"../../../_lib/setUTCDay/index.js\"; // Stand-alone local day of week\n\nexport var StandAloneLocalDayParser = /*#__PURE__*/function (_Parser) {\n _inherits(StandAloneLocalDayParser, _Parser);\n\n var _super = _createSuper(StandAloneLocalDayParser);\n\n function StandAloneLocalDayParser() {\n var _this;\n\n _classCallCheck(this, StandAloneLocalDayParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'E', 'i', 'e', 't', 'T']);\n\n return _this;\n }\n\n _createClass(StandAloneLocalDayParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match, options) {\n var valueCallback = function valueCallback(value) {\n var wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;\n };\n\n switch (token) {\n // 3\n case 'c':\n case 'cc':\n // 03\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n // 3rd\n\n case 'co':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'day'\n }), valueCallback);\n // Tue\n\n case 'ccc':\n return match.day(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'short',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // T\n\n case 'ccccc':\n return match.day(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tu\n\n case 'cccccc':\n return match.day(dateString, {\n width: 'short',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tuesday\n\n case 'cccc':\n default:\n return match.day(dateString, {\n width: 'wide',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'short',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 6;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return StandAloneLocalDayParser;\n}(Parser);","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nexport default function setUTCISODay(dirtyDate, dirtyDay) {\n requiredArgs(2, arguments);\n var day = toInteger(dirtyDay);\n\n if (day % 7 === 0) {\n day = day - 7;\n }\n\n var weekStartsOn = 1;\n var date = toDate(dirtyDate);\n var currentDay = date.getUTCDay();\n var remainder = day % 7;\n var dayIndex = (remainder + 7) % 7;\n var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nimport setUTCISODay from \"../../../_lib/setUTCISODay/index.js\"; // ISO day of week\n\nexport var ISODayParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISODayParser, _Parser);\n\n var _super = _createSuper(ISODayParser);\n\n function ISODayParser() {\n var _this;\n\n _classCallCheck(this, ISODayParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'Y', 'u', 'q', 'Q', 'M', 'L', 'w', 'd', 'D', 'E', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(ISODayParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(value) {\n if (value === 0) {\n return 7;\n }\n\n return value;\n };\n\n switch (token) {\n // 2\n case 'i':\n case 'ii':\n // 02\n return parseNDigits(token.length, dateString);\n // 2nd\n\n case 'io':\n return match.ordinalNumber(dateString, {\n unit: 'day'\n });\n // Tue\n\n case 'iii':\n return mapValue(match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n }), valueCallback);\n // T\n\n case 'iiiii':\n return mapValue(match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n }), valueCallback);\n // Tu\n\n case 'iiiiii':\n return mapValue(match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n }), valueCallback);\n // Tuesday\n\n case 'iiii':\n default:\n return mapValue(match.day(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n }), valueCallback);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 7;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date = setUTCISODay(date, value);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return ISODayParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { dayPeriodEnumToHours } from \"../utils.js\";\nexport var AMPMParser = /*#__PURE__*/function (_Parser) {\n _inherits(AMPMParser, _Parser);\n\n var _super = _createSuper(AMPMParser);\n\n function AMPMParser() {\n var _this;\n\n _classCallCheck(this, AMPMParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 80);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['b', 'B', 'H', 'k', 't', 'T']);\n\n return _this;\n }\n\n _createClass(AMPMParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'a':\n case 'aa':\n case 'aaa':\n return match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'aaaaa':\n return match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'aaaa':\n default:\n return match.dayPeriod(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n }\n }]);\n\n return AMPMParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { dayPeriodEnumToHours } from \"../utils.js\";\nexport var AMPMMidnightParser = /*#__PURE__*/function (_Parser) {\n _inherits(AMPMMidnightParser, _Parser);\n\n var _super = _createSuper(AMPMMidnightParser);\n\n function AMPMMidnightParser() {\n var _this;\n\n _classCallCheck(this, AMPMMidnightParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 80);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['a', 'B', 'H', 'k', 't', 'T']);\n\n return _this;\n }\n\n _createClass(AMPMMidnightParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'b':\n case 'bb':\n case 'bbb':\n return match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'bbbbb':\n return match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'bbbb':\n default:\n return match.dayPeriod(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n }\n }]);\n\n return AMPMMidnightParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { dayPeriodEnumToHours } from \"../utils.js\"; // in the morning, in the afternoon, in the evening, at night\n\nexport var DayPeriodParser = /*#__PURE__*/function (_Parser) {\n _inherits(DayPeriodParser, _Parser);\n\n var _super = _createSuper(DayPeriodParser);\n\n function DayPeriodParser() {\n var _this;\n\n _classCallCheck(this, DayPeriodParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 80);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['a', 'b', 't', 'T']);\n\n return _this;\n }\n\n _createClass(DayPeriodParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'BBBBB':\n return match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'BBBB':\n default:\n return match.dayPeriod(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n }\n }]);\n\n return DayPeriodParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var Hour1to12Parser = /*#__PURE__*/function (_Parser) {\n _inherits(Hour1to12Parser, _Parser);\n\n var _super = _createSuper(Hour1to12Parser);\n\n function Hour1to12Parser() {\n var _this;\n\n _classCallCheck(this, Hour1to12Parser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 70);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['H', 'K', 'k', 't', 'T']);\n\n return _this;\n }\n\n _createClass(Hour1to12Parser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'h':\n return parseNumericPattern(numericPatterns.hour12h, dateString);\n\n case 'ho':\n return match.ordinalNumber(dateString, {\n unit: 'hour'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 12;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n var isPM = date.getUTCHours() >= 12;\n\n if (isPM && value < 12) {\n date.setUTCHours(value + 12, 0, 0, 0);\n } else if (!isPM && value === 12) {\n date.setUTCHours(0, 0, 0, 0);\n } else {\n date.setUTCHours(value, 0, 0, 0);\n }\n\n return date;\n }\n }]);\n\n return Hour1to12Parser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var Hour0to23Parser = /*#__PURE__*/function (_Parser) {\n _inherits(Hour0to23Parser, _Parser);\n\n var _super = _createSuper(Hour0to23Parser);\n\n function Hour0to23Parser() {\n var _this;\n\n _classCallCheck(this, Hour0to23Parser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 70);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['a', 'b', 'h', 'K', 'k', 't', 'T']);\n\n return _this;\n }\n\n _createClass(Hour0to23Parser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'H':\n return parseNumericPattern(numericPatterns.hour23h, dateString);\n\n case 'Ho':\n return match.ordinalNumber(dateString, {\n unit: 'hour'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 23;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCHours(value, 0, 0, 0);\n return date;\n }\n }]);\n\n return Hour0to23Parser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var Hour0To11Parser = /*#__PURE__*/function (_Parser) {\n _inherits(Hour0To11Parser, _Parser);\n\n var _super = _createSuper(Hour0To11Parser);\n\n function Hour0To11Parser() {\n var _this;\n\n _classCallCheck(this, Hour0To11Parser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 70);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['h', 'H', 'k', 't', 'T']);\n\n return _this;\n }\n\n _createClass(Hour0To11Parser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'K':\n return parseNumericPattern(numericPatterns.hour11h, dateString);\n\n case 'Ko':\n return match.ordinalNumber(dateString, {\n unit: 'hour'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 11;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n var isPM = date.getUTCHours() >= 12;\n\n if (isPM && value < 12) {\n date.setUTCHours(value + 12, 0, 0, 0);\n } else {\n date.setUTCHours(value, 0, 0, 0);\n }\n\n return date;\n }\n }]);\n\n return Hour0To11Parser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var Hour1To24Parser = /*#__PURE__*/function (_Parser) {\n _inherits(Hour1To24Parser, _Parser);\n\n var _super = _createSuper(Hour1To24Parser);\n\n function Hour1To24Parser() {\n var _this;\n\n _classCallCheck(this, Hour1To24Parser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 70);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['a', 'b', 'h', 'H', 'K', 't', 'T']);\n\n return _this;\n }\n\n _createClass(Hour1To24Parser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'k':\n return parseNumericPattern(numericPatterns.hour24h, dateString);\n\n case 'ko':\n return match.ordinalNumber(dateString, {\n unit: 'hour'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 24;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n var hours = value <= 24 ? value % 24 : value;\n date.setUTCHours(hours, 0, 0, 0);\n return date;\n }\n }]);\n\n return Hour1To24Parser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var MinuteParser = /*#__PURE__*/function (_Parser) {\n _inherits(MinuteParser, _Parser);\n\n var _super = _createSuper(MinuteParser);\n\n function MinuteParser() {\n var _this;\n\n _classCallCheck(this, MinuteParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 60);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T']);\n\n return _this;\n }\n\n _createClass(MinuteParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'm':\n return parseNumericPattern(numericPatterns.minute, dateString);\n\n case 'mo':\n return match.ordinalNumber(dateString, {\n unit: 'minute'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 59;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMinutes(value, 0, 0);\n return date;\n }\n }]);\n\n return MinuteParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var SecondParser = /*#__PURE__*/function (_Parser) {\n _inherits(SecondParser, _Parser);\n\n var _super = _createSuper(SecondParser);\n\n function SecondParser() {\n var _this;\n\n _classCallCheck(this, SecondParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 50);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T']);\n\n return _this;\n }\n\n _createClass(SecondParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 's':\n return parseNumericPattern(numericPatterns.second, dateString);\n\n case 'so':\n return match.ordinalNumber(dateString, {\n unit: 'second'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 59;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCSeconds(value, 0);\n return date;\n }\n }]);\n\n return SecondParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nexport var FractionOfSecondParser = /*#__PURE__*/function (_Parser) {\n _inherits(FractionOfSecondParser, _Parser);\n\n var _super = _createSuper(FractionOfSecondParser);\n\n function FractionOfSecondParser() {\n var _this;\n\n _classCallCheck(this, FractionOfSecondParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 30);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T']);\n\n return _this;\n }\n\n _createClass(FractionOfSecondParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n var valueCallback = function valueCallback(value) {\n return Math.floor(value * Math.pow(10, -token.length + 3));\n };\n\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMilliseconds(value);\n return date;\n }\n }]);\n\n return FractionOfSecondParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { timezonePatterns } from \"../constants.js\";\nimport { parseTimezonePattern } from \"../utils.js\"; // Timezone (ISO-8601. +00:00 is `'Z'`)\n\nexport var ISOTimezoneWithZParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISOTimezoneWithZParser, _Parser);\n\n var _super = _createSuper(ISOTimezoneWithZParser);\n\n function ISOTimezoneWithZParser() {\n var _this;\n\n _classCallCheck(this, ISOTimezoneWithZParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 10);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T', 'x']);\n\n return _this;\n }\n\n _createClass(ISOTimezoneWithZParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n switch (token) {\n case 'X':\n return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, dateString);\n\n case 'XX':\n return parseTimezonePattern(timezonePatterns.basic, dateString);\n\n case 'XXXX':\n return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, dateString);\n\n case 'XXXXX':\n return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, dateString);\n\n case 'XXX':\n default:\n return parseTimezonePattern(timezonePatterns.extended, dateString);\n }\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value) {\n if (flags.timestampIsSet) {\n return date;\n }\n\n return new Date(date.getTime() - value);\n }\n }]);\n\n return ISOTimezoneWithZParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { timezonePatterns } from \"../constants.js\";\nimport { parseTimezonePattern } from \"../utils.js\"; // Timezone (ISO-8601)\n\nexport var ISOTimezoneParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISOTimezoneParser, _Parser);\n\n var _super = _createSuper(ISOTimezoneParser);\n\n function ISOTimezoneParser() {\n var _this;\n\n _classCallCheck(this, ISOTimezoneParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 10);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T', 'X']);\n\n return _this;\n }\n\n _createClass(ISOTimezoneParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n switch (token) {\n case 'x':\n return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, dateString);\n\n case 'xx':\n return parseTimezonePattern(timezonePatterns.basic, dateString);\n\n case 'xxxx':\n return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, dateString);\n\n case 'xxxxx':\n return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, dateString);\n\n case 'xxx':\n default:\n return parseTimezonePattern(timezonePatterns.extended, dateString);\n }\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value) {\n if (flags.timestampIsSet) {\n return date;\n }\n\n return new Date(date.getTime() - value);\n }\n }]);\n\n return ISOTimezoneParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { parseAnyDigitsSigned } from \"../utils.js\";\nexport var TimestampSecondsParser = /*#__PURE__*/function (_Parser) {\n _inherits(TimestampSecondsParser, _Parser);\n\n var _super = _createSuper(TimestampSecondsParser);\n\n function TimestampSecondsParser() {\n var _this;\n\n _classCallCheck(this, TimestampSecondsParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 40);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", '*');\n\n return _this;\n }\n\n _createClass(TimestampSecondsParser, [{\n key: \"parse\",\n value: function parse(dateString) {\n return parseAnyDigitsSigned(dateString);\n }\n }, {\n key: \"set\",\n value: function set(_date, _flags, value) {\n return [new Date(value * 1000), {\n timestampIsSet: true\n }];\n }\n }]);\n\n return TimestampSecondsParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { parseAnyDigitsSigned } from \"../utils.js\";\nexport var TimestampMillisecondsParser = /*#__PURE__*/function (_Parser) {\n _inherits(TimestampMillisecondsParser, _Parser);\n\n var _super = _createSuper(TimestampMillisecondsParser);\n\n function TimestampMillisecondsParser() {\n var _this;\n\n _classCallCheck(this, TimestampMillisecondsParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 20);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", '*');\n\n return _this;\n }\n\n _createClass(TimestampMillisecondsParser, [{\n key: \"parse\",\n value: function parse(dateString) {\n return parseAnyDigitsSigned(dateString);\n }\n }, {\n key: \"set\",\n value: function set(_date, _flags, value) {\n return [new Date(value), {\n timestampIsSet: true\n }];\n }\n }]);\n\n return TimestampMillisecondsParser;\n}(Parser);","import { EraParser } from \"./EraParser.js\";\nimport { YearParser } from \"./YearParser.js\";\nimport { LocalWeekYearParser } from \"./LocalWeekYearParser.js\";\nimport { ISOWeekYearParser } from \"./ISOWeekYearParser.js\";\nimport { ExtendedYearParser } from \"./ExtendedYearParser.js\";\nimport { QuarterParser } from \"./QuarterParser.js\";\nimport { StandAloneQuarterParser } from \"./StandAloneQuarterParser.js\";\nimport { MonthParser } from \"./MonthParser.js\";\nimport { StandAloneMonthParser } from \"./StandAloneMonthParser.js\";\nimport { LocalWeekParser } from \"./LocalWeekParser.js\";\nimport { ISOWeekParser } from \"./ISOWeekParser.js\";\nimport { DateParser } from \"./DateParser.js\";\nimport { DayOfYearParser } from \"./DayOfYearParser.js\";\nimport { DayParser } from \"./DayParser.js\";\nimport { LocalDayParser } from \"./LocalDayParser.js\";\nimport { StandAloneLocalDayParser } from \"./StandAloneLocalDayParser.js\";\nimport { ISODayParser } from \"./ISODayParser.js\";\nimport { AMPMParser } from \"./AMPMParser.js\";\nimport { AMPMMidnightParser } from \"./AMPMMidnightParser.js\";\nimport { DayPeriodParser } from \"./DayPeriodParser.js\";\nimport { Hour1to12Parser } from \"./Hour1to12Parser.js\";\nimport { Hour0to23Parser } from \"./Hour0to23Parser.js\";\nimport { Hour0To11Parser } from \"./Hour0To11Parser.js\";\nimport { Hour1To24Parser } from \"./Hour1To24Parser.js\";\nimport { MinuteParser } from \"./MinuteParser.js\";\nimport { SecondParser } from \"./SecondParser.js\";\nimport { FractionOfSecondParser } from \"./FractionOfSecondParser.js\";\nimport { ISOTimezoneWithZParser } from \"./ISOTimezoneWithZParser.js\";\nimport { ISOTimezoneParser } from \"./ISOTimezoneParser.js\";\nimport { TimestampSecondsParser } from \"./TimestampSecondsParser.js\";\nimport { TimestampMillisecondsParser } from \"./TimestampMillisecondsParser.js\";\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O* | Timezone (GMT) |\n * | p | | P | |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z* | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `parse` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n */\n\nexport var parsers = {\n G: new EraParser(),\n y: new YearParser(),\n Y: new LocalWeekYearParser(),\n R: new ISOWeekYearParser(),\n u: new ExtendedYearParser(),\n Q: new QuarterParser(),\n q: new StandAloneQuarterParser(),\n M: new MonthParser(),\n L: new StandAloneMonthParser(),\n w: new LocalWeekParser(),\n I: new ISOWeekParser(),\n d: new DateParser(),\n D: new DayOfYearParser(),\n E: new DayParser(),\n e: new LocalDayParser(),\n c: new StandAloneLocalDayParser(),\n i: new ISODayParser(),\n a: new AMPMParser(),\n b: new AMPMMidnightParser(),\n B: new DayPeriodParser(),\n h: new Hour1to12Parser(),\n H: new Hour0to23Parser(),\n K: new Hour0To11Parser(),\n k: new Hour1To24Parser(),\n m: new MinuteParser(),\n s: new SecondParser(),\n S: new FractionOfSecondParser(),\n X: new ISOTimezoneWithZParser(),\n x: new ISOTimezoneParser(),\n t: new TimestampSecondsParser(),\n T: new TimestampMillisecondsParser()\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport defaultLocale from \"../_lib/defaultLocale/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport assign from \"../_lib/assign/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { DateToSystemTimezoneSetter } from \"./_lib/Setter.js\";\nimport { parsers } from \"./_lib/parsers/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\"; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\n\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\n\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar notWhitespaceRegExp = /\\S/;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n/**\n * @name parse\n * @category Common Helpers\n * @summary Parse the date.\n *\n * @description\n * Return the date parsed from string using the given format string.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters in the format string wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n *\n * Format of the format string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 5 below the table).\n *\n * Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited\n * and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception:\n *\n * ```javascript\n * parse('23 AM', 'HH a', new Date())\n * //=> RangeError: The format string mustn't contain `HH` and `a` at the same time\n * ```\n *\n * See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true\n *\n * Accepted format string patterns:\n * | Unit |Prior| Pattern | Result examples | Notes |\n * |---------------------------------|-----|---------|-----------------------------------|-------|\n * | Era | 140 | G..GGG | AD, BC | |\n * | | | GGGG | Anno Domini, Before Christ | 2 |\n * | | | GGGGG | A, B | |\n * | Calendar year | 130 | y | 44, 1, 1900, 2017, 9999 | 4 |\n * | | | yo | 44th, 1st, 1900th, 9999999th | 4,5 |\n * | | | yy | 44, 01, 00, 17 | 4 |\n * | | | yyy | 044, 001, 123, 999 | 4 |\n * | | | yyyy | 0044, 0001, 1900, 2017 | 4 |\n * | | | yyyyy | ... | 2,4 |\n * | Local week-numbering year | 130 | Y | 44, 1, 1900, 2017, 9000 | 4 |\n * | | | Yo | 44th, 1st, 1900th, 9999999th | 4,5 |\n * | | | YY | 44, 01, 00, 17 | 4,6 |\n * | | | YYY | 044, 001, 123, 999 | 4 |\n * | | | YYYY | 0044, 0001, 1900, 2017 | 4,6 |\n * | | | YYYYY | ... | 2,4 |\n * | ISO week-numbering year | 130 | R | -43, 1, 1900, 2017, 9999, -9999 | 4,5 |\n * | | | RR | -43, 01, 00, 17 | 4,5 |\n * | | | RRR | -043, 001, 123, 999, -999 | 4,5 |\n * | | | RRRR | -0043, 0001, 2017, 9999, -9999 | 4,5 |\n * | | | RRRRR | ... | 2,4,5 |\n * | Extended year | 130 | u | -43, 1, 1900, 2017, 9999, -999 | 4 |\n * | | | uu | -43, 01, 99, -99 | 4 |\n * | | | uuu | -043, 001, 123, 999, -999 | 4 |\n * | | | uuuu | -0043, 0001, 2017, 9999, -9999 | 4 |\n * | | | uuuuu | ... | 2,4 |\n * | Quarter (formatting) | 120 | Q | 1, 2, 3, 4 | |\n * | | | Qo | 1st, 2nd, 3rd, 4th | 5 |\n * | | | QQ | 01, 02, 03, 04 | |\n * | | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | 120 | q | 1, 2, 3, 4 | |\n * | | | qo | 1st, 2nd, 3rd, 4th | 5 |\n * | | | qq | 01, 02, 03, 04 | |\n * | | | qqq | Q1, Q2, Q3, Q4 | |\n * | | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | | qqqqq | 1, 2, 3, 4 | 3 |\n * | Month (formatting) | 110 | M | 1, 2, ..., 12 | |\n * | | | Mo | 1st, 2nd, ..., 12th | 5 |\n * | | | MM | 01, 02, ..., 12 | |\n * | | | MMM | Jan, Feb, ..., Dec | |\n * | | | MMMM | January, February, ..., December | 2 |\n * | | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | 110 | L | 1, 2, ..., 12 | |\n * | | | Lo | 1st, 2nd, ..., 12th | 5 |\n * | | | LL | 01, 02, ..., 12 | |\n * | | | LLL | Jan, Feb, ..., Dec | |\n * | | | LLLL | January, February, ..., December | 2 |\n * | | | LLLLL | J, F, ..., D | |\n * | Local week of year | 100 | w | 1, 2, ..., 53 | |\n * | | | wo | 1st, 2nd, ..., 53th | 5 |\n * | | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | 100 | I | 1, 2, ..., 53 | 5 |\n * | | | Io | 1st, 2nd, ..., 53th | 5 |\n * | | | II | 01, 02, ..., 53 | 5 |\n * | Day of month | 90 | d | 1, 2, ..., 31 | |\n * | | | do | 1st, 2nd, ..., 31st | 5 |\n * | | | dd | 01, 02, ..., 31 | |\n * | Day of year | 90 | D | 1, 2, ..., 365, 366 | 7 |\n * | | | Do | 1st, 2nd, ..., 365th, 366th | 5 |\n * | | | DD | 01, 02, ..., 365, 366 | 7 |\n * | | | DDD | 001, 002, ..., 365, 366 | |\n * | | | DDDD | ... | 2 |\n * | Day of week (formatting) | 90 | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | | EEEEE | M, T, W, T, F, S, S | |\n * | | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | 90 | i | 1, 2, 3, ..., 7 | 5 |\n * | | | io | 1st, 2nd, ..., 7th | 5 |\n * | | | ii | 01, 02, ..., 07 | 5 |\n * | | | iii | Mon, Tue, Wed, ..., Sun | 5 |\n * | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 |\n * | | | iiiii | M, T, W, T, F, S, S | 5 |\n * | | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 5 |\n * | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | |\n * | | | eo | 2nd, 3rd, ..., 1st | 5 |\n * | | | ee | 02, 03, ..., 01 | |\n * | | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | | eeeee | M, T, W, T, F, S, S | |\n * | | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | 90 | c | 2, 3, 4, ..., 1 | |\n * | | | co | 2nd, 3rd, ..., 1st | 5 |\n * | | | cc | 02, 03, ..., 01 | |\n * | | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | | ccccc | M, T, W, T, F, S, S | |\n * | | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | 80 | a..aaa | AM, PM | |\n * | | | aaaa | a.m., p.m. | 2 |\n * | | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | 80 | b..bbb | AM, PM, noon, midnight | |\n * | | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | | bbbbb | a, p, n, mi | |\n * | Flexible day period | 80 | B..BBB | at night, in the morning, ... | |\n * | | | BBBB | at night, in the morning, ... | 2 |\n * | | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | 70 | h | 1, 2, ..., 11, 12 | |\n * | | | ho | 1st, 2nd, ..., 11th, 12th | 5 |\n * | | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | 70 | H | 0, 1, 2, ..., 23 | |\n * | | | Ho | 0th, 1st, 2nd, ..., 23rd | 5 |\n * | | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | 70 | K | 1, 2, ..., 11, 0 | |\n * | | | Ko | 1st, 2nd, ..., 11th, 0th | 5 |\n * | | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | 70 | k | 24, 1, 2, ..., 23 | |\n * | | | ko | 24th, 1st, 2nd, ..., 23rd | 5 |\n * | | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | 60 | m | 0, 1, ..., 59 | |\n * | | | mo | 0th, 1st, ..., 59th | 5 |\n * | | | mm | 00, 01, ..., 59 | |\n * | Second | 50 | s | 0, 1, ..., 59 | |\n * | | | so | 0th, 1st, ..., 59th | 5 |\n * | | | ss | 00, 01, ..., 59 | |\n * | Seconds timestamp | 40 | t | 512969520 | |\n * | | | tt | ... | 2 |\n * | Fraction of second | 30 | S | 0, 1, ..., 9 | |\n * | | | SS | 00, 01, ..., 99 | |\n * | | | SSS | 000, 001, ..., 999 | |\n * | | | SSSS | ... | 2 |\n * | Milliseconds timestamp | 20 | T | 512969520900 | |\n * | | | TT | ... | 2 |\n * | Timezone (ISO-8601 w/ Z) | 10 | X | -08, +0530, Z | |\n * | | | XX | -0800, +0530, Z | |\n * | | | XXX | -08:00, +05:30, Z | |\n * | | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | 10 | x | -08, +0530, +00 | |\n * | | | xx | -0800, +0530, +0000 | |\n * | | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Long localized date | NA | P | 05/29/1453 | 5,8 |\n * | | | PP | May 29, 1453 | |\n * | | | PPP | May 29th, 1453 | |\n * | | | PPPP | Sunday, May 29th, 1453 | 2,5,8 |\n * | Long localized time | NA | p | 12:00 AM | 5,8 |\n * | | | pp | 12:00:00 AM | |\n * | Combination of date and time | NA | Pp | 05/29/1453, 12:00 AM | |\n * | | | PPpp | May 29, 1453, 12:00:00 AM | |\n * | | | PPPpp | May 29th, 1453 at ... | |\n * | | | PPPPpp | Sunday, May 29th, 1453 at ... | 2,5,8 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular.\n * In `format` function, they will produce different result:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * `parse` will try to match both formatting and stand-alone units interchangably.\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table:\n * - for numerical units (`yyyyyyyy`) `parse` will try to match a number\n * as wide as the sequence\n * - for text units (`MMMMMMMM`) `parse` will try to match the widest variation of the unit.\n * These variations are marked with \"2\" in the last column of the table.\n *\n * 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 4. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`:\n *\n * `parse('50', 'yy', new Date(2018, 0, 1)) //=> Sat Jan 01 2050 00:00:00`\n *\n * `parse('75', 'yy', new Date(2018, 0, 1)) //=> Wed Jan 01 1975 00:00:00`\n *\n * while `uu` will just assign the year as is:\n *\n * `parse('50', 'uu', new Date(2018, 0, 1)) //=> Sat Jan 01 0050 00:00:00`\n *\n * `parse('75', 'uu', new Date(2018, 0, 1)) //=> Tue Jan 01 0075 00:00:00`\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [setISOWeekYear]{@link https://date-fns.org/docs/setISOWeekYear}\n * and [setWeekYear]{@link https://date-fns.org/docs/setWeekYear}).\n *\n * 5. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 7. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based\n * on the given locale.\n *\n * using `en-US` locale: `P` => `MM/dd/yyyy`\n * using `en-US` locale: `p` => `hh:mm a`\n * using `pt-BR` locale: `P` => `dd/MM/yyyy`\n * using `pt-BR` locale: `p` => `HH:mm`\n *\n * Values will be assigned to the date in the descending order of its unit's priority.\n * Units of an equal priority overwrite each other in the order of appearance.\n *\n * If no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year),\n * the values will be taken from 3rd argument `referenceDate` which works as a context of parsing.\n *\n * `referenceDate` must be passed for correct work of the function.\n * If you're not sure which `referenceDate` to supply, create a new instance of Date:\n * `parse('02/11/2014', 'MM/dd/yyyy', new Date())`\n * In this case parsing will be done in the context of the current date.\n * If `referenceDate` is `Invalid Date` or a value not convertible to valid `Date`,\n * then `Invalid Date` will be returned.\n *\n * The result may vary by locale.\n *\n * If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned.\n *\n * If parsing failed, `Invalid Date` will be returned.\n * Invalid Date is a Date, whose time value is NaN.\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {String} dateString - the string to parse\n * @param {String} formatString - the string of tokens\n * @param {Date|Number} referenceDate - defines values missing from the parsed dateString\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @returns {Date} the parsed date\n * @throws {TypeError} 3 arguments required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} `options.locale` must contain `match` property\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Parse 11 February 2014 from middle-endian format:\n * var result = parse('02/11/2014', 'MM/dd/yyyy', new Date())\n * //=> Tue Feb 11 2014 00:00:00\n *\n * @example\n * // Parse 28th of February in Esperanto locale in the context of 2010 year:\n * import eo from 'date-fns/locale/eo'\n * var result = parse('28-a de februaro', \"do 'de' MMMM\", new Date(2010, 0, 1), {\n * locale: eo\n * })\n * //=> Sun Feb 28 2010 00:00:00\n */\n\nexport default function parse(dirtyDateString, dirtyFormatString, dirtyReferenceDate, options) {\n var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;\n\n requiredArgs(3, arguments);\n var dateString = String(dirtyDateString);\n var formatString = String(dirtyFormatString);\n var defaultOptions = getDefaultOptions();\n var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;\n\n if (!locale.match) {\n throw new RangeError('locale must contain match property');\n }\n\n var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n if (formatString === '') {\n if (dateString === '') {\n return toDate(dirtyReferenceDate);\n } else {\n return new Date(NaN);\n }\n }\n\n var subFnOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale\n }; // If timezone isn't specified, it will be set to the system timezone\n\n var setters = [new DateToSystemTimezoneSetter()];\n var tokens = formatString.match(longFormattingTokensRegExp).map(function (substring) {\n var firstCharacter = substring[0];\n\n if (firstCharacter in longFormatters) {\n var longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n\n return substring;\n }).join('').match(formattingTokensRegExp);\n var usedTokens = [];\n\n var _iterator = _createForOfIteratorHelper(tokens),\n _step;\n\n try {\n var _loop = function _loop() {\n var token = _step.value;\n\n if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(token)) {\n throwProtectedError(token, formatString, dirtyDateString);\n }\n\n if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(token)) {\n throwProtectedError(token, formatString, dirtyDateString);\n }\n\n var firstCharacter = token[0];\n var parser = parsers[firstCharacter];\n\n if (parser) {\n var incompatibleTokens = parser.incompatibleTokens;\n\n if (Array.isArray(incompatibleTokens)) {\n var incompatibleToken = usedTokens.find(function (usedToken) {\n return incompatibleTokens.includes(usedToken.token) || usedToken.token === firstCharacter;\n });\n\n if (incompatibleToken) {\n throw new RangeError(\"The format string mustn't contain `\".concat(incompatibleToken.fullToken, \"` and `\").concat(token, \"` at the same time\"));\n }\n } else if (parser.incompatibleTokens === '*' && usedTokens.length > 0) {\n throw new RangeError(\"The format string mustn't contain `\".concat(token, \"` and any other token at the same time\"));\n }\n\n usedTokens.push({\n token: firstCharacter,\n fullToken: token\n });\n var parseResult = parser.run(dateString, token, locale.match, subFnOptions);\n\n if (!parseResult) {\n return {\n v: new Date(NaN)\n };\n }\n\n setters.push(parseResult.setter);\n dateString = parseResult.rest;\n } else {\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n } // Replace two single quote characters with one single quote character\n\n\n if (token === \"''\") {\n token = \"'\";\n } else if (firstCharacter === \"'\") {\n token = cleanEscapedString(token);\n } // Cut token from string, or, if string doesn't match the token, return Invalid Date\n\n\n if (dateString.indexOf(token) === 0) {\n dateString = dateString.slice(token.length);\n } else {\n return {\n v: new Date(NaN)\n };\n }\n }\n };\n\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _ret = _loop();\n\n if (_typeof(_ret) === \"object\") return _ret.v;\n } // Check if the remaining input contains something other than whitespace\n\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n if (dateString.length > 0 && notWhitespaceRegExp.test(dateString)) {\n return new Date(NaN);\n }\n\n var uniquePrioritySetters = setters.map(function (setter) {\n return setter.priority;\n }).sort(function (a, b) {\n return b - a;\n }).filter(function (priority, index, array) {\n return array.indexOf(priority) === index;\n }).map(function (priority) {\n return setters.filter(function (setter) {\n return setter.priority === priority;\n }).sort(function (a, b) {\n return b.subPriority - a.subPriority;\n });\n }).map(function (setterArray) {\n return setterArray[0];\n });\n var date = toDate(dirtyReferenceDate);\n\n if (isNaN(date.getTime())) {\n return new Date(NaN);\n } // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n\n\n var utcDate = subMilliseconds(date, getTimezoneOffsetInMilliseconds(date));\n var flags = {};\n\n var _iterator2 = _createForOfIteratorHelper(uniquePrioritySetters),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var setter = _step2.value;\n\n if (!setter.validate(utcDate, subFnOptions)) {\n return new Date(NaN);\n }\n\n var result = setter.set(utcDate, flags, subFnOptions); // Result is tuple (date, flags)\n\n if (Array.isArray(result)) {\n utcDate = result[0];\n assign(flags, result[1]); // Result is date\n } else {\n utcDate = result;\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return utcDate;\n}\n\nfunction cleanEscapedString(input) {\n return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, \"'\");\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\n\nexport default function addMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var timestamp = toDate(dirtyDate).getTime();\n var amount = toInteger(dirtyAmount);\n return new Date(timestamp + amount);\n}","import addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name subMilliseconds\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\n\nexport default function subMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMilliseconds(dirtyDate, -amount);\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\n\nexport default function toDate(argument) {\n requiredArgs(1, arguments);\n var argStr = Object.prototype.toString.call(argument); // Clone the date\n\n if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n } else if (typeof argument === 'number' || argStr === '[object Number]') {\n return new Date(argument);\n } else {\n if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments\"); // eslint-disable-next-line no-console\n\n console.warn(new Error().stack);\n }\n\n return new Date(NaN);\n }\n}","/**\n* Muuri v0.9.5\n* https://muuri.dev/\n* Copyright (c) 2015-present, Haltu Oy\n* Released under the MIT license\n* https://github.com/haltu/muuri/blob/master/LICENSE.md\n* @license MIT\n*\n* Muuri Packer\n* Copyright (c) 2016-present, Niklas Rämö <inramo@gmail.com>\n* @license MIT\n*\n* Muuri Ticker / Muuri Emitter / Muuri Dragger\n* Copyright (c) 2018-present, Niklas Rämö <inramo@gmail.com>\n* @license MIT\n*\n* Muuri AutoScroller\n* Copyright (c) 2019-present, Niklas Rämö <inramo@gmail.com>\n* @license MIT\n*/\n\nvar GRID_INSTANCES = {};\nvar ITEM_ELEMENT_MAP = typeof Map === 'function' ? new Map() : null;\n\nvar ACTION_SWAP = 'swap';\nvar ACTION_MOVE = 'move';\n\nvar EVENT_SYNCHRONIZE = 'synchronize';\nvar EVENT_LAYOUT_START = 'layoutStart';\nvar EVENT_LAYOUT_END = 'layoutEnd';\nvar EVENT_LAYOUT_ABORT = 'layoutAbort';\nvar EVENT_ADD = 'add';\nvar EVENT_REMOVE = 'remove';\nvar EVENT_SHOW_START = 'showStart';\nvar EVENT_SHOW_END = 'showEnd';\nvar EVENT_HIDE_START = 'hideStart';\nvar EVENT_HIDE_END = 'hideEnd';\nvar EVENT_FILTER = 'filter';\nvar EVENT_SORT = 'sort';\nvar EVENT_MOVE = 'move';\nvar EVENT_SEND = 'send';\nvar EVENT_BEFORE_SEND = 'beforeSend';\nvar EVENT_RECEIVE = 'receive';\nvar EVENT_BEFORE_RECEIVE = 'beforeReceive';\nvar EVENT_DRAG_INIT = 'dragInit';\nvar EVENT_DRAG_START = 'dragStart';\nvar EVENT_DRAG_MOVE = 'dragMove';\nvar EVENT_DRAG_SCROLL = 'dragScroll';\nvar EVENT_DRAG_END = 'dragEnd';\nvar EVENT_DRAG_RELEASE_START = 'dragReleaseStart';\nvar EVENT_DRAG_RELEASE_END = 'dragReleaseEnd';\nvar EVENT_DESTROY = 'destroy';\n\nvar HAS_TOUCH_EVENTS = 'ontouchstart' in window;\nvar HAS_POINTER_EVENTS = !!window.PointerEvent;\nvar HAS_MS_POINTER_EVENTS = !!window.navigator.msPointerEnabled;\n\nvar MAX_SAFE_FLOAT32_INTEGER = 16777216;\n\n/**\n * Event emitter constructor.\n *\n * @class\n */\nfunction Emitter() {\n this._events = {};\n this._queue = [];\n this._counter = 0;\n this._clearOnEmit = false;\n}\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Bind an event listener.\n *\n * @public\n * @param {String} event\n * @param {Function} listener\n * @returns {Emitter}\n */\nEmitter.prototype.on = function (event, listener) {\n if (!this._events || !event || !listener) return this;\n\n // Get listeners queue and create it if it does not exist.\n var listeners = this._events[event];\n if (!listeners) listeners = this._events[event] = [];\n\n // Add the listener to the queue.\n listeners.push(listener);\n\n return this;\n};\n\n/**\n * Unbind all event listeners that match the provided listener function.\n *\n * @public\n * @param {String} event\n * @param {Function} listener\n * @returns {Emitter}\n */\nEmitter.prototype.off = function (event, listener) {\n if (!this._events || !event || !listener) return this;\n\n // Get listeners and return immediately if none is found.\n var listeners = this._events[event];\n if (!listeners || !listeners.length) return this;\n\n // Remove all matching listeners.\n var index;\n while ((index = listeners.indexOf(listener)) !== -1) {\n listeners.splice(index, 1);\n }\n\n return this;\n};\n\n/**\n * Unbind all listeners of the provided event.\n *\n * @public\n * @param {String} event\n * @returns {Emitter}\n */\nEmitter.prototype.clear = function (event) {\n if (!this._events || !event) return this;\n\n var listeners = this._events[event];\n if (listeners) {\n listeners.length = 0;\n delete this._events[event];\n }\n\n return this;\n};\n\n/**\n * Emit all listeners in a specified event with the provided arguments.\n *\n * @public\n * @param {String} event\n * @param {...*} [args]\n * @returns {Emitter}\n */\nEmitter.prototype.emit = function (event) {\n if (!this._events || !event) {\n this._clearOnEmit = false;\n return this;\n }\n\n // Get event listeners and quit early if there's no listeners.\n var listeners = this._events[event];\n if (!listeners || !listeners.length) {\n this._clearOnEmit = false;\n return this;\n }\n\n var queue = this._queue;\n var startIndex = queue.length;\n var argsLength = arguments.length - 1;\n var args;\n\n // If we have more than 3 arguments let's put the arguments in an array and\n // apply it to the listeners.\n if (argsLength > 3) {\n args = [];\n args.push.apply(args, arguments);\n args.shift();\n }\n\n // Add the current listeners to the callback queue before we process them.\n // This is necessary to guarantee that all of the listeners are called in\n // correct order even if new event listeners are removed/added during\n // processing and/or events are emitted during processing.\n queue.push.apply(queue, listeners);\n\n // Reset the event's listeners if need be.\n if (this._clearOnEmit) {\n listeners.length = 0;\n this._clearOnEmit = false;\n }\n\n // Increment queue counter. This is needed for the scenarios where emit is\n // triggered while the queue is already processing. We need to keep track of\n // how many \"queue processors\" there are active so that we can safely reset\n // the queue in the end when the last queue processor is finished.\n ++this._counter;\n\n // Process the queue (the specific part of it for this emit).\n var i = startIndex;\n var endIndex = queue.length;\n for (; i < endIndex; i++) {\n // prettier-ignore\n argsLength === 0 ? queue[i]() :\n argsLength === 1 ? queue[i](arguments[1]) :\n argsLength === 2 ? queue[i](arguments[1], arguments[2]) :\n argsLength === 3 ? queue[i](arguments[1], arguments[2], arguments[3]) :\n queue[i].apply(null, args);\n\n // Stop processing if the emitter is destroyed.\n if (!this._events) return this;\n }\n\n // Decrement queue process counter.\n --this._counter;\n\n // Reset the queue if there are no more queue processes running.\n if (!this._counter) queue.length = 0;\n\n return this;\n};\n\n/**\n * Emit all listeners in a specified event with the provided arguments and\n * remove the event's listeners just before calling the them. This method allows\n * the emitter to serve as a queue where all listeners are called only once.\n *\n * @public\n * @param {String} event\n * @param {...*} [args]\n * @returns {Emitter}\n */\nEmitter.prototype.burst = function () {\n if (!this._events) return this;\n this._clearOnEmit = true;\n this.emit.apply(this, arguments);\n return this;\n};\n\n/**\n * Check how many listeners there are for a specific event.\n *\n * @public\n * @param {String} event\n * @returns {Boolean}\n */\nEmitter.prototype.countListeners = function (event) {\n if (!this._events) return 0;\n var listeners = this._events[event];\n return listeners ? listeners.length : 0;\n};\n\n/**\n * Destroy emitter instance. Basically just removes all bound listeners.\n *\n * @public\n * @returns {Emitter}\n */\nEmitter.prototype.destroy = function () {\n if (!this._events) return this;\n this._queue.length = this._counter = 0;\n this._events = null;\n return this;\n};\n\nvar pointerout = HAS_POINTER_EVENTS ? 'pointerout' : HAS_MS_POINTER_EVENTS ? 'MSPointerOut' : '';\nvar waitDuration = 100;\n\n/**\n * If you happen to use Edge or IE on a touch capable device there is a\n * a specific case where pointercancel and pointerend events are never emitted,\n * even though one them should always be emitted when you release your finger\n * from the screen. The bug appears specifically when Muuri shifts the dragged\n * element's position in the DOM after pointerdown event, IE and Edge don't like\n * that behaviour and quite often forget to emit the pointerend/pointercancel\n * event. But, they do emit pointerout event so we utilize that here.\n * Specifically, if there has been no pointermove event within 100 milliseconds\n * since the last pointerout event we force cancel the drag operation. This hack\n * works surprisingly well 99% of the time. There is that 1% chance there still\n * that dragged items get stuck but it is what it is.\n *\n * @class\n * @param {Dragger} dragger\n */\nfunction EdgeHack(dragger) {\n if (!pointerout) return;\n\n this._dragger = dragger;\n this._timeout = null;\n this._outEvent = null;\n this._isActive = false;\n\n this._addBehaviour = this._addBehaviour.bind(this);\n this._removeBehaviour = this._removeBehaviour.bind(this);\n this._onTimeout = this._onTimeout.bind(this);\n this._resetData = this._resetData.bind(this);\n this._onStart = this._onStart.bind(this);\n this._onOut = this._onOut.bind(this);\n\n this._dragger.on('start', this._onStart);\n}\n\n/**\n * @private\n */\nEdgeHack.prototype._addBehaviour = function () {\n if (this._isActive) return;\n this._isActive = true;\n this._dragger.on('move', this._resetData);\n this._dragger.on('cancel', this._removeBehaviour);\n this._dragger.on('end', this._removeBehaviour);\n window.addEventListener(pointerout, this._onOut);\n};\n\n/**\n * @private\n */\nEdgeHack.prototype._removeBehaviour = function () {\n if (!this._isActive) return;\n this._dragger.off('move', this._resetData);\n this._dragger.off('cancel', this._removeBehaviour);\n this._dragger.off('end', this._removeBehaviour);\n window.removeEventListener(pointerout, this._onOut);\n this._resetData();\n this._isActive = false;\n};\n\n/**\n * @private\n */\nEdgeHack.prototype._resetData = function () {\n window.clearTimeout(this._timeout);\n this._timeout = null;\n this._outEvent = null;\n};\n\n/**\n * @private\n * @param {(PointerEvent|TouchEvent|MouseEvent)} e\n */\nEdgeHack.prototype._onStart = function (e) {\n if (e.pointerType === 'mouse') return;\n this._addBehaviour();\n};\n\n/**\n * @private\n * @param {(PointerEvent|TouchEvent|MouseEvent)} e\n */\nEdgeHack.prototype._onOut = function (e) {\n if (!this._dragger._getTrackedTouch(e)) return;\n this._resetData();\n this._outEvent = e;\n this._timeout = window.setTimeout(this._onTimeout, waitDuration);\n};\n\n/**\n * @private\n */\nEdgeHack.prototype._onTimeout = function () {\n var e = this._outEvent;\n this._resetData();\n if (this._dragger.isActive()) this._dragger._onCancel(e);\n};\n\n/**\n * @public\n */\nEdgeHack.prototype.destroy = function () {\n if (!pointerout) return;\n this._dragger.off('start', this._onStart);\n this._removeBehaviour();\n};\n\n// Playing it safe here, test all potential prefixes capitalized and lowercase.\nvar vendorPrefixes = ['', 'webkit', 'moz', 'ms', 'o', 'Webkit', 'Moz', 'MS', 'O'];\nvar cache$2 = {};\n\n/**\n * Get prefixed CSS property name when given a non-prefixed CSS property name.\n * Returns null if the property is not supported at all.\n *\n * @param {CSSStyleDeclaration} style\n * @param {String} prop\n * @returns {String}\n */\nfunction getPrefixedPropName(style, prop) {\n var prefixedProp = cache$2[prop] || '';\n if (prefixedProp) return prefixedProp;\n\n var camelProp = prop[0].toUpperCase() + prop.slice(1);\n var i = 0;\n while (i < vendorPrefixes.length) {\n prefixedProp = vendorPrefixes[i] ? vendorPrefixes[i] + camelProp : prop;\n if (prefixedProp in style) {\n cache$2[prop] = prefixedProp;\n return prefixedProp;\n }\n ++i;\n }\n\n return '';\n}\n\n/**\n * Check if passive events are supported.\n * https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection\n *\n * @returns {Boolean}\n */\nfunction hasPassiveEvents() {\n var isPassiveEventsSupported = false;\n\n try {\n var passiveOpts = Object.defineProperty({}, 'passive', {\n get: function () {\n isPassiveEventsSupported = true;\n },\n });\n window.addEventListener('testPassive', null, passiveOpts);\n window.removeEventListener('testPassive', null, passiveOpts);\n } catch (e) {}\n\n return isPassiveEventsSupported;\n}\n\nvar ua = window.navigator.userAgent.toLowerCase();\nvar isEdge = ua.indexOf('edge') > -1;\nvar isIE = ua.indexOf('trident') > -1;\nvar isFirefox = ua.indexOf('firefox') > -1;\nvar isAndroid = ua.indexOf('android') > -1;\n\nvar listenerOptions = hasPassiveEvents() ? { passive: true } : false;\n\nvar taProp = 'touchAction';\nvar taPropPrefixed = getPrefixedPropName(document.documentElement.style, taProp);\nvar taDefaultValue = 'auto';\n\n/**\n * Creates a new Dragger instance for an element.\n *\n * @public\n * @class\n * @param {HTMLElement} element\n * @param {Object} [cssProps]\n */\nfunction Dragger(element, cssProps) {\n this._element = element;\n this._emitter = new Emitter();\n this._isDestroyed = false;\n this._cssProps = {};\n this._touchAction = '';\n this._isActive = false;\n\n this._pointerId = null;\n this._startTime = 0;\n this._startX = 0;\n this._startY = 0;\n this._currentX = 0;\n this._currentY = 0;\n\n this._onStart = this._onStart.bind(this);\n this._onMove = this._onMove.bind(this);\n this._onCancel = this._onCancel.bind(this);\n this._onEnd = this._onEnd.bind(this);\n\n // Can't believe had to build a freaking class for a hack!\n this._edgeHack = null;\n if ((isEdge || isIE) && (HAS_POINTER_EVENTS || HAS_MS_POINTER_EVENTS)) {\n this._edgeHack = new EdgeHack(this);\n }\n\n // Apply initial CSS props.\n this.setCssProps(cssProps);\n\n // If touch action was not provided with initial CSS props let's assume it's\n // auto.\n if (!this._touchAction) {\n this.setTouchAction(taDefaultValue);\n }\n\n // Prevent native link/image dragging for the item and it's children.\n element.addEventListener('dragstart', Dragger._preventDefault, false);\n\n // Listen to start event.\n element.addEventListener(Dragger._inputEvents.start, this._onStart, listenerOptions);\n}\n\n/**\n * Protected properties\n * ********************\n */\n\nDragger._pointerEvents = {\n start: 'pointerdown',\n move: 'pointermove',\n cancel: 'pointercancel',\n end: 'pointerup',\n};\n\nDragger._msPointerEvents = {\n start: 'MSPointerDown',\n move: 'MSPointerMove',\n cancel: 'MSPointerCancel',\n end: 'MSPointerUp',\n};\n\nDragger._touchEvents = {\n start: 'touchstart',\n move: 'touchmove',\n cancel: 'touchcancel',\n end: 'touchend',\n};\n\nDragger._mouseEvents = {\n start: 'mousedown',\n move: 'mousemove',\n cancel: '',\n end: 'mouseup',\n};\n\nDragger._inputEvents = (function () {\n if (HAS_TOUCH_EVENTS) return Dragger._touchEvents;\n if (HAS_POINTER_EVENTS) return Dragger._pointerEvents;\n if (HAS_MS_POINTER_EVENTS) return Dragger._msPointerEvents;\n return Dragger._mouseEvents;\n})();\n\nDragger._emitter = new Emitter();\n\nDragger._emitterEvents = {\n start: 'start',\n move: 'move',\n end: 'end',\n cancel: 'cancel',\n};\n\nDragger._activeInstances = [];\n\n/**\n * Protected static methods\n * ************************\n */\n\nDragger._preventDefault = function (e) {\n if (e.preventDefault && e.cancelable !== false) e.preventDefault();\n};\n\nDragger._activateInstance = function (instance) {\n var index = Dragger._activeInstances.indexOf(instance);\n if (index > -1) return;\n\n Dragger._activeInstances.push(instance);\n Dragger._emitter.on(Dragger._emitterEvents.move, instance._onMove);\n Dragger._emitter.on(Dragger._emitterEvents.cancel, instance._onCancel);\n Dragger._emitter.on(Dragger._emitterEvents.end, instance._onEnd);\n\n if (Dragger._activeInstances.length === 1) {\n Dragger._bindListeners();\n }\n};\n\nDragger._deactivateInstance = function (instance) {\n var index = Dragger._activeInstances.indexOf(instance);\n if (index === -1) return;\n\n Dragger._activeInstances.splice(index, 1);\n Dragger._emitter.off(Dragger._emitterEvents.move, instance._onMove);\n Dragger._emitter.off(Dragger._emitterEvents.cancel, instance._onCancel);\n Dragger._emitter.off(Dragger._emitterEvents.end, instance._onEnd);\n\n if (!Dragger._activeInstances.length) {\n Dragger._unbindListeners();\n }\n};\n\nDragger._bindListeners = function () {\n window.addEventListener(Dragger._inputEvents.move, Dragger._onMove, listenerOptions);\n window.addEventListener(Dragger._inputEvents.end, Dragger._onEnd, listenerOptions);\n if (Dragger._inputEvents.cancel) {\n window.addEventListener(Dragger._inputEvents.cancel, Dragger._onCancel, listenerOptions);\n }\n};\n\nDragger._unbindListeners = function () {\n window.removeEventListener(Dragger._inputEvents.move, Dragger._onMove, listenerOptions);\n window.removeEventListener(Dragger._inputEvents.end, Dragger._onEnd, listenerOptions);\n if (Dragger._inputEvents.cancel) {\n window.removeEventListener(Dragger._inputEvents.cancel, Dragger._onCancel, listenerOptions);\n }\n};\n\nDragger._getEventPointerId = function (event) {\n // If we have pointer id available let's use it.\n if (typeof event.pointerId === 'number') {\n return event.pointerId;\n }\n\n // For touch events let's get the first changed touch's identifier.\n if (event.changedTouches) {\n return event.changedTouches[0] ? event.changedTouches[0].identifier : null;\n }\n\n // For mouse/other events let's provide a static id.\n return 1;\n};\n\nDragger._getTouchById = function (event, id) {\n // If we have a pointer event return the whole event if there's a match, and\n // null otherwise.\n if (typeof event.pointerId === 'number') {\n return event.pointerId === id ? event : null;\n }\n\n // For touch events let's check if there's a changed touch object that matches\n // the pointerId in which case return the touch object.\n if (event.changedTouches) {\n for (var i = 0; i < event.changedTouches.length; i++) {\n if (event.changedTouches[i].identifier === id) {\n return event.changedTouches[i];\n }\n }\n return null;\n }\n\n // For mouse/other events let's assume there's only one pointer and just\n // return the event.\n return event;\n};\n\nDragger._onMove = function (e) {\n Dragger._emitter.emit(Dragger._emitterEvents.move, e);\n};\n\nDragger._onCancel = function (e) {\n Dragger._emitter.emit(Dragger._emitterEvents.cancel, e);\n};\n\nDragger._onEnd = function (e) {\n Dragger._emitter.emit(Dragger._emitterEvents.end, e);\n};\n\n/**\n * Private prototype methods\n * *************************\n */\n\n/**\n * Reset current drag operation (if any).\n *\n * @private\n */\nDragger.prototype._reset = function () {\n this._pointerId = null;\n this._startTime = 0;\n this._startX = 0;\n this._startY = 0;\n this._currentX = 0;\n this._currentY = 0;\n this._isActive = false;\n Dragger._deactivateInstance(this);\n};\n\n/**\n * Create a custom dragger event from a raw event.\n *\n * @private\n * @param {String} type\n * @param {(PointerEvent|TouchEvent|MouseEvent)} e\n * @returns {Object}\n */\nDragger.prototype._createEvent = function (type, e) {\n var touch = this._getTrackedTouch(e);\n return {\n // Hammer.js compatibility interface.\n type: type,\n srcEvent: e,\n distance: this.getDistance(),\n deltaX: this.getDeltaX(),\n deltaY: this.getDeltaY(),\n deltaTime: type === Dragger._emitterEvents.start ? 0 : this.getDeltaTime(),\n isFirst: type === Dragger._emitterEvents.start,\n isFinal: type === Dragger._emitterEvents.end || type === Dragger._emitterEvents.cancel,\n pointerType: e.pointerType || (e.touches ? 'touch' : 'mouse'),\n // Partial Touch API interface.\n identifier: this._pointerId,\n screenX: touch.screenX,\n screenY: touch.screenY,\n clientX: touch.clientX,\n clientY: touch.clientY,\n pageX: touch.pageX,\n pageY: touch.pageY,\n target: touch.target,\n };\n};\n\n/**\n * Emit a raw event as dragger event internally.\n *\n * @private\n * @param {String} type\n * @param {(PointerEvent|TouchEvent|MouseEvent)} e\n */\nDragger.prototype._emit = function (type, e) {\n this._emitter.emit(type, this._createEvent(type, e));\n};\n\n/**\n * If the provided event is a PointerEvent this method will return it if it has\n * the same pointerId as the instance. If the provided event is a TouchEvent\n * this method will try to look for a Touch instance in the changedTouches that\n * has an identifier matching this instance's pointerId. If the provided event\n * is a MouseEvent (or just any other event than PointerEvent or TouchEvent)\n * it will be returned immediately.\n *\n * @private\n * @param {(PointerEvent|TouchEvent|MouseEvent)} e\n * @returns {?(Touch|PointerEvent|MouseEvent)}\n */\nDragger.prototype._getTrackedTouch = function (e) {\n if (this._pointerId === null) return null;\n return Dragger._getTouchById(e, this._pointerId);\n};\n\n/**\n * Handler for start event.\n *\n * @private\n * @param {(PointerEvent|TouchEvent|MouseEvent)} e\n */\nDragger.prototype._onStart = function (e) {\n if (this._isDestroyed) return;\n\n // If pointer id is already assigned let's return early.\n if (this._pointerId !== null) return;\n\n // Get (and set) pointer id.\n this._pointerId = Dragger._getEventPointerId(e);\n if (this._pointerId === null) return;\n\n // Setup initial data and emit start event.\n var touch = this._getTrackedTouch(e);\n this._startX = this._currentX = touch.clientX;\n this._startY = this._currentY = touch.clientY;\n this._startTime = Date.now();\n this._isActive = true;\n this._emit(Dragger._emitterEvents.start, e);\n\n // If the drag procedure was not reset within the start procedure let's\n // activate the instance (start listening to move/cancel/end events).\n if (this._isActive) {\n Dragger._activateInstance(this);\n }\n};\n\n/**\n * Handler for move event.\n *\n * @private\n * @param {(PointerEvent|TouchEvent|MouseEvent)} e\n */\nDragger.prototype._onMove = function (e) {\n var touch = this._getTrackedTouch(e);\n if (!touch) return;\n this._currentX = touch.clientX;\n this._currentY = touch.clientY;\n this._emit(Dragger._emitterEvents.move, e);\n};\n\n/**\n * Handler for cancel event.\n *\n * @private\n * @param {(PointerEvent|TouchEvent|MouseEvent)} e\n */\nDragger.prototype._onCancel = function (e) {\n if (!this._getTrackedTouch(e)) return;\n this._emit(Dragger._emitterEvents.cancel, e);\n this._reset();\n};\n\n/**\n * Handler for end event.\n *\n * @private\n * @param {(PointerEvent|TouchEvent|MouseEvent)} e\n */\nDragger.prototype._onEnd = function (e) {\n if (!this._getTrackedTouch(e)) return;\n this._emit(Dragger._emitterEvents.end, e);\n this._reset();\n};\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Check if the element is being dragged at the moment.\n *\n * @public\n * @returns {Boolean}\n */\nDragger.prototype.isActive = function () {\n return this._isActive;\n};\n\n/**\n * Set element's touch-action CSS property.\n *\n * @public\n * @param {String} value\n */\nDragger.prototype.setTouchAction = function (value) {\n // Store unmodified touch action value (we trust user input here).\n this._touchAction = value;\n\n // Set touch-action style.\n if (taPropPrefixed) {\n this._cssProps[taPropPrefixed] = '';\n this._element.style[taPropPrefixed] = value;\n }\n\n // If we have an unsupported touch-action value let's add a special listener\n // that prevents default action on touch start event. A dirty hack, but best\n // we can do for now. The other options would be to somehow polyfill the\n // unsupported touch action behavior with custom heuristics which sounds like\n // a can of worms. We do a special exception here for Firefox Android which's\n // touch-action does not work properly if the dragged element is moved in the\n // the DOM tree on touchstart.\n if (HAS_TOUCH_EVENTS) {\n this._element.removeEventListener(Dragger._touchEvents.start, Dragger._preventDefault, true);\n if (this._element.style[taPropPrefixed] !== value || (isFirefox && isAndroid)) {\n this._element.addEventListener(Dragger._touchEvents.start, Dragger._preventDefault, true);\n }\n }\n};\n\n/**\n * Update element's CSS properties. Accepts an object with camel cased style\n * props with value pairs as it's first argument.\n *\n * @public\n * @param {Object} [newProps]\n */\nDragger.prototype.setCssProps = function (newProps) {\n if (!newProps) return;\n\n var currentProps = this._cssProps;\n var element = this._element;\n var prop;\n var prefixedProp;\n\n // Reset current props.\n for (prop in currentProps) {\n element.style[prop] = currentProps[prop];\n delete currentProps[prop];\n }\n\n // Set new props.\n for (prop in newProps) {\n // Make sure we have a value for the prop.\n if (!newProps[prop]) continue;\n\n // Special handling for touch-action.\n if (prop === taProp) {\n this.setTouchAction(newProps[prop]);\n continue;\n }\n\n // Get prefixed prop and skip if it does not exist.\n prefixedProp = getPrefixedPropName(element.style, prop);\n if (!prefixedProp) continue;\n\n // Store the prop and add the style.\n currentProps[prefixedProp] = '';\n element.style[prefixedProp] = newProps[prop];\n }\n};\n\n/**\n * How much the pointer has moved on x-axis from start position, in pixels.\n * Positive value indicates movement from left to right.\n *\n * @public\n * @returns {Number}\n */\nDragger.prototype.getDeltaX = function () {\n return this._currentX - this._startX;\n};\n\n/**\n * How much the pointer has moved on y-axis from start position, in pixels.\n * Positive value indicates movement from top to bottom.\n *\n * @public\n * @returns {Number}\n */\nDragger.prototype.getDeltaY = function () {\n return this._currentY - this._startY;\n};\n\n/**\n * How far (in pixels) has pointer moved from start position.\n *\n * @public\n * @returns {Number}\n */\nDragger.prototype.getDistance = function () {\n var x = this.getDeltaX();\n var y = this.getDeltaY();\n return Math.sqrt(x * x + y * y);\n};\n\n/**\n * How long has pointer been dragged.\n *\n * @public\n * @returns {Number}\n */\nDragger.prototype.getDeltaTime = function () {\n return this._startTime ? Date.now() - this._startTime : 0;\n};\n\n/**\n * Bind drag event listeners.\n *\n * @public\n * @param {String} eventName\n * - 'start', 'move', 'cancel' or 'end'.\n * @param {Function} listener\n */\nDragger.prototype.on = function (eventName, listener) {\n this._emitter.on(eventName, listener);\n};\n\n/**\n * Unbind drag event listeners.\n *\n * @public\n * @param {String} eventName\n * - 'start', 'move', 'cancel' or 'end'.\n * @param {Function} listener\n */\nDragger.prototype.off = function (eventName, listener) {\n this._emitter.off(eventName, listener);\n};\n\n/**\n * Destroy the instance and unbind all drag event listeners.\n *\n * @public\n */\nDragger.prototype.destroy = function () {\n if (this._isDestroyed) return;\n\n var element = this._element;\n\n if (this._edgeHack) this._edgeHack.destroy();\n\n // Reset data and deactivate the instance.\n this._reset();\n\n // Destroy emitter.\n this._emitter.destroy();\n\n // Unbind event handlers.\n element.removeEventListener(Dragger._inputEvents.start, this._onStart, listenerOptions);\n element.removeEventListener('dragstart', Dragger._preventDefault, false);\n element.removeEventListener(Dragger._touchEvents.start, Dragger._preventDefault, true);\n\n // Reset styles.\n for (var prop in this._cssProps) {\n element.style[prop] = this._cssProps[prop];\n delete this._cssProps[prop];\n }\n\n // Reset data.\n this._element = null;\n\n // Mark as destroyed.\n this._isDestroyed = true;\n};\n\nvar dt = 1000 / 60;\n\nvar raf = (\n window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.msRequestAnimationFrame ||\n function (callback) {\n return this.setTimeout(function () {\n callback(Date.now());\n }, dt);\n }\n).bind(window);\n\n/**\n * A ticker system for handling DOM reads and writes in an efficient way.\n *\n * @class\n */\nfunction Ticker(numLanes) {\n this._nextStep = null;\n this._lanes = [];\n this._stepQueue = [];\n this._stepCallbacks = {};\n this._step = this._step.bind(this);\n for (var i = 0; i < numLanes; i++) {\n this._lanes.push(new TickerLane());\n }\n}\n\nTicker.prototype._step = function (time) {\n var lanes = this._lanes;\n var stepQueue = this._stepQueue;\n var stepCallbacks = this._stepCallbacks;\n var i, j, id, laneQueue, laneCallbacks, laneIndices;\n\n this._nextStep = null;\n\n for (i = 0; i < lanes.length; i++) {\n laneQueue = lanes[i].queue;\n laneCallbacks = lanes[i].callbacks;\n laneIndices = lanes[i].indices;\n for (j = 0; j < laneQueue.length; j++) {\n id = laneQueue[j];\n if (!id) continue;\n stepQueue.push(id);\n stepCallbacks[id] = laneCallbacks[id];\n delete laneCallbacks[id];\n delete laneIndices[id];\n }\n laneQueue.length = 0;\n }\n\n for (i = 0; i < stepQueue.length; i++) {\n id = stepQueue[i];\n if (stepCallbacks[id]) stepCallbacks[id](time);\n delete stepCallbacks[id];\n }\n\n stepQueue.length = 0;\n};\n\nTicker.prototype.add = function (laneIndex, id, callback) {\n this._lanes[laneIndex].add(id, callback);\n if (!this._nextStep) this._nextStep = raf(this._step);\n};\n\nTicker.prototype.remove = function (laneIndex, id) {\n this._lanes[laneIndex].remove(id);\n};\n\n/**\n * A lane for ticker.\n *\n * @class\n */\nfunction TickerLane() {\n this.queue = [];\n this.indices = {};\n this.callbacks = {};\n}\n\nTickerLane.prototype.add = function (id, callback) {\n var index = this.indices[id];\n if (index !== undefined) this.queue[index] = undefined;\n this.queue.push(id);\n this.callbacks[id] = callback;\n this.indices[id] = this.queue.length - 1;\n};\n\nTickerLane.prototype.remove = function (id) {\n var index = this.indices[id];\n if (index === undefined) return;\n this.queue[index] = undefined;\n delete this.callbacks[id];\n delete this.indices[id];\n};\n\nvar LAYOUT_READ = 'layoutRead';\nvar LAYOUT_WRITE = 'layoutWrite';\nvar VISIBILITY_READ = 'visibilityRead';\nvar VISIBILITY_WRITE = 'visibilityWrite';\nvar DRAG_START_READ = 'dragStartRead';\nvar DRAG_START_WRITE = 'dragStartWrite';\nvar DRAG_MOVE_READ = 'dragMoveRead';\nvar DRAG_MOVE_WRITE = 'dragMoveWrite';\nvar DRAG_SCROLL_READ = 'dragScrollRead';\nvar DRAG_SCROLL_WRITE = 'dragScrollWrite';\nvar DRAG_SORT_READ = 'dragSortRead';\nvar PLACEHOLDER_LAYOUT_READ = 'placeholderLayoutRead';\nvar PLACEHOLDER_LAYOUT_WRITE = 'placeholderLayoutWrite';\nvar PLACEHOLDER_RESIZE_WRITE = 'placeholderResizeWrite';\nvar AUTO_SCROLL_READ = 'autoScrollRead';\nvar AUTO_SCROLL_WRITE = 'autoScrollWrite';\nvar DEBOUNCE_READ = 'debounceRead';\n\nvar LANE_READ = 0;\nvar LANE_READ_TAIL = 1;\nvar LANE_WRITE = 2;\n\nvar ticker = new Ticker(3);\n\nfunction addLayoutTick(itemId, read, write) {\n ticker.add(LANE_READ, LAYOUT_READ + itemId, read);\n ticker.add(LANE_WRITE, LAYOUT_WRITE + itemId, write);\n}\n\nfunction cancelLayoutTick(itemId) {\n ticker.remove(LANE_READ, LAYOUT_READ + itemId);\n ticker.remove(LANE_WRITE, LAYOUT_WRITE + itemId);\n}\n\nfunction addVisibilityTick(itemId, read, write) {\n ticker.add(LANE_READ, VISIBILITY_READ + itemId, read);\n ticker.add(LANE_WRITE, VISIBILITY_WRITE + itemId, write);\n}\n\nfunction cancelVisibilityTick(itemId) {\n ticker.remove(LANE_READ, VISIBILITY_READ + itemId);\n ticker.remove(LANE_WRITE, VISIBILITY_WRITE + itemId);\n}\n\nfunction addDragStartTick(itemId, read, write) {\n ticker.add(LANE_READ, DRAG_START_READ + itemId, read);\n ticker.add(LANE_WRITE, DRAG_START_WRITE + itemId, write);\n}\n\nfunction cancelDragStartTick(itemId) {\n ticker.remove(LANE_READ, DRAG_START_READ + itemId);\n ticker.remove(LANE_WRITE, DRAG_START_WRITE + itemId);\n}\n\nfunction addDragMoveTick(itemId, read, write) {\n ticker.add(LANE_READ, DRAG_MOVE_READ + itemId, read);\n ticker.add(LANE_WRITE, DRAG_MOVE_WRITE + itemId, write);\n}\n\nfunction cancelDragMoveTick(itemId) {\n ticker.remove(LANE_READ, DRAG_MOVE_READ + itemId);\n ticker.remove(LANE_WRITE, DRAG_MOVE_WRITE + itemId);\n}\n\nfunction addDragScrollTick(itemId, read, write) {\n ticker.add(LANE_READ, DRAG_SCROLL_READ + itemId, read);\n ticker.add(LANE_WRITE, DRAG_SCROLL_WRITE + itemId, write);\n}\n\nfunction cancelDragScrollTick(itemId) {\n ticker.remove(LANE_READ, DRAG_SCROLL_READ + itemId);\n ticker.remove(LANE_WRITE, DRAG_SCROLL_WRITE + itemId);\n}\n\nfunction addDragSortTick(itemId, read) {\n ticker.add(LANE_READ_TAIL, DRAG_SORT_READ + itemId, read);\n}\n\nfunction cancelDragSortTick(itemId) {\n ticker.remove(LANE_READ_TAIL, DRAG_SORT_READ + itemId);\n}\n\nfunction addPlaceholderLayoutTick(itemId, read, write) {\n ticker.add(LANE_READ, PLACEHOLDER_LAYOUT_READ + itemId, read);\n ticker.add(LANE_WRITE, PLACEHOLDER_LAYOUT_WRITE + itemId, write);\n}\n\nfunction cancelPlaceholderLayoutTick(itemId) {\n ticker.remove(LANE_READ, PLACEHOLDER_LAYOUT_READ + itemId);\n ticker.remove(LANE_WRITE, PLACEHOLDER_LAYOUT_WRITE + itemId);\n}\n\nfunction addPlaceholderResizeTick(itemId, write) {\n ticker.add(LANE_WRITE, PLACEHOLDER_RESIZE_WRITE + itemId, write);\n}\n\nfunction cancelPlaceholderResizeTick(itemId) {\n ticker.remove(LANE_WRITE, PLACEHOLDER_RESIZE_WRITE + itemId);\n}\n\nfunction addAutoScrollTick(read, write) {\n ticker.add(LANE_READ, AUTO_SCROLL_READ, read);\n ticker.add(LANE_WRITE, AUTO_SCROLL_WRITE, write);\n}\n\nfunction cancelAutoScrollTick() {\n ticker.remove(LANE_READ, AUTO_SCROLL_READ);\n ticker.remove(LANE_WRITE, AUTO_SCROLL_WRITE);\n}\n\nfunction addDebounceTick(debounceId, read) {\n ticker.add(LANE_READ, DEBOUNCE_READ + debounceId, read);\n}\n\nfunction cancelDebounceTick(debounceId) {\n ticker.remove(LANE_READ, DEBOUNCE_READ + debounceId);\n}\n\nvar AXIS_X = 1;\nvar AXIS_Y = 2;\nvar FORWARD = 4;\nvar BACKWARD = 8;\nvar LEFT = AXIS_X | BACKWARD;\nvar RIGHT = AXIS_X | FORWARD;\nvar UP = AXIS_Y | BACKWARD;\nvar DOWN = AXIS_Y | FORWARD;\n\nvar functionType = 'function';\n\n/**\n * Check if a value is a function.\n *\n * @param {*} val\n * @returns {Boolean}\n */\nfunction isFunction(val) {\n return typeof val === functionType;\n}\n\nvar cache$1 = typeof WeakMap === 'function' ? new WeakMap() : null;\n\n/**\n * Returns the computed value of an element's style property as a string.\n *\n * @param {HTMLElement} element\n * @param {String} style\n * @returns {String}\n */\nfunction getStyle(element, style) {\n var styles = cache$1 && cache$1.get(element);\n\n if (!styles) {\n styles = window.getComputedStyle(element, null);\n if (cache$1) cache$1.set(element, styles);\n }\n\n return styles.getPropertyValue(style);\n}\n\n/**\n * Returns the computed value of an element's style property transformed into\n * a float value.\n *\n * @param {HTMLElement} el\n * @param {String} style\n * @returns {Number}\n */\nfunction getStyleAsFloat(el, style) {\n return parseFloat(getStyle(el, style)) || 0;\n}\n\nvar DOC_ELEM = document.documentElement;\nvar BODY = document.body;\nvar THRESHOLD_DATA = { value: 0, offset: 0 };\n\n/**\n * @param {HTMLElement|Window} element\n * @returns {HTMLElement|Window}\n */\nfunction getScrollElement(element) {\n if (element === window || element === DOC_ELEM || element === BODY) {\n return window;\n } else {\n return element;\n }\n}\n\n/**\n * @param {HTMLElement|Window} element\n * @returns {Number}\n */\nfunction getScrollLeft(element) {\n return element === window ? element.pageXOffset : element.scrollLeft;\n}\n\n/**\n * @param {HTMLElement|Window} element\n * @returns {Number}\n */\nfunction getScrollTop(element) {\n return element === window ? element.pageYOffset : element.scrollTop;\n}\n\n/**\n * @param {HTMLElement|Window} element\n * @returns {Number}\n */\nfunction getScrollLeftMax(element) {\n if (element === window) {\n return DOC_ELEM.scrollWidth - DOC_ELEM.clientWidth;\n } else {\n return element.scrollWidth - element.clientWidth;\n }\n}\n\n/**\n * @param {HTMLElement|Window} element\n * @returns {Number}\n */\nfunction getScrollTopMax(element) {\n if (element === window) {\n return DOC_ELEM.scrollHeight - DOC_ELEM.clientHeight;\n } else {\n return element.scrollHeight - element.clientHeight;\n }\n}\n\n/**\n * Get window's or element's client rectangle data relative to the element's\n * content dimensions (includes inner size + padding, excludes scrollbars,\n * borders and margins).\n *\n * @param {HTMLElement|Window} element\n * @returns {Rectangle}\n */\nfunction getContentRect(element, result) {\n result = result || {};\n\n if (element === window) {\n result.width = DOC_ELEM.clientWidth;\n result.height = DOC_ELEM.clientHeight;\n result.left = 0;\n result.right = result.width;\n result.top = 0;\n result.bottom = result.height;\n } else {\n var bcr = element.getBoundingClientRect();\n var borderLeft = element.clientLeft || getStyleAsFloat(element, 'border-left-width');\n var borderTop = element.clientTop || getStyleAsFloat(element, 'border-top-width');\n result.width = element.clientWidth;\n result.height = element.clientHeight;\n result.left = bcr.left + borderLeft;\n result.right = result.left + result.width;\n result.top = bcr.top + borderTop;\n result.bottom = result.top + result.height;\n }\n\n return result;\n}\n\n/**\n * @param {Item} item\n * @returns {Object}\n */\nfunction getItemAutoScrollSettings(item) {\n return item._drag._getGrid()._settings.dragAutoScroll;\n}\n\n/**\n * @param {Item} item\n */\nfunction prepareItemScrollSync(item) {\n if (!item._drag) return;\n item._drag._prepareScroll();\n}\n\n/**\n * @param {Item} item\n */\nfunction applyItemScrollSync(item) {\n if (!item._drag || !item._isActive) return;\n var drag = item._drag;\n drag._scrollDiffX = drag._scrollDiffY = 0;\n item._setTranslate(drag._left, drag._top);\n}\n\n/**\n * Compute threshold value and edge offset.\n *\n * @param {Number} threshold\n * @param {Number} safeZone\n * @param {Number} itemSize\n * @param {Number} targetSize\n * @returns {Object}\n */\nfunction computeThreshold(threshold, safeZone, itemSize, targetSize) {\n THRESHOLD_DATA.value = Math.min(targetSize / 2, threshold);\n THRESHOLD_DATA.offset =\n Math.max(0, itemSize + THRESHOLD_DATA.value * 2 + targetSize * safeZone - targetSize) / 2;\n return THRESHOLD_DATA;\n}\n\nfunction ScrollRequest() {\n this.reset();\n}\n\nScrollRequest.prototype.reset = function () {\n if (this.isActive) this.onStop();\n this.item = null;\n this.element = null;\n this.isActive = false;\n this.isEnding = false;\n this.direction = null;\n this.value = null;\n this.maxValue = 0;\n this.threshold = 0;\n this.distance = 0;\n this.speed = 0;\n this.duration = 0;\n this.action = null;\n};\n\nScrollRequest.prototype.hasReachedEnd = function () {\n return FORWARD & this.direction ? this.value >= this.maxValue : this.value <= 0;\n};\n\nScrollRequest.prototype.computeCurrentScrollValue = function () {\n if (this.value === null) {\n return AXIS_X & this.direction ? getScrollLeft(this.element) : getScrollTop(this.element);\n }\n return Math.max(0, Math.min(this.value, this.maxValue));\n};\n\nScrollRequest.prototype.computeNextScrollValue = function (deltaTime) {\n var delta = this.speed * (deltaTime / 1000);\n var nextValue = FORWARD & this.direction ? this.value + delta : this.value - delta;\n return Math.max(0, Math.min(nextValue, this.maxValue));\n};\n\nScrollRequest.prototype.computeSpeed = (function () {\n var data = {\n direction: null,\n threshold: 0,\n distance: 0,\n value: 0,\n maxValue: 0,\n deltaTime: 0,\n duration: 0,\n isEnding: false,\n };\n\n return function (deltaTime) {\n var item = this.item;\n var speed = getItemAutoScrollSettings(item).speed;\n\n if (isFunction(speed)) {\n data.direction = this.direction;\n data.threshold = this.threshold;\n data.distance = this.distance;\n data.value = this.value;\n data.maxValue = this.maxValue;\n data.duration = this.duration;\n data.speed = this.speed;\n data.deltaTime = deltaTime;\n data.isEnding = this.isEnding;\n return speed(item, this.element, data);\n } else {\n return speed;\n }\n };\n})();\n\nScrollRequest.prototype.tick = function (deltaTime) {\n if (!this.isActive) {\n this.isActive = true;\n this.onStart();\n }\n this.value = this.computeCurrentScrollValue();\n this.speed = this.computeSpeed(deltaTime);\n this.value = this.computeNextScrollValue(deltaTime);\n this.duration += deltaTime;\n return this.value;\n};\n\nScrollRequest.prototype.onStart = function () {\n var item = this.item;\n var onStart = getItemAutoScrollSettings(item).onStart;\n if (isFunction(onStart)) onStart(item, this.element, this.direction);\n};\n\nScrollRequest.prototype.onStop = function () {\n var item = this.item;\n var onStop = getItemAutoScrollSettings(item).onStop;\n if (isFunction(onStop)) onStop(item, this.element, this.direction);\n // Manually nudge sort to happen. There's a good chance that the item is still\n // after the scroll stops which means that the next sort will be triggered\n // only after the item is moved or it's parent scrolled.\n if (item._drag) item._drag.sort();\n};\n\nfunction ScrollAction() {\n this.element = null;\n this.requestX = null;\n this.requestY = null;\n this.scrollLeft = 0;\n this.scrollTop = 0;\n}\n\nScrollAction.prototype.reset = function () {\n if (this.requestX) this.requestX.action = null;\n if (this.requestY) this.requestY.action = null;\n this.element = null;\n this.requestX = null;\n this.requestY = null;\n this.scrollLeft = 0;\n this.scrollTop = 0;\n};\n\nScrollAction.prototype.addRequest = function (request) {\n if (AXIS_X & request.direction) {\n this.removeRequest(this.requestX);\n this.requestX = request;\n } else {\n this.removeRequest(this.requestY);\n this.requestY = request;\n }\n request.action = this;\n};\n\nScrollAction.prototype.removeRequest = function (request) {\n if (!request) return;\n if (this.requestX === request) {\n this.requestX = null;\n request.action = null;\n } else if (this.requestY === request) {\n this.requestY = null;\n request.action = null;\n }\n};\n\nScrollAction.prototype.computeScrollValues = function () {\n this.scrollLeft = this.requestX ? this.requestX.value : getScrollLeft(this.element);\n this.scrollTop = this.requestY ? this.requestY.value : getScrollTop(this.element);\n};\n\nScrollAction.prototype.scroll = function () {\n var element = this.element;\n if (!element) return;\n\n if (element.scrollTo) {\n element.scrollTo(this.scrollLeft, this.scrollTop);\n } else {\n element.scrollLeft = this.scrollLeft;\n element.scrollTop = this.scrollTop;\n }\n};\n\nfunction Pool(createItem, releaseItem) {\n this.pool = [];\n this.createItem = createItem;\n this.releaseItem = releaseItem;\n}\n\nPool.prototype.pick = function () {\n return this.pool.pop() || this.createItem();\n};\n\nPool.prototype.release = function (item) {\n this.releaseItem(item);\n if (this.pool.indexOf(item) !== -1) return;\n this.pool.push(item);\n};\n\nPool.prototype.reset = function () {\n this.pool.length = 0;\n};\n\n/**\n * Check if two rectangles are overlapping.\n *\n * @param {Object} a\n * @param {Object} b\n * @returns {Number}\n */\nfunction isOverlapping(a, b) {\n return !(\n a.left + a.width <= b.left ||\n b.left + b.width <= a.left ||\n a.top + a.height <= b.top ||\n b.top + b.height <= a.top\n );\n}\n\n/**\n * Calculate intersection area between two rectangle.\n *\n * @param {Object} a\n * @param {Object} b\n * @returns {Number}\n */\nfunction getIntersectionArea(a, b) {\n if (!isOverlapping(a, b)) return 0;\n var width = Math.min(a.left + a.width, b.left + b.width) - Math.max(a.left, b.left);\n var height = Math.min(a.top + a.height, b.top + b.height) - Math.max(a.top, b.top);\n return width * height;\n}\n\n/**\n * Calculate how many percent the intersection area of two rectangles is from\n * the maximum potential intersection area between the rectangles.\n *\n * @param {Object} a\n * @param {Object} b\n * @returns {Number}\n */\nfunction getIntersectionScore(a, b) {\n var area = getIntersectionArea(a, b);\n if (!area) return 0;\n var maxArea = Math.min(a.width, b.width) * Math.min(a.height, b.height);\n return (area / maxArea) * 100;\n}\n\nvar RECT_1 = {\n width: 0,\n height: 0,\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n};\n\nvar RECT_2 = {\n width: 0,\n height: 0,\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n};\n\nfunction AutoScroller() {\n this._isDestroyed = false;\n this._isTicking = false;\n this._tickTime = 0;\n this._tickDeltaTime = 0;\n this._items = [];\n this._actions = [];\n this._requests = {};\n this._requests[AXIS_X] = {};\n this._requests[AXIS_Y] = {};\n this._requestOverlapCheck = {};\n this._dragPositions = {};\n this._dragDirections = {};\n this._overlapCheckInterval = 150;\n\n this._requestPool = new Pool(\n function () {\n return new ScrollRequest();\n },\n function (request) {\n request.reset();\n }\n );\n\n this._actionPool = new Pool(\n function () {\n return new ScrollAction();\n },\n function (action) {\n action.reset();\n }\n );\n\n this._readTick = this._readTick.bind(this);\n this._writeTick = this._writeTick.bind(this);\n}\n\nAutoScroller.AXIS_X = AXIS_X;\nAutoScroller.AXIS_Y = AXIS_Y;\nAutoScroller.FORWARD = FORWARD;\nAutoScroller.BACKWARD = BACKWARD;\nAutoScroller.LEFT = LEFT;\nAutoScroller.RIGHT = RIGHT;\nAutoScroller.UP = UP;\nAutoScroller.DOWN = DOWN;\n\nAutoScroller.smoothSpeed = function (maxSpeed, acceleration, deceleration) {\n return function (item, element, data) {\n var targetSpeed = 0;\n if (!data.isEnding) {\n if (data.threshold > 0) {\n var factor = data.threshold - Math.max(0, data.distance);\n targetSpeed = (maxSpeed / data.threshold) * factor;\n } else {\n targetSpeed = maxSpeed;\n }\n }\n\n var currentSpeed = data.speed;\n var nextSpeed = targetSpeed;\n\n if (currentSpeed === targetSpeed) {\n return nextSpeed;\n }\n\n if (currentSpeed < targetSpeed) {\n nextSpeed = currentSpeed + acceleration * (data.deltaTime / 1000);\n return Math.min(targetSpeed, nextSpeed);\n } else {\n nextSpeed = currentSpeed - deceleration * (data.deltaTime / 1000);\n return Math.max(targetSpeed, nextSpeed);\n }\n };\n};\n\nAutoScroller.pointerHandle = function (pointerSize) {\n var rect = { left: 0, top: 0, width: 0, height: 0 };\n var size = pointerSize || 1;\n return function (item, x, y, w, h, pX, pY) {\n rect.left = pX - size * 0.5;\n rect.top = pY - size * 0.5;\n rect.width = size;\n rect.height = size;\n return rect;\n };\n};\n\nAutoScroller.prototype._readTick = function (time) {\n if (this._isDestroyed) return;\n if (time && this._tickTime) {\n this._tickDeltaTime = time - this._tickTime;\n this._tickTime = time;\n this._updateRequests();\n this._updateActions();\n } else {\n this._tickTime = time;\n this._tickDeltaTime = 0;\n }\n};\n\nAutoScroller.prototype._writeTick = function () {\n if (this._isDestroyed) return;\n this._applyActions();\n addAutoScrollTick(this._readTick, this._writeTick);\n};\n\nAutoScroller.prototype._startTicking = function () {\n this._isTicking = true;\n addAutoScrollTick(this._readTick, this._writeTick);\n};\n\nAutoScroller.prototype._stopTicking = function () {\n this._isTicking = false;\n this._tickTime = 0;\n this._tickDeltaTime = 0;\n cancelAutoScrollTick();\n};\n\nAutoScroller.prototype._getItemHandleRect = function (item, handle, rect) {\n var itemDrag = item._drag;\n\n if (handle) {\n var ev = itemDrag._dragMoveEvent || itemDrag._dragStartEvent;\n var data = handle(\n item,\n itemDrag._clientX,\n itemDrag._clientY,\n item._width,\n item._height,\n ev.clientX,\n ev.clientY\n );\n rect.left = data.left;\n rect.top = data.top;\n rect.width = data.width;\n rect.height = data.height;\n } else {\n rect.left = itemDrag._clientX;\n rect.top = itemDrag._clientY;\n rect.width = item._width;\n rect.height = item._height;\n }\n\n rect.right = rect.left + rect.width;\n rect.bottom = rect.top + rect.height;\n\n return rect;\n};\n\nAutoScroller.prototype._requestItemScroll = function (\n item,\n axis,\n element,\n direction,\n threshold,\n distance,\n maxValue\n) {\n var reqMap = this._requests[axis];\n var request = reqMap[item._id];\n\n if (request) {\n if (request.element !== element || request.direction !== direction) {\n request.reset();\n }\n } else {\n request = this._requestPool.pick();\n }\n\n request.item = item;\n request.element = element;\n request.direction = direction;\n request.threshold = threshold;\n request.distance = distance;\n request.maxValue = maxValue;\n reqMap[item._id] = request;\n};\n\nAutoScroller.prototype._cancelItemScroll = function (item, axis) {\n var reqMap = this._requests[axis];\n var request = reqMap[item._id];\n if (!request) return;\n if (request.action) request.action.removeRequest(request);\n this._requestPool.release(request);\n delete reqMap[item._id];\n};\n\nAutoScroller.prototype._checkItemOverlap = function (item, checkX, checkY) {\n var settings = getItemAutoScrollSettings(item);\n var targets = isFunction(settings.targets) ? settings.targets(item) : settings.targets;\n var threshold = settings.threshold;\n var safeZone = settings.safeZone;\n\n if (!targets || !targets.length) {\n checkX && this._cancelItemScroll(item, AXIS_X);\n checkY && this._cancelItemScroll(item, AXIS_Y);\n return;\n }\n\n var dragDirections = this._dragDirections[item._id];\n var dragDirectionX = dragDirections[0];\n var dragDirectionY = dragDirections[1];\n\n if (!dragDirectionX && !dragDirectionY) {\n checkX && this._cancelItemScroll(item, AXIS_X);\n checkY && this._cancelItemScroll(item, AXIS_Y);\n return;\n }\n\n var itemRect = this._getItemHandleRect(item, settings.handle, RECT_1);\n var testRect = RECT_2;\n\n var target = null;\n var testElement = null;\n var testAxisX = true;\n var testAxisY = true;\n var testScore = 0;\n var testPriority = 0;\n var testThreshold = null;\n var testDirection = null;\n var testDistance = 0;\n var testMaxScrollX = 0;\n var testMaxScrollY = 0;\n\n var xElement = null;\n var xPriority = -Infinity;\n var xThreshold = 0;\n var xScore = 0;\n var xDirection = null;\n var xDistance = 0;\n var xMaxScroll = 0;\n\n var yElement = null;\n var yPriority = -Infinity;\n var yThreshold = 0;\n var yScore = 0;\n var yDirection = null;\n var yDistance = 0;\n var yMaxScroll = 0;\n\n for (var i = 0; i < targets.length; i++) {\n target = targets[i];\n testAxisX = checkX && dragDirectionX && target.axis !== AXIS_Y;\n testAxisY = checkY && dragDirectionY && target.axis !== AXIS_X;\n testPriority = target.priority || 0;\n\n // Ignore this item if it's x-axis and y-axis priority is lower than\n // the currently matching item's.\n if ((!testAxisX || testPriority < xPriority) && (!testAxisY || testPriority < yPriority)) {\n continue;\n }\n\n testElement = getScrollElement(target.element || target);\n testMaxScrollX = testAxisX ? getScrollLeftMax(testElement) : -1;\n testMaxScrollY = testAxisY ? getScrollTopMax(testElement) : -1;\n\n // Ignore this item if there is no possibility to scroll.\n if (!testMaxScrollX && !testMaxScrollY) continue;\n\n testRect = getContentRect(testElement, testRect);\n testScore = getIntersectionScore(itemRect, testRect);\n\n // Ignore this item if it's not overlapping at all with the dragged item.\n if (testScore <= 0) continue;\n\n // Test x-axis.\n if (\n testAxisX &&\n testPriority >= xPriority &&\n testMaxScrollX > 0 &&\n (testPriority > xPriority || testScore > xScore)\n ) {\n testDirection = null;\n testThreshold = computeThreshold(\n typeof target.threshold === 'number' ? target.threshold : threshold,\n safeZone,\n itemRect.width,\n testRect.width\n );\n if (dragDirectionX === RIGHT) {\n testDistance = testRect.right + testThreshold.offset - itemRect.right;\n if (testDistance <= testThreshold.value && getScrollLeft(testElement) < testMaxScrollX) {\n testDirection = RIGHT;\n }\n } else if (dragDirectionX === LEFT) {\n testDistance = itemRect.left - (testRect.left - testThreshold.offset);\n if (testDistance <= testThreshold.value && getScrollLeft(testElement) > 0) {\n testDirection = LEFT;\n }\n }\n\n if (testDirection !== null) {\n xElement = testElement;\n xPriority = testPriority;\n xThreshold = testThreshold.value;\n xScore = testScore;\n xDirection = testDirection;\n xDistance = testDistance;\n xMaxScroll = testMaxScrollX;\n }\n }\n\n // Test y-axis.\n if (\n testAxisY &&\n testPriority >= yPriority &&\n testMaxScrollY > 0 &&\n (testPriority > yPriority || testScore > yScore)\n ) {\n testDirection = null;\n testThreshold = computeThreshold(\n typeof target.threshold === 'number' ? target.threshold : threshold,\n safeZone,\n itemRect.height,\n testRect.height\n );\n if (dragDirectionY === DOWN) {\n testDistance = testRect.bottom + testThreshold.offset - itemRect.bottom;\n if (testDistance <= testThreshold.value && getScrollTop(testElement) < testMaxScrollY) {\n testDirection = DOWN;\n }\n } else if (dragDirectionY === UP) {\n testDistance = itemRect.top - (testRect.top - testThreshold.offset);\n if (testDistance <= testThreshold.value && getScrollTop(testElement) > 0) {\n testDirection = UP;\n }\n }\n\n if (testDirection !== null) {\n yElement = testElement;\n yPriority = testPriority;\n yThreshold = testThreshold.value;\n yScore = testScore;\n yDirection = testDirection;\n yDistance = testDistance;\n yMaxScroll = testMaxScrollY;\n }\n }\n }\n\n // Request or cancel x-axis scroll.\n if (checkX) {\n if (xElement) {\n this._requestItemScroll(\n item,\n AXIS_X,\n xElement,\n xDirection,\n xThreshold,\n xDistance,\n xMaxScroll\n );\n } else {\n this._cancelItemScroll(item, AXIS_X);\n }\n }\n\n // Request or cancel y-axis scroll.\n if (checkY) {\n if (yElement) {\n this._requestItemScroll(\n item,\n AXIS_Y,\n yElement,\n yDirection,\n yThreshold,\n yDistance,\n yMaxScroll\n );\n } else {\n this._cancelItemScroll(item, AXIS_Y);\n }\n }\n};\n\nAutoScroller.prototype._updateScrollRequest = function (scrollRequest) {\n var item = scrollRequest.item;\n var settings = getItemAutoScrollSettings(item);\n var targets = isFunction(settings.targets) ? settings.targets(item) : settings.targets;\n var targetCount = (targets && targets.length) || 0;\n var threshold = settings.threshold;\n var safeZone = settings.safeZone;\n var itemRect = this._getItemHandleRect(item, settings.handle, RECT_1);\n var testRect = RECT_2;\n var target = null;\n var testElement = null;\n var testIsAxisX = false;\n var testScore = null;\n var testThreshold = null;\n var testDistance = null;\n var testScroll = null;\n var testMaxScroll = null;\n var hasReachedEnd = null;\n\n for (var i = 0; i < targetCount; i++) {\n target = targets[i];\n\n // Make sure we have a matching element.\n testElement = getScrollElement(target.element || target);\n if (testElement !== scrollRequest.element) continue;\n\n // Make sure we have a matching axis.\n testIsAxisX = !!(AXIS_X & scrollRequest.direction);\n if (testIsAxisX) {\n if (target.axis === AXIS_Y) continue;\n } else {\n if (target.axis === AXIS_X) continue;\n }\n\n // Stop scrolling if there is no room to scroll anymore.\n testMaxScroll = testIsAxisX ? getScrollLeftMax(testElement) : getScrollTopMax(testElement);\n if (testMaxScroll <= 0) {\n break;\n }\n\n testRect = getContentRect(testElement, testRect);\n testScore = getIntersectionScore(itemRect, testRect);\n\n // Stop scrolling if dragged item is not overlapping with the scroll\n // element anymore.\n if (testScore <= 0) {\n break;\n }\n\n // Compute threshold and edge offset.\n testThreshold = computeThreshold(\n typeof target.threshold === 'number' ? target.threshold : threshold,\n safeZone,\n testIsAxisX ? itemRect.width : itemRect.height,\n testIsAxisX ? testRect.width : testRect.height\n );\n\n // Compute distance (based on current direction).\n if (scrollRequest.direction === LEFT) {\n testDistance = itemRect.left - (testRect.left - testThreshold.offset);\n } else if (scrollRequest.direction === RIGHT) {\n testDistance = testRect.right + testThreshold.offset - itemRect.right;\n } else if (scrollRequest.direction === UP) {\n testDistance = itemRect.top - (testRect.top - testThreshold.offset);\n } else {\n testDistance = testRect.bottom + testThreshold.offset - itemRect.bottom;\n }\n\n // Stop scrolling if threshold is not exceeded.\n if (testDistance > testThreshold.value) {\n break;\n }\n\n // Stop scrolling if we have reached the end of the scroll value.\n testScroll = testIsAxisX ? getScrollLeft(testElement) : getScrollTop(testElement);\n hasReachedEnd =\n FORWARD & scrollRequest.direction ? testScroll >= testMaxScroll : testScroll <= 0;\n if (hasReachedEnd) {\n break;\n }\n\n // Scrolling can continue, let's update the values.\n scrollRequest.maxValue = testMaxScroll;\n scrollRequest.threshold = testThreshold.value;\n scrollRequest.distance = testDistance;\n scrollRequest.isEnding = false;\n return true;\n }\n\n // Before we end the request, let's see if we need to stop the scrolling\n // smoothly or immediately.\n if (settings.smoothStop === true && scrollRequest.speed > 0) {\n if (hasReachedEnd === null) hasReachedEnd = scrollRequest.hasReachedEnd();\n scrollRequest.isEnding = hasReachedEnd ? false : true;\n } else {\n scrollRequest.isEnding = false;\n }\n\n return scrollRequest.isEnding;\n};\n\nAutoScroller.prototype._updateRequests = function () {\n var items = this._items;\n var requestsX = this._requests[AXIS_X];\n var requestsY = this._requests[AXIS_Y];\n var item, reqX, reqY, checkTime, needsCheck, checkX, checkY;\n\n for (var i = 0; i < items.length; i++) {\n item = items[i];\n checkTime = this._requestOverlapCheck[item._id];\n needsCheck = checkTime > 0 && this._tickTime - checkTime > this._overlapCheckInterval;\n\n checkX = true;\n reqX = requestsX[item._id];\n if (reqX && reqX.isActive) {\n checkX = !this._updateScrollRequest(reqX);\n if (checkX) {\n needsCheck = true;\n this._cancelItemScroll(item, AXIS_X);\n }\n }\n\n checkY = true;\n reqY = requestsY[item._id];\n if (reqY && reqY.isActive) {\n checkY = !this._updateScrollRequest(reqY);\n if (checkY) {\n needsCheck = true;\n this._cancelItemScroll(item, AXIS_Y);\n }\n }\n\n if (needsCheck) {\n this._requestOverlapCheck[item._id] = 0;\n this._checkItemOverlap(item, checkX, checkY);\n }\n }\n};\n\nAutoScroller.prototype._requestAction = function (request, axis) {\n var actions = this._actions;\n var isAxisX = axis === AXIS_X;\n var action = null;\n\n for (var i = 0; i < actions.length; i++) {\n action = actions[i];\n\n // If the action's request does not match the request's -> skip.\n if (request.element !== action.element) {\n action = null;\n continue;\n }\n\n // If the request and action share the same element, but the request slot\n // for the requested axis is already reserved let's ignore and cancel this\n // request.\n if (isAxisX ? action.requestX : action.requestY) {\n this._cancelItemScroll(request.item, axis);\n return;\n }\n\n // Seems like we have found our action, let's break the loop.\n break;\n }\n\n if (!action) action = this._actionPool.pick();\n action.element = request.element;\n action.addRequest(request);\n\n request.tick(this._tickDeltaTime);\n actions.push(action);\n};\n\nAutoScroller.prototype._updateActions = function () {\n var items = this._items;\n var requests = this._requests;\n var actions = this._actions;\n var itemId;\n var reqX;\n var reqY;\n var i;\n\n // Generate actions.\n for (i = 0; i < items.length; i++) {\n itemId = items[i]._id;\n reqX = requests[AXIS_X][itemId];\n reqY = requests[AXIS_Y][itemId];\n if (reqX) this._requestAction(reqX, AXIS_X);\n if (reqY) this._requestAction(reqY, AXIS_Y);\n }\n\n // Compute actions' scroll values.\n for (i = 0; i < actions.length; i++) {\n actions[i].computeScrollValues();\n }\n};\n\nAutoScroller.prototype._applyActions = function () {\n var actions = this._actions;\n var items = this._items;\n var i;\n\n // No actions -> no scrolling.\n if (!actions.length) return;\n\n // Scroll all the required elements.\n for (i = 0; i < actions.length; i++) {\n actions[i].scroll();\n this._actionPool.release(actions[i]);\n }\n\n // Reset actions.\n actions.length = 0;\n\n // Sync the item position immediately after all the auto-scrolling business is\n // finished. Without this procedure the items will jitter during auto-scroll\n // (in some cases at least) since the drag scroll handler is async (bound to\n // raf tick). Note that this procedure should not emit any dragScroll events,\n // because otherwise they would be emitted twice for the same event.\n for (i = 0; i < items.length; i++) prepareItemScrollSync(items[i]);\n for (i = 0; i < items.length; i++) applyItemScrollSync(items[i]);\n};\n\nAutoScroller.prototype._updateDragDirection = function (item) {\n var dragPositions = this._dragPositions[item._id];\n var dragDirections = this._dragDirections[item._id];\n var x1 = item._drag._left;\n var y1 = item._drag._top;\n if (dragPositions.length) {\n var x2 = dragPositions[0];\n var y2 = dragPositions[1];\n dragDirections[0] = x1 > x2 ? RIGHT : x1 < x2 ? LEFT : dragDirections[0] || 0;\n dragDirections[1] = y1 > y2 ? DOWN : y1 < y2 ? UP : dragDirections[1] || 0;\n }\n dragPositions[0] = x1;\n dragPositions[1] = y1;\n};\n\nAutoScroller.prototype.addItem = function (item) {\n if (this._isDestroyed) return;\n var index = this._items.indexOf(item);\n if (index === -1) {\n this._items.push(item);\n this._requestOverlapCheck[item._id] = this._tickTime;\n this._dragDirections[item._id] = [0, 0];\n this._dragPositions[item._id] = [];\n if (!this._isTicking) this._startTicking();\n }\n};\n\nAutoScroller.prototype.updateItem = function (item) {\n if (this._isDestroyed) return;\n\n // Make sure the item still exists in the auto-scroller.\n if (!this._dragDirections[item._id]) return;\n\n this._updateDragDirection(item);\n if (!this._requestOverlapCheck[item._id]) {\n this._requestOverlapCheck[item._id] = this._tickTime;\n }\n};\n\nAutoScroller.prototype.removeItem = function (item) {\n if (this._isDestroyed) return;\n\n var index = this._items.indexOf(item);\n if (index === -1) return;\n\n var itemId = item._id;\n\n var reqX = this._requests[AXIS_X][itemId];\n if (reqX) {\n this._cancelItemScroll(item, AXIS_X);\n delete this._requests[AXIS_X][itemId];\n }\n\n var reqY = this._requests[AXIS_Y][itemId];\n if (reqY) {\n this._cancelItemScroll(item, AXIS_Y);\n delete this._requests[AXIS_Y][itemId];\n }\n\n delete this._requestOverlapCheck[itemId];\n delete this._dragPositions[itemId];\n delete this._dragDirections[itemId];\n this._items.splice(index, 1);\n\n if (this._isTicking && !this._items.length) {\n this._stopTicking();\n }\n};\n\nAutoScroller.prototype.isItemScrollingX = function (item) {\n var reqX = this._requests[AXIS_X][item._id];\n return !!(reqX && reqX.isActive);\n};\n\nAutoScroller.prototype.isItemScrollingY = function (item) {\n var reqY = this._requests[AXIS_Y][item._id];\n return !!(reqY && reqY.isActive);\n};\n\nAutoScroller.prototype.isItemScrolling = function (item) {\n return this.isItemScrollingX(item) || this.isItemScrollingY(item);\n};\n\nAutoScroller.prototype.destroy = function () {\n if (this._isDestroyed) return;\n\n var items = this._items.slice(0);\n for (var i = 0; i < items.length; i++) {\n this.removeItem(items[i]);\n }\n\n this._actions.length = 0;\n this._requestPool.reset();\n this._actionPool.reset();\n\n this._isDestroyed = true;\n};\n\nvar ElProto = window.Element.prototype;\nvar matchesFn =\n ElProto.matches ||\n ElProto.matchesSelector ||\n ElProto.webkitMatchesSelector ||\n ElProto.mozMatchesSelector ||\n ElProto.msMatchesSelector ||\n ElProto.oMatchesSelector ||\n function () {\n return false;\n };\n\n/**\n * Check if element matches a CSS selector.\n *\n * @param {Element} el\n * @param {String} selector\n * @returns {Boolean}\n */\nfunction elementMatches(el, selector) {\n return matchesFn.call(el, selector);\n}\n\n/**\n * Add class to an element.\n *\n * @param {HTMLElement} element\n * @param {String} className\n */\nfunction addClass(element, className) {\n if (!className) return;\n\n if (element.classList) {\n element.classList.add(className);\n } else {\n if (!elementMatches(element, '.' + className)) {\n element.className += ' ' + className;\n }\n }\n}\n\nvar tempArray = [];\nvar numberType = 'number';\n\n/**\n * Insert an item or an array of items to array to a specified index. Mutates\n * the array. The index can be negative in which case the items will be added\n * to the end of the array.\n *\n * @param {Array} array\n * @param {*} items\n * @param {Number} [index=-1]\n */\nfunction arrayInsert(array, items, index) {\n var startIndex = typeof index === numberType ? index : -1;\n if (startIndex < 0) startIndex = array.length - startIndex + 1;\n\n array.splice.apply(array, tempArray.concat(startIndex, 0, items));\n tempArray.length = 0;\n}\n\n/**\n * Normalize array index. Basically this function makes sure that the provided\n * array index is within the bounds of the provided array and also transforms\n * negative index to the matching positive index. The third (optional) argument\n * allows you to define offset for array's length in case you are adding items\n * to the array or removing items from the array.\n *\n * @param {Array} array\n * @param {Number} index\n * @param {Number} [sizeOffset]\n */\nfunction normalizeArrayIndex(array, index, sizeOffset) {\n var maxIndex = Math.max(0, array.length - 1 + (sizeOffset || 0));\n return index > maxIndex ? maxIndex : index < 0 ? Math.max(maxIndex + index + 1, 0) : index;\n}\n\n/**\n * Move array item to another index.\n *\n * @param {Array} array\n * @param {Number} fromIndex\n * - Index (positive or negative) of the item that will be moved.\n * @param {Number} toIndex\n * - Index (positive or negative) where the item should be moved to.\n */\nfunction arrayMove(array, fromIndex, toIndex) {\n // Make sure the array has two or more items.\n if (array.length < 2) return;\n\n // Normalize the indices.\n var from = normalizeArrayIndex(array, fromIndex);\n var to = normalizeArrayIndex(array, toIndex);\n\n // Add target item to the new position.\n if (from !== to) {\n array.splice(to, 0, array.splice(from, 1)[0]);\n }\n}\n\n/**\n * Swap array items.\n *\n * @param {Array} array\n * @param {Number} index\n * - Index (positive or negative) of the item that will be swapped.\n * @param {Number} withIndex\n * - Index (positive or negative) of the other item that will be swapped.\n */\nfunction arraySwap(array, index, withIndex) {\n // Make sure the array has two or more items.\n if (array.length < 2) return;\n\n // Normalize the indices.\n var indexA = normalizeArrayIndex(array, index);\n var indexB = normalizeArrayIndex(array, withIndex);\n var temp;\n\n // Swap the items.\n if (indexA !== indexB) {\n temp = array[indexA];\n array[indexA] = array[indexB];\n array[indexB] = temp;\n }\n}\n\nvar transformProp = getPrefixedPropName(document.documentElement.style, 'transform') || 'transform';\n\nvar styleNameRegEx = /([A-Z])/g;\nvar prefixRegex = /^(webkit-|moz-|ms-|o-)/;\nvar msPrefixRegex = /^(-m-s-)/;\n\n/**\n * Transforms a camel case style property to kebab case style property. Handles\n * vendor prefixed properties elegantly as well, e.g. \"WebkitTransform\" and\n * \"webkitTransform\" are both transformed into \"-webkit-transform\".\n *\n * @param {String} property\n * @returns {String}\n */\nfunction getStyleName(property) {\n // Initial slicing, turns \"fooBarProp\" into \"foo-bar-prop\".\n var styleName = property.replace(styleNameRegEx, '-$1').toLowerCase();\n\n // Handle properties that start with \"webkit\", \"moz\", \"ms\" or \"o\" prefix (we\n // need to add an extra '-' to the beginnig).\n styleName = styleName.replace(prefixRegex, '-$1');\n\n // Handle properties that start with \"MS\" prefix (we need to transform the\n // \"-m-s-\" into \"-ms-\").\n styleName = styleName.replace(msPrefixRegex, '-ms-');\n\n return styleName;\n}\n\nvar transformStyle = getStyleName(transformProp);\n\nvar transformNone$1 = 'none';\nvar displayInline = 'inline';\nvar displayNone = 'none';\nvar displayStyle = 'display';\n\n/**\n * Returns true if element is transformed, false if not. In practice the\n * element's display value must be anything else than \"none\" or \"inline\" as\n * well as have a valid transform value applied in order to be counted as a\n * transformed element.\n *\n * Borrowed from Mezr (v0.6.1):\n * https://github.com/niklasramo/mezr/blob/0.6.1/mezr.js#L661\n *\n * @param {HTMLElement} element\n * @returns {Boolean}\n */\nfunction isTransformed(element) {\n var transform = getStyle(element, transformStyle);\n if (!transform || transform === transformNone$1) return false;\n\n var display = getStyle(element, displayStyle);\n if (display === displayInline || display === displayNone) return false;\n\n return true;\n}\n\n/**\n * Returns an absolute positioned element's containing block, which is\n * considered to be the closest ancestor element that the target element's\n * positioning is relative to. Disclaimer: this only works as intended for\n * absolute positioned elements.\n *\n * @param {HTMLElement} element\n * @returns {(Document|Element)}\n */\nfunction getContainingBlock(element) {\n // As long as the containing block is an element, static and not\n // transformed, try to get the element's parent element and fallback to\n // document. https://github.com/niklasramo/mezr/blob/0.6.1/mezr.js#L339\n var doc = document;\n var res = element || doc;\n while (res && res !== doc && getStyle(res, 'position') === 'static' && !isTransformed(res)) {\n res = res.parentElement || doc;\n }\n return res;\n}\n\nvar offsetA = {};\nvar offsetB = {};\nvar offsetDiff = {};\n\n/**\n * Returns the element's document offset, which in practice means the vertical\n * and horizontal distance between the element's northwest corner and the\n * document's northwest corner. Note that this function always returns the same\n * object so be sure to read the data from it instead using it as a reference.\n *\n * @param {(Document|Element|Window)} element\n * @param {Object} [offsetData]\n * - Optional data object where the offset data will be inserted to. If not\n * provided a new object will be created for the return data.\n * @returns {Object}\n */\nfunction getOffset(element, offsetData) {\n var offset = offsetData || {};\n var rect;\n\n // Set up return data.\n offset.left = 0;\n offset.top = 0;\n\n // Document's offsets are always 0.\n if (element === document) return offset;\n\n // Add viewport scroll left/top to the respective offsets.\n offset.left = window.pageXOffset || 0;\n offset.top = window.pageYOffset || 0;\n\n // Window's offsets are the viewport scroll left/top values.\n if (element.self === window.self) return offset;\n\n // Add element's client rects to the offsets.\n rect = element.getBoundingClientRect();\n offset.left += rect.left;\n offset.top += rect.top;\n\n // Exclude element's borders from the offset.\n offset.left += getStyleAsFloat(element, 'border-left-width');\n offset.top += getStyleAsFloat(element, 'border-top-width');\n\n return offset;\n}\n\n/**\n * Calculate the offset difference two elements.\n *\n * @param {HTMLElement} elemA\n * @param {HTMLElement} elemB\n * @param {Boolean} [compareContainingBlocks=false]\n * - When this is set to true the containing blocks of the provided elements\n * will be used for calculating the difference. Otherwise the provided\n * elements will be compared directly.\n * @returns {Object}\n */\nfunction getOffsetDiff(elemA, elemB, compareContainingBlocks) {\n offsetDiff.left = 0;\n offsetDiff.top = 0;\n\n // If elements are same let's return early.\n if (elemA === elemB) return offsetDiff;\n\n // Compare containing blocks if necessary.\n if (compareContainingBlocks) {\n elemA = getContainingBlock(elemA);\n elemB = getContainingBlock(elemB);\n\n // If containing blocks are identical, let's return early.\n if (elemA === elemB) return offsetDiff;\n }\n\n // Finally, let's calculate the offset diff.\n getOffset(elemA, offsetA);\n getOffset(elemB, offsetB);\n offsetDiff.left = offsetB.left - offsetA.left;\n offsetDiff.top = offsetB.top - offsetA.top;\n\n return offsetDiff;\n}\n\n/**\n * Check if overflow style value is scrollable.\n *\n * @param {String} value\n * @returns {Boolean}\n */\nfunction isScrollableOverflow(value) {\n return value === 'auto' || value === 'scroll' || value === 'overlay';\n}\n\n/**\n * Check if an element is scrollable.\n *\n * @param {HTMLElement} element\n * @returns {Boolean}\n */\nfunction isScrollable(element) {\n return (\n isScrollableOverflow(getStyle(element, 'overflow')) ||\n isScrollableOverflow(getStyle(element, 'overflow-x')) ||\n isScrollableOverflow(getStyle(element, 'overflow-y'))\n );\n}\n\n/**\n * Collect element's ancestors that are potentially scrollable elements. The\n * provided element is also also included in the check, meaning that if it is\n * scrollable it is added to the result array.\n *\n * @param {HTMLElement} element\n * @param {Array} [result]\n * @returns {Array}\n */\nfunction getScrollableAncestors(element, result) {\n result = result || [];\n\n // Find scroll parents.\n while (element && element !== document) {\n // If element is inside ShadowDOM let's get it's host node from the real\n // DOM and continue looping.\n if (element.getRootNode && element instanceof DocumentFragment) {\n element = element.getRootNode().host;\n continue;\n }\n\n // If element is scrollable let's add it to the scrollable list.\n if (isScrollable(element)) {\n result.push(element);\n }\n\n element = element.parentNode;\n }\n\n // Always add window to the results.\n result.push(window);\n\n return result;\n}\n\nvar translateValue = {};\nvar transformNone = 'none';\nvar rxMat3d = /^matrix3d/;\nvar rxMatTx = /([^,]*,){4}/;\nvar rxMat3dTx = /([^,]*,){12}/;\nvar rxNextItem = /[^,]*,/;\n\n/**\n * Returns the element's computed translateX and translateY values as a floats.\n * The returned object is always the same object and updated every time this\n * function is called.\n *\n * @param {HTMLElement} element\n * @returns {Object}\n */\nfunction getTranslate(element) {\n translateValue.x = 0;\n translateValue.y = 0;\n\n var transform = getStyle(element, transformStyle);\n if (!transform || transform === transformNone) {\n return translateValue;\n }\n\n // Transform style can be in either matrix3d(...) or matrix(...).\n var isMat3d = rxMat3d.test(transform);\n var tX = transform.replace(isMat3d ? rxMat3dTx : rxMatTx, '');\n var tY = tX.replace(rxNextItem, '');\n\n translateValue.x = parseFloat(tX) || 0;\n translateValue.y = parseFloat(tY) || 0;\n\n return translateValue;\n}\n\n/**\n * Remove class from an element.\n *\n * @param {HTMLElement} element\n * @param {String} className\n */\nfunction removeClass(element, className) {\n if (!className) return;\n\n if (element.classList) {\n element.classList.remove(className);\n } else {\n if (elementMatches(element, '.' + className)) {\n element.className = (' ' + element.className + ' ')\n .replace(' ' + className + ' ', ' ')\n .trim();\n }\n }\n}\n\nvar IS_IOS =\n /^(iPad|iPhone|iPod)/.test(window.navigator.platform) ||\n (/^Mac/.test(window.navigator.platform) && window.navigator.maxTouchPoints > 1);\nvar START_PREDICATE_INACTIVE = 0;\nvar START_PREDICATE_PENDING = 1;\nvar START_PREDICATE_RESOLVED = 2;\nvar SCROLL_LISTENER_OPTIONS = hasPassiveEvents() ? { passive: true } : false;\n\n/**\n * Bind touch interaction to an item.\n *\n * @class\n * @param {Item} item\n */\nfunction ItemDrag(item) {\n var element = item._element;\n var grid = item.getGrid();\n var settings = grid._settings;\n\n this._item = item;\n this._gridId = grid._id;\n this._isDestroyed = false;\n this._isMigrating = false;\n\n // Start predicate data.\n this._startPredicate = isFunction(settings.dragStartPredicate)\n ? settings.dragStartPredicate\n : ItemDrag.defaultStartPredicate;\n this._startPredicateState = START_PREDICATE_INACTIVE;\n this._startPredicateResult = undefined;\n\n // Data for drag sort predicate heuristics.\n this._isSortNeeded = false;\n this._sortTimer = undefined;\n this._blockedSortIndex = null;\n this._sortX1 = 0;\n this._sortX2 = 0;\n this._sortY1 = 0;\n this._sortY2 = 0;\n\n // Setup item's initial drag data.\n this._reset();\n\n // Bind the methods that needs binding.\n this._preStartCheck = this._preStartCheck.bind(this);\n this._preEndCheck = this._preEndCheck.bind(this);\n this._onScroll = this._onScroll.bind(this);\n this._prepareStart = this._prepareStart.bind(this);\n this._applyStart = this._applyStart.bind(this);\n this._prepareMove = this._prepareMove.bind(this);\n this._applyMove = this._applyMove.bind(this);\n this._prepareScroll = this._prepareScroll.bind(this);\n this._applyScroll = this._applyScroll.bind(this);\n this._handleSort = this._handleSort.bind(this);\n this._handleSortDelayed = this._handleSortDelayed.bind(this);\n\n // Get drag handle element.\n this._handle = (settings.dragHandle && element.querySelector(settings.dragHandle)) || element;\n\n // Init dragger.\n this._dragger = new Dragger(this._handle, settings.dragCssProps);\n this._dragger.on('start', this._preStartCheck);\n this._dragger.on('move', this._preStartCheck);\n this._dragger.on('cancel', this._preEndCheck);\n this._dragger.on('end', this._preEndCheck);\n}\n\n/**\n * Public properties\n * *****************\n */\n\n/**\n * @public\n * @static\n * @type {AutoScroller}\n */\nItemDrag.autoScroller = new AutoScroller();\n\n/**\n * Public static methods\n * *********************\n */\n\n/**\n * Default drag start predicate handler that handles anchor elements\n * gracefully. The return value of this function defines if the drag is\n * started, rejected or pending. When true is returned the dragging is started\n * and when false is returned the dragging is rejected. If nothing is returned\n * the predicate will be called again on the next drag movement.\n *\n * @public\n * @static\n * @param {Item} item\n * @param {Object} event\n * @param {Object} [options]\n * - An optional options object which can be used to pass the predicate\n * it's options manually. By default the predicate retrieves the options\n * from the grid's settings.\n * @returns {(Boolean|undefined)}\n */\nItemDrag.defaultStartPredicate = function (item, event, options) {\n var drag = item._drag;\n\n // Make sure left button is pressed on mouse.\n if (event.isFirst && event.srcEvent.button) {\n return false;\n }\n\n // If the start event is trusted, non-cancelable and it's default action has\n // not been prevented it is in most cases a sign that the gesture would be\n // cancelled anyways right after it has started (e.g. starting drag while\n // the page is scrolling).\n if (\n !IS_IOS &&\n event.isFirst &&\n event.srcEvent.isTrusted === true &&\n event.srcEvent.defaultPrevented === false &&\n event.srcEvent.cancelable === false\n ) {\n return false;\n }\n\n // Final event logic. At this stage return value does not matter anymore,\n // the predicate is either resolved or it's not and there's nothing to do\n // about it. Here we just reset data and if the item element is a link\n // we follow it (if there has only been slight movement).\n if (event.isFinal) {\n drag._finishStartPredicate(event);\n return;\n }\n\n // Setup predicate data from options if not already set.\n var predicate = drag._startPredicateData;\n if (!predicate) {\n var config = options || drag._getGrid()._settings.dragStartPredicate || {};\n drag._startPredicateData = predicate = {\n distance: Math.max(config.distance, 0) || 0,\n delay: Math.max(config.delay, 0) || 0,\n };\n }\n\n // If delay is defined let's keep track of the latest event and initiate\n // delay if it has not been done yet.\n if (predicate.delay) {\n predicate.event = event;\n if (!predicate.delayTimer) {\n predicate.delayTimer = window.setTimeout(function () {\n predicate.delay = 0;\n if (drag._resolveStartPredicate(predicate.event)) {\n drag._forceResolveStartPredicate(predicate.event);\n drag._resetStartPredicate();\n }\n }, predicate.delay);\n }\n }\n\n return drag._resolveStartPredicate(event);\n};\n\n/**\n * Default drag sort predicate.\n *\n * @public\n * @static\n * @param {Item} item\n * @param {Object} [options]\n * @param {Number} [options.threshold=50]\n * @param {String} [options.action='move']\n * @returns {?Object}\n * - Returns `null` if no valid index was found. Otherwise returns drag sort\n * command.\n */\nItemDrag.defaultSortPredicate = (function () {\n var itemRect = {};\n var targetRect = {};\n var returnData = {};\n var gridsArray = [];\n var minThreshold = 1;\n var maxThreshold = 100;\n\n function getTargetGrid(item, rootGrid, threshold) {\n var target = null;\n var dragSort = rootGrid._settings.dragSort;\n var bestScore = -1;\n var gridScore;\n var grids;\n var grid;\n var container;\n var containerRect;\n var left;\n var top;\n var right;\n var bottom;\n var i;\n\n // Get potential target grids.\n if (dragSort === true) {\n gridsArray[0] = rootGrid;\n grids = gridsArray;\n } else if (isFunction(dragSort)) {\n grids = dragSort.call(rootGrid, item);\n }\n\n // Return immediately if there are no grids.\n if (!grids || !Array.isArray(grids) || !grids.length) {\n return target;\n }\n\n // Loop through the grids and get the best match.\n for (i = 0; i < grids.length; i++) {\n grid = grids[i];\n\n // Filter out all destroyed grids.\n if (grid._isDestroyed) continue;\n\n // Compute the grid's client rect an clamp the initial boundaries to\n // viewport dimensions.\n grid._updateBoundingRect();\n left = Math.max(0, grid._left);\n top = Math.max(0, grid._top);\n right = Math.min(window.innerWidth, grid._right);\n bottom = Math.min(window.innerHeight, grid._bottom);\n\n // The grid might be inside one or more elements that clip it's visibility\n // (e.g overflow scroll/hidden) so we want to find out the visible portion\n // of the grid in the viewport and use that in our calculations.\n container = grid._element.parentNode;\n while (\n container &&\n container !== document &&\n container !== document.documentElement &&\n container !== document.body\n ) {\n if (container.getRootNode && container instanceof DocumentFragment) {\n container = container.getRootNode().host;\n continue;\n }\n\n if (getStyle(container, 'overflow') !== 'visible') {\n containerRect = container.getBoundingClientRect();\n left = Math.max(left, containerRect.left);\n top = Math.max(top, containerRect.top);\n right = Math.min(right, containerRect.right);\n bottom = Math.min(bottom, containerRect.bottom);\n }\n\n if (getStyle(container, 'position') === 'fixed') {\n break;\n }\n\n container = container.parentNode;\n }\n\n // No need to go further if target rect does not have visible area.\n if (left >= right || top >= bottom) continue;\n\n // Check how much dragged element overlaps the container element.\n targetRect.left = left;\n targetRect.top = top;\n targetRect.width = right - left;\n targetRect.height = bottom - top;\n gridScore = getIntersectionScore(itemRect, targetRect);\n\n // Check if this grid is the best match so far.\n if (gridScore > threshold && gridScore > bestScore) {\n bestScore = gridScore;\n target = grid;\n }\n }\n\n // Always reset grids array.\n gridsArray.length = 0;\n\n return target;\n }\n\n return function (item, options) {\n var drag = item._drag;\n var rootGrid = drag._getGrid();\n\n // Get drag sort predicate settings.\n var sortThreshold = options && typeof options.threshold === 'number' ? options.threshold : 50;\n var sortAction = options && options.action === ACTION_SWAP ? ACTION_SWAP : ACTION_MOVE;\n var migrateAction =\n options && options.migrateAction === ACTION_SWAP ? ACTION_SWAP : ACTION_MOVE;\n\n // Sort threshold must be a positive number capped to a max value of 100. If\n // that's not the case this function will not work correctly. So let's clamp\n // the threshold just in case.\n sortThreshold = Math.min(Math.max(sortThreshold, minThreshold), maxThreshold);\n\n // Populate item rect data.\n itemRect.width = item._width;\n itemRect.height = item._height;\n itemRect.left = drag._clientX;\n itemRect.top = drag._clientY;\n\n // Calculate the target grid.\n var grid = getTargetGrid(item, rootGrid, sortThreshold);\n\n // Return early if we found no grid container element that overlaps the\n // dragged item enough.\n if (!grid) return null;\n\n var isMigration = item.getGrid() !== grid;\n var gridOffsetLeft = 0;\n var gridOffsetTop = 0;\n var matchScore = 0;\n var matchIndex = -1;\n var hasValidTargets = false;\n var target;\n var score;\n var i;\n\n // If item is moved within it's originating grid adjust item's left and\n // top props. Otherwise if item is moved to/within another grid get the\n // container element's offset (from the element's content edge).\n if (grid === rootGrid) {\n itemRect.left = drag._gridX + item._marginLeft;\n itemRect.top = drag._gridY + item._marginTop;\n } else {\n grid._updateBorders(1, 0, 1, 0);\n gridOffsetLeft = grid._left + grid._borderLeft;\n gridOffsetTop = grid._top + grid._borderTop;\n }\n\n // Loop through the target grid items and try to find the best match.\n for (i = 0; i < grid._items.length; i++) {\n target = grid._items[i];\n\n // If the target item is not active or the target item is the dragged\n // item let's skip to the next item.\n if (!target._isActive || target === item) {\n continue;\n }\n\n // Mark the grid as having valid target items.\n hasValidTargets = true;\n\n // Calculate the target's overlap score with the dragged item.\n targetRect.width = target._width;\n targetRect.height = target._height;\n targetRect.left = target._left + target._marginLeft + gridOffsetLeft;\n targetRect.top = target._top + target._marginTop + gridOffsetTop;\n score = getIntersectionScore(itemRect, targetRect);\n\n // Update best match index and score if the target's overlap score with\n // the dragged item is higher than the current best match score.\n if (score > matchScore) {\n matchIndex = i;\n matchScore = score;\n }\n }\n\n // If there is no valid match and the dragged item is being moved into\n // another grid we need to do some guess work here. If there simply are no\n // valid targets (which means that the dragged item will be the only active\n // item in the new grid) we can just add it as the first item. If we have\n // valid items in the new grid and the dragged item is overlapping one or\n // more of the items in the new grid let's make an exception with the\n // threshold and just pick the item which the dragged item is overlapping\n // most. However, if the dragged item is not overlapping any of the valid\n // items in the new grid let's position it as the last item in the grid.\n if (isMigration && matchScore < sortThreshold) {\n matchIndex = hasValidTargets ? matchIndex : 0;\n matchScore = sortThreshold;\n }\n\n // Check if the best match overlaps enough to justify a placement switch.\n if (matchScore >= sortThreshold) {\n returnData.grid = grid;\n returnData.index = matchIndex;\n returnData.action = isMigration ? migrateAction : sortAction;\n return returnData;\n }\n\n return null;\n };\n})();\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Abort dragging and reset drag data.\n *\n * @public\n */\nItemDrag.prototype.stop = function () {\n if (!this._isActive) return;\n\n // If the item is being dropped into another grid, finish it up and return\n // immediately.\n if (this._isMigrating) {\n this._finishMigration();\n return;\n }\n\n var item = this._item;\n var itemId = item._id;\n\n // Stop auto-scroll.\n ItemDrag.autoScroller.removeItem(item);\n\n // Cancel queued ticks.\n cancelDragStartTick(itemId);\n cancelDragMoveTick(itemId);\n cancelDragScrollTick(itemId);\n\n // Cancel sort procedure.\n this._cancelSort();\n\n if (this._isStarted) {\n // Remove scroll listeners.\n this._unbindScrollListeners();\n\n var element = item._element;\n var grid = this._getGrid();\n var draggingClass = grid._settings.itemDraggingClass;\n\n // Append item element to the container if it's not it's child. Also make\n // sure the translate values are adjusted to account for the DOM shift.\n if (element.parentNode !== grid._element) {\n grid._element.appendChild(element);\n item._setTranslate(this._gridX, this._gridY);\n\n // We need to do forced reflow to make sure the dragging class is removed\n // gracefully.\n // eslint-disable-next-line\n if (draggingClass) element.clientWidth;\n }\n\n // Remove dragging class.\n removeClass(element, draggingClass);\n }\n\n // Reset drag data.\n this._reset();\n};\n\n/**\n * Manually trigger drag sort. This is only needed for special edge cases where\n * e.g. you have disabled sort and want to trigger a sort right after enabling\n * it (and don't want to wait for the next move/scroll event).\n *\n * @private\n * @param {Boolean} [force=false]\n */\nItemDrag.prototype.sort = function (force) {\n var item = this._item;\n if (this._isActive && item._isActive && this._dragMoveEvent) {\n if (force === true) {\n this._handleSort();\n } else {\n addDragSortTick(item._id, this._handleSort);\n }\n }\n};\n\n/**\n * Destroy instance.\n *\n * @public\n */\nItemDrag.prototype.destroy = function () {\n if (this._isDestroyed) return;\n this.stop();\n this._dragger.destroy();\n ItemDrag.autoScroller.removeItem(this._item);\n this._isDestroyed = true;\n};\n\n/**\n * Private prototype methods\n * *************************\n */\n\n/**\n * Get Grid instance.\n *\n * @private\n * @returns {?Grid}\n */\nItemDrag.prototype._getGrid = function () {\n return GRID_INSTANCES[this._gridId] || null;\n};\n\n/**\n * Setup/reset drag data.\n *\n * @private\n */\nItemDrag.prototype._reset = function () {\n this._isActive = false;\n this._isStarted = false;\n\n // The dragged item's container element.\n this._container = null;\n\n // The dragged item's containing block.\n this._containingBlock = null;\n\n // Drag/scroll event data.\n this._dragStartEvent = null;\n this._dragMoveEvent = null;\n this._dragPrevMoveEvent = null;\n this._scrollEvent = null;\n\n // All the elements which need to be listened for scroll events during\n // dragging.\n this._scrollers = [];\n\n // The current translateX/translateY position.\n this._left = 0;\n this._top = 0;\n\n // Dragged element's current position within the grid.\n this._gridX = 0;\n this._gridY = 0;\n\n // Dragged element's current offset from window's northwest corner. Does\n // not account for element's margins.\n this._clientX = 0;\n this._clientY = 0;\n\n // Keep track of the clientX/Y diff for scrolling.\n this._scrollDiffX = 0;\n this._scrollDiffY = 0;\n\n // Keep track of the clientX/Y diff for moving.\n this._moveDiffX = 0;\n this._moveDiffY = 0;\n\n // Offset difference between the dragged element's temporary drag\n // container and it's original container.\n this._containerDiffX = 0;\n this._containerDiffY = 0;\n};\n\n/**\n * Bind drag scroll handlers to all scrollable ancestor elements of the\n * dragged element and the drag container element.\n *\n * @private\n */\nItemDrag.prototype._bindScrollListeners = function () {\n var gridContainer = this._getGrid()._element;\n var dragContainer = this._container;\n var scrollers = this._scrollers;\n var gridScrollers;\n var i;\n\n // Get dragged element's scrolling parents.\n scrollers.length = 0;\n getScrollableAncestors(this._item._element.parentNode, scrollers);\n\n // If drag container is defined and it's not the same element as grid\n // container then we need to add the grid container and it's scroll parents\n // to the elements which are going to be listener for scroll events.\n if (dragContainer !== gridContainer) {\n gridScrollers = [];\n getScrollableAncestors(gridContainer, gridScrollers);\n for (i = 0; i < gridScrollers.length; i++) {\n if (scrollers.indexOf(gridScrollers[i]) < 0) {\n scrollers.push(gridScrollers[i]);\n }\n }\n }\n\n // Bind scroll listeners.\n for (i = 0; i < scrollers.length; i++) {\n scrollers[i].addEventListener('scroll', this._onScroll, SCROLL_LISTENER_OPTIONS);\n }\n};\n\n/**\n * Unbind currently bound drag scroll handlers from all scrollable ancestor\n * elements of the dragged element and the drag container element.\n *\n * @private\n */\nItemDrag.prototype._unbindScrollListeners = function () {\n var scrollers = this._scrollers;\n var i;\n\n for (i = 0; i < scrollers.length; i++) {\n scrollers[i].removeEventListener('scroll', this._onScroll, SCROLL_LISTENER_OPTIONS);\n }\n\n scrollers.length = 0;\n};\n\n/**\n * Unbind currently bound drag scroll handlers from all scrollable ancestor\n * elements of the dragged element and the drag container element.\n *\n * @private\n * @param {Object} event\n * @returns {Boolean}\n */\nItemDrag.prototype._resolveStartPredicate = function (event) {\n var predicate = this._startPredicateData;\n if (event.distance < predicate.distance || predicate.delay) return;\n this._resetStartPredicate();\n return true;\n};\n\n/**\n * Forcefully resolve drag start predicate.\n *\n * @private\n * @param {Object} event\n */\nItemDrag.prototype._forceResolveStartPredicate = function (event) {\n if (!this._isDestroyed && this._startPredicateState === START_PREDICATE_PENDING) {\n this._startPredicateState = START_PREDICATE_RESOLVED;\n this._onStart(event);\n }\n};\n\n/**\n * Finalize start predicate.\n *\n * @private\n * @param {Object} event\n */\nItemDrag.prototype._finishStartPredicate = function (event) {\n var element = this._item._element;\n\n // Check if this is a click (very subjective heuristics).\n var isClick = Math.abs(event.deltaX) < 2 && Math.abs(event.deltaY) < 2 && event.deltaTime < 200;\n\n // Reset predicate.\n this._resetStartPredicate();\n\n // If the gesture can be interpreted as click let's try to open the element's\n // href url (if it is an anchor element).\n if (isClick) openAnchorHref(element);\n};\n\n/**\n * Reset drag sort heuristics.\n *\n * @private\n * @param {Number} x\n * @param {Number} y\n */\nItemDrag.prototype._resetHeuristics = function (x, y) {\n this._blockedSortIndex = null;\n this._sortX1 = this._sortX2 = x;\n this._sortY1 = this._sortY2 = y;\n};\n\n/**\n * Run heuristics and return true if overlap check can be performed, and false\n * if it can not.\n *\n * @private\n * @param {Number} x\n * @param {Number} y\n * @returns {Boolean}\n */\nItemDrag.prototype._checkHeuristics = function (x, y) {\n var settings = this._getGrid()._settings.dragSortHeuristics;\n var minDist = settings.minDragDistance;\n\n // Skip heuristics if not needed.\n if (minDist <= 0) {\n this._blockedSortIndex = null;\n return true;\n }\n\n var diffX = x - this._sortX2;\n var diffY = y - this._sortY2;\n\n // If we can't do proper bounce back check make sure that the blocked index\n // is not set.\n var canCheckBounceBack = minDist > 3 && settings.minBounceBackAngle > 0;\n if (!canCheckBounceBack) {\n this._blockedSortIndex = null;\n }\n\n if (Math.abs(diffX) > minDist || Math.abs(diffY) > minDist) {\n // Reset blocked index if angle changed enough. This check requires a\n // minimum value of 3 for minDragDistance to function properly.\n if (canCheckBounceBack) {\n var angle = Math.atan2(diffX, diffY);\n var prevAngle = Math.atan2(this._sortX2 - this._sortX1, this._sortY2 - this._sortY1);\n var deltaAngle = Math.atan2(Math.sin(angle - prevAngle), Math.cos(angle - prevAngle));\n if (Math.abs(deltaAngle) > settings.minBounceBackAngle) {\n this._blockedSortIndex = null;\n }\n }\n\n // Update points.\n this._sortX1 = this._sortX2;\n this._sortY1 = this._sortY2;\n this._sortX2 = x;\n this._sortY2 = y;\n\n return true;\n }\n\n return false;\n};\n\n/**\n * Reset for default drag start predicate function.\n *\n * @private\n */\nItemDrag.prototype._resetStartPredicate = function () {\n var predicate = this._startPredicateData;\n if (predicate) {\n if (predicate.delayTimer) {\n predicate.delayTimer = window.clearTimeout(predicate.delayTimer);\n }\n this._startPredicateData = null;\n }\n};\n\n/**\n * Handle the sorting procedure. Manage drag sort heuristics/interval and\n * check overlap when necessary.\n *\n * @private\n */\nItemDrag.prototype._handleSort = function () {\n if (!this._isActive) return;\n\n var settings = this._getGrid()._settings;\n\n // No sorting when drag sort is disabled. Also, account for the scenario where\n // dragSort is temporarily disabled during drag procedure so we need to reset\n // sort timer heuristics state too.\n if (\n !settings.dragSort ||\n (!settings.dragAutoScroll.sortDuringScroll && ItemDrag.autoScroller.isItemScrolling(this._item))\n ) {\n this._sortX1 = this._sortX2 = this._gridX;\n this._sortY1 = this._sortY2 = this._gridY;\n // We set this to true intentionally so that overlap check would be\n // triggered as soon as possible after sort becomes enabled again.\n this._isSortNeeded = true;\n if (this._sortTimer !== undefined) {\n this._sortTimer = window.clearTimeout(this._sortTimer);\n }\n return;\n }\n\n // If sorting is enabled we always need to run the heuristics check to keep\n // the tracked coordinates updated. We also allow an exception when the sort\n // timer is finished because the heuristics are intended to prevent overlap\n // checks based on the dragged element's immediate movement and a delayed\n // overlap check is valid if it comes through, because it was valid when it\n // was invoked.\n var shouldSort = this._checkHeuristics(this._gridX, this._gridY);\n if (!this._isSortNeeded && !shouldSort) return;\n\n var sortInterval = settings.dragSortHeuristics.sortInterval;\n if (sortInterval <= 0 || this._isSortNeeded) {\n this._isSortNeeded = false;\n if (this._sortTimer !== undefined) {\n this._sortTimer = window.clearTimeout(this._sortTimer);\n }\n this._checkOverlap();\n } else if (this._sortTimer === undefined) {\n this._sortTimer = window.setTimeout(this._handleSortDelayed, sortInterval);\n }\n};\n\n/**\n * Delayed sort handler.\n *\n * @private\n */\nItemDrag.prototype._handleSortDelayed = function () {\n this._isSortNeeded = true;\n this._sortTimer = undefined;\n addDragSortTick(this._item._id, this._handleSort);\n};\n\n/**\n * Cancel and reset sort procedure.\n *\n * @private\n */\nItemDrag.prototype._cancelSort = function () {\n this._isSortNeeded = false;\n if (this._sortTimer !== undefined) {\n this._sortTimer = window.clearTimeout(this._sortTimer);\n }\n cancelDragSortTick(this._item._id);\n};\n\n/**\n * Handle the ending of the drag procedure for sorting.\n *\n * @private\n */\nItemDrag.prototype._finishSort = function () {\n var isSortEnabled = this._getGrid()._settings.dragSort;\n var needsFinalCheck = isSortEnabled && (this._isSortNeeded || this._sortTimer !== undefined);\n this._cancelSort();\n if (needsFinalCheck) this._checkOverlap();\n};\n\n/**\n * Check (during drag) if an item is overlapping other items and based on\n * the configuration layout the items.\n *\n * @private\n */\nItemDrag.prototype._checkOverlap = function () {\n if (!this._isActive) return;\n\n var item = this._item;\n var settings = this._getGrid()._settings;\n var result;\n var currentGrid;\n var currentIndex;\n var targetGrid;\n var targetIndex;\n var targetItem;\n var sortAction;\n var isMigration;\n\n // Get overlap check result.\n if (isFunction(settings.dragSortPredicate)) {\n result = settings.dragSortPredicate(item, this._dragMoveEvent);\n } else {\n result = ItemDrag.defaultSortPredicate(item, settings.dragSortPredicate);\n }\n\n // Let's make sure the result object has a valid index before going further.\n if (!result || typeof result.index !== 'number') return;\n\n sortAction = result.action === ACTION_SWAP ? ACTION_SWAP : ACTION_MOVE;\n currentGrid = item.getGrid();\n targetGrid = result.grid || currentGrid;\n isMigration = currentGrid !== targetGrid;\n currentIndex = currentGrid._items.indexOf(item);\n targetIndex = normalizeArrayIndex(\n targetGrid._items,\n result.index,\n isMigration && sortAction === ACTION_MOVE ? 1 : 0\n );\n\n // Prevent position bounce.\n if (!isMigration && targetIndex === this._blockedSortIndex) {\n return;\n }\n\n // If the item was moved within it's current grid.\n if (!isMigration) {\n // Make sure the target index is not the current index.\n if (currentIndex !== targetIndex) {\n this._blockedSortIndex = currentIndex;\n\n // Do the sort.\n (sortAction === ACTION_SWAP ? arraySwap : arrayMove)(\n currentGrid._items,\n currentIndex,\n targetIndex\n );\n\n // Emit move event.\n if (currentGrid._hasListeners(EVENT_MOVE)) {\n currentGrid._emit(EVENT_MOVE, {\n item: item,\n fromIndex: currentIndex,\n toIndex: targetIndex,\n action: sortAction,\n });\n }\n\n // Layout the grid.\n currentGrid.layout();\n }\n }\n\n // If the item was moved to another grid.\n else {\n this._blockedSortIndex = null;\n\n // Let's fetch the target item when it's still in it's original index.\n targetItem = targetGrid._items[targetIndex];\n\n // Emit beforeSend event.\n if (currentGrid._hasListeners(EVENT_BEFORE_SEND)) {\n currentGrid._emit(EVENT_BEFORE_SEND, {\n item: item,\n fromGrid: currentGrid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex,\n });\n }\n\n // Emit beforeReceive event.\n if (targetGrid._hasListeners(EVENT_BEFORE_RECEIVE)) {\n targetGrid._emit(EVENT_BEFORE_RECEIVE, {\n item: item,\n fromGrid: currentGrid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex,\n });\n }\n\n // Update item's grid id reference.\n item._gridId = targetGrid._id;\n\n // Update drag instance's migrating indicator.\n this._isMigrating = item._gridId !== this._gridId;\n\n // Move item instance from current grid to target grid.\n currentGrid._items.splice(currentIndex, 1);\n arrayInsert(targetGrid._items, item, targetIndex);\n\n // Reset sort data.\n item._sortData = null;\n\n // Emit send event.\n if (currentGrid._hasListeners(EVENT_SEND)) {\n currentGrid._emit(EVENT_SEND, {\n item: item,\n fromGrid: currentGrid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex,\n });\n }\n\n // Emit receive event.\n if (targetGrid._hasListeners(EVENT_RECEIVE)) {\n targetGrid._emit(EVENT_RECEIVE, {\n item: item,\n fromGrid: currentGrid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex,\n });\n }\n\n // If the sort action is \"swap\" let's respect it and send the target item\n // (if it exists) from the target grid to the originating grid. This process\n // is done on purpose after the dragged item placed within the target grid\n // so that we can keep this implementation as simple as possible utilizing\n // the existing API.\n if (sortAction === ACTION_SWAP && targetItem && targetItem.isActive()) {\n // Sanity check to make sure that the target item is still part of the\n // target grid. It could have been manipulated in the event handlers.\n if (targetGrid._items.indexOf(targetItem) > -1) {\n targetGrid.send(targetItem, currentGrid, currentIndex, {\n appendTo: this._container || document.body,\n layoutSender: false,\n layoutReceiver: false,\n });\n }\n }\n\n // Layout both grids.\n currentGrid.layout();\n targetGrid.layout();\n }\n};\n\n/**\n * If item is dragged into another grid, finish the migration process\n * gracefully.\n *\n * @private\n */\nItemDrag.prototype._finishMigration = function () {\n var item = this._item;\n var release = item._dragRelease;\n var element = item._element;\n var isActive = item._isActive;\n var targetGrid = item.getGrid();\n var targetGridElement = targetGrid._element;\n var targetSettings = targetGrid._settings;\n var targetContainer = targetSettings.dragContainer || targetGridElement;\n var currentSettings = this._getGrid()._settings;\n var currentContainer = element.parentNode;\n var currentVisClass = isActive\n ? currentSettings.itemVisibleClass\n : currentSettings.itemHiddenClass;\n var nextVisClass = isActive ? targetSettings.itemVisibleClass : targetSettings.itemHiddenClass;\n var translate;\n var offsetDiff;\n\n // Destroy current drag. Note that we need to set the migrating flag to\n // false first, because otherwise we create an infinite loop between this\n // and the drag.stop() method.\n this._isMigrating = false;\n this.destroy();\n\n // Update item class.\n if (currentSettings.itemClass !== targetSettings.itemClass) {\n removeClass(element, currentSettings.itemClass);\n addClass(element, targetSettings.itemClass);\n }\n\n // Update visibility class.\n if (currentVisClass !== nextVisClass) {\n removeClass(element, currentVisClass);\n addClass(element, nextVisClass);\n }\n\n // Move the item inside the target container if it's different than the\n // current container.\n if (targetContainer !== currentContainer) {\n targetContainer.appendChild(element);\n offsetDiff = getOffsetDiff(currentContainer, targetContainer, true);\n translate = getTranslate(element);\n translate.x -= offsetDiff.left;\n translate.y -= offsetDiff.top;\n }\n\n // Update item's cached dimensions.\n item._refreshDimensions();\n\n // Calculate the offset difference between target's drag container (if any)\n // and actual grid container element. We save it later for the release\n // process.\n offsetDiff = getOffsetDiff(targetContainer, targetGridElement, true);\n release._containerDiffX = offsetDiff.left;\n release._containerDiffY = offsetDiff.top;\n\n // Recreate item's drag handler.\n item._drag = targetSettings.dragEnabled ? new ItemDrag(item) : null;\n\n // Adjust the position of the item element if it was moved from a container\n // to another.\n if (targetContainer !== currentContainer) {\n item._setTranslate(translate.x, translate.y);\n }\n\n // Update child element's styles to reflect the current visibility state.\n item._visibility.setStyles(isActive ? targetSettings.visibleStyles : targetSettings.hiddenStyles);\n\n // Start the release.\n release.start();\n};\n\n/**\n * Drag pre-start handler.\n *\n * @private\n * @param {Object} event\n */\nItemDrag.prototype._preStartCheck = function (event) {\n // Let's activate drag start predicate state.\n if (this._startPredicateState === START_PREDICATE_INACTIVE) {\n this._startPredicateState = START_PREDICATE_PENDING;\n }\n\n // If predicate is pending try to resolve it.\n if (this._startPredicateState === START_PREDICATE_PENDING) {\n this._startPredicateResult = this._startPredicate(this._item, event);\n if (this._startPredicateResult === true) {\n this._startPredicateState = START_PREDICATE_RESOLVED;\n this._onStart(event);\n } else if (this._startPredicateResult === false) {\n this._resetStartPredicate(event);\n this._dragger._reset();\n this._startPredicateState = START_PREDICATE_INACTIVE;\n }\n }\n\n // Otherwise if predicate is resolved and drag is active, move the item.\n else if (this._startPredicateState === START_PREDICATE_RESOLVED && this._isActive) {\n this._onMove(event);\n }\n};\n\n/**\n * Drag pre-end handler.\n *\n * @private\n * @param {Object} event\n */\nItemDrag.prototype._preEndCheck = function (event) {\n var isResolved = this._startPredicateState === START_PREDICATE_RESOLVED;\n\n // Do final predicate check to allow user to unbind stuff for the current\n // drag procedure within the predicate callback. The return value of this\n // check will have no effect to the state of the predicate.\n this._startPredicate(this._item, event);\n\n this._startPredicateState = START_PREDICATE_INACTIVE;\n\n if (!isResolved || !this._isActive) return;\n\n if (this._isStarted) {\n this._onEnd(event);\n } else {\n this.stop();\n }\n};\n\n/**\n * Drag start handler.\n *\n * @private\n * @param {Object} event\n */\nItemDrag.prototype._onStart = function (event) {\n var item = this._item;\n if (!item._isActive) return;\n\n this._isActive = true;\n this._dragStartEvent = event;\n ItemDrag.autoScroller.addItem(item);\n\n addDragStartTick(item._id, this._prepareStart, this._applyStart);\n};\n\n/**\n * Prepare item to be dragged.\n *\n * @private\n * ItemDrag.prototype\n */\nItemDrag.prototype._prepareStart = function () {\n if (!this._isActive) return;\n\n var item = this._item;\n if (!item._isActive) return;\n\n var element = item._element;\n var grid = this._getGrid();\n var settings = grid._settings;\n var gridContainer = grid._element;\n var dragContainer = settings.dragContainer || gridContainer;\n var containingBlock = getContainingBlock(dragContainer);\n var translate = getTranslate(element);\n var elementRect = element.getBoundingClientRect();\n var hasDragContainer = dragContainer !== gridContainer;\n\n this._container = dragContainer;\n this._containingBlock = containingBlock;\n this._clientX = elementRect.left;\n this._clientY = elementRect.top;\n this._left = this._gridX = translate.x;\n this._top = this._gridY = translate.y;\n this._scrollDiffX = this._scrollDiffY = 0;\n this._moveDiffX = this._moveDiffY = 0;\n\n this._resetHeuristics(this._gridX, this._gridY);\n\n // If a specific drag container is set and it is different from the\n // grid's container element we store the offset between containers.\n if (hasDragContainer) {\n var offsetDiff = getOffsetDiff(containingBlock, gridContainer);\n this._containerDiffX = offsetDiff.left;\n this._containerDiffY = offsetDiff.top;\n }\n};\n\n/**\n * Start drag for the item.\n *\n * @private\n */\nItemDrag.prototype._applyStart = function () {\n if (!this._isActive) return;\n\n var item = this._item;\n if (!item._isActive) return;\n\n var grid = this._getGrid();\n var element = item._element;\n var release = item._dragRelease;\n var migrate = item._migrate;\n var hasDragContainer = this._container !== grid._element;\n\n if (item.isPositioning()) {\n item._layout.stop(true, this._left, this._top);\n }\n\n if (migrate._isActive) {\n this._left -= migrate._containerDiffX;\n this._top -= migrate._containerDiffY;\n this._gridX -= migrate._containerDiffX;\n this._gridY -= migrate._containerDiffY;\n migrate.stop(true, this._left, this._top);\n }\n\n if (item.isReleasing()) {\n release._reset();\n }\n\n if (grid._settings.dragPlaceholder.enabled) {\n item._dragPlaceholder.create();\n }\n\n this._isStarted = true;\n\n grid._emit(EVENT_DRAG_INIT, item, this._dragStartEvent);\n\n if (hasDragContainer) {\n // If the dragged element is a child of the drag container all we need to\n // do is setup the relative drag position data.\n if (element.parentNode === this._container) {\n this._gridX -= this._containerDiffX;\n this._gridY -= this._containerDiffY;\n }\n // Otherwise we need to append the element inside the correct container,\n // setup the actual drag position data and adjust the element's translate\n // values to account for the DOM position shift.\n else {\n this._left += this._containerDiffX;\n this._top += this._containerDiffY;\n this._container.appendChild(element);\n item._setTranslate(this._left, this._top);\n }\n }\n\n addClass(element, grid._settings.itemDraggingClass);\n this._bindScrollListeners();\n grid._emit(EVENT_DRAG_START, item, this._dragStartEvent);\n};\n\n/**\n * Drag move handler.\n *\n * @private\n * @param {Object} event\n */\nItemDrag.prototype._onMove = function (event) {\n var item = this._item;\n\n if (!item._isActive) {\n this.stop();\n return;\n }\n\n this._dragMoveEvent = event;\n addDragMoveTick(item._id, this._prepareMove, this._applyMove);\n addDragSortTick(item._id, this._handleSort);\n};\n\n/**\n * Prepare dragged item for moving.\n *\n * @private\n */\nItemDrag.prototype._prepareMove = function () {\n if (!this._isActive) return;\n\n var item = this._item;\n if (!item._isActive) return;\n\n var settings = this._getGrid()._settings;\n var axis = settings.dragAxis;\n var nextEvent = this._dragMoveEvent;\n var prevEvent = this._dragPrevMoveEvent || this._dragStartEvent || nextEvent;\n\n // Update horizontal position data.\n if (axis !== 'y') {\n var moveDiffX = nextEvent.clientX - prevEvent.clientX;\n this._left = this._left - this._moveDiffX + moveDiffX;\n this._gridX = this._gridX - this._moveDiffX + moveDiffX;\n this._clientX = this._clientX - this._moveDiffX + moveDiffX;\n this._moveDiffX = moveDiffX;\n }\n\n // Update vertical position data.\n if (axis !== 'x') {\n var moveDiffY = nextEvent.clientY - prevEvent.clientY;\n this._top = this._top - this._moveDiffY + moveDiffY;\n this._gridY = this._gridY - this._moveDiffY + moveDiffY;\n this._clientY = this._clientY - this._moveDiffY + moveDiffY;\n this._moveDiffY = moveDiffY;\n }\n\n this._dragPrevMoveEvent = nextEvent;\n};\n\n/**\n * Apply movement to dragged item.\n *\n * @private\n */\nItemDrag.prototype._applyMove = function () {\n if (!this._isActive) return;\n\n var item = this._item;\n if (!item._isActive) return;\n\n this._moveDiffX = this._moveDiffY = 0;\n item._setTranslate(this._left, this._top);\n this._getGrid()._emit(EVENT_DRAG_MOVE, item, this._dragMoveEvent);\n ItemDrag.autoScroller.updateItem(item);\n};\n\n/**\n * Drag scroll handler.\n *\n * @private\n * @param {Object} event\n */\nItemDrag.prototype._onScroll = function (event) {\n var item = this._item;\n\n if (!item._isActive) {\n this.stop();\n return;\n }\n\n this._scrollEvent = event;\n addDragScrollTick(item._id, this._prepareScroll, this._applyScroll);\n addDragSortTick(item._id, this._handleSort);\n};\n\n/**\n * Prepare dragged item for scrolling.\n *\n * @private\n */\nItemDrag.prototype._prepareScroll = function () {\n if (!this._isActive) return;\n\n // If item is not active do nothing.\n var item = this._item;\n if (!item._isActive) return;\n\n var element = item._element;\n var grid = this._getGrid();\n var gridContainer = grid._element;\n var rect = element.getBoundingClientRect();\n\n // Update container diff.\n if (this._container !== gridContainer) {\n var offsetDiff = getOffsetDiff(this._containingBlock, gridContainer);\n this._containerDiffX = offsetDiff.left;\n this._containerDiffY = offsetDiff.top;\n }\n\n // Update horizontal position data.\n var scrollDiffX = this._clientX - this._moveDiffX - rect.left;\n this._left = this._left - this._scrollDiffX + scrollDiffX;\n this._scrollDiffX = scrollDiffX;\n\n // Update vertical position data.\n var scrollDiffY = this._clientY - this._moveDiffY - rect.top;\n this._top = this._top - this._scrollDiffY + scrollDiffY;\n this._scrollDiffY = scrollDiffY;\n\n // Update grid position.\n this._gridX = this._left - this._containerDiffX;\n this._gridY = this._top - this._containerDiffY;\n};\n\n/**\n * Apply scroll to dragged item.\n *\n * @private\n */\nItemDrag.prototype._applyScroll = function () {\n if (!this._isActive) return;\n\n var item = this._item;\n if (!item._isActive) return;\n\n this._scrollDiffX = this._scrollDiffY = 0;\n item._setTranslate(this._left, this._top);\n this._getGrid()._emit(EVENT_DRAG_SCROLL, item, this._scrollEvent);\n};\n\n/**\n * Drag end handler.\n *\n * @private\n * @param {Object} event\n */\nItemDrag.prototype._onEnd = function (event) {\n var item = this._item;\n var element = item._element;\n var grid = this._getGrid();\n var settings = grid._settings;\n var release = item._dragRelease;\n\n // If item is not active, reset drag.\n if (!item._isActive) {\n this.stop();\n return;\n }\n\n // Cancel queued ticks.\n cancelDragStartTick(item._id);\n cancelDragMoveTick(item._id);\n cancelDragScrollTick(item._id);\n\n // Finish sort procedure (does final overlap check if needed).\n this._finishSort();\n\n // Remove scroll listeners.\n this._unbindScrollListeners();\n\n // Setup release data.\n release._containerDiffX = this._containerDiffX;\n release._containerDiffY = this._containerDiffY;\n\n // Reset drag data.\n this._reset();\n\n // Remove drag class name from element.\n removeClass(element, settings.itemDraggingClass);\n\n // Stop auto-scroll.\n ItemDrag.autoScroller.removeItem(item);\n\n // Emit dragEnd event.\n grid._emit(EVENT_DRAG_END, item, event);\n\n // Finish up the migration process or start the release process.\n this._isMigrating ? this._finishMigration() : release.start();\n};\n\n/**\n * Private helpers\n * ***************\n */\n\n/**\n * Check if an element is an anchor element and open the href url if possible.\n *\n * @param {HTMLElement} element\n */\nfunction openAnchorHref(element) {\n // Make sure the element is anchor element.\n if (element.tagName.toLowerCase() !== 'a') return;\n\n // Get href and make sure it exists.\n var href = element.getAttribute('href');\n if (!href) return;\n\n // Finally let's navigate to the link href.\n var target = element.getAttribute('target');\n if (target && target !== '_self') {\n window.open(href, target);\n } else {\n window.location.href = href;\n }\n}\n\n/**\n * Get current values of the provided styles definition object or array.\n *\n * @param {HTMLElement} element\n * @param {(Object|Array} styles\n * @return {Object}\n */\nfunction getCurrentStyles(element, styles) {\n var result = {};\n var prop, i;\n\n if (Array.isArray(styles)) {\n for (i = 0; i < styles.length; i++) {\n prop = styles[i];\n result[prop] = getStyle(element, getStyleName(prop));\n }\n } else {\n for (prop in styles) {\n result[prop] = getStyle(element, getStyleName(prop));\n }\n }\n\n return result;\n}\n\nvar unprefixRegEx = /^(webkit|moz|ms|o|Webkit|Moz|MS|O)(?=[A-Z])/;\nvar cache = {};\n\n/**\n * Remove any potential vendor prefixes from a property name.\n *\n * @param {String} prop\n * @returns {String}\n */\nfunction getUnprefixedPropName(prop) {\n var result = cache[prop];\n if (result) return result;\n\n result = prop.replace(unprefixRegEx, '');\n\n if (result !== prop) {\n result = result[0].toLowerCase() + result.slice(1);\n }\n\n cache[prop] = result;\n\n return result;\n}\n\nvar nativeCode = '[native code]';\n\n/**\n * Check if a value (e.g. a method or constructor) is native code. Good for\n * detecting when a polyfill is used and when not.\n *\n * @param {*} feat\n * @returns {Boolean}\n */\nfunction isNative(feat) {\n var S = window.Symbol;\n return !!(\n feat &&\n isFunction(S) &&\n isFunction(S.toString) &&\n S(feat).toString().indexOf(nativeCode) > -1\n );\n}\n\n/**\n * Set inline styles to an element.\n *\n * @param {HTMLElement} element\n * @param {Object} styles\n */\nfunction setStyles(element, styles) {\n for (var prop in styles) {\n element.style[prop] = styles[prop];\n }\n}\n\nvar HAS_WEB_ANIMATIONS = !!(Element && isFunction(Element.prototype.animate));\nvar HAS_NATIVE_WEB_ANIMATIONS = !!(Element && isNative(Element.prototype.animate));\n\n/**\n * Item animation handler powered by Web Animations API.\n *\n * @class\n * @param {HTMLElement} element\n */\nfunction Animator(element) {\n this._element = element;\n this._animation = null;\n this._duration = 0;\n this._easing = '';\n this._callback = null;\n this._props = [];\n this._values = [];\n this._isDestroyed = false;\n this._onFinish = this._onFinish.bind(this);\n}\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Start instance's animation. Automatically stops current animation if it is\n * running.\n *\n * @public\n * @param {Object} propsFrom\n * @param {Object} propsTo\n * @param {Object} [options]\n * @param {Number} [options.duration=300]\n * @param {String} [options.easing='ease']\n * @param {Function} [options.onFinish]\n */\nAnimator.prototype.start = function (propsFrom, propsTo, options) {\n if (this._isDestroyed) return;\n\n var element = this._element;\n var opts = options || {};\n\n // If we don't have web animations available let's not animate.\n if (!HAS_WEB_ANIMATIONS) {\n setStyles(element, propsTo);\n this._callback = isFunction(opts.onFinish) ? opts.onFinish : null;\n this._onFinish();\n return;\n }\n\n var animation = this._animation;\n var currentProps = this._props;\n var currentValues = this._values;\n var duration = opts.duration || 300;\n var easing = opts.easing || 'ease';\n var cancelAnimation = false;\n var propName, propCount, propIndex;\n\n // If we have an existing animation running, let's check if it needs to be\n // cancelled or if it can continue running.\n if (animation) {\n propCount = 0;\n\n // Cancel animation if duration or easing has changed.\n if (duration !== this._duration || easing !== this._easing) {\n cancelAnimation = true;\n }\n\n // Check if the requested animation target props and values match with the\n // current props and values.\n if (!cancelAnimation) {\n for (propName in propsTo) {\n ++propCount;\n propIndex = currentProps.indexOf(propName);\n if (propIndex === -1 || propsTo[propName] !== currentValues[propIndex]) {\n cancelAnimation = true;\n break;\n }\n }\n\n // Check if the target props count matches current props count. This is\n // needed for the edge case scenario where target props contain the same\n // styles as current props, but the current props have some additional\n // props.\n if (propCount !== currentProps.length) {\n cancelAnimation = true;\n }\n }\n }\n\n // Cancel animation (if required).\n if (cancelAnimation) animation.cancel();\n\n // Store animation callback.\n this._callback = isFunction(opts.onFinish) ? opts.onFinish : null;\n\n // If we have a running animation that does not need to be cancelled, let's\n // call it a day here and let it run.\n if (animation && !cancelAnimation) return;\n\n // Store target props and values to instance.\n currentProps.length = currentValues.length = 0;\n for (propName in propsTo) {\n currentProps.push(propName);\n currentValues.push(propsTo[propName]);\n }\n\n // Start the animation. We need to provide unprefixed property names to the\n // Web Animations polyfill if it is being used. If we have native Web\n // Animations available we need to provide prefixed properties instead.\n this._duration = duration;\n this._easing = easing;\n this._animation = element.animate(\n [\n createFrame(propsFrom, HAS_NATIVE_WEB_ANIMATIONS),\n createFrame(propsTo, HAS_NATIVE_WEB_ANIMATIONS),\n ],\n {\n duration: duration,\n easing: easing,\n }\n );\n this._animation.onfinish = this._onFinish;\n\n // Set the end styles. This makes sure that the element stays at the end\n // values after animation is finished.\n setStyles(element, propsTo);\n};\n\n/**\n * Stop instance's current animation if running.\n *\n * @public\n */\nAnimator.prototype.stop = function () {\n if (this._isDestroyed || !this._animation) return;\n this._animation.cancel();\n this._animation = this._callback = null;\n this._props.length = this._values.length = 0;\n};\n\n/**\n * Read the current values of the element's animated styles from the DOM.\n *\n * @public\n * @return {Object}\n */\nAnimator.prototype.getCurrentStyles = function () {\n return getCurrentStyles(element, currentProps);\n};\n\n/**\n * Check if the item is being animated currently.\n *\n * @public\n * @return {Boolean}\n */\nAnimator.prototype.isAnimating = function () {\n return !!this._animation;\n};\n\n/**\n * Destroy the instance and stop current animation if it is running.\n *\n * @public\n */\nAnimator.prototype.destroy = function () {\n if (this._isDestroyed) return;\n this.stop();\n this._element = null;\n this._isDestroyed = true;\n};\n\n/**\n * Private prototype methods\n * *************************\n */\n\n/**\n * Animation end handler.\n *\n * @private\n */\nAnimator.prototype._onFinish = function () {\n var callback = this._callback;\n this._animation = this._callback = null;\n this._props.length = this._values.length = 0;\n callback && callback();\n};\n\n/**\n * Private helpers\n * ***************\n */\n\nfunction createFrame(props, prefix) {\n var frame = {};\n for (var prop in props) {\n frame[prefix ? prop : getUnprefixedPropName(prop)] = props[prop];\n }\n return frame;\n}\n\n/**\n * Transform translateX and translateY value into CSS transform style\n * property's value.\n *\n * @param {Number} x\n * @param {Number} y\n * @returns {String}\n */\nfunction getTranslateString(x, y) {\n return 'translateX(' + x + 'px) translateY(' + y + 'px)';\n}\n\n/**\n * Drag placeholder.\n *\n * @class\n * @param {Item} item\n */\nfunction ItemDragPlaceholder(item) {\n this._item = item;\n this._animation = new Animator();\n this._element = null;\n this._className = '';\n this._didMigrate = false;\n this._resetAfterLayout = false;\n this._left = 0;\n this._top = 0;\n this._transX = 0;\n this._transY = 0;\n this._nextTransX = 0;\n this._nextTransY = 0;\n\n // Bind animation handlers.\n this._setupAnimation = this._setupAnimation.bind(this);\n this._startAnimation = this._startAnimation.bind(this);\n this._updateDimensions = this._updateDimensions.bind(this);\n\n // Bind event handlers.\n this._onLayoutStart = this._onLayoutStart.bind(this);\n this._onLayoutEnd = this._onLayoutEnd.bind(this);\n this._onReleaseEnd = this._onReleaseEnd.bind(this);\n this._onMigrate = this._onMigrate.bind(this);\n this._onHide = this._onHide.bind(this);\n}\n\n/**\n * Private prototype methods\n * *************************\n */\n\n/**\n * Update placeholder's dimensions to match the item's dimensions.\n *\n * @private\n */\nItemDragPlaceholder.prototype._updateDimensions = function () {\n if (!this.isActive()) return;\n setStyles(this._element, {\n width: this._item._width + 'px',\n height: this._item._height + 'px',\n });\n};\n\n/**\n * Move placeholder to a new position.\n *\n * @private\n * @param {Item[]} items\n * @param {Boolean} isInstant\n */\nItemDragPlaceholder.prototype._onLayoutStart = function (items, isInstant) {\n var item = this._item;\n\n // If the item is not part of the layout anymore reset placeholder.\n if (items.indexOf(item) === -1) {\n this.reset();\n return;\n }\n\n var nextLeft = item._left;\n var nextTop = item._top;\n var currentLeft = this._left;\n var currentTop = this._top;\n\n // Keep track of item layout position.\n this._left = nextLeft;\n this._top = nextTop;\n\n // If item's position did not change, and the item did not migrate and the\n // layout is not instant and we can safely skip layout.\n if (!isInstant && !this._didMigrate && currentLeft === nextLeft && currentTop === nextTop) {\n return;\n }\n\n // Slots data is calculated with item margins added to them so we need to add\n // item's left and top margin to the slot data to get the placeholder's\n // next position.\n var nextX = nextLeft + item._marginLeft;\n var nextY = nextTop + item._marginTop;\n\n // Just snap to new position without any animations if no animation is\n // required or if placeholder moves between grids.\n var grid = item.getGrid();\n var animEnabled = !isInstant && grid._settings.layoutDuration > 0;\n if (!animEnabled || this._didMigrate) {\n // Cancel potential (queued) layout tick.\n cancelPlaceholderLayoutTick(item._id);\n\n // Snap placeholder to correct position.\n this._element.style[transformProp] = getTranslateString(nextX, nextY);\n this._animation.stop();\n\n // Move placeholder inside correct container after migration.\n if (this._didMigrate) {\n grid.getElement().appendChild(this._element);\n this._didMigrate = false;\n }\n\n return;\n }\n\n // Start the placeholder's layout animation in the next tick. We do this to\n // avoid layout thrashing.\n this._nextTransX = nextX;\n this._nextTransY = nextY;\n addPlaceholderLayoutTick(item._id, this._setupAnimation, this._startAnimation);\n};\n\n/**\n * Prepare placeholder for layout animation.\n *\n * @private\n */\nItemDragPlaceholder.prototype._setupAnimation = function () {\n if (!this.isActive()) return;\n\n var translate = getTranslate(this._element);\n this._transX = translate.x;\n this._transY = translate.y;\n};\n\n/**\n * Start layout animation.\n *\n * @private\n */\nItemDragPlaceholder.prototype._startAnimation = function () {\n if (!this.isActive()) return;\n\n var animation = this._animation;\n var currentX = this._transX;\n var currentY = this._transY;\n var nextX = this._nextTransX;\n var nextY = this._nextTransY;\n\n // If placeholder is already in correct position let's just stop animation\n // and be done with it.\n if (currentX === nextX && currentY === nextY) {\n if (animation.isAnimating()) {\n this._element.style[transformProp] = getTranslateString(nextX, nextY);\n animation.stop();\n }\n return;\n }\n\n // Otherwise let's start the animation.\n var settings = this._item.getGrid()._settings;\n var currentStyles = {};\n var targetStyles = {};\n currentStyles[transformProp] = getTranslateString(currentX, currentY);\n targetStyles[transformProp] = getTranslateString(nextX, nextY);\n animation.start(currentStyles, targetStyles, {\n duration: settings.layoutDuration,\n easing: settings.layoutEasing,\n onFinish: this._onLayoutEnd,\n });\n};\n\n/**\n * Layout end handler.\n *\n * @private\n */\nItemDragPlaceholder.prototype._onLayoutEnd = function () {\n if (this._resetAfterLayout) {\n this.reset();\n }\n};\n\n/**\n * Drag end handler. This handler is called when dragReleaseEnd event is\n * emitted and receives the event data as it's argument.\n *\n * @private\n * @param {Item} item\n */\nItemDragPlaceholder.prototype._onReleaseEnd = function (item) {\n if (item._id === this._item._id) {\n // If the placeholder is not animating anymore we can safely reset it.\n if (!this._animation.isAnimating()) {\n this.reset();\n return;\n }\n\n // If the placeholder item is still animating here, let's wait for it to\n // finish it's animation.\n this._resetAfterLayout = true;\n }\n};\n\n/**\n * Migration start handler. This handler is called when beforeSend event is\n * emitted and receives the event data as it's argument.\n *\n * @private\n * @param {Object} data\n * @param {Item} data.item\n * @param {Grid} data.fromGrid\n * @param {Number} data.fromIndex\n * @param {Grid} data.toGrid\n * @param {Number} data.toIndex\n */\nItemDragPlaceholder.prototype._onMigrate = function (data) {\n // Make sure we have a matching item.\n if (data.item !== this._item) return;\n\n var grid = this._item.getGrid();\n var nextGrid = data.toGrid;\n\n // Unbind listeners from current grid.\n grid.off(EVENT_DRAG_RELEASE_END, this._onReleaseEnd);\n grid.off(EVENT_LAYOUT_START, this._onLayoutStart);\n grid.off(EVENT_BEFORE_SEND, this._onMigrate);\n grid.off(EVENT_HIDE_START, this._onHide);\n\n // Bind listeners to the next grid.\n nextGrid.on(EVENT_DRAG_RELEASE_END, this._onReleaseEnd);\n nextGrid.on(EVENT_LAYOUT_START, this._onLayoutStart);\n nextGrid.on(EVENT_BEFORE_SEND, this._onMigrate);\n nextGrid.on(EVENT_HIDE_START, this._onHide);\n\n // Mark the item as migrated.\n this._didMigrate = true;\n};\n\n/**\n * Reset placeholder if the associated item is hidden.\n *\n * @private\n * @param {Item[]} items\n */\nItemDragPlaceholder.prototype._onHide = function (items) {\n if (items.indexOf(this._item) > -1) this.reset();\n};\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Create placeholder. Note that this method only writes to DOM and does not\n * read anything from DOM so it should not cause any additional layout\n * thrashing when it's called at the end of the drag start procedure.\n *\n * @public\n */\nItemDragPlaceholder.prototype.create = function () {\n // If we already have placeholder set up we can skip the initiation logic.\n if (this.isActive()) {\n this._resetAfterLayout = false;\n return;\n }\n\n var item = this._item;\n var grid = item.getGrid();\n var settings = grid._settings;\n var animation = this._animation;\n\n // Keep track of layout position.\n this._left = item._left;\n this._top = item._top;\n\n // Create placeholder element.\n var element;\n if (isFunction(settings.dragPlaceholder.createElement)) {\n element = settings.dragPlaceholder.createElement(item);\n } else {\n element = document.createElement('div');\n }\n this._element = element;\n\n // Update element to animation instance.\n animation._element = element;\n\n // Add placeholder class to the placeholder element.\n this._className = settings.itemPlaceholderClass || '';\n if (this._className) {\n addClass(element, this._className);\n }\n\n // Set initial styles.\n setStyles(element, {\n position: 'absolute',\n left: '0px',\n top: '0px',\n width: item._width + 'px',\n height: item._height + 'px',\n });\n\n // Set initial position.\n element.style[transformProp] = getTranslateString(\n item._left + item._marginLeft,\n item._top + item._marginTop\n );\n\n // Bind event listeners.\n grid.on(EVENT_LAYOUT_START, this._onLayoutStart);\n grid.on(EVENT_DRAG_RELEASE_END, this._onReleaseEnd);\n grid.on(EVENT_BEFORE_SEND, this._onMigrate);\n grid.on(EVENT_HIDE_START, this._onHide);\n\n // onCreate hook.\n if (isFunction(settings.dragPlaceholder.onCreate)) {\n settings.dragPlaceholder.onCreate(item, element);\n }\n\n // Insert the placeholder element to the grid.\n grid.getElement().appendChild(element);\n};\n\n/**\n * Reset placeholder data.\n *\n * @public\n */\nItemDragPlaceholder.prototype.reset = function () {\n if (!this.isActive()) return;\n\n var element = this._element;\n var item = this._item;\n var grid = item.getGrid();\n var settings = grid._settings;\n var animation = this._animation;\n\n // Reset flag.\n this._resetAfterLayout = false;\n\n // Cancel potential (queued) layout tick.\n cancelPlaceholderLayoutTick(item._id);\n cancelPlaceholderResizeTick(item._id);\n\n // Reset animation instance.\n animation.stop();\n animation._element = null;\n\n // Unbind event listeners.\n grid.off(EVENT_DRAG_RELEASE_END, this._onReleaseEnd);\n grid.off(EVENT_LAYOUT_START, this._onLayoutStart);\n grid.off(EVENT_BEFORE_SEND, this._onMigrate);\n grid.off(EVENT_HIDE_START, this._onHide);\n\n // Remove placeholder class from the placeholder element.\n if (this._className) {\n removeClass(element, this._className);\n this._className = '';\n }\n\n // Remove element.\n element.parentNode.removeChild(element);\n this._element = null;\n\n // onRemove hook. Note that here we use the current grid's onRemove callback\n // so if the item has migrated during drag the onRemove method will not be\n // the originating grid's method.\n if (isFunction(settings.dragPlaceholder.onRemove)) {\n settings.dragPlaceholder.onRemove(item, element);\n }\n};\n\n/**\n * Check if placeholder is currently active (visible).\n *\n * @public\n * @returns {Boolean}\n */\nItemDragPlaceholder.prototype.isActive = function () {\n return !!this._element;\n};\n\n/**\n * Get placeholder element.\n *\n * @public\n * @returns {?HTMLElement}\n */\nItemDragPlaceholder.prototype.getElement = function () {\n return this._element;\n};\n\n/**\n * Update placeholder's dimensions to match the item's dimensions. Note that\n * the updating is done asynchronously in the next tick to avoid layout\n * thrashing.\n *\n * @public\n */\nItemDragPlaceholder.prototype.updateDimensions = function () {\n if (!this.isActive()) return;\n addPlaceholderResizeTick(this._item._id, this._updateDimensions);\n};\n\n/**\n * Destroy placeholder instance.\n *\n * @public\n */\nItemDragPlaceholder.prototype.destroy = function () {\n this.reset();\n this._animation.destroy();\n this._item = this._animation = null;\n};\n\n/**\n * The release process handler constructor. Although this might seem as proper\n * fit for the drag process this needs to be separated into it's own logic\n * because there might be a scenario where drag is disabled, but the release\n * process still needs to be implemented (dragging from a grid to another).\n *\n * @class\n * @param {Item} item\n */\nfunction ItemDragRelease(item) {\n this._item = item;\n this._isActive = false;\n this._isDestroyed = false;\n this._isPositioningStarted = false;\n this._containerDiffX = 0;\n this._containerDiffY = 0;\n}\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Start the release process of an item.\n *\n * @public\n */\nItemDragRelease.prototype.start = function () {\n if (this._isDestroyed || this._isActive) return;\n\n var item = this._item;\n var grid = item.getGrid();\n var settings = grid._settings;\n\n this._isActive = true;\n addClass(item._element, settings.itemReleasingClass);\n if (!settings.dragRelease.useDragContainer) {\n this._placeToGrid();\n }\n grid._emit(EVENT_DRAG_RELEASE_START, item);\n\n // Let's start layout manually _only_ if there is no unfinished layout in\n // about to finish.\n if (!grid._nextLayoutData) item._layout.start(false);\n};\n\n/**\n * End the release process of an item. This method can be used to abort an\n * ongoing release process (animation) or finish the release process.\n *\n * @public\n * @param {Boolean} [abort=false]\n * - Should the release be aborted? When true, the release end event won't be\n * emitted. Set to true only when you need to abort the release process\n * while the item is animating to it's position.\n * @param {Number} [left]\n * - The element's current translateX value (optional).\n * @param {Number} [top]\n * - The element's current translateY value (optional).\n */\nItemDragRelease.prototype.stop = function (abort, left, top) {\n if (this._isDestroyed || !this._isActive) return;\n\n var item = this._item;\n var grid = item.getGrid();\n\n if (!abort && (left === undefined || top === undefined)) {\n left = item._left;\n top = item._top;\n }\n\n var didReparent = this._placeToGrid(left, top);\n this._reset(didReparent);\n\n if (!abort) grid._emit(EVENT_DRAG_RELEASE_END, item);\n};\n\nItemDragRelease.prototype.isJustReleased = function () {\n return this._isActive && this._isPositioningStarted === false;\n};\n\n/**\n * Destroy instance.\n *\n * @public\n */\nItemDragRelease.prototype.destroy = function () {\n if (this._isDestroyed) return;\n this.stop(true);\n this._item = null;\n this._isDestroyed = true;\n};\n\n/**\n * Private prototype methods\n * *************************\n */\n\n/**\n * Move the element back to the grid container element if it does not exist\n * there already.\n *\n * @private\n * @param {Number} [left]\n * - The element's current translateX value (optional).\n * @param {Number} [top]\n * - The element's current translateY value (optional).\n * @returns {Boolean}\n * - Returns `true` if the element was reparented.\n */\nItemDragRelease.prototype._placeToGrid = function (left, top) {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var element = item._element;\n var container = item.getGrid()._element;\n var didReparent = false;\n\n if (element.parentNode !== container) {\n if (left === undefined || top === undefined) {\n var translate = getTranslate(element);\n left = translate.x - this._containerDiffX;\n top = translate.y - this._containerDiffY;\n }\n\n container.appendChild(element);\n item._setTranslate(left, top);\n didReparent = true;\n }\n\n this._containerDiffX = 0;\n this._containerDiffY = 0;\n\n return didReparent;\n};\n\n/**\n * Reset data and remove releasing class.\n *\n * @private\n * @param {Boolean} [needsReflow]\n */\nItemDragRelease.prototype._reset = function (needsReflow) {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var releasingClass = item.getGrid()._settings.itemReleasingClass;\n\n this._isActive = false;\n this._isPositioningStarted = false;\n this._containerDiffX = 0;\n this._containerDiffY = 0;\n\n // If the element was just reparented we need to do a forced reflow to remove\n // the class gracefully.\n if (releasingClass) {\n // eslint-disable-next-line\n if (needsReflow) item._element.clientWidth;\n removeClass(item._element, releasingClass);\n }\n};\n\nvar MIN_ANIMATION_DISTANCE = 2;\n\n/**\n * Layout manager for Item instance, handles the positioning of an item.\n *\n * @class\n * @param {Item} item\n */\nfunction ItemLayout(item) {\n var element = item._element;\n var elementStyle = element.style;\n\n this._item = item;\n this._isActive = false;\n this._isDestroyed = false;\n this._isInterrupted = false;\n this._currentStyles = {};\n this._targetStyles = {};\n this._nextLeft = 0;\n this._nextTop = 0;\n this._offsetLeft = 0;\n this._offsetTop = 0;\n this._skipNextAnimation = false;\n this._animOptions = {\n onFinish: this._finish.bind(this),\n duration: 0,\n easing: 0,\n };\n\n // Set element's initial position styles.\n elementStyle.left = '0px';\n elementStyle.top = '0px';\n item._setTranslate(0, 0);\n\n this._animation = new Animator(element);\n this._queue = 'layout-' + item._id;\n\n // Bind animation handlers and finish method.\n this._setupAnimation = this._setupAnimation.bind(this);\n this._startAnimation = this._startAnimation.bind(this);\n}\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Start item layout based on it's current data.\n *\n * @public\n * @param {Boolean} instant\n * @param {Function} [onFinish]\n */\nItemLayout.prototype.start = function (instant, onFinish) {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var release = item._dragRelease;\n var gridSettings = item.getGrid()._settings;\n var isPositioning = this._isActive;\n var isJustReleased = release.isJustReleased();\n var animDuration = isJustReleased\n ? gridSettings.dragRelease.duration\n : gridSettings.layoutDuration;\n var animEasing = isJustReleased ? gridSettings.dragRelease.easing : gridSettings.layoutEasing;\n var animEnabled = !instant && !this._skipNextAnimation && animDuration > 0;\n\n // If the item is currently positioning cancel potential queued layout tick\n // and process current layout callback queue with interrupted flag on.\n if (isPositioning) {\n cancelLayoutTick(item._id);\n item._emitter.burst(this._queue, true, item);\n }\n\n // Mark release positioning as started.\n if (isJustReleased) release._isPositioningStarted = true;\n\n // Push the callback to the callback queue.\n if (isFunction(onFinish)) {\n item._emitter.on(this._queue, onFinish);\n }\n\n // Reset animation skipping flag.\n this._skipNextAnimation = false;\n\n // If no animations are needed, easy peasy!\n if (!animEnabled) {\n this._updateOffsets();\n item._setTranslate(this._nextLeft, this._nextTop);\n this._animation.stop();\n this._finish();\n return;\n }\n\n // Let's make sure an ongoing animation's callback is cancelled before going\n // further. Without this there's a chance that the animation will finish\n // before the next tick and mess up our logic.\n if (this._animation.isAnimating()) {\n this._animation._animation.onfinish = null;\n }\n\n // Kick off animation to be started in the next tick.\n this._isActive = true;\n this._animOptions.easing = animEasing;\n this._animOptions.duration = animDuration;\n this._isInterrupted = isPositioning;\n addLayoutTick(item._id, this._setupAnimation, this._startAnimation);\n};\n\n/**\n * Stop item's position animation if it is currently animating.\n *\n * @public\n * @param {Boolean} processCallbackQueue\n * @param {Number} [left]\n * @param {Number} [top]\n */\nItemLayout.prototype.stop = function (processCallbackQueue, left, top) {\n if (this._isDestroyed || !this._isActive) return;\n\n var item = this._item;\n\n // Cancel animation init.\n cancelLayoutTick(item._id);\n\n // Stop animation.\n if (this._animation.isAnimating()) {\n if (left === undefined || top === undefined) {\n var translate = getTranslate(item._element);\n left = translate.x;\n top = translate.y;\n }\n item._setTranslate(left, top);\n this._animation.stop();\n }\n\n // Remove positioning class.\n removeClass(item._element, item.getGrid()._settings.itemPositioningClass);\n\n // Reset active state.\n this._isActive = false;\n\n // Process callback queue if needed.\n if (processCallbackQueue) {\n item._emitter.burst(this._queue, true, item);\n }\n};\n\n/**\n * Destroy the instance and stop current animation if it is running.\n *\n * @public\n */\nItemLayout.prototype.destroy = function () {\n if (this._isDestroyed) return;\n\n var elementStyle = this._item._element.style;\n\n this.stop(true, 0, 0);\n this._item._emitter.clear(this._queue);\n this._animation.destroy();\n\n elementStyle[transformProp] = '';\n elementStyle.left = '';\n elementStyle.top = '';\n\n this._item = null;\n this._currentStyles = null;\n this._targetStyles = null;\n this._animOptions = null;\n this._isDestroyed = true;\n};\n\n/**\n * Private prototype methods\n * *************************\n */\n\n/**\n * Calculate and update item's current layout offset data.\n *\n * @private\n */\nItemLayout.prototype._updateOffsets = function () {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var migrate = item._migrate;\n var release = item._dragRelease;\n\n this._offsetLeft = release._isActive\n ? release._containerDiffX\n : migrate._isActive\n ? migrate._containerDiffX\n : 0;\n\n this._offsetTop = release._isActive\n ? release._containerDiffY\n : migrate._isActive\n ? migrate._containerDiffY\n : 0;\n\n this._nextLeft = this._item._left + this._offsetLeft;\n this._nextTop = this._item._top + this._offsetTop;\n};\n\n/**\n * Finish item layout procedure.\n *\n * @private\n */\nItemLayout.prototype._finish = function () {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var migrate = item._migrate;\n var release = item._dragRelease;\n\n // Update internal translate values.\n item._tX = this._nextLeft;\n item._tY = this._nextTop;\n\n // Mark the item as inactive and remove positioning classes.\n if (this._isActive) {\n this._isActive = false;\n removeClass(item._element, item.getGrid()._settings.itemPositioningClass);\n }\n\n // Finish up release and migration.\n if (release._isActive) release.stop();\n if (migrate._isActive) migrate.stop();\n\n // Process the callback queue.\n item._emitter.burst(this._queue, false, item);\n};\n\n/**\n * Prepare item for layout animation.\n *\n * @private\n */\nItemLayout.prototype._setupAnimation = function () {\n var item = this._item;\n if (item._tX === undefined || item._tY === undefined) {\n var translate = getTranslate(item._element);\n item._tX = translate.x;\n item._tY = translate.y;\n }\n};\n\n/**\n * Start layout animation.\n *\n * @private\n */\nItemLayout.prototype._startAnimation = function () {\n var item = this._item;\n var settings = item.getGrid()._settings;\n var isInstant = this._animOptions.duration <= 0;\n\n // Let's update the offset data and target styles.\n this._updateOffsets();\n\n var xDiff = Math.abs(item._left - (item._tX - this._offsetLeft));\n var yDiff = Math.abs(item._top - (item._tY - this._offsetTop));\n\n // If there is no need for animation or if the item is already in correct\n // position (or near it) let's finish the process early.\n if (isInstant || (xDiff < MIN_ANIMATION_DISTANCE && yDiff < MIN_ANIMATION_DISTANCE)) {\n if (xDiff || yDiff || this._isInterrupted) {\n item._setTranslate(this._nextLeft, this._nextTop);\n }\n this._animation.stop();\n this._finish();\n return;\n }\n\n // Set item's positioning class if needed.\n if (!this._isInterrupted) {\n addClass(item._element, settings.itemPositioningClass);\n }\n\n // Get current/next styles for animation.\n this._currentStyles[transformProp] = getTranslateString(item._tX, item._tY);\n this._targetStyles[transformProp] = getTranslateString(this._nextLeft, this._nextTop);\n\n // Set internal translation values to undefined for the duration of the\n // animation since they will be changing on each animation frame for the\n // duration of the animation and tracking them would mean reading the DOM on\n // each frame, which is pretty darn expensive.\n item._tX = item._tY = undefined;\n\n // Start animation.\n this._animation.start(this._currentStyles, this._targetStyles, this._animOptions);\n};\n\n/**\n * The migrate process handler constructor.\n *\n * @class\n * @param {Item} item\n */\nfunction ItemMigrate(item) {\n // Private props.\n this._item = item;\n this._isActive = false;\n this._isDestroyed = false;\n this._container = false;\n this._containerDiffX = 0;\n this._containerDiffY = 0;\n}\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Start the migrate process of an item.\n *\n * @public\n * @param {Grid} targetGrid\n * @param {(HTMLElement|Number|Item)} position\n * @param {HTMLElement} [container]\n */\nItemMigrate.prototype.start = function (targetGrid, position, container) {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var element = item._element;\n var isActive = item.isActive();\n var isVisible = item.isVisible();\n var grid = item.getGrid();\n var settings = grid._settings;\n var targetSettings = targetGrid._settings;\n var targetElement = targetGrid._element;\n var targetItems = targetGrid._items;\n var currentIndex = grid._items.indexOf(item);\n var targetContainer = container || document.body;\n var targetIndex;\n var targetItem;\n var currentContainer;\n var offsetDiff;\n var containerDiff;\n var translate;\n var translateX;\n var translateY;\n var currentVisClass;\n var nextVisClass;\n\n // Get target index.\n if (typeof position === 'number') {\n targetIndex = normalizeArrayIndex(targetItems, position, 1);\n } else {\n targetItem = targetGrid.getItem(position);\n if (!targetItem) return;\n targetIndex = targetItems.indexOf(targetItem);\n }\n\n // Get current translateX and translateY values if needed.\n if (item.isPositioning() || this._isActive || item.isReleasing()) {\n translate = getTranslate(element);\n translateX = translate.x;\n translateY = translate.y;\n }\n\n // Abort current positioning.\n if (item.isPositioning()) {\n item._layout.stop(true, translateX, translateY);\n }\n\n // Abort current migration.\n if (this._isActive) {\n translateX -= this._containerDiffX;\n translateY -= this._containerDiffY;\n this.stop(true, translateX, translateY);\n }\n\n // Abort current release.\n if (item.isReleasing()) {\n translateX -= item._dragRelease._containerDiffX;\n translateY -= item._dragRelease._containerDiffY;\n item._dragRelease.stop(true, translateX, translateY);\n }\n\n // Stop current visibility animation.\n item._visibility.stop(true);\n\n // Destroy current drag.\n if (item._drag) item._drag.destroy();\n\n // Emit beforeSend event.\n if (grid._hasListeners(EVENT_BEFORE_SEND)) {\n grid._emit(EVENT_BEFORE_SEND, {\n item: item,\n fromGrid: grid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex,\n });\n }\n\n // Emit beforeReceive event.\n if (targetGrid._hasListeners(EVENT_BEFORE_RECEIVE)) {\n targetGrid._emit(EVENT_BEFORE_RECEIVE, {\n item: item,\n fromGrid: grid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex,\n });\n }\n\n // Update item class.\n if (settings.itemClass !== targetSettings.itemClass) {\n removeClass(element, settings.itemClass);\n addClass(element, targetSettings.itemClass);\n }\n\n // Update visibility class.\n currentVisClass = isVisible ? settings.itemVisibleClass : settings.itemHiddenClass;\n nextVisClass = isVisible ? targetSettings.itemVisibleClass : targetSettings.itemHiddenClass;\n if (currentVisClass !== nextVisClass) {\n removeClass(element, currentVisClass);\n addClass(element, nextVisClass);\n }\n\n // Move item instance from current grid to target grid.\n grid._items.splice(currentIndex, 1);\n arrayInsert(targetItems, item, targetIndex);\n\n // Update item's grid id reference.\n item._gridId = targetGrid._id;\n\n // If item is active we need to move the item inside the target container for\n // the duration of the (potential) animation if it's different than the\n // current container.\n if (isActive) {\n currentContainer = element.parentNode;\n if (targetContainer !== currentContainer) {\n targetContainer.appendChild(element);\n offsetDiff = getOffsetDiff(targetContainer, currentContainer, true);\n if (!translate) {\n translate = getTranslate(element);\n translateX = translate.x;\n translateY = translate.y;\n }\n item._setTranslate(translateX + offsetDiff.left, translateY + offsetDiff.top);\n }\n }\n // If item is not active let's just append it to the target grid's element.\n else {\n targetElement.appendChild(element);\n }\n\n // Update child element's styles to reflect the current visibility state.\n item._visibility.setStyles(\n isVisible ? targetSettings.visibleStyles : targetSettings.hiddenStyles\n );\n\n // Get offset diff for the migration data, if the item is active.\n if (isActive) {\n containerDiff = getOffsetDiff(targetContainer, targetElement, true);\n }\n\n // Update item's cached dimensions.\n item._refreshDimensions();\n\n // Reset item's sort data.\n item._sortData = null;\n\n // Create new drag handler.\n item._drag = targetSettings.dragEnabled ? new ItemDrag(item) : null;\n\n // Setup migration data.\n if (isActive) {\n this._isActive = true;\n this._container = targetContainer;\n this._containerDiffX = containerDiff.left;\n this._containerDiffY = containerDiff.top;\n } else {\n this._isActive = false;\n this._container = null;\n this._containerDiffX = 0;\n this._containerDiffY = 0;\n }\n\n // Emit send event.\n if (grid._hasListeners(EVENT_SEND)) {\n grid._emit(EVENT_SEND, {\n item: item,\n fromGrid: grid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex,\n });\n }\n\n // Emit receive event.\n if (targetGrid._hasListeners(EVENT_RECEIVE)) {\n targetGrid._emit(EVENT_RECEIVE, {\n item: item,\n fromGrid: grid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex,\n });\n }\n};\n\n/**\n * End the migrate process of an item. This method can be used to abort an\n * ongoing migrate process (animation) or finish the migrate process.\n *\n * @public\n * @param {Boolean} [abort=false]\n * - Should the migration be aborted?\n * @param {Number} [left]\n * - The element's current translateX value (optional).\n * @param {Number} [top]\n * - The element's current translateY value (optional).\n */\nItemMigrate.prototype.stop = function (abort, left, top) {\n if (this._isDestroyed || !this._isActive) return;\n\n var item = this._item;\n var element = item._element;\n var grid = item.getGrid();\n var gridElement = grid._element;\n var translate;\n\n if (this._container !== gridElement) {\n if (left === undefined || top === undefined) {\n if (abort) {\n translate = getTranslate(element);\n left = translate.x - this._containerDiffX;\n top = translate.y - this._containerDiffY;\n } else {\n left = item._left;\n top = item._top;\n }\n }\n\n gridElement.appendChild(element);\n item._setTranslate(left, top);\n }\n\n this._isActive = false;\n this._container = null;\n this._containerDiffX = 0;\n this._containerDiffY = 0;\n};\n\n/**\n * Destroy instance.\n *\n * @public\n */\nItemMigrate.prototype.destroy = function () {\n if (this._isDestroyed) return;\n this.stop(true);\n this._item = null;\n this._isDestroyed = true;\n};\n\n/**\n * Visibility manager for Item instance, handles visibility of an item.\n *\n * @class\n * @param {Item} item\n */\nfunction ItemVisibility(item) {\n var isActive = item._isActive;\n var element = item._element;\n var childElement = element.children[0];\n var settings = item.getGrid()._settings;\n\n if (!childElement) {\n throw new Error('No valid child element found within item element.');\n }\n\n this._item = item;\n this._isDestroyed = false;\n this._isHidden = !isActive;\n this._isHiding = false;\n this._isShowing = false;\n this._childElement = childElement;\n this._currentStyleProps = [];\n this._animation = new Animator(childElement);\n this._queue = 'visibility-' + item._id;\n this._finishShow = this._finishShow.bind(this);\n this._finishHide = this._finishHide.bind(this);\n\n element.style.display = isActive ? '' : 'none';\n addClass(element, isActive ? settings.itemVisibleClass : settings.itemHiddenClass);\n this.setStyles(isActive ? settings.visibleStyles : settings.hiddenStyles);\n}\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Show item.\n *\n * @public\n * @param {Boolean} instant\n * @param {Function} [onFinish]\n */\nItemVisibility.prototype.show = function (instant, onFinish) {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var element = item._element;\n var callback = isFunction(onFinish) ? onFinish : null;\n var grid = item.getGrid();\n var settings = grid._settings;\n\n // If item is visible call the callback and be done with it.\n if (!this._isShowing && !this._isHidden) {\n callback && callback(false, item);\n return;\n }\n\n // If item is showing and does not need to be shown instantly, let's just\n // push callback to the callback queue and be done with it.\n if (this._isShowing && !instant) {\n callback && item._emitter.on(this._queue, callback);\n return;\n }\n\n // If the item is hiding or hidden process the current visibility callback\n // queue with the interrupted flag active, update classes and set display\n // to block if necessary.\n if (!this._isShowing) {\n item._emitter.burst(this._queue, true, item);\n removeClass(element, settings.itemHiddenClass);\n addClass(element, settings.itemVisibleClass);\n if (!this._isHiding) element.style.display = '';\n }\n\n // Push callback to the callback queue.\n callback && item._emitter.on(this._queue, callback);\n\n // Update visibility states.\n this._isShowing = true;\n this._isHiding = this._isHidden = false;\n\n // Finally let's start show animation.\n this._startAnimation(true, instant, this._finishShow);\n};\n\n/**\n * Hide item.\n *\n * @public\n * @param {Boolean} instant\n * @param {Function} [onFinish]\n */\nItemVisibility.prototype.hide = function (instant, onFinish) {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var element = item._element;\n var callback = isFunction(onFinish) ? onFinish : null;\n var grid = item.getGrid();\n var settings = grid._settings;\n\n // If item is already hidden call the callback and be done with it.\n if (!this._isHiding && this._isHidden) {\n callback && callback(false, item);\n return;\n }\n\n // If item is hiding and does not need to be hidden instantly, let's just\n // push callback to the callback queue and be done with it.\n if (this._isHiding && !instant) {\n callback && item._emitter.on(this._queue, callback);\n return;\n }\n\n // If the item is showing or visible process the current visibility callback\n // queue with the interrupted flag active, update classes and set display\n // to block if necessary.\n if (!this._isHiding) {\n item._emitter.burst(this._queue, true, item);\n addClass(element, settings.itemHiddenClass);\n removeClass(element, settings.itemVisibleClass);\n }\n\n // Push callback to the callback queue.\n callback && item._emitter.on(this._queue, callback);\n\n // Update visibility states.\n this._isHidden = this._isHiding = true;\n this._isShowing = false;\n\n // Finally let's start hide animation.\n this._startAnimation(false, instant, this._finishHide);\n};\n\n/**\n * Stop current hiding/showing process.\n *\n * @public\n * @param {Boolean} processCallbackQueue\n */\nItemVisibility.prototype.stop = function (processCallbackQueue) {\n if (this._isDestroyed) return;\n if (!this._isHiding && !this._isShowing) return;\n\n var item = this._item;\n\n cancelVisibilityTick(item._id);\n this._animation.stop();\n if (processCallbackQueue) {\n item._emitter.burst(this._queue, true, item);\n }\n};\n\n/**\n * Reset all existing visibility styles and apply new visibility styles to the\n * visibility element. This method should be used to set styles when there is a\n * chance that the current style properties differ from the new ones (basically\n * on init and on migrations).\n *\n * @public\n * @param {Object} styles\n */\nItemVisibility.prototype.setStyles = function (styles) {\n var childElement = this._childElement;\n var currentStyleProps = this._currentStyleProps;\n this._removeCurrentStyles();\n for (var prop in styles) {\n currentStyleProps.push(prop);\n childElement.style[prop] = styles[prop];\n }\n};\n\n/**\n * Destroy the instance and stop current animation if it is running.\n *\n * @public\n */\nItemVisibility.prototype.destroy = function () {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var element = item._element;\n var grid = item.getGrid();\n var settings = grid._settings;\n\n this.stop(true);\n item._emitter.clear(this._queue);\n this._animation.destroy();\n this._removeCurrentStyles();\n removeClass(element, settings.itemVisibleClass);\n removeClass(element, settings.itemHiddenClass);\n element.style.display = '';\n\n // Reset state.\n this._isHiding = this._isShowing = false;\n this._isDestroyed = this._isHidden = true;\n};\n\n/**\n * Private prototype methods\n * *************************\n */\n\n/**\n * Start visibility animation.\n *\n * @private\n * @param {Boolean} toVisible\n * @param {Boolean} [instant]\n * @param {Function} [onFinish]\n */\nItemVisibility.prototype._startAnimation = function (toVisible, instant, onFinish) {\n if (this._isDestroyed) return;\n\n var item = this._item;\n var animation = this._animation;\n var childElement = this._childElement;\n var settings = item.getGrid()._settings;\n var targetStyles = toVisible ? settings.visibleStyles : settings.hiddenStyles;\n var duration = toVisible ? settings.showDuration : settings.hideDuration;\n var easing = toVisible ? settings.showEasing : settings.hideEasing;\n var isInstant = instant || duration <= 0;\n var currentStyles;\n\n // No target styles? Let's quit early.\n if (!targetStyles) {\n onFinish && onFinish();\n return;\n }\n\n // Cancel queued visibility tick.\n cancelVisibilityTick(item._id);\n\n // If we need to apply the styles instantly without animation.\n if (isInstant) {\n setStyles(childElement, targetStyles);\n animation.stop();\n onFinish && onFinish();\n return;\n }\n\n // Let's make sure an ongoing animation's callback is cancelled before going\n // further. Without this there's a chance that the animation will finish\n // before the next tick and mess up our logic.\n if (animation.isAnimating()) {\n animation._animation.onfinish = null;\n }\n\n // Start the animation in the next tick (to avoid layout thrashing).\n addVisibilityTick(\n item._id,\n function () {\n currentStyles = getCurrentStyles(childElement, targetStyles);\n },\n function () {\n animation.start(currentStyles, targetStyles, {\n duration: duration,\n easing: easing,\n onFinish: onFinish,\n });\n }\n );\n};\n\n/**\n * Finish show procedure.\n *\n * @private\n */\nItemVisibility.prototype._finishShow = function () {\n if (this._isHidden) return;\n this._isShowing = false;\n this._item._emitter.burst(this._queue, false, this._item);\n};\n\n/**\n * Finish hide procedure.\n *\n * @private\n */\nItemVisibility.prototype._finishHide = function () {\n if (!this._isHidden) return;\n var item = this._item;\n this._isHiding = false;\n item._layout.stop(true, 0, 0);\n item._element.style.display = 'none';\n item._emitter.burst(this._queue, false, item);\n};\n\n/**\n * Remove currently applied visibility related inline style properties.\n *\n * @private\n */\nItemVisibility.prototype._removeCurrentStyles = function () {\n var childElement = this._childElement;\n var currentStyleProps = this._currentStyleProps;\n\n for (var i = 0; i < currentStyleProps.length; i++) {\n childElement.style[currentStyleProps[i]] = '';\n }\n\n currentStyleProps.length = 0;\n};\n\nvar id = 0;\n\n/**\n * Returns a unique numeric id (increments a base value on every call).\n * @returns {Number}\n */\nfunction createUid() {\n return ++id;\n}\n\n/**\n * Creates a new Item instance for a Grid instance.\n *\n * @class\n * @param {Grid} grid\n * @param {HTMLElement} element\n * @param {Boolean} [isActive]\n */\nfunction Item(grid, element, isActive) {\n var settings = grid._settings;\n\n // Store item/element pair to a map (for faster item querying by element).\n if (ITEM_ELEMENT_MAP) {\n if (ITEM_ELEMENT_MAP.has(element)) {\n throw new Error('You can only create one Muuri Item per element!');\n } else {\n ITEM_ELEMENT_MAP.set(element, this);\n }\n }\n\n this._id = createUid();\n this._gridId = grid._id;\n this._element = element;\n this._isDestroyed = false;\n this._left = 0;\n this._top = 0;\n this._width = 0;\n this._height = 0;\n this._marginLeft = 0;\n this._marginRight = 0;\n this._marginTop = 0;\n this._marginBottom = 0;\n this._tX = undefined;\n this._tY = undefined;\n this._sortData = null;\n this._emitter = new Emitter();\n\n // If the provided item element is not a direct child of the grid container\n // element, append it to the grid container. Note, we are indeed reading the\n // DOM here but it's a property that does not cause reflowing.\n if (element.parentNode !== grid._element) {\n grid._element.appendChild(element);\n }\n\n // Set item class.\n addClass(element, settings.itemClass);\n\n // If isActive is not defined, let's try to auto-detect it. Note, we are\n // indeed reading the DOM here but it's a property that does not cause\n // reflowing.\n if (typeof isActive !== 'boolean') {\n isActive = getStyle(element, 'display') !== 'none';\n }\n\n // Set up active state (defines if the item is considered part of the layout\n // or not).\n this._isActive = isActive;\n\n // Setup visibility handler.\n this._visibility = new ItemVisibility(this);\n\n // Set up layout handler.\n this._layout = new ItemLayout(this);\n\n // Set up migration handler data.\n this._migrate = new ItemMigrate(this);\n\n // Set up drag handler.\n this._drag = settings.dragEnabled ? new ItemDrag(this) : null;\n\n // Set up release handler. Note that although this is fully linked to dragging\n // this still needs to be always instantiated to handle migration scenarios\n // correctly.\n this._dragRelease = new ItemDragRelease(this);\n\n // Set up drag placeholder handler. Note that although this is fully linked to\n // dragging this still needs to be always instantiated to handle migration\n // scenarios correctly.\n this._dragPlaceholder = new ItemDragPlaceholder(this);\n\n // Note! You must call the following methods before you start using the\n // instance. They are deliberately not called in the end as it would cause\n // potentially a massive amount of reflows if multiple items were instantiated\n // in a loop.\n // this._refreshDimensions();\n // this._refreshSortData();\n}\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Get the instance grid reference.\n *\n * @public\n * @returns {Grid}\n */\nItem.prototype.getGrid = function () {\n return GRID_INSTANCES[this._gridId];\n};\n\n/**\n * Get the instance element.\n *\n * @public\n * @returns {HTMLElement}\n */\nItem.prototype.getElement = function () {\n return this._element;\n};\n\n/**\n * Get instance element's cached width.\n *\n * @public\n * @returns {Number}\n */\nItem.prototype.getWidth = function () {\n return this._width;\n};\n\n/**\n * Get instance element's cached height.\n *\n * @public\n * @returns {Number}\n */\nItem.prototype.getHeight = function () {\n return this._height;\n};\n\n/**\n * Get instance element's cached margins.\n *\n * @public\n * @returns {Object}\n * - The returned object contains left, right, top and bottom properties\n * which indicate the item element's cached margins.\n */\nItem.prototype.getMargin = function () {\n return {\n left: this._marginLeft,\n right: this._marginRight,\n top: this._marginTop,\n bottom: this._marginBottom,\n };\n};\n\n/**\n * Get instance element's cached position.\n *\n * @public\n * @returns {Object}\n * - The returned object contains left and top properties which indicate the\n * item element's cached position in the grid.\n */\nItem.prototype.getPosition = function () {\n return {\n left: this._left,\n top: this._top,\n };\n};\n\n/**\n * Is the item active?\n *\n * @public\n * @returns {Boolean}\n */\nItem.prototype.isActive = function () {\n return this._isActive;\n};\n\n/**\n * Is the item visible?\n *\n * @public\n * @returns {Boolean}\n */\nItem.prototype.isVisible = function () {\n return !!this._visibility && !this._visibility._isHidden;\n};\n\n/**\n * Is the item being animated to visible?\n *\n * @public\n * @returns {Boolean}\n */\nItem.prototype.isShowing = function () {\n return !!(this._visibility && this._visibility._isShowing);\n};\n\n/**\n * Is the item being animated to hidden?\n *\n * @public\n * @returns {Boolean}\n */\nItem.prototype.isHiding = function () {\n return !!(this._visibility && this._visibility._isHiding);\n};\n\n/**\n * Is the item positioning?\n *\n * @public\n * @returns {Boolean}\n */\nItem.prototype.isPositioning = function () {\n return !!(this._layout && this._layout._isActive);\n};\n\n/**\n * Is the item being dragged (or queued for dragging)?\n *\n * @public\n * @returns {Boolean}\n */\nItem.prototype.isDragging = function () {\n return !!(this._drag && this._drag._isActive);\n};\n\n/**\n * Is the item being released?\n *\n * @public\n * @returns {Boolean}\n */\nItem.prototype.isReleasing = function () {\n return !!(this._dragRelease && this._dragRelease._isActive);\n};\n\n/**\n * Is the item destroyed?\n *\n * @public\n * @returns {Boolean}\n */\nItem.prototype.isDestroyed = function () {\n return this._isDestroyed;\n};\n\n/**\n * Private prototype methods\n * *************************\n */\n\n/**\n * Recalculate item's dimensions.\n *\n * @private\n * @param {Boolean} [force=false]\n */\nItem.prototype._refreshDimensions = function (force) {\n if (this._isDestroyed) return;\n if (force !== true && this._visibility._isHidden) return;\n\n var element = this._element;\n var dragPlaceholder = this._dragPlaceholder;\n var rect = element.getBoundingClientRect();\n\n // Calculate width and height.\n this._width = rect.width;\n this._height = rect.height;\n\n // Calculate margins (ignore negative margins).\n this._marginLeft = Math.max(0, getStyleAsFloat(element, 'margin-left'));\n this._marginRight = Math.max(0, getStyleAsFloat(element, 'margin-right'));\n this._marginTop = Math.max(0, getStyleAsFloat(element, 'margin-top'));\n this._marginBottom = Math.max(0, getStyleAsFloat(element, 'margin-bottom'));\n\n // Keep drag placeholder's dimensions synced with the item's.\n if (dragPlaceholder) dragPlaceholder.updateDimensions();\n};\n\n/**\n * Fetch and store item's sort data.\n *\n * @private\n */\nItem.prototype._refreshSortData = function () {\n if (this._isDestroyed) return;\n\n var data = (this._sortData = {});\n var getters = this.getGrid()._settings.sortData;\n var prop;\n\n for (prop in getters) {\n data[prop] = getters[prop](this, this._element);\n }\n};\n\n/**\n * Add item to layout.\n *\n * @private\n */\nItem.prototype._addToLayout = function (left, top) {\n if (this._isActive === true) return;\n this._isActive = true;\n this._left = left || 0;\n this._top = top || 0;\n};\n\n/**\n * Remove item from layout.\n *\n * @private\n */\nItem.prototype._removeFromLayout = function () {\n if (this._isActive === false) return;\n this._isActive = false;\n this._left = 0;\n this._top = 0;\n};\n\n/**\n * Check if the layout procedure can be skipped for the item.\n *\n * @private\n * @param {Number} left\n * @param {Number} top\n * @returns {Boolean}\n */\nItem.prototype._canSkipLayout = function (left, top) {\n return (\n this._left === left &&\n this._top === top &&\n !this._migrate._isActive &&\n !this._layout._skipNextAnimation &&\n !this._dragRelease.isJustReleased()\n );\n};\n\n/**\n * Set the provided left and top arguments as the item element's translate\n * values in the DOM. This method keeps track of the currently applied\n * translate values and skips the update operation if the provided values are\n * identical to the currently applied values. Returns `false` if there was no\n * need for update and `true` if the translate value was updated.\n *\n * @private\n * @param {Number} left\n * @param {Number} top\n * @returns {Boolean}\n */\nItem.prototype._setTranslate = function (left, top) {\n if (this._tX === left && this._tY === top) return false;\n this._tX = left;\n this._tY = top;\n this._element.style[transformProp] = getTranslateString(left, top);\n return true;\n};\n\n/**\n * Destroy item instance.\n *\n * @private\n * @param {Boolean} [removeElement=false]\n */\nItem.prototype._destroy = function (removeElement) {\n if (this._isDestroyed) return;\n\n var element = this._element;\n var grid = this.getGrid();\n var settings = grid._settings;\n\n // Destroy handlers.\n this._dragPlaceholder.destroy();\n this._dragRelease.destroy();\n this._migrate.destroy();\n this._layout.destroy();\n this._visibility.destroy();\n if (this._drag) this._drag.destroy();\n\n // Destroy emitter.\n this._emitter.destroy();\n\n // Remove item class.\n removeClass(element, settings.itemClass);\n\n // Remove element from DOM.\n if (removeElement) element.parentNode.removeChild(element);\n\n // Remove item/element pair from map.\n if (ITEM_ELEMENT_MAP) ITEM_ELEMENT_MAP.delete(element);\n\n // Reset state.\n this._isActive = false;\n this._isDestroyed = true;\n};\n\nfunction createPackerProcessor(isWorker) {\n var FILL_GAPS = 1;\n var HORIZONTAL = 2;\n var ALIGN_RIGHT = 4;\n var ALIGN_BOTTOM = 8;\n var ROUNDING = 16;\n\n var EPS = 0.001;\n var MIN_SLOT_SIZE = 0.5;\n\n // Rounds number first to three decimal precision and then floors the result\n // to two decimal precision.\n // Math.floor(Math.round(number * 1000) / 10) / 100\n function roundNumber(number) {\n return ((((number * 1000 + 0.5) << 0) / 10) << 0) / 100;\n }\n\n /**\n * @class\n */\n function PackerProcessor() {\n this.currentRects = [];\n this.nextRects = [];\n this.rectTarget = {};\n this.rectStore = [];\n this.slotSizes = [];\n this.rectId = 0;\n this.slotIndex = -1;\n this.slotData = { left: 0, top: 0, width: 0, height: 0 };\n this.sortRectsLeftTop = this.sortRectsLeftTop.bind(this);\n this.sortRectsTopLeft = this.sortRectsTopLeft.bind(this);\n }\n\n /**\n * Takes a layout object as an argument and computes positions (slots) for the\n * layout items. Also computes the final width and height of the layout. The\n * provided layout object's slots array is mutated as well as the width and\n * height properties.\n *\n * @param {Object} layout\n * @param {Number} layout.width\n * - The start (current) width of the layout in pixels.\n * @param {Number} layout.height\n * - The start (current) height of the layout in pixels.\n * @param {(Item[]|Number[])} layout.items\n * - List of Muuri.Item instances or a list of item dimensions\n * (e.g [ item1Width, item1Height, item2Width, item2Height, ... ]).\n * @param {(Array|Float32Array)} layout.slots\n * - An Array/Float32Array instance which's length should equal to\n * the amount of items times two. The position (width and height) of each\n * item will be written into this array.\n * @param {Number} settings\n * - The layout's settings as bitmasks.\n * @returns {Object}\n */\n PackerProcessor.prototype.computeLayout = function (layout, settings) {\n var items = layout.items;\n var slots = layout.slots;\n var fillGaps = !!(settings & FILL_GAPS);\n var horizontal = !!(settings & HORIZONTAL);\n var alignRight = !!(settings & ALIGN_RIGHT);\n var alignBottom = !!(settings & ALIGN_BOTTOM);\n var rounding = !!(settings & ROUNDING);\n var isPreProcessed = typeof items[0] === 'number';\n var i, bump, item, slotWidth, slotHeight, slot;\n\n // No need to go further if items do not exist.\n if (!items.length) return layout;\n\n // Compute slots for the items.\n bump = isPreProcessed ? 2 : 1;\n for (i = 0; i < items.length; i += bump) {\n // If items are pre-processed it means that items array contains only\n // the raw dimensions of the items. Otherwise we assume it is an array\n // of normal Muuri items.\n if (isPreProcessed) {\n slotWidth = items[i];\n slotHeight = items[i + 1];\n } else {\n item = items[i];\n slotWidth = item._width + item._marginLeft + item._marginRight;\n slotHeight = item._height + item._marginTop + item._marginBottom;\n }\n\n // If rounding is enabled let's round the item's width and height to\n // make the layout algorithm a bit more stable. This has a performance\n // cost so don't use this if not necessary.\n if (rounding) {\n slotWidth = roundNumber(slotWidth);\n slotHeight = roundNumber(slotHeight);\n }\n\n // Get slot data.\n slot = this.computeNextSlot(layout, slotWidth, slotHeight, fillGaps, horizontal);\n\n // Update layout width/height.\n if (horizontal) {\n if (slot.left + slot.width > layout.width) {\n layout.width = slot.left + slot.width;\n }\n } else {\n if (slot.top + slot.height > layout.height) {\n layout.height = slot.top + slot.height;\n }\n }\n\n // Add item slot data to layout slots.\n slots[++this.slotIndex] = slot.left;\n slots[++this.slotIndex] = slot.top;\n\n // Store the size too (for later usage) if needed.\n if (alignRight || alignBottom) {\n this.slotSizes.push(slot.width, slot.height);\n }\n }\n\n // If the alignment is set to right we need to adjust the results.\n if (alignRight) {\n for (i = 0; i < slots.length; i += 2) {\n slots[i] = layout.width - (slots[i] + this.slotSizes[i]);\n }\n }\n\n // If the alignment is set to bottom we need to adjust the results.\n if (alignBottom) {\n for (i = 1; i < slots.length; i += 2) {\n slots[i] = layout.height - (slots[i] + this.slotSizes[i]);\n }\n }\n\n // Reset stuff.\n this.slotSizes.length = 0;\n this.currentRects.length = 0;\n this.nextRects.length = 0;\n this.rectStore.length = 0;\n this.rectId = 0;\n this.slotIndex = -1;\n\n return layout;\n };\n\n /**\n * Calculate next slot in the layout. Returns a slot object with position and\n * dimensions data. The returned object is reused between calls.\n *\n * @param {Object} layout\n * @param {Number} slotWidth\n * @param {Number} slotHeight\n * @param {Boolean} fillGaps\n * @param {Boolean} horizontal\n * @returns {Object}\n */\n PackerProcessor.prototype.computeNextSlot = function (\n layout,\n slotWidth,\n slotHeight,\n fillGaps,\n horizontal\n ) {\n var slot = this.slotData;\n var currentRects = this.currentRects;\n var nextRects = this.nextRects;\n var ignoreCurrentRects = false;\n var rect;\n var rectId;\n var shards;\n var i;\n var j;\n\n // Reset new slots.\n nextRects.length = 0;\n\n // Set item slot initial data.\n slot.left = null;\n slot.top = null;\n slot.width = slotWidth;\n slot.height = slotHeight;\n\n // Try to find position for the slot from the existing free spaces in the\n // layout.\n for (i = 0; i < currentRects.length; i++) {\n rectId = currentRects[i];\n if (!rectId) continue;\n rect = this.getRect(rectId);\n if (slot.width <= rect.width + EPS && slot.height <= rect.height + EPS) {\n slot.left = rect.left;\n slot.top = rect.top;\n break;\n }\n }\n\n // If no position was found for the slot let's position the slot to\n // the bottom left (in vertical mode) or top right (in horizontal mode) of\n // the layout.\n if (slot.left === null) {\n if (horizontal) {\n slot.left = layout.width;\n slot.top = 0;\n } else {\n slot.left = 0;\n slot.top = layout.height;\n }\n\n // If gaps don't need filling let's throw away all the current free spaces\n // (currentRects).\n if (!fillGaps) {\n ignoreCurrentRects = true;\n }\n }\n\n // In vertical mode, if the slot's bottom overlaps the layout's bottom.\n if (!horizontal && slot.top + slot.height > layout.height + EPS) {\n // If slot is not aligned to the left edge, create a new free space to the\n // left of the slot.\n if (slot.left > MIN_SLOT_SIZE) {\n nextRects.push(this.addRect(0, layout.height, slot.left, Infinity));\n }\n\n // If slot is not aligned to the right edge, create a new free space to\n // the right of the slot.\n if (slot.left + slot.width < layout.width - MIN_SLOT_SIZE) {\n nextRects.push(\n this.addRect(\n slot.left + slot.width,\n layout.height,\n layout.width - slot.left - slot.width,\n Infinity\n )\n );\n }\n\n // Update layout height.\n layout.height = slot.top + slot.height;\n }\n\n // In horizontal mode, if the slot's right overlaps the layout's right edge.\n if (horizontal && slot.left + slot.width > layout.width + EPS) {\n // If slot is not aligned to the top, create a new free space above the\n // slot.\n if (slot.top > MIN_SLOT_SIZE) {\n nextRects.push(this.addRect(layout.width, 0, Infinity, slot.top));\n }\n\n // If slot is not aligned to the bottom, create a new free space below\n // the slot.\n if (slot.top + slot.height < layout.height - MIN_SLOT_SIZE) {\n nextRects.push(\n this.addRect(\n layout.width,\n slot.top + slot.height,\n Infinity,\n layout.height - slot.top - slot.height\n )\n );\n }\n\n // Update layout width.\n layout.width = slot.left + slot.width;\n }\n\n // Clean up the current free spaces making sure none of them overlap with\n // the slot. Split all overlapping free spaces into smaller shards that do\n // not overlap with the slot.\n if (!ignoreCurrentRects) {\n if (fillGaps) i = 0;\n for (; i < currentRects.length; i++) {\n rectId = currentRects[i];\n if (!rectId) continue;\n rect = this.getRect(rectId);\n shards = this.splitRect(rect, slot);\n for (j = 0; j < shards.length; j++) {\n rectId = shards[j];\n rect = this.getRect(rectId);\n // Make sure that the free space is within the boundaries of the\n // layout. This routine is critical to the algorithm as it makes sure\n // that there are no leftover spaces with infinite height/width.\n // It's also essential that we don't compare values absolutely to each\n // other but leave a little headroom (EPSILON) to get rid of false\n // positives.\n if (\n horizontal ? rect.left + EPS < layout.width - EPS : rect.top + EPS < layout.height - EPS\n ) {\n nextRects.push(rectId);\n }\n }\n }\n }\n\n // Sanitize and sort all the new free spaces that will be used in the next\n // iteration. This procedure is critical to make the bin-packing algorithm\n // work. The free spaces have to be in correct order in the beginning of the\n // next iteration.\n if (nextRects.length > 1) {\n this.purgeRects(nextRects).sort(horizontal ? this.sortRectsLeftTop : this.sortRectsTopLeft);\n }\n\n // Finally we need to make sure that `this.currentRects` points to\n // `nextRects` array as that is used in the next iteration's beginning when\n // we try to find a space for the next slot.\n this.currentRects = nextRects;\n this.nextRects = currentRects;\n\n return slot;\n };\n\n /**\n * Add a new rectangle to the rectangle store. Returns the id of the new\n * rectangle.\n *\n * @param {Number} left\n * @param {Number} top\n * @param {Number} width\n * @param {Number} height\n * @returns {Number}\n */\n PackerProcessor.prototype.addRect = function (left, top, width, height) {\n var rectId = ++this.rectId;\n this.rectStore[rectId] = left || 0;\n this.rectStore[++this.rectId] = top || 0;\n this.rectStore[++this.rectId] = width || 0;\n this.rectStore[++this.rectId] = height || 0;\n return rectId;\n };\n\n /**\n * Get rectangle data from the rectangle store by id. Optionally you can\n * provide a target object where the rectangle data will be written in. By\n * default an internal object is reused as a target object.\n *\n * @param {Number} id\n * @param {Object} [target]\n * @returns {Object}\n */\n PackerProcessor.prototype.getRect = function (id, target) {\n if (!target) target = this.rectTarget;\n target.left = this.rectStore[id] || 0;\n target.top = this.rectStore[++id] || 0;\n target.width = this.rectStore[++id] || 0;\n target.height = this.rectStore[++id] || 0;\n return target;\n };\n\n /**\n * Punch a hole into a rectangle and return the shards (1-4).\n *\n * @param {Object} rect\n * @param {Object} hole\n * @returns {Number[]}\n */\n PackerProcessor.prototype.splitRect = (function () {\n var shards = [];\n var width = 0;\n var height = 0;\n return function (rect, hole) {\n // Reset old shards.\n shards.length = 0;\n\n // If the slot does not overlap with the hole add slot to the return data\n // as is. Note that in this case we are eager to keep the slot as is if\n // possible so we use the EPSILON in favour of that logic.\n if (\n rect.left + rect.width <= hole.left + EPS ||\n hole.left + hole.width <= rect.left + EPS ||\n rect.top + rect.height <= hole.top + EPS ||\n hole.top + hole.height <= rect.top + EPS\n ) {\n shards.push(this.addRect(rect.left, rect.top, rect.width, rect.height));\n return shards;\n }\n\n // Left split.\n width = hole.left - rect.left;\n if (width >= MIN_SLOT_SIZE) {\n shards.push(this.addRect(rect.left, rect.top, width, rect.height));\n }\n\n // Right split.\n width = rect.left + rect.width - (hole.left + hole.width);\n if (width >= MIN_SLOT_SIZE) {\n shards.push(this.addRect(hole.left + hole.width, rect.top, width, rect.height));\n }\n\n // Top split.\n height = hole.top - rect.top;\n if (height >= MIN_SLOT_SIZE) {\n shards.push(this.addRect(rect.left, rect.top, rect.width, height));\n }\n\n // Bottom split.\n height = rect.top + rect.height - (hole.top + hole.height);\n if (height >= MIN_SLOT_SIZE) {\n shards.push(this.addRect(rect.left, hole.top + hole.height, rect.width, height));\n }\n\n return shards;\n };\n })();\n\n /**\n * Check if a rectangle is fully within another rectangle.\n *\n * @param {Object} a\n * @param {Object} b\n * @returns {Boolean}\n */\n PackerProcessor.prototype.isRectAWithinRectB = function (a, b) {\n return (\n a.left + EPS >= b.left &&\n a.top + EPS >= b.top &&\n a.left + a.width - EPS <= b.left + b.width &&\n a.top + a.height - EPS <= b.top + b.height\n );\n };\n\n /**\n * Loops through an array of rectangle ids and resets all that are fully\n * within another rectangle in the array. Resetting in this case means that\n * the rectangle id value is replaced with zero.\n *\n * @param {Number[]} rectIds\n * @returns {Number[]}\n */\n PackerProcessor.prototype.purgeRects = (function () {\n var rectA = {};\n var rectB = {};\n return function (rectIds) {\n var i = rectIds.length;\n var j;\n\n while (i--) {\n j = rectIds.length;\n if (!rectIds[i]) continue;\n this.getRect(rectIds[i], rectA);\n while (j--) {\n if (!rectIds[j] || i === j) continue;\n this.getRect(rectIds[j], rectB);\n if (this.isRectAWithinRectB(rectA, rectB)) {\n rectIds[i] = 0;\n break;\n }\n }\n }\n\n return rectIds;\n };\n })();\n\n /**\n * Sort rectangles with top-left gravity.\n *\n * @param {Number} aId\n * @param {Number} bId\n * @returns {Number}\n */\n PackerProcessor.prototype.sortRectsTopLeft = (function () {\n var rectA = {};\n var rectB = {};\n return function (aId, bId) {\n this.getRect(aId, rectA);\n this.getRect(bId, rectB);\n\n return rectA.top < rectB.top && rectA.top + EPS < rectB.top\n ? -1\n : rectA.top > rectB.top && rectA.top - EPS > rectB.top\n ? 1\n : rectA.left < rectB.left && rectA.left + EPS < rectB.left\n ? -1\n : rectA.left > rectB.left && rectA.left - EPS > rectB.left\n ? 1\n : 0;\n };\n })();\n\n /**\n * Sort rectangles with left-top gravity.\n *\n * @param {Number} aId\n * @param {Number} bId\n * @returns {Number}\n */\n PackerProcessor.prototype.sortRectsLeftTop = (function () {\n var rectA = {};\n var rectB = {};\n return function (aId, bId) {\n this.getRect(aId, rectA);\n this.getRect(bId, rectB);\n return rectA.left < rectB.left && rectA.left + EPS < rectB.left\n ? -1\n : rectA.left > rectB.left && rectA.left - EPS < rectB.left\n ? 1\n : rectA.top < rectB.top && rectA.top + EPS < rectB.top\n ? -1\n : rectA.top > rectB.top && rectA.top - EPS > rectB.top\n ? 1\n : 0;\n };\n })();\n\n if (isWorker) {\n var PACKET_INDEX_WIDTH = 1;\n var PACKET_INDEX_HEIGHT = 2;\n var PACKET_INDEX_OPTIONS = 3;\n var PACKET_HEADER_SLOTS = 4;\n var processor = new PackerProcessor();\n\n self.onmessage = function (msg) {\n var data = new Float32Array(msg.data);\n var items = data.subarray(PACKET_HEADER_SLOTS, data.length);\n var slots = new Float32Array(items.length);\n var settings = data[PACKET_INDEX_OPTIONS];\n var layout = {\n items: items,\n slots: slots,\n width: data[PACKET_INDEX_WIDTH],\n height: data[PACKET_INDEX_HEIGHT],\n };\n\n // Compute the layout (width / height / slots).\n processor.computeLayout(layout, settings);\n\n // Copy layout data to the return data.\n data[PACKET_INDEX_WIDTH] = layout.width;\n data[PACKET_INDEX_HEIGHT] = layout.height;\n data.set(layout.slots, PACKET_HEADER_SLOTS);\n\n // Send layout back to the main thread.\n postMessage(data.buffer, [data.buffer]);\n };\n }\n\n return PackerProcessor;\n}\n\nvar PackerProcessor = createPackerProcessor();\n\n//\n// WORKER UTILS\n//\n\nvar blobUrl = null;\nvar activeWorkers = [];\n\nfunction createWorkerProcessors(amount, onmessage) {\n var workers = [];\n\n if (amount > 0) {\n if (!blobUrl) {\n blobUrl = URL.createObjectURL(\n new Blob(['(' + createPackerProcessor.toString() + ')(true)'], {\n type: 'application/javascript',\n })\n );\n }\n\n for (var i = 0, worker; i < amount; i++) {\n worker = new Worker(blobUrl);\n if (onmessage) worker.onmessage = onmessage;\n workers.push(worker);\n activeWorkers.push(worker);\n }\n }\n\n return workers;\n}\n\nfunction destroyWorkerProcessors(workers) {\n var worker;\n var index;\n\n for (var i = 0; i < workers.length; i++) {\n worker = workers[i];\n worker.onmessage = null;\n worker.onerror = null;\n worker.onmessageerror = null;\n worker.terminate();\n\n index = activeWorkers.indexOf(worker);\n if (index > -1) activeWorkers.splice(index, 1);\n }\n\n if (blobUrl && !activeWorkers.length) {\n URL.revokeObjectURL(blobUrl);\n blobUrl = null;\n }\n}\n\nfunction isWorkerProcessorsSupported() {\n return !!(window.Worker && window.URL && window.Blob);\n}\n\nvar FILL_GAPS = 1;\nvar HORIZONTAL = 2;\nvar ALIGN_RIGHT = 4;\nvar ALIGN_BOTTOM = 8;\nvar ROUNDING = 16;\nvar PACKET_INDEX_ID = 0;\nvar PACKET_INDEX_WIDTH = 1;\nvar PACKET_INDEX_HEIGHT = 2;\nvar PACKET_INDEX_OPTIONS = 3;\nvar PACKET_HEADER_SLOTS = 4;\n\n/**\n * @class\n * @param {Number} [numWorkers=0]\n * @param {Object} [options]\n * @param {Boolean} [options.fillGaps=false]\n * @param {Boolean} [options.horizontal=false]\n * @param {Boolean} [options.alignRight=false]\n * @param {Boolean} [options.alignBottom=false]\n * @param {Boolean} [options.rounding=false]\n */\nfunction Packer(numWorkers, options) {\n this._options = 0;\n this._processor = null;\n this._layoutQueue = [];\n this._layouts = {};\n this._layoutCallbacks = {};\n this._layoutWorkers = {};\n this._layoutWorkerData = {};\n this._workers = [];\n this._onWorkerMessage = this._onWorkerMessage.bind(this);\n\n // Set initial options.\n this.setOptions(options);\n\n // Init the worker(s) or the processor if workers can't be used.\n numWorkers = typeof numWorkers === 'number' ? Math.max(0, numWorkers) : 0;\n if (numWorkers && isWorkerProcessorsSupported()) {\n try {\n this._workers = createWorkerProcessors(numWorkers, this._onWorkerMessage);\n } catch (e) {\n this._processor = new PackerProcessor();\n }\n } else {\n this._processor = new PackerProcessor();\n }\n}\n\nPacker.prototype._sendToWorker = function () {\n if (!this._layoutQueue.length || !this._workers.length) return;\n\n var layoutId = this._layoutQueue.shift();\n var worker = this._workers.pop();\n var data = this._layoutWorkerData[layoutId];\n\n delete this._layoutWorkerData[layoutId];\n this._layoutWorkers[layoutId] = worker;\n worker.postMessage(data.buffer, [data.buffer]);\n};\n\nPacker.prototype._onWorkerMessage = function (msg) {\n var data = new Float32Array(msg.data);\n var layoutId = data[PACKET_INDEX_ID];\n var layout = this._layouts[layoutId];\n var callback = this._layoutCallbacks[layoutId];\n var worker = this._layoutWorkers[layoutId];\n\n if (layout) delete this._layouts[layoutId];\n if (callback) delete this._layoutCallbacks[layoutId];\n if (worker) delete this._layoutWorkers[layoutId];\n\n if (layout && callback) {\n layout.width = data[PACKET_INDEX_WIDTH];\n layout.height = data[PACKET_INDEX_HEIGHT];\n layout.slots = data.subarray(PACKET_HEADER_SLOTS, data.length);\n this._finalizeLayout(layout);\n callback(layout);\n }\n\n if (worker) {\n this._workers.push(worker);\n this._sendToWorker();\n }\n};\n\nPacker.prototype._finalizeLayout = function (layout) {\n var grid = layout._grid;\n var isHorizontal = layout._settings & HORIZONTAL;\n var isBorderBox = grid._boxSizing === 'border-box';\n\n delete layout._grid;\n delete layout._settings;\n\n layout.styles = {};\n\n if (isHorizontal) {\n layout.styles.width =\n (isBorderBox ? layout.width + grid._borderLeft + grid._borderRight : layout.width) + 'px';\n } else {\n layout.styles.height =\n (isBorderBox ? layout.height + grid._borderTop + grid._borderBottom : layout.height) + 'px';\n }\n\n return layout;\n};\n\n/**\n * @public\n * @param {Object} [options]\n * @param {Boolean} [options.fillGaps]\n * @param {Boolean} [options.horizontal]\n * @param {Boolean} [options.alignRight]\n * @param {Boolean} [options.alignBottom]\n * @param {Boolean} [options.rounding]\n */\nPacker.prototype.setOptions = function (options) {\n if (!options) return;\n\n var fillGaps;\n if (typeof options.fillGaps === 'boolean') {\n fillGaps = options.fillGaps ? FILL_GAPS : 0;\n } else {\n fillGaps = this._options & FILL_GAPS;\n }\n\n var horizontal;\n if (typeof options.horizontal === 'boolean') {\n horizontal = options.horizontal ? HORIZONTAL : 0;\n } else {\n horizontal = this._options & HORIZONTAL;\n }\n\n var alignRight;\n if (typeof options.alignRight === 'boolean') {\n alignRight = options.alignRight ? ALIGN_RIGHT : 0;\n } else {\n alignRight = this._options & ALIGN_RIGHT;\n }\n\n var alignBottom;\n if (typeof options.alignBottom === 'boolean') {\n alignBottom = options.alignBottom ? ALIGN_BOTTOM : 0;\n } else {\n alignBottom = this._options & ALIGN_BOTTOM;\n }\n\n var rounding;\n if (typeof options.rounding === 'boolean') {\n rounding = options.rounding ? ROUNDING : 0;\n } else {\n rounding = this._options & ROUNDING;\n }\n\n this._options = fillGaps | horizontal | alignRight | alignBottom | rounding;\n};\n\n/**\n * @public\n * @param {Grid} grid\n * @param {Number} layoutId\n * @param {Item[]} items\n * @param {Number} width\n * @param {Number} height\n * @param {Function} callback\n * @returns {?Function}\n */\nPacker.prototype.createLayout = function (grid, layoutId, items, width, height, callback) {\n if (this._layouts[layoutId]) {\n throw new Error('A layout with the provided id is currently being processed.');\n }\n\n var horizontal = this._options & HORIZONTAL;\n var layout = {\n id: layoutId,\n items: items,\n slots: null,\n width: horizontal ? 0 : width,\n height: !horizontal ? 0 : height,\n // Temporary data, which will be removed before sending the layout data\n // outside of Packer's context.\n _grid: grid,\n _settings: this._options,\n };\n\n // If there are no items let's call the callback immediately.\n if (!items.length) {\n layout.slots = [];\n this._finalizeLayout(layout);\n callback(layout);\n return;\n }\n\n // Create layout synchronously if needed.\n if (this._processor) {\n layout.slots = window.Float32Array\n ? new Float32Array(items.length * 2)\n : new Array(items.length * 2);\n this._processor.computeLayout(layout, layout._settings);\n this._finalizeLayout(layout);\n callback(layout);\n return;\n }\n\n // Worker data.\n var data = new Float32Array(PACKET_HEADER_SLOTS + items.length * 2);\n\n // Worker data header.\n data[PACKET_INDEX_ID] = layoutId;\n data[PACKET_INDEX_WIDTH] = layout.width;\n data[PACKET_INDEX_HEIGHT] = layout.height;\n data[PACKET_INDEX_OPTIONS] = layout._settings;\n\n // Worker data items.\n var i, j, item;\n for (i = 0, j = PACKET_HEADER_SLOTS - 1, item; i < items.length; i++) {\n item = items[i];\n data[++j] = item._width + item._marginLeft + item._marginRight;\n data[++j] = item._height + item._marginTop + item._marginBottom;\n }\n\n this._layoutQueue.push(layoutId);\n this._layouts[layoutId] = layout;\n this._layoutCallbacks[layoutId] = callback;\n this._layoutWorkerData[layoutId] = data;\n\n this._sendToWorker();\n\n return this.cancelLayout.bind(this, layoutId);\n};\n\n/**\n * @public\n * @param {Number} layoutId\n */\nPacker.prototype.cancelLayout = function (layoutId) {\n var layout = this._layouts[layoutId];\n if (!layout) return;\n\n delete this._layouts[layoutId];\n delete this._layoutCallbacks[layoutId];\n\n if (this._layoutWorkerData[layoutId]) {\n delete this._layoutWorkerData[layoutId];\n var queueIndex = this._layoutQueue.indexOf(layoutId);\n if (queueIndex > -1) this._layoutQueue.splice(queueIndex, 1);\n }\n};\n\n/**\n * @public\n */\nPacker.prototype.destroy = function () {\n // Move all currently used workers back in the workers array.\n for (var key in this._layoutWorkers) {\n this._workers.push(this._layoutWorkers[key]);\n }\n\n // Destroy all instance's workers.\n destroyWorkerProcessors(this._workers);\n\n // Reset data.\n this._workers.length = 0;\n this._layoutQueue.length = 0;\n this._layouts = {};\n this._layoutCallbacks = {};\n this._layoutWorkers = {};\n this._layoutWorkerData = {};\n};\n\nvar debounceId = 0;\n\n/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. The returned function accepts one argument which, when\n * being `true`, cancels the debounce function immediately. When the debounce\n * function is canceled it cannot be invoked again.\n *\n * @param {Function} fn\n * @param {Number} durationMs\n * @returns {Function}\n */\nfunction debounce(fn, durationMs) {\n var id = ++debounceId;\n var timer = 0;\n var lastTime = 0;\n var isCanceled = false;\n var tick = function (time) {\n if (isCanceled) return;\n\n if (lastTime) timer -= time - lastTime;\n lastTime = time;\n\n if (timer > 0) {\n addDebounceTick(id, tick);\n } else {\n timer = lastTime = 0;\n fn();\n }\n };\n\n return function (cancel) {\n if (isCanceled) return;\n\n if (durationMs <= 0) {\n if (cancel !== true) fn();\n return;\n }\n\n if (cancel === true) {\n isCanceled = true;\n timer = lastTime = 0;\n tick = undefined;\n cancelDebounceTick(id);\n return;\n }\n\n if (timer <= 0) {\n timer = durationMs;\n tick(0);\n } else {\n timer = durationMs;\n }\n };\n}\n\nvar htmlCollectionType = '[object HTMLCollection]';\nvar nodeListType = '[object NodeList]';\n\n/**\n * Check if a value is a node list or a html collection.\n *\n * @param {*} val\n * @returns {Boolean}\n */\nfunction isNodeList(val) {\n var type = Object.prototype.toString.call(val);\n return type === htmlCollectionType || type === nodeListType;\n}\n\nvar objectType = 'object';\nvar objectToStringType = '[object Object]';\nvar toString = Object.prototype.toString;\n\n/**\n * Check if a value is a plain object.\n *\n * @param {*} val\n * @returns {Boolean}\n */\nfunction isPlainObject(val) {\n return typeof val === objectType && toString.call(val) === objectToStringType;\n}\n\nfunction noop() {}\n\n/**\n * Converts a value to an array or clones an array.\n *\n * @param {*} val\n * @returns {Array}\n */\nfunction toArray(val) {\n return isNodeList(val) ? Array.prototype.slice.call(val) : Array.prototype.concat(val);\n}\n\nvar NUMBER_TYPE = 'number';\nvar STRING_TYPE = 'string';\nvar INSTANT_LAYOUT = 'instant';\nvar layoutId = 0;\n\n/**\n * Creates a new Grid instance.\n *\n * @class\n * @param {(HTMLElement|String)} element\n * @param {Object} [options]\n * @param {(String|HTMLElement[]|NodeList|HTMLCollection)} [options.items=\"*\"]\n * @param {Number} [options.showDuration=300]\n * @param {String} [options.showEasing=\"ease\"]\n * @param {Object} [options.visibleStyles={opacity: \"1\", transform: \"scale(1)\"}]\n * @param {Number} [options.hideDuration=300]\n * @param {String} [options.hideEasing=\"ease\"]\n * @param {Object} [options.hiddenStyles={opacity: \"0\", transform: \"scale(0.5)\"}]\n * @param {(Function|Object)} [options.layout]\n * @param {Boolean} [options.layout.fillGaps=false]\n * @param {Boolean} [options.layout.horizontal=false]\n * @param {Boolean} [options.layout.alignRight=false]\n * @param {Boolean} [options.layout.alignBottom=false]\n * @param {Boolean} [options.layout.rounding=false]\n * @param {(Boolean|Number)} [options.layoutOnResize=150]\n * @param {Boolean} [options.layoutOnInit=true]\n * @param {Number} [options.layoutDuration=300]\n * @param {String} [options.layoutEasing=\"ease\"]\n * @param {?Object} [options.sortData=null]\n * @param {Boolean} [options.dragEnabled=false]\n * @param {?String} [options.dragHandle=null]\n * @param {?HtmlElement} [options.dragContainer=null]\n * @param {?Function} [options.dragStartPredicate]\n * @param {Number} [options.dragStartPredicate.distance=0]\n * @param {Number} [options.dragStartPredicate.delay=0]\n * @param {String} [options.dragAxis=\"xy\"]\n * @param {(Boolean|Function)} [options.dragSort=true]\n * @param {Object} [options.dragSortHeuristics]\n * @param {Number} [options.dragSortHeuristics.sortInterval=100]\n * @param {Number} [options.dragSortHeuristics.minDragDistance=10]\n * @param {Number} [options.dragSortHeuristics.minBounceBackAngle=1]\n * @param {(Function|Object)} [options.dragSortPredicate]\n * @param {Number} [options.dragSortPredicate.threshold=50]\n * @param {String} [options.dragSortPredicate.action=\"move\"]\n * @param {String} [options.dragSortPredicate.migrateAction=\"move\"]\n * @param {Object} [options.dragRelease]\n * @param {Number} [options.dragRelease.duration=300]\n * @param {String} [options.dragRelease.easing=\"ease\"]\n * @param {Boolean} [options.dragRelease.useDragContainer=true]\n * @param {Object} [options.dragCssProps]\n * @param {Object} [options.dragPlaceholder]\n * @param {Boolean} [options.dragPlaceholder.enabled=false]\n * @param {?Function} [options.dragPlaceholder.createElement=null]\n * @param {?Function} [options.dragPlaceholder.onCreate=null]\n * @param {?Function} [options.dragPlaceholder.onRemove=null]\n * @param {Object} [options.dragAutoScroll]\n * @param {(Function|Array)} [options.dragAutoScroll.targets=[]]\n * @param {?Function} [options.dragAutoScroll.handle=null]\n * @param {Number} [options.dragAutoScroll.threshold=50]\n * @param {Number} [options.dragAutoScroll.safeZone=0.2]\n * @param {(Function|Number)} [options.dragAutoScroll.speed]\n * @param {Boolean} [options.dragAutoScroll.sortDuringScroll=true]\n * @param {Boolean} [options.dragAutoScroll.smoothStop=false]\n * @param {?Function} [options.dragAutoScroll.onStart=null]\n * @param {?Function} [options.dragAutoScroll.onStop=null]\n * @param {String} [options.containerClass=\"muuri\"]\n * @param {String} [options.itemClass=\"muuri-item\"]\n * @param {String} [options.itemVisibleClass=\"muuri-item-visible\"]\n * @param {String} [options.itemHiddenClass=\"muuri-item-hidden\"]\n * @param {String} [options.itemPositioningClass=\"muuri-item-positioning\"]\n * @param {String} [options.itemDraggingClass=\"muuri-item-dragging\"]\n * @param {String} [options.itemReleasingClass=\"muuri-item-releasing\"]\n * @param {String} [options.itemPlaceholderClass=\"muuri-item-placeholder\"]\n */\nfunction Grid(element, options) {\n // Allow passing element as selector string\n if (typeof element === STRING_TYPE) {\n element = document.querySelector(element);\n }\n\n // Throw an error if the container element is not body element or does not\n // exist within the body element.\n var isElementInDom = element.getRootNode\n ? element.getRootNode({ composed: true }) === document\n : document.body.contains(element);\n if (!isElementInDom || element === document.documentElement) {\n throw new Error('Container element must be an existing DOM element.');\n }\n\n // Create instance settings by merging the options with default options.\n var settings = mergeSettings(Grid.defaultOptions, options);\n settings.visibleStyles = normalizeStyles(settings.visibleStyles);\n settings.hiddenStyles = normalizeStyles(settings.hiddenStyles);\n if (!isFunction(settings.dragSort)) {\n settings.dragSort = !!settings.dragSort;\n }\n\n this._id = createUid();\n this._element = element;\n this._settings = settings;\n this._isDestroyed = false;\n this._items = [];\n this._layout = {\n id: 0,\n items: [],\n slots: [],\n };\n this._isLayoutFinished = true;\n this._nextLayoutData = null;\n this._emitter = new Emitter();\n this._onLayoutDataReceived = this._onLayoutDataReceived.bind(this);\n\n // Store grid instance to the grid instances collection.\n GRID_INSTANCES[this._id] = this;\n\n // Add container element's class name.\n addClass(element, settings.containerClass);\n\n // If layoutOnResize option is a valid number sanitize it and bind the resize\n // handler.\n bindLayoutOnResize(this, settings.layoutOnResize);\n\n // Add initial items.\n this.add(getInitialGridElements(element, settings.items), { layout: false });\n\n // Layout on init if necessary.\n if (settings.layoutOnInit) {\n this.layout(true);\n }\n}\n\n/**\n * Public properties\n * *****************\n */\n\n/**\n * @public\n * @static\n * @see Item\n */\nGrid.Item = Item;\n\n/**\n * @public\n * @static\n * @see ItemLayout\n */\nGrid.ItemLayout = ItemLayout;\n\n/**\n * @public\n * @static\n * @see ItemVisibility\n */\nGrid.ItemVisibility = ItemVisibility;\n\n/**\n * @public\n * @static\n * @see ItemMigrate\n */\nGrid.ItemMigrate = ItemMigrate;\n\n/**\n * @public\n * @static\n * @see ItemDrag\n */\nGrid.ItemDrag = ItemDrag;\n\n/**\n * @public\n * @static\n * @see ItemDragRelease\n */\nGrid.ItemDragRelease = ItemDragRelease;\n\n/**\n * @public\n * @static\n * @see ItemDragPlaceholder\n */\nGrid.ItemDragPlaceholder = ItemDragPlaceholder;\n\n/**\n * @public\n * @static\n * @see Emitter\n */\nGrid.Emitter = Emitter;\n\n/**\n * @public\n * @static\n * @see Animator\n */\nGrid.Animator = Animator;\n\n/**\n * @public\n * @static\n * @see Dragger\n */\nGrid.Dragger = Dragger;\n\n/**\n * @public\n * @static\n * @see Packer\n */\nGrid.Packer = Packer;\n\n/**\n * @public\n * @static\n * @see AutoScroller\n */\nGrid.AutoScroller = AutoScroller;\n\n/**\n * The default Packer instance used by default for all layouts.\n *\n * @public\n * @static\n * @type {Packer}\n */\nGrid.defaultPacker = new Packer(2);\n\n/**\n * Default options for Grid instance.\n *\n * @public\n * @static\n * @type {Object}\n */\nGrid.defaultOptions = {\n // Initial item elements\n items: '*',\n\n // Default show animation\n showDuration: 300,\n showEasing: 'ease',\n\n // Default hide animation\n hideDuration: 300,\n hideEasing: 'ease',\n\n // Item's visible/hidden state styles\n visibleStyles: {\n opacity: '1',\n transform: 'scale(1)',\n },\n hiddenStyles: {\n opacity: '0',\n transform: 'scale(0.5)',\n },\n\n // Layout\n layout: {\n fillGaps: false,\n horizontal: false,\n alignRight: false,\n alignBottom: false,\n rounding: false,\n },\n layoutOnResize: 150,\n layoutOnInit: true,\n layoutDuration: 300,\n layoutEasing: 'ease',\n\n // Sorting\n sortData: null,\n\n // Drag & Drop\n dragEnabled: false,\n dragContainer: null,\n dragHandle: null,\n dragStartPredicate: {\n distance: 0,\n delay: 0,\n },\n dragAxis: 'xy',\n dragSort: true,\n dragSortHeuristics: {\n sortInterval: 100,\n minDragDistance: 10,\n minBounceBackAngle: 1,\n },\n dragSortPredicate: {\n threshold: 50,\n action: ACTION_MOVE,\n migrateAction: ACTION_MOVE,\n },\n dragRelease: {\n duration: 300,\n easing: 'ease',\n useDragContainer: true,\n },\n dragCssProps: {\n touchAction: 'none',\n userSelect: 'none',\n userDrag: 'none',\n tapHighlightColor: 'rgba(0, 0, 0, 0)',\n touchCallout: 'none',\n contentZooming: 'none',\n },\n dragPlaceholder: {\n enabled: false,\n createElement: null,\n onCreate: null,\n onRemove: null,\n },\n dragAutoScroll: {\n targets: [],\n handle: null,\n threshold: 50,\n safeZone: 0.2,\n speed: AutoScroller.smoothSpeed(1000, 2000, 2500),\n sortDuringScroll: true,\n smoothStop: false,\n onStart: null,\n onStop: null,\n },\n\n // Classnames\n containerClass: 'muuri',\n itemClass: 'muuri-item',\n itemVisibleClass: 'muuri-item-shown',\n itemHiddenClass: 'muuri-item-hidden',\n itemPositioningClass: 'muuri-item-positioning',\n itemDraggingClass: 'muuri-item-dragging',\n itemReleasingClass: 'muuri-item-releasing',\n itemPlaceholderClass: 'muuri-item-placeholder',\n};\n\n/**\n * Public prototype methods\n * ************************\n */\n\n/**\n * Bind an event listener.\n *\n * @public\n * @param {String} event\n * @param {Function} listener\n * @returns {Grid}\n */\nGrid.prototype.on = function (event, listener) {\n this._emitter.on(event, listener);\n return this;\n};\n\n/**\n * Unbind an event listener.\n *\n * @public\n * @param {String} event\n * @param {Function} listener\n * @returns {Grid}\n */\nGrid.prototype.off = function (event, listener) {\n this._emitter.off(event, listener);\n return this;\n};\n\n/**\n * Get the container element.\n *\n * @public\n * @returns {HTMLElement}\n */\nGrid.prototype.getElement = function () {\n return this._element;\n};\n\n/**\n * Get instance's item by element or by index. Target can also be an Item\n * instance in which case the function returns the item if it exists within\n * related Grid instance. If nothing is found with the provided target, null\n * is returned.\n *\n * @private\n * @param {(HtmlElement|Number|Item)} [target]\n * @returns {?Item}\n */\nGrid.prototype.getItem = function (target) {\n // If no target is specified or the instance is destroyed, return null.\n if (this._isDestroyed || (!target && target !== 0)) {\n return null;\n }\n\n // If target is number return the item in that index. If the number is lower\n // than zero look for the item starting from the end of the items array. For\n // example -1 for the last item, -2 for the second last item, etc.\n if (typeof target === NUMBER_TYPE) {\n return this._items[target > -1 ? target : this._items.length + target] || null;\n }\n\n // If the target is an instance of Item return it if it is attached to this\n // Grid instance, otherwise return null.\n if (target instanceof Item) {\n return target._gridId === this._id ? target : null;\n }\n\n // In other cases let's assume that the target is an element, so let's try\n // to find an item that matches the element and return it. If item is not\n // found return null.\n if (ITEM_ELEMENT_MAP) {\n var item = ITEM_ELEMENT_MAP.get(target);\n return item && item._gridId === this._id ? item : null;\n } else {\n for (var i = 0; i < this._items.length; i++) {\n if (this._items[i]._element === target) {\n return this._items[i];\n }\n }\n }\n\n return null;\n};\n\n/**\n * Get all items. Optionally you can provide specific targets (elements,\n * indices and item instances). All items that are not found are omitted from\n * the returned array.\n *\n * @public\n * @param {(HtmlElement|Number|Item|Array)} [targets]\n * @returns {Item[]}\n */\nGrid.prototype.getItems = function (targets) {\n // Return all items immediately if no targets were provided or if the\n // instance is destroyed.\n if (this._isDestroyed || targets === undefined) {\n return this._items.slice(0);\n }\n\n var items = [];\n var i, item;\n\n if (Array.isArray(targets) || isNodeList(targets)) {\n for (i = 0; i < targets.length; i++) {\n item = this.getItem(targets[i]);\n if (item) items.push(item);\n }\n } else {\n item = this.getItem(targets);\n if (item) items.push(item);\n }\n\n return items;\n};\n\n/**\n * Update the cached dimensions of the instance's items. By default all the\n * items are refreshed, but you can also provide an array of target items as the\n * first argument if you want to refresh specific items. Note that all hidden\n * items are not refreshed by default since their \"display\" property is \"none\"\n * and their dimensions are therefore not readable from the DOM. However, if you\n * do want to force update hidden item dimensions too you can provide `true`\n * as the second argument, which makes the elements temporarily visible while\n * their dimensions are being read.\n *\n * @public\n * @param {Item[]} [items]\n * @param {Boolean} [force=false]\n * @returns {Grid}\n */\nGrid.prototype.refreshItems = function (items, force) {\n if (this._isDestroyed) return this;\n\n var targets = items || this._items;\n var i, item, style, hiddenItemStyles;\n\n if (force === true) {\n hiddenItemStyles = [];\n for (i = 0; i < targets.length; i++) {\n item = targets[i];\n if (!item.isVisible() && !item.isHiding()) {\n style = item.getElement().style;\n style.visibility = 'hidden';\n style.display = '';\n hiddenItemStyles.push(style);\n }\n }\n }\n\n for (i = 0; i < targets.length; i++) {\n targets[i]._refreshDimensions(force);\n }\n\n if (force === true) {\n for (i = 0; i < hiddenItemStyles.length; i++) {\n style = hiddenItemStyles[i];\n style.visibility = '';\n style.display = 'none';\n }\n hiddenItemStyles.length = 0;\n }\n\n return this;\n};\n\n/**\n * Update the sort data of the instance's items. By default all the items are\n * refreshed, but you can also provide an array of target items if you want to\n * refresh specific items.\n *\n * @public\n * @param {Item[]} [items]\n * @returns {Grid}\n */\nGrid.prototype.refreshSortData = function (items) {\n if (this._isDestroyed) return this;\n\n var targets = items || this._items;\n for (var i = 0; i < targets.length; i++) {\n targets[i]._refreshSortData();\n }\n\n return this;\n};\n\n/**\n * Synchronize the item elements to match the order of the items in the DOM.\n * This comes handy if you need to keep the DOM structure matched with the\n * order of the items. Note that if an item's element is not currently a child\n * of the container element (if it is dragged for example) it is ignored and\n * left untouched.\n *\n * @public\n * @returns {Grid}\n */\nGrid.prototype.synchronize = function () {\n if (this._isDestroyed) return this;\n\n var items = this._items;\n if (!items.length) return this;\n\n var fragment;\n var element;\n\n for (var i = 0; i < items.length; i++) {\n element = items[i]._element;\n if (element.parentNode === this._element) {\n fragment = fragment || document.createDocumentFragment();\n fragment.appendChild(element);\n }\n }\n\n if (!fragment) return this;\n\n this._element.appendChild(fragment);\n this._emit(EVENT_SYNCHRONIZE);\n\n return this;\n};\n\n/**\n * Calculate and apply item positions.\n *\n * @public\n * @param {Boolean} [instant=false]\n * @param {Function} [onFinish]\n * @returns {Grid}\n */\nGrid.prototype.layout = function (instant, onFinish) {\n if (this._isDestroyed) return this;\n\n // Cancel unfinished layout algorithm if possible.\n var unfinishedLayout = this._nextLayoutData;\n if (unfinishedLayout && isFunction(unfinishedLayout.cancel)) {\n unfinishedLayout.cancel();\n }\n\n // Compute layout id (let's stay in Float32 range).\n layoutId = (layoutId % MAX_SAFE_FLOAT32_INTEGER) + 1;\n var nextLayoutId = layoutId;\n\n // Store data for next layout.\n this._nextLayoutData = {\n id: nextLayoutId,\n instant: instant,\n onFinish: onFinish,\n cancel: null,\n };\n\n // Collect layout items (all active grid items).\n var items = this._items;\n var layoutItems = [];\n for (var i = 0; i < items.length; i++) {\n if (items[i]._isActive) layoutItems.push(items[i]);\n }\n\n // Compute new layout.\n this._refreshDimensions();\n var gridWidth = this._width - this._borderLeft - this._borderRight;\n var gridHeight = this._height - this._borderTop - this._borderBottom;\n var layoutSettings = this._settings.layout;\n var cancelLayout;\n if (isFunction(layoutSettings)) {\n cancelLayout = layoutSettings(\n this,\n nextLayoutId,\n layoutItems,\n gridWidth,\n gridHeight,\n this._onLayoutDataReceived\n );\n } else {\n Grid.defaultPacker.setOptions(layoutSettings);\n cancelLayout = Grid.defaultPacker.createLayout(\n this,\n nextLayoutId,\n layoutItems,\n gridWidth,\n gridHeight,\n this._onLayoutDataReceived\n );\n }\n\n // Store layout cancel method if available.\n if (\n isFunction(cancelLayout) &&\n this._nextLayoutData &&\n this._nextLayoutData.id === nextLayoutId\n ) {\n this._nextLayoutData.cancel = cancelLayout;\n }\n\n return this;\n};\n\n/**\n * Add new items by providing the elements you wish to add to the instance and\n * optionally provide the index where you want the items to be inserted into.\n * All elements that are not already children of the container element will be\n * automatically appended to the container element. If an element has it's CSS\n * display property set to \"none\" it will be marked as inactive during the\n * initiation process. As long as the item is inactive it will not be part of\n * the layout, but it will retain it's index. You can activate items at any\n * point with grid.show() method. This method will automatically call\n * grid.layout() if one or more of the added elements are visible. If only\n * hidden items are added no layout will be called. All the new visible items\n * are positioned without animation during their first layout.\n *\n * @public\n * @param {(HTMLElement|HTMLElement[])} elements\n * @param {Object} [options]\n * @param {Number} [options.index=-1]\n * @param {Boolean} [options.active]\n * @param {(Boolean|Function|String)} [options.layout=true]\n * @returns {Item[]}\n */\nGrid.prototype.add = function (elements, options) {\n if (this._isDestroyed || !elements) return [];\n\n var newItems = toArray(elements);\n if (!newItems.length) return newItems;\n\n var opts = options || {};\n var layout = opts.layout ? opts.layout : opts.layout === undefined;\n var items = this._items;\n var needsLayout = false;\n var fragment;\n var element;\n var item;\n var i;\n\n // Collect all the elements that are not child of the grid element into a\n // document fragment.\n for (i = 0; i < newItems.length; i++) {\n element = newItems[i];\n if (element.parentNode !== this._element) {\n fragment = fragment || document.createDocumentFragment();\n fragment.appendChild(element);\n }\n }\n\n // If we have a fragment, let's append it to the grid element. We could just\n // not do this and the `new Item()` instantiation would handle this for us,\n // but this way we can add the elements into the DOM a bit faster.\n if (fragment) {\n this._element.appendChild(fragment);\n }\n\n // Map provided elements into new grid items.\n for (i = 0; i < newItems.length; i++) {\n element = newItems[i];\n item = newItems[i] = new Item(this, element, opts.active);\n\n // If the item to be added is active, we need to do a layout. Also, we\n // need to mark the item with the skipNextAnimation flag to make it\n // position instantly (without animation) during the next layout. Without\n // the hack the item would animate to it's new position from the northwest\n // corner of the grid, which feels a bit buggy (imho).\n if (item._isActive) {\n needsLayout = true;\n item._layout._skipNextAnimation = true;\n }\n }\n\n // Set up the items' initial dimensions and sort data. This needs to be done\n // in a separate loop to avoid layout thrashing.\n for (i = 0; i < newItems.length; i++) {\n item = newItems[i];\n item._refreshDimensions();\n item._refreshSortData();\n }\n\n // Add the new items to the items collection to correct index.\n arrayInsert(items, newItems, opts.index);\n\n // Emit add event.\n if (this._hasListeners(EVENT_ADD)) {\n this._emit(EVENT_ADD, newItems.slice(0));\n }\n\n // If layout is needed.\n if (needsLayout && layout) {\n this.layout(layout === INSTANT_LAYOUT, isFunction(layout) ? layout : undefined);\n }\n\n return newItems;\n};\n\n/**\n * Remove items from the instance.\n *\n * @public\n * @param {Item[]} items\n * @param {Object} [options]\n * @param {Boolean} [options.removeElements=false]\n * @param {(Boolean|Function|String)} [options.layout=true]\n * @returns {Item[]}\n */\nGrid.prototype.remove = function (items, options) {\n if (this._isDestroyed || !items.length) return [];\n\n var opts = options || {};\n var layout = opts.layout ? opts.layout : opts.layout === undefined;\n var needsLayout = false;\n var allItems = this.getItems();\n var targetItems = [];\n var indices = [];\n var index;\n var item;\n var i;\n\n // Remove the individual items.\n for (i = 0; i < items.length; i++) {\n item = items[i];\n if (item._isDestroyed) continue;\n\n index = this._items.indexOf(item);\n if (index === -1) continue;\n\n if (item._isActive) needsLayout = true;\n\n targetItems.push(item);\n indices.push(allItems.indexOf(item));\n item._destroy(opts.removeElements);\n this._items.splice(index, 1);\n }\n\n // Emit remove event.\n if (this._hasListeners(EVENT_REMOVE)) {\n this._emit(EVENT_REMOVE, targetItems.slice(0), indices);\n }\n\n // If layout is needed.\n if (needsLayout && layout) {\n this.layout(layout === INSTANT_LAYOUT, isFunction(layout) ? layout : undefined);\n }\n\n return targetItems;\n};\n\n/**\n * Show specific instance items.\n *\n * @public\n * @param {Item[]} items\n * @param {Object} [options]\n * @param {Boolean} [options.instant=false]\n * @param {Boolean} [options.syncWithLayout=true]\n * @param {Function} [options.onFinish]\n * @param {(Boolean|Function|String)} [options.layout=true]\n * @returns {Grid}\n */\nGrid.prototype.show = function (items, options) {\n if (!this._isDestroyed && items.length) {\n this._setItemsVisibility(items, true, options);\n }\n return this;\n};\n\n/**\n * Hide specific instance items.\n *\n * @public\n * @param {Item[]} items\n * @param {Object} [options]\n * @param {Boolean} [options.instant=false]\n * @param {Boolean} [options.syncWithLayout=true]\n * @param {Function} [options.onFinish]\n * @param {(Boolean|Function|String)} [options.layout=true]\n * @returns {Grid}\n */\nGrid.prototype.hide = function (items, options) {\n if (!this._isDestroyed && items.length) {\n this._setItemsVisibility(items, false, options);\n }\n return this;\n};\n\n/**\n * Filter items. Expects at least one argument, a predicate, which should be\n * either a function or a string. The predicate callback is executed for every\n * item in the instance. If the return value of the predicate is truthy the\n * item in question will be shown and otherwise hidden. The predicate callback\n * receives the item instance as it's argument. If the predicate is a string\n * it is considered to be a selector and it is checked against every item\n * element in the instance with the native element.matches() method. All the\n * matching items will be shown and others hidden.\n *\n * @public\n * @param {(Function|String)} predicate\n * @param {Object} [options]\n * @param {Boolean} [options.instant=false]\n * @param {Boolean} [options.syncWithLayout=true]\n * @param {FilterCallback} [options.onFinish]\n * @param {(Boolean|Function|String)} [options.layout=true]\n * @returns {Grid}\n */\nGrid.prototype.filter = function (predicate, options) {\n if (this._isDestroyed || !this._items.length) return this;\n\n var itemsToShow = [];\n var itemsToHide = [];\n var isPredicateString = typeof predicate === STRING_TYPE;\n var isPredicateFn = isFunction(predicate);\n var opts = options || {};\n var isInstant = opts.instant === true;\n var syncWithLayout = opts.syncWithLayout;\n var layout = opts.layout ? opts.layout : opts.layout === undefined;\n var onFinish = isFunction(opts.onFinish) ? opts.onFinish : null;\n var tryFinishCounter = -1;\n var tryFinish = noop;\n var item;\n var i;\n\n // If we have onFinish callback, let's create proper tryFinish callback.\n if (onFinish) {\n tryFinish = function () {\n ++tryFinishCounter && onFinish(itemsToShow.slice(0), itemsToHide.slice(0));\n };\n }\n\n // Check which items need to be shown and which hidden.\n if (isPredicateFn || isPredicateString) {\n for (i = 0; i < this._items.length; i++) {\n item = this._items[i];\n if (isPredicateFn ? predicate(item) : elementMatches(item._element, predicate)) {\n itemsToShow.push(item);\n } else {\n itemsToHide.push(item);\n }\n }\n }\n\n // Show items that need to be shown.\n if (itemsToShow.length) {\n this.show(itemsToShow, {\n instant: isInstant,\n syncWithLayout: syncWithLayout,\n onFinish: tryFinish,\n layout: false,\n });\n } else {\n tryFinish();\n }\n\n // Hide items that need to be hidden.\n if (itemsToHide.length) {\n this.hide(itemsToHide, {\n instant: isInstant,\n syncWithLayout: syncWithLayout,\n onFinish: tryFinish,\n layout: false,\n });\n } else {\n tryFinish();\n }\n\n // If there are any items to filter.\n if (itemsToShow.length || itemsToHide.length) {\n // Emit filter event.\n if (this._hasListeners(EVENT_FILTER)) {\n this._emit(EVENT_FILTER, itemsToShow.slice(0), itemsToHide.slice(0));\n }\n\n // If layout is needed.\n if (layout) {\n this.layout(layout === INSTANT_LAYOUT, isFunction(layout) ? layout : undefined);\n }\n }\n\n return this;\n};\n\n/**\n * Sort items. There are three ways to sort the items. The first is simply by\n * providing a function as the comparer which works identically to native\n * array sort. Alternatively you can sort by the sort data you have provided\n * in the instance's options. Just provide the sort data key(s) as a string\n * (separated by space) and the items will be sorted based on the provided\n * sort data keys. Lastly you have the opportunity to provide a presorted\n * array of items which will be used to sync the internal items array in the\n * same order.\n *\n * @public\n * @param {(Function|String|Item[])} comparer\n * @param {Object} [options]\n * @param {Boolean} [options.descending=false]\n * @param {(Boolean|Function|String)} [options.layout=true]\n * @returns {Grid}\n */\nGrid.prototype.sort = (function () {\n var sortComparer;\n var isDescending;\n var origItems;\n var indexMap;\n\n function defaultComparer(a, b) {\n var result = 0;\n var criteriaName;\n var criteriaOrder;\n var valA;\n var valB;\n\n // Loop through the list of sort criteria.\n for (var i = 0; i < sortComparer.length; i++) {\n // Get the criteria name, which should match an item's sort data key.\n criteriaName = sortComparer[i][0];\n criteriaOrder = sortComparer[i][1];\n\n // Get items' cached sort values for the criteria. If the item has no sort\n // data let's update the items sort data (this is a lazy load mechanism).\n valA = (a._sortData ? a : a._refreshSortData())._sortData[criteriaName];\n valB = (b._sortData ? b : b._refreshSortData())._sortData[criteriaName];\n\n // Sort the items in descending order if defined so explicitly. Otherwise\n // sort items in ascending order.\n if (criteriaOrder === 'desc' || (!criteriaOrder && isDescending)) {\n result = valB < valA ? -1 : valB > valA ? 1 : 0;\n } else {\n result = valA < valB ? -1 : valA > valB ? 1 : 0;\n }\n\n // If we have -1 or 1 as the return value, let's return it immediately.\n if (result) return result;\n }\n\n // If values are equal let's compare the item indices to make sure we\n // have a stable sort. Note that this is not necessary in evergreen browsers\n // because Array.sort() is nowadays stable. However, in order to guarantee\n // same results in older browsers we need this.\n if (!result) {\n if (!indexMap) indexMap = createIndexMap(origItems);\n result = isDescending ? compareIndexMap(indexMap, b, a) : compareIndexMap(indexMap, a, b);\n }\n return result;\n }\n\n function customComparer(a, b) {\n var result = isDescending ? -sortComparer(a, b) : sortComparer(a, b);\n if (!result) {\n if (!indexMap) indexMap = createIndexMap(origItems);\n result = isDescending ? compareIndexMap(indexMap, b, a) : compareIndexMap(indexMap, a, b);\n }\n return result;\n }\n\n return function (comparer, options) {\n if (this._isDestroyed || this._items.length < 2) return this;\n\n var items = this._items;\n var opts = options || {};\n var layout = opts.layout ? opts.layout : opts.layout === undefined;\n\n // Setup parent scope data.\n isDescending = !!opts.descending;\n origItems = items.slice(0);\n indexMap = null;\n\n // If function is provided do a native array sort.\n if (isFunction(comparer)) {\n sortComparer = comparer;\n items.sort(customComparer);\n }\n // Otherwise if we got a string, let's sort by the sort data as provided in\n // the instance's options.\n else if (typeof comparer === STRING_TYPE) {\n sortComparer = comparer\n .trim()\n .split(' ')\n .filter(function (val) {\n return val;\n })\n .map(function (val) {\n return val.split(':');\n });\n items.sort(defaultComparer);\n }\n // Otherwise if we got an array, let's assume it's a presorted array of the\n // items and order the items based on it. Here we blindly trust that the\n // presorted array consists of the same item instances as the current\n // `gird._items` array.\n else if (Array.isArray(comparer)) {\n items.length = 0;\n items.push.apply(items, comparer);\n }\n // Otherwise let's throw an error.\n else {\n sortComparer = isDescending = origItems = indexMap = null;\n throw new Error('Invalid comparer argument provided.');\n }\n\n // Emit sort event.\n if (this._hasListeners(EVENT_SORT)) {\n this._emit(EVENT_SORT, items.slice(0), origItems);\n }\n\n // If layout is needed.\n if (layout) {\n this.layout(layout === INSTANT_LAYOUT, isFunction(layout) ? layout : undefined);\n }\n\n // Reset data (to avoid mem leaks).\n sortComparer = isDescending = origItems = indexMap = null;\n\n return this;\n };\n})();\n\n/**\n * Move item to another index or in place of another item.\n *\n * @public\n * @param {(HtmlElement|Number|Item)} item\n * @param {(HtmlElement|Number|Item)} position\n * @param {Object} [options]\n * @param {String} [options.action=\"move\"]\n * - Accepts either \"move\" or \"swap\".\n * - \"move\" moves the item in place of the other item.\n * - \"swap\" swaps the position of the items.\n * @param {(Boolean|Function|String)} [options.layout=true]\n * @returns {Grid}\n */\nGrid.prototype.move = function (item, position, options) {\n if (this._isDestroyed || this._items.length < 2) return this;\n\n var items = this._items;\n var opts = options || {};\n var layout = opts.layout ? opts.layout : opts.layout === undefined;\n var isSwap = opts.action === ACTION_SWAP;\n var action = isSwap ? ACTION_SWAP : ACTION_MOVE;\n var fromItem = this.getItem(item);\n var toItem = this.getItem(position);\n var fromIndex;\n var toIndex;\n\n // Make sure the items exist and are not the same.\n if (fromItem && toItem && fromItem !== toItem) {\n // Get the indices of the items.\n fromIndex = items.indexOf(fromItem);\n toIndex = items.indexOf(toItem);\n\n // Do the move/swap.\n if (isSwap) {\n arraySwap(items, fromIndex, toIndex);\n } else {\n arrayMove(items, fromIndex, toIndex);\n }\n\n // Emit move event.\n if (this._hasListeners(EVENT_MOVE)) {\n this._emit(EVENT_MOVE, {\n item: fromItem,\n fromIndex: fromIndex,\n toIndex: toIndex,\n action: action,\n });\n }\n\n // If layout is needed.\n if (layout) {\n this.layout(layout === INSTANT_LAYOUT, isFunction(layout) ? layout : undefined);\n }\n }\n\n return this;\n};\n\n/**\n * Send item to another Grid instance.\n *\n * @public\n * @param {(HtmlElement|Number|Item)} item\n * @param {Grid} targetGrid\n * @param {(HtmlElement|Number|Item)} position\n * @param {Object} [options]\n * @param {HTMLElement} [options.appendTo=document.body]\n * @param {(Boolean|Function|String)} [options.layoutSender=true]\n * @param {(Boolean|Function|String)} [options.layoutReceiver=true]\n * @returns {Grid}\n */\nGrid.prototype.send = function (item, targetGrid, position, options) {\n if (this._isDestroyed || targetGrid._isDestroyed || this === targetGrid) return this;\n\n // Make sure we have a valid target item.\n item = this.getItem(item);\n if (!item) return this;\n\n var opts = options || {};\n var container = opts.appendTo || document.body;\n var layoutSender = opts.layoutSender ? opts.layoutSender : opts.layoutSender === undefined;\n var layoutReceiver = opts.layoutReceiver\n ? opts.layoutReceiver\n : opts.layoutReceiver === undefined;\n\n // Start the migration process.\n item._migrate.start(targetGrid, position, container);\n\n // If migration was started successfully and the item is active, let's layout\n // the grids.\n if (item._migrate._isActive && item._isActive) {\n if (layoutSender) {\n this.layout(\n layoutSender === INSTANT_LAYOUT,\n isFunction(layoutSender) ? layoutSender : undefined\n );\n }\n if (layoutReceiver) {\n targetGrid.layout(\n layoutReceiver === INSTANT_LAYOUT,\n isFunction(layoutReceiver) ? layoutReceiver : undefined\n );\n }\n }\n\n return this;\n};\n\n/**\n * Destroy the instance.\n *\n * @public\n * @param {Boolean} [removeElements=false]\n * @returns {Grid}\n */\nGrid.prototype.destroy = function (removeElements) {\n if (this._isDestroyed) return this;\n\n var container = this._element;\n var items = this._items.slice(0);\n var layoutStyles = (this._layout && this._layout.styles) || {};\n var i, prop;\n\n // Unbind window resize event listener.\n unbindLayoutOnResize(this);\n\n // Destroy items.\n for (i = 0; i < items.length; i++) items[i]._destroy(removeElements);\n this._items.length = 0;\n\n // Restore container.\n removeClass(container, this._settings.containerClass);\n for (prop in layoutStyles) container.style[prop] = '';\n\n // Emit destroy event and unbind all events.\n this._emit(EVENT_DESTROY);\n this._emitter.destroy();\n\n // Remove reference from the grid instances collection.\n delete GRID_INSTANCES[this._id];\n\n // Flag instance as destroyed.\n this._isDestroyed = true;\n\n return this;\n};\n\n/**\n * Private prototype methods\n * *************************\n */\n\n/**\n * Emit a grid event.\n *\n * @private\n * @param {String} event\n * @param {...*} [arg]\n */\nGrid.prototype._emit = function () {\n if (this._isDestroyed) return;\n this._emitter.emit.apply(this._emitter, arguments);\n};\n\n/**\n * Check if there are any events listeners for an event.\n *\n * @private\n * @param {String} event\n * @returns {Boolean}\n */\nGrid.prototype._hasListeners = function (event) {\n if (this._isDestroyed) return false;\n return this._emitter.countListeners(event) > 0;\n};\n\n/**\n * Update container's width, height and offsets.\n *\n * @private\n */\nGrid.prototype._updateBoundingRect = function () {\n var element = this._element;\n var rect = element.getBoundingClientRect();\n this._width = rect.width;\n this._height = rect.height;\n this._left = rect.left;\n this._top = rect.top;\n this._right = rect.right;\n this._bottom = rect.bottom;\n};\n\n/**\n * Update container's border sizes.\n *\n * @private\n * @param {Boolean} left\n * @param {Boolean} right\n * @param {Boolean} top\n * @param {Boolean} bottom\n */\nGrid.prototype._updateBorders = function (left, right, top, bottom) {\n var element = this._element;\n if (left) this._borderLeft = getStyleAsFloat(element, 'border-left-width');\n if (right) this._borderRight = getStyleAsFloat(element, 'border-right-width');\n if (top) this._borderTop = getStyleAsFloat(element, 'border-top-width');\n if (bottom) this._borderBottom = getStyleAsFloat(element, 'border-bottom-width');\n};\n\n/**\n * Refresh all of container's internal dimensions and offsets.\n *\n * @private\n */\nGrid.prototype._refreshDimensions = function () {\n this._updateBoundingRect();\n this._updateBorders(1, 1, 1, 1);\n this._boxSizing = getStyle(this._element, 'box-sizing');\n};\n\n/**\n * Calculate and apply item positions.\n *\n * @private\n * @param {Object} layout\n */\nGrid.prototype._onLayoutDataReceived = (function () {\n var itemsToLayout = [];\n return function (layout) {\n if (this._isDestroyed || !this._nextLayoutData || this._nextLayoutData.id !== layout.id) return;\n\n var grid = this;\n var instant = this._nextLayoutData.instant;\n var onFinish = this._nextLayoutData.onFinish;\n var numItems = layout.items.length;\n var counter = numItems;\n var item;\n var left;\n var top;\n var i;\n\n // Reset next layout data.\n this._nextLayoutData = null;\n\n if (!this._isLayoutFinished && this._hasListeners(EVENT_LAYOUT_ABORT)) {\n this._emit(EVENT_LAYOUT_ABORT, this._layout.items.slice(0));\n }\n\n // Update the layout reference.\n this._layout = layout;\n\n // Update the item positions and collect all items that need to be laid\n // out. It is critical that we update the item position _before_ the\n // layoutStart event as the new data might be needed in the callback.\n itemsToLayout.length = 0;\n for (i = 0; i < numItems; i++) {\n item = layout.items[i];\n\n // Make sure we have a matching item.\n if (!item) {\n --counter;\n continue;\n }\n\n // Get the item's new left and top values.\n left = layout.slots[i * 2];\n top = layout.slots[i * 2 + 1];\n\n // Let's skip the layout process if we can. Possibly avoids a lot of DOM\n // operations which saves us some CPU cycles.\n if (item._canSkipLayout(left, top)) {\n --counter;\n continue;\n }\n\n // Update the item's position.\n item._left = left;\n item._top = top;\n\n // Only active non-dragged items need to be moved.\n if (item.isActive() && !item.isDragging()) {\n itemsToLayout.push(item);\n } else {\n --counter;\n }\n }\n\n // Set layout styles to the grid element.\n if (layout.styles) {\n setStyles(this._element, layout.styles);\n }\n\n // layoutStart event is intentionally emitted after the container element's\n // dimensions are set, because otherwise there would be no hook for reacting\n // to container dimension changes.\n if (this._hasListeners(EVENT_LAYOUT_START)) {\n this._emit(EVENT_LAYOUT_START, layout.items.slice(0), instant === true);\n // Let's make sure that the current layout process has not been overridden\n // in the layoutStart event, and if so, let's stop processing the aborted\n // layout.\n if (this._layout.id !== layout.id) return;\n }\n\n var tryFinish = function () {\n if (--counter > 0) return;\n\n var hasLayoutChanged = grid._layout.id !== layout.id;\n var callback = isFunction(instant) ? instant : onFinish;\n\n if (!hasLayoutChanged) {\n grid._isLayoutFinished = true;\n }\n\n if (isFunction(callback)) {\n callback(layout.items.slice(0), hasLayoutChanged);\n }\n\n if (!hasLayoutChanged && grid._hasListeners(EVENT_LAYOUT_END)) {\n grid._emit(EVENT_LAYOUT_END, layout.items.slice(0));\n }\n };\n\n if (!itemsToLayout.length) {\n tryFinish();\n return this;\n }\n\n this._isLayoutFinished = false;\n\n for (i = 0; i < itemsToLayout.length; i++) {\n if (this._layout.id !== layout.id) break;\n itemsToLayout[i]._layout.start(instant === true, tryFinish);\n }\n\n if (this._layout.id === layout.id) {\n itemsToLayout.length = 0;\n }\n\n return this;\n };\n})();\n\n/**\n * Show or hide Grid instance's items.\n *\n * @private\n * @param {Item[]} items\n * @param {Boolean} toVisible\n * @param {Object} [options]\n * @param {Boolean} [options.instant=false]\n * @param {Boolean} [options.syncWithLayout=true]\n * @param {Function} [options.onFinish]\n * @param {(Boolean|Function|String)} [options.layout=true]\n */\nGrid.prototype._setItemsVisibility = function (items, toVisible, options) {\n var grid = this;\n var targetItems = items.slice(0);\n var opts = options || {};\n var isInstant = opts.instant === true;\n var callback = opts.onFinish;\n var layout = opts.layout ? opts.layout : opts.layout === undefined;\n var counter = targetItems.length;\n var startEvent = toVisible ? EVENT_SHOW_START : EVENT_HIDE_START;\n var endEvent = toVisible ? EVENT_SHOW_END : EVENT_HIDE_END;\n var method = toVisible ? 'show' : 'hide';\n var needsLayout = false;\n var completedItems = [];\n var hiddenItems = [];\n var item;\n var i;\n\n // If there are no items call the callback, but don't emit any events.\n if (!counter) {\n if (isFunction(callback)) callback(targetItems);\n return;\n }\n\n // Prepare the items.\n for (i = 0; i < targetItems.length; i++) {\n item = targetItems[i];\n\n // If inactive item is shown or active item is hidden we need to do\n // layout.\n if ((toVisible && !item._isActive) || (!toVisible && item._isActive)) {\n needsLayout = true;\n }\n\n // If inactive item is shown we also need to do a little hack to make the\n // item not animate it's next positioning (layout).\n item._layout._skipNextAnimation = !!(toVisible && !item._isActive);\n\n // If a hidden item is being shown we need to refresh the item's\n // dimensions.\n if (toVisible && item._visibility._isHidden) {\n hiddenItems.push(item);\n }\n\n // Add item to layout or remove it from layout.\n if (toVisible) {\n item._addToLayout();\n } else {\n item._removeFromLayout();\n }\n }\n\n // Force refresh the dimensions of all hidden items.\n if (hiddenItems.length) {\n this.refreshItems(hiddenItems, true);\n hiddenItems.length = 0;\n }\n\n // Show the items in sync with the next layout.\n function triggerVisibilityChange() {\n if (needsLayout && opts.syncWithLayout !== false) {\n grid.off(EVENT_LAYOUT_START, triggerVisibilityChange);\n }\n\n if (grid._hasListeners(startEvent)) {\n grid._emit(startEvent, targetItems.slice(0));\n }\n\n for (i = 0; i < targetItems.length; i++) {\n // Make sure the item is still in the original grid. There is a chance\n // that the item starts migrating before tiggerVisibilityChange is called.\n if (targetItems[i]._gridId !== grid._id) {\n if (--counter < 1) {\n if (isFunction(callback)) callback(completedItems.slice(0));\n if (grid._hasListeners(endEvent)) grid._emit(endEvent, completedItems.slice(0));\n }\n continue;\n }\n\n targetItems[i]._visibility[method](isInstant, function (interrupted, item) {\n // If the current item's animation was not interrupted add it to the\n // completedItems array.\n if (!interrupted) completedItems.push(item);\n\n // If all items have finished their animations call the callback\n // and emit showEnd/hideEnd event.\n if (--counter < 1) {\n if (isFunction(callback)) callback(completedItems.slice(0));\n if (grid._hasListeners(endEvent)) grid._emit(endEvent, completedItems.slice(0));\n }\n });\n }\n }\n\n // Trigger the visibility change, either async with layout or instantly.\n if (needsLayout && opts.syncWithLayout !== false) {\n this.on(EVENT_LAYOUT_START, triggerVisibilityChange);\n } else {\n triggerVisibilityChange();\n }\n\n // Trigger layout if needed.\n if (needsLayout && layout) {\n this.layout(layout === INSTANT_LAYOUT, isFunction(layout) ? layout : undefined);\n }\n};\n\n/**\n * Private helpers\n * ***************\n */\n\n/**\n * Merge default settings with user settings. The returned object is a new\n * object with merged values. The merging is a deep merge meaning that all\n * objects and arrays within the provided settings objects will be also merged\n * so that modifying the values of the settings object will have no effect on\n * the returned object.\n *\n * @param {Object} defaultSettings\n * @param {Object} [userSettings]\n * @returns {Object} Returns a new object.\n */\nfunction mergeSettings(defaultSettings, userSettings) {\n // Create a fresh copy of default settings.\n var settings = mergeObjects({}, defaultSettings);\n\n // Merge user settings to default settings.\n if (userSettings) {\n settings = mergeObjects(settings, userSettings);\n }\n\n // Handle visible/hidden styles manually so that the whole object is\n // overridden instead of the props.\n\n if (userSettings && userSettings.visibleStyles) {\n settings.visibleStyles = userSettings.visibleStyles;\n } else if (defaultSettings && defaultSettings.visibleStyles) {\n settings.visibleStyles = defaultSettings.visibleStyles;\n }\n\n if (userSettings && userSettings.hiddenStyles) {\n settings.hiddenStyles = userSettings.hiddenStyles;\n } else if (defaultSettings && defaultSettings.hiddenStyles) {\n settings.hiddenStyles = defaultSettings.hiddenStyles;\n }\n\n return settings;\n}\n\n/**\n * Merge two objects recursively (deep merge). The source object's properties\n * are merged to the target object.\n *\n * @param {Object} target\n * - The target object.\n * @param {Object} source\n * - The source object.\n * @returns {Object} Returns the target object.\n */\nfunction mergeObjects(target, source) {\n var sourceKeys = Object.keys(source);\n var length = sourceKeys.length;\n var isSourceObject;\n var propName;\n var i;\n\n for (i = 0; i < length; i++) {\n propName = sourceKeys[i];\n isSourceObject = isPlainObject(source[propName]);\n\n // If target and source values are both objects, merge the objects and\n // assign the merged value to the target property.\n if (isPlainObject(target[propName]) && isSourceObject) {\n target[propName] = mergeObjects(mergeObjects({}, target[propName]), source[propName]);\n continue;\n }\n\n // If source's value is object and target's is not let's clone the object as\n // the target's value.\n if (isSourceObject) {\n target[propName] = mergeObjects({}, source[propName]);\n continue;\n }\n\n // If source's value is an array let's clone the array as the target's\n // value.\n if (Array.isArray(source[propName])) {\n target[propName] = source[propName].slice(0);\n continue;\n }\n\n // In all other cases let's just directly assign the source's value as the\n // target's value.\n target[propName] = source[propName];\n }\n\n return target;\n}\n\n/**\n * Collect and return initial items for grid.\n *\n * @param {HTMLElement} gridElement\n * @param {?(HTMLElement[]|NodeList|HtmlCollection|String)} elements\n * @returns {(HTMLElement[]|NodeList|HtmlCollection)}\n */\nfunction getInitialGridElements(gridElement, elements) {\n // If we have a wildcard selector let's return all the children.\n if (elements === '*') {\n return gridElement.children;\n }\n\n // If we have some more specific selector, let's filter the elements.\n if (typeof elements === STRING_TYPE) {\n var result = [];\n var children = gridElement.children;\n for (var i = 0; i < children.length; i++) {\n if (elementMatches(children[i], elements)) {\n result.push(children[i]);\n }\n }\n return result;\n }\n\n // If we have an array of elements or a node list.\n if (Array.isArray(elements) || isNodeList(elements)) {\n return elements;\n }\n\n // Otherwise just return an empty array.\n return [];\n}\n\n/**\n * Bind grid's resize handler to window.\n *\n * @param {Grid} grid\n * @param {(Number|Boolean)} delay\n */\nfunction bindLayoutOnResize(grid, delay) {\n if (typeof delay !== NUMBER_TYPE) {\n delay = delay === true ? 0 : -1;\n }\n\n if (delay >= 0) {\n grid._resizeHandler = debounce(function () {\n grid.refreshItems().layout();\n }, delay);\n\n window.addEventListener('resize', grid._resizeHandler);\n }\n}\n\n/**\n * Unbind grid's resize handler from window.\n *\n * @param {Grid} grid\n */\nfunction unbindLayoutOnResize(grid) {\n if (grid._resizeHandler) {\n grid._resizeHandler(true);\n window.removeEventListener('resize', grid._resizeHandler);\n grid._resizeHandler = null;\n }\n}\n\n/**\n * Normalize style declaration object, returns a normalized (new) styles object\n * (prefixed properties and invalid properties removed).\n *\n * @param {Object} styles\n * @returns {Object}\n */\nfunction normalizeStyles(styles) {\n var normalized = {};\n var docElemStyle = document.documentElement.style;\n var prop, prefixedProp;\n\n // Normalize visible styles (prefix and remove invalid).\n for (prop in styles) {\n if (!styles[prop]) continue;\n prefixedProp = getPrefixedPropName(docElemStyle, prop);\n if (!prefixedProp) continue;\n normalized[prefixedProp] = styles[prop];\n }\n\n return normalized;\n}\n\n/**\n * Create index map from items.\n *\n * @param {Item[]} items\n * @returns {Object}\n */\nfunction createIndexMap(items) {\n var result = {};\n for (var i = 0; i < items.length; i++) {\n result[items[i]._id] = i;\n }\n return result;\n}\n\n/**\n * Sort comparer function for items' index map.\n *\n * @param {Object} indexMap\n * @param {Item} itemA\n * @param {Item} itemB\n * @returns {Number}\n */\nfunction compareIndexMap(indexMap, itemA, itemB) {\n var indexA = indexMap[itemA._id];\n var indexB = indexMap[itemB._id];\n return indexA - indexB;\n}\n\nexport default Grid;\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../@vue/cli-service/node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!../../@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!../../@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[3]!./uPlot.min.css\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"7668e03a\", content, true, {\"sourceMap\":false,\"shadowMode\":false});","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","import unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nexport default function _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (!it) {\n if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n var F = function F() {};\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = it.call(o);\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}","import _typeof from \"./typeof.js\";\nexport default function _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n };\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (undefined === method) {\n if (context.delegate = null, \"throw\" === context.method) {\n if (delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method)) return ContinueSentinel;\n context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n }\n return ContinueSentinel;\n }\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) {\n if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n }\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) {\n keys.push(key);\n }\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {\n \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n }\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}"],"names":["adapters","logger","self","console","WebSocket","log","messages","this","enabled","push","Date","now","getTime","secondsSince","time","ConnectionMonitor","constructor","connection","visibilityDidChange","bind","reconnectAttempts","start","isRunning","startedAt","stoppedAt","startPolling","addEventListener","staleThreshold","stop","stopPolling","removeEventListener","recordPing","pingedAt","recordConnect","disconnectedAt","recordDisconnect","poll","clearTimeout","pollTimeout","setTimeout","reconnectIfStale","getPollInterval","reconnectionBackoffRate","backoff","Math","pow","min","jitterMax","jitter","random","connectionIsStale","refreshedAt","disconnectedRecently","reopen","document","visibilityState","isOpen","INTERNAL","message_types","welcome","disconnect","ping","confirmation","rejection","disconnect_reasons","unauthorized","invalid_request","server_restart","default_mount_path","protocols","supportedProtocols","slice","length","indexOf","Connection","consumer","open","subscriptions","monitor","disconnected","send","data","webSocket","JSON","stringify","isActive","getState","uninstallEventHandlers","url","installEventHandlers","close","allowReconnect","error","reopenDelay","getProtocol","protocol","isState","isProtocolSupported","call","states","state","readyState","toLowerCase","eventName","events","handler","prototype","message","event","identifier","reason","reconnect","type","parse","reload","confirmSubscription","notify","reject","notifyAll","willAttemptReconnect","extend","object","properties","key","value","Subscription","params","mixin","perform","action","command","unsubscribe","remove","SubscriptionGuarantor","pendingSubscriptions","guarantee","subscription","startGuaranteeing","forget","filter","s","stopGuaranteeing","retrySubscribing","retryTimeout","subscribe","map","Subscriptions","guarantor","create","channelName","channel","add","ensureActiveConnection","findAll","sendCommand","callbackName","args","undefined","Consumer","_url","createWebSocketURL","connect","test","a","createElement","href","replace","createConsumer","getConfig","name","element","head","querySelector","getAttribute","pxRatio","query","FEAT_TIME","pre","UPLOT","ORI_HZ","ORI_VT","TITLE","WRAP","UNDER","OVER","AXIS","OFF","SELECT","CURSOR_X","CURSOR_Y","CURSOR_PT","LEGEND","LEGEND_LIVE","LEGEND_INLINE","LEGEND_THEAD","LEGEND_SERIES","LEGEND_MARKER","LEGEND_LABEL","LEGEND_VALUE","WIDTH","HEIGHT","TOP","BOTTOM","LEFT","RIGHT","hexBlack","transparent","mousemove","mousedown","mouseup","mouseenter","mouseleave","dblclick","resize","scroll","change","dppxchange","domEnv","window","doc","win","nav","navigator","setPxRatio","_pxRatio","devicePixelRatio","off","matchMedia","on","dispatchEvent","CustomEvent","addClass","el","c","cl","classList","contains","remClass","setStylePx","style","placeTag","tag","cls","targ","refEl","insertBefore","placeDiv","xformCache","WeakMap","elTrans","xPos","yPos","xMax","yMax","xform","xformOld","get","transform","set","colorCache","elColor","background","borderColor","newColor","oldColor","sizeCache","elSize","newWid","newHgt","centered","newSize","oldSize","height","width","marginLeft","marginTop","evOpts","passive","evOpts2","capture","ev","cb","capt","closestIdx","num","arr","lo","hi","mid","bitwise","floor","nonNullIdx","_i0","_i1","dir","i","getMinMax","sorted","_min","inf","_max","max","getMinMaxLog","_fixedTuple","fixIncr","minIncr","maxIncr","minExp","maxExp","roundDec","rangeLog","base","fullMags","minMaxIncrs","minSign","sign","logFn","log10","log2","ceil","abs","incrRoundDn","incrRoundUp","rangeAsinh","minMax","rangePad","autoRangePart","mode","pad","_eqRangePart","soft","_eqRange","rangeNum","mult","extra","isObj","_rangeNum","ifNull","lh","rh","hasData","idx0","idx1","cfg","cmin","cmax","padMin","padMax","hardMin","hard","hardMax","softMin","softMax","softMinMode","softMaxMode","delta","nonZeroDelta","mag","_padMin","_newMin","_softMin","minLim","_padMax","_newMax","_softMax","maxLim","numFormatter","Intl","NumberFormat","language","fmtNum","val","format","M","PI","round","sinh","v","linthresh","asinh","Infinity","numIntDigits","x","incrRound","incr","clamp","fnOrSelf","retArg0","_0","retArg1","_1","retNull","_","retTrue","retEq","b","dec","fixedDec","Map","guessDec","split","genIncrs","mults","incrs","multDec","exp","expa","_incr","EMPTY_OBJ","EMPTY_ARR","nullNullTuple","isArr","Array","isArray","isStr","is","Object","fastIsObj","TypedArray","getPrototypeOf","Uint8Array","copy","o","out","_isObj","find","k","assign","arguments","src","NULL_REMOVE","NULL_RETAIN","NULL_EXPAND","nullExpand","yVals","nullIdxs","alignedLen","xi","lastNullIdx","nullIdx","join","tables","nullModes","xVals","Set","ti","t","xs","len","from","sort","xIdxs","si","ys","fill","nullMode","yVal","alignedIdx","microTask","queueMicrotask","fn","Promise","resolve","then","months","days","slice3","str","days3","months3","engNames","MMMM","MMM","WWWW","WWW","zeroPad2","int","zeroPad3","subs","YYYY","d","getFullYear","YY","names","getMonth","MM","DD","getDate","D","getDay","HH","getHours","H","h","AA","aa","mm","getMinutes","m","ss","getSeconds","fff","getMilliseconds","fmtDate","tpl","parts","R","exec","localTz","DateTimeFormat","resolvedOptions","timeZone","tzDate","date","tz","date2","getTimezoneOffset","toLocaleString","setMilliseconds","onlyWhole","allMults","decIncrs","oneIncrs","wholeIncrs","numIncrs","concat","NL","yyyy","NLyyyy","md","NLmd","NLmdyy","hmm","hmmaa","NLhmmaa","genTimeStuffs","ms","mo","y","subSecIncrs","timeIncrs","_timeAxisStamps","timeAxisSplits","axisIdx","scaleMin","scaleMax","foundIncr","foundSpace","splits","isYr","isMo","minDate","minDateTs","minMin","mkDate","minMinTs","moIncr","yrIncr","splitDate","baseYear","baseMonth","next","offs","incr0","tzOffset","date0","prevHour","incrHours","minSpace","axes","_space","pctSpace","expectedHour","actualHour","dstShift","prevSplit","pctIncr","timeIncrsMs","_timeAxisStampsMs","timeAxisSplitsMs","timeIncrsS","_timeAxisStampsS","timeAxisSplitsS","timeAxisStamps","stampCfg","timeAxisVals","stamps","prevYear","prevMnth","prevDate","prevMins","prevSecs","newYear","newMnth","newDate","newHour","newMins","newSecs","stamp","timeAxisVal","dateTpl","timeSeriesStamp","_timeSeriesStamp","timeSeriesVal","legendStroke","seriesIdx","series","stroke","points","legendFill","legendOpts","show","live","isolate","markers","dash","idx","idxs","values","cursorPointShow","cursor","pt","size","mar","cursorPointFill","sp","_fill","_stroke","cursorPointStroke","cursorPointSize","ptDia","dataIdx","cursorIdx","moveTuple","cursorMove","mouseLeft1","mouseTop1","filtBtn0","handle","e","button","passThru","cursorOpts","lock","move","click","drag","setScale","dist","uni","_x","_y","focus","prox","left","top","axisLines","grid","ticks","border","font","labelFont","lineMult","xAxisOpts","scale","space","gap","labelGap","labelSize","side","rotate","numSeriesLabel","timeSeriesLabel","xSeriesOpts","auto","numAxisVals","numAxisSplits","forceMin","numDec","logAxisSplits","logBase","scales","asinhAxisSplits","sc","posSplits","zero","negSplits","reverse","RE_ALL","RE_12357","RE_125","RE_1","logAxisValsFilt","axis","scaleKey","distr","valToPos","_10","re","numSeriesVal","yAxisOpts","dia","seriesPointsShow","xData","_data","p0","p1","dim","maxPts","facet","xySeriesOpts","alpha","facets","ySeriesOpts","spanGaps","gaps","nullGaps","path","clip","clampScale","xScaleOpts","ori","yScaleOpts","syncs","_sync","opts","plots","sub","plot","unsub","pub","w","j","BAND_CLIP_FILL","BAND_CLIP_STROKE","orient","u","bbox","scaleX","dx","dy","sx","sy","l","valToPosH","V","valToPosV","moveToH","lineToH","rectH","arcH","bezierCurveToH","moveToV","lineToV","rectV","arcV","bezierCurveToV","bandFillClipDirs","fillDir","clipDirs","bands","seriesFillTo","dataMin","dataMax","bandFillDir","clipBandLine","strokePath","clipDir","dataX","dataY","scaleY","valToPosX","valToPosY","xOff","yOff","xDim","yDim","frIdx","toIdx","pxRound","lineTo","x0","y0","x1","yLimit","Path2D","clipGaps","plotLft","plotTop","plotWid","plotHgt","rect","prevGapEnd","g","addGap","fromX","toX","prevGap","findGaps","pixelForX","align","fr","to","frPx","toPx","frPx2","toPx2","pxRoundGen","pxAlign","moveTo","arcTo","p","y1","x2","y2","r","closePath","startAngle","endAngle","arc","bp1x","bp1y","bp2x","bp2y","p2x","p2y","bezierCurveTo","filtIdxs","rad","lft","wid","hgt","drawPoint","pi","forEach","flags","_drawAcc","accX","minY","maxY","inY","outY","drawAccH","drawAccV","linear","alignGaps","drawAcc","pixelForY","drawnAtX","_paths","band","lftIdx","rgtIdx","lftX","rgtX","bandClipDir","fillToVal","fillTo","fillToY","stepped","ascDesc","prevYPos","firstXPos","prevXPos","yVal1","halfStroke","startsOffset","endsOffset","bars","extraGap","radius","gapFactor","maxWidth","minWidth","disp","_each","each","dispFills","dispStrokes","xShift","barWid","_dirX","_dirY","y0Pos","strokeWidth","multiPath","fillColors","fillPaths","strokeColors","strokePaths","color","unit","pct","posToVal","sizes","colWid","prevIdx","minDelta","gapWid","dataY0","xVal","btm","barHgt","splineInterp","interp","xCoords","yCoords","monotoneCubic","_monotoneCubic","n","ds","dys","dxs","isFinite","cursorPlots","invalidateRects","syncRect","uPlot","linearPath","pointsPath","setDefaults","xo","yo","initY","d2","setDefault","setDefaults2","xyo","snapNumX","snapTimeX","snapNumY","snapLogY","snapLogX","snapAsinhY","snapAsinhX","findIncr","minVal","maxVal","intDigits","incrIdx","pxRatioFont","fontSize","fontSizeCss","syncFontSize","f","getValPct","_val","getHPos","getVPos","getPos","ready","status","root","id","class","title","textContent","can","ctx","getContext","wrap","under","appendChild","over","plugins","xScaleKey","drawOrderMap","drawAxesGrid","drawSeries","drawOrder","initScale","scaleOpts","isTime","rn","range","rangeIsArr","xScaleDistr","pendScales","legendEl","_tzDate","ts","_fmtDate","_timeAxisSplits","_timeAxisVals","_timeSeriesVal","activeIdxs","legend","showLegend","legendCols","legendRows","legendCells","multiValLegend","NULL_LEGEND_VALUES","getMultiVals","son","soff","initLegendRow","cells","row","childNodes","label","indic","text","onMouse","_lock","ctrlKey","metaKey","some","setSeries","syncOpts","cursorFocus","FOCUS_TRUE","mouseListeners","targListeners","listener","offMouse","delete","fullWidCss","fullHgtCss","plotWidCss","plotHgtCss","plotLftCss","plotTopCss","shouldSetScales","shouldSetSize","shouldConvergeSize","shouldSetCursor","shouldSetLegend","_setSize","force","calcSize","resetYSeries","commit","calcPlotRect","calcAxesRects","bb","CYCLE_LIMIT","convergeSize","converged","cycleNum","axesConverged","axesCalc","paddingConverged","paddingCalc","setSize","hasTopAxis","hasBtmAxis","hasRgtAxis","hasLftAxis","_show","_size","isVt","fullSize","sidesWithAxes","_padding","off1","off2","off3","off0","incrOffset","_pos","_lpos","cursorPts","initCursorPt","initSeries","sv","paths","_focus","_ptDia","rowCells","splice","fire","addSeries","delSeries","tr","firstChild","initAxis","av","_rotate","_incrs","_found","_splits","_values","_el","autoPadSide","dataLen","ctxStroke","ctxFill","ctxWidth","ctxDash","ctxJoin","ctxCap","ctxFont","ctxAlign","ctxBaseline","ctxAlpha","padding","i0","i1","data0","viaAutoScaleX","setData","_resetScales","xsc","autoScaleX","_setScale","setCtxStyle","cap","strokeStyle","fillStyle","lineWidth","lineJoin","lineCap","setLineDash","setFontStyle","baseline","textAlign","textBaseline","accScale","wsc","psc","setScales","wipScales","xFacet","yFacet","yScaleKey","yData","changed","anyChanged","getOuterIdxs","ydata","_idxs","globalAlpha","cacheStrokeFill","drawPath","_points","gapsClip","boundsClip","offset","_pxAlign","translate","halfWid","strokeFill","fillStroke","lineDash","fillPath","didStrokeFill","bi","gapsClip2","lowerEdge","lowerData","bandClip","_fillStyle","CLIP_FILL_STROKE","save","doFill","doStroke","restore","getIncrSpace","fullDim","incrSpace","drawOrthoLines","filts","pos0","beginPath","pos1","_p","shiftDir","shiftAmt","baseLpos","fillText","plotDim","plotOff","axisGap","tickSize","angle","basePos","finalPos","lineHeight","canOffs","_parts","xCursor","yCursor","vCursor","hCursor","rawMouseLeft0","rawMouseTop0","mouseLeft0","mouseTop0","rawMouseLeft1","rawMouseTop1","queuedCommit","_commit","posOffset","clearRect","updateCursor","redraw","rebuildPaths","recalcAxes","dragging","dragX","dragY","closestDist","closestSeries","focusedSeries","select","selectDiv","setSelect","_fire","prop","toggleDOM","onOff","_pub","setFocus","pubSync","setBand","addBand","delBand","setAlpha","opacity","allFocused","_setAlpha","i2","isFocused","pos","closestIdxFromXpos","batch","setSelH","setSelV","valToIdx","posToIdx","setCursor","setSelX","setSelY","syncLegend","vals","nodeValue","setLegend","sidx","setLegendValues","noDataInRange","mouseXPos","valAtPosX","idx2","yVal2","xPos2","hPos","vPos","ptWid","ptHgt","ptLft","ptTop","getBBox","xKey","yKey","match","matchXKeys","matchYKeys","sync","xKeySrc","yKeySrc","sdrag","sOff","sDim","sori","sPosToVal","matchingX","matchingY","hideSelect","rawDX","rawDY","_rawDX","syncKey","xSyncKey","ySyncKey","shouldPub","defer","getBoundingClientRect","mouseMove","_l","_t","_w","_h","_i","cacheMouse","initial","snap","clientX","clientY","syncOptsSrc","xValSrc","yValSrc","rotSrc","_xDim","_yDim","_xPos","_yPos","__l","_hideProps","mouseDown","mouseUp","hasSelect","mouseLeave","_dragging","dragH","dragV","snapH","snapV","snapProx","dblClick","syncPxRatio","hooks","evName","a1","a2","filters","destroy","clear","_init","HTMLElement","spline","___CSS_LOADER_EXPORT___","module","exports","utils","settle","cookies","buildURL","buildFullPath","parseHeaders","isURLSameOrigin","transitionalDefaults","AxiosError","CanceledError","parseProtocol","config","onCanceled","requestData","requestHeaders","headers","responseType","done","cancelToken","signal","isFormData","isStandardBrowserEnv","request","XMLHttpRequest","auth","username","password","unescape","encodeURIComponent","Authorization","btoa","fullPath","baseURL","onloadend","responseHeaders","getAllResponseHeaders","responseData","response","responseText","statusText","err","method","toUpperCase","paramsSerializer","timeout","onreadystatechange","responseURL","onabort","ECONNABORTED","onerror","ERR_NETWORK","ontimeout","timeoutErrorMessage","transitional","clarifyTimeoutError","ETIMEDOUT","xsrfValue","withCredentials","xsrfCookieName","read","xsrfHeaderName","setRequestHeader","isUndefined","onDownloadProgress","onUploadProgress","upload","cancel","abort","aborted","ERR_BAD_REQUEST","Axios","mergeConfig","defaults","createInstance","defaultConfig","context","instance","instanceConfig","axios","CancelToken","isCancel","VERSION","toFormData","Cancel","all","promises","spread","isAxiosError","executor","TypeError","resolvePromise","promise","token","_listeners","onfulfilled","_resolve","throwIfRequested","index","source","ERR_CANCELED","inherits","__CANCEL__","InterceptorManager","dispatchRequest","validator","validators","interceptors","configOrUrl","assertOptions","silentJSONParsing","boolean","forcedJSONParsing","requestInterceptorChain","synchronousRequestInterceptors","interceptor","runWhen","synchronous","unshift","fulfilled","rejected","responseInterceptorChain","chain","apply","shift","newConfig","onFulfilled","onRejected","getUri","generateHTTPMethod","isForm","code","Error","toJSON","description","number","fileName","lineNumber","columnNumber","stack","descriptors","defineProperties","defineProperty","customProps","axiosError","toFlatObject","obj","handlers","use","options","eject","isAbsoluteURL","combineURLs","requestedURL","transformData","throwIfCancellationRequested","transformRequest","merge","common","adapter","transformResponse","config1","config2","getMergedValue","target","isPlainObject","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","keys","configValue","validateStatus","ERR_BAD_RESPONSE","fns","normalizeHeaderName","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","getDefaultAdapter","process","toString","stringifySafely","rawValue","parser","encoder","isString","trim","isArrayBuffer","isBuffer","isStream","isFile","isBlob","isArrayBufferView","buffer","isURLSearchParams","isFileList","isObjectPayload","isObject","contentType","_FormData","env","FormData","strictJSONParsing","maxContentLength","maxBodyLength","thisArg","encode","serializedParams","isDate","toISOString","hashmarkIndex","relativeURL","write","expires","domain","secure","cookie","isNumber","toGMTString","RegExp","decodeURIComponent","payload","originURL","msie","userAgent","urlParsingNode","resolveURL","setAttribute","host","search","hash","hostname","port","pathname","charAt","location","requestURL","parsed","normalizedName","ignoreDuplicateOf","line","substr","callback","formData","convertValue","isTypedArray","Blob","Buffer","build","parentKey","fullKey","endsWith","toArray","append","pop","thing","deprecatedWarnings","schema","allowUnknown","ERR_BAD_OPTION_VALUE","opt","result","ERR_BAD_OPTION","version","formatMessage","desc","ERR_DEPRECATED","warn","kindOf","cache","kindOfTest","ArrayBuffer","isView","isFunction","pipe","pattern","product","hasOwnProperty","assignValue","stripBOM","content","charCodeAt","superConstructor","props","sourceObj","destObj","merged","getOwnPropertyNames","searchString","position","String","lastIndex","haystack","needle","comparator","low","high","cmp","RangeError","DataView","NAME","Constructor","Prototype","NATIVE_ARRAY_BUFFER","DESCRIPTORS","global","isCallable","hasOwn","classof","tryToString","createNonEnumerableProperty","defineBuiltIn","isPrototypeOf","setPrototypeOf","wellKnownSymbol","uid","InternalStateModule","enforceInternalState","enforce","getInternalState","Int8Array","Int8ArrayPrototype","Uint8ClampedArray","Uint8ClampedArrayPrototype","TypedArrayPrototype","ObjectPrototype","TO_STRING_TAG","TYPED_ARRAY_TAG","TYPED_ARRAY_CONSTRUCTOR","NATIVE_ARRAY_BUFFER_VIEWS","opera","TYPED_ARRAY_TAG_REQUIRED","TypedArrayConstructorsList","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigIntArrayConstructorsList","BigInt64Array","BigUint64Array","it","klass","getTypedArrayConstructor","proto","aTypedArray","aTypedArrayConstructor","C","exportTypedArrayMethod","KEY","property","forced","ARRAY","TypedArrayConstructor","error2","exportTypedArrayStaticMethod","Function","uncurryThis","FunctionName","defineBuiltIns","fails","anInstance","toIntegerOrInfinity","toLength","toIndex","IEEE754","arrayFill","arraySlice","setToStringTag","PROPER_FUNCTION_NAME","PROPER","CONFIGURABLE_FUNCTION_NAME","CONFIGURABLE","setInternalState","ARRAY_BUFFER","DATA_VIEW","PROTOTYPE","WRONG_LENGTH","WRONG_INDEX","NativeArrayBuffer","$ArrayBuffer","ArrayBufferPrototype","$DataView","DataViewPrototype","packIEEE754","pack","unpackIEEE754","unpack","packInt8","packInt16","packInt32","unpackInt32","packFloat32","packFloat64","addGetter","view","count","isLittleEndian","intIndex","store","byteLength","bytes","byteOffset","conversion","INCORRECT_ARRAY_BUFFER_NAME","NaN","testView","$setInt8","setInt8","getInt8","setUint8","unsafe","bufferLength","getUint8","getInt16","getUint16","getInt32","getUint32","getFloat32","getFloat64","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","toObject","toAbsoluteIndex","lengthOfArrayLike","deletePropertyOrThrow","copyWithin","O","end","inc","list","IndexedObject","createMethod","TYPE","IS_FIND_LAST_INDEX","$this","callbackfn","that","boundFunction","findLast","findLastIndex","toIndexedObject","arrayMethodIsStrict","$lastIndexOf","lastIndexOf","NEGATIVE_ZERO","STRICT_METHOD","FORCED","searchElement","isNullOrUndefined","iterate","defineIterator","createIterResultObject","setSpecies","fastKey","internalStateGetterFor","getterFor","getConstructor","wrapper","CONSTRUCTOR_NAME","IS_MAP","ADDER","iterable","first","last","AS_ENTRIES","define","previous","entry","getEntry","removed","prev","has","setStrong","ITERATOR_NAME","getInternalCollectionState","getInternalIteratorState","iterated","kind","getWeakData","anObject","ArrayIterationModule","findIndex","uncaughtFrozenStore","frozen","UncaughtFrozenStore","entries","findUncaughtFrozen","$","isForced","InternalMetadataModule","checkCorrectnessOfIteration","inheritIfRequired","IS_WEAK","NativeConstructor","NativePrototype","exported","fixMethod","uncurriedNativeMethod","REPLACE","enable","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","BUGGY_ZERO","$instance","dummy","makeBuiltIn","descriptor","getter","setter","$Array","LN2","mantissaLength","exponent","mantissa","exponentLength","eMax","eBias","rt","nBits","Number","isInteger","$expm1","expm1","LOG10E","whitespaces","$parseFloat","parseFloat","Symbol","ITERATOR","iterator","string","trimmedString","$repeat","requireObjectCoercible","repeat","stringSlice","IS_END","maxLength","fillString","fillLen","stringFiller","S","intMaxLength","stringLength","fillStr","toPrimitive","$TypeError","argument","prim","BigInt","$RangeError","toPositiveInteger","BYTES","TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS","ArrayBufferViewCore","ArrayBufferModule","createPropertyDescriptor","isIntegralNumber","toOffset","toPropertyKey","isSymbol","typedArrayFrom","definePropertyModule","getOwnPropertyDescriptorModule","nativeDefineProperty","nativeGetOwnPropertyDescriptor","BYTES_PER_ELEMENT","fromList","isTypedArrayIndex","wrappedGetOwnPropertyDescriptor","wrappedDefineProperty","configurable","writable","enumerable","stat","getOwnPropertyDescriptor","CLAMPED","GETTER","SETTER","NativeTypedArrayConstructor","TypedArrayConstructorPrototype","addElement","typedArrayOffset","$length","$len","sham","arrayFromConstructorAndList","typedArraySpeciesConstructor","aConstructor","getIterator","getIteratorMethod","isArrayIteratorMethod","isBigIntArray","toBigInt","thisIsBigIntArray","step","argumentsLength","mapfn","mapping","iteratorMethod","speciesConstructor","originalArray","collection","collectionStrong","init","$asinh","sqrt","E","$entries","defineBuiltInAccessor","regExpFlags","RegExpPrototype","INDICES_SUPPORT","calls","expected","chr","pairs","dotAll","ignoreCase","multiline","sticky","hasIndices","$padStart","WEBKIT_BUG","padStart","isRegExp","getMethod","getRegExpFlags","getSubstitution","IS_PURE","stringIndexOf","searchValue","fromIndex","replaceAll","replaceValue","IS_REG_EXP","replacer","functionalReplace","searchLength","advanceBy","replacement","endOfLastMatch","fixRegExpWellKnownSymbolLogic","sameValue","regExpExec","SEARCH","nativeSearch","maybeCallNative","regexp","searcher","rx","res","previousLastIndex","defineWellKnownSymbol","getBuiltIn","relativeIndex","$ArrayCopyWithin","u$ArrayCopyWithin","$every","$fill","CONVERSION_BUG","valueOf","actualValue","$filter","fromSpeciesAndList","$findIndex","predicate","$findLastIndex","$findLast","$find","$forEach","$includes","$indexOf","ArrayIterators","arrayValues","arrayKeys","arrayEntries","GENERIC","ITERATOR_IS_VALUES","typedArrayValues","$join","separator","$map","$reduceRight","$reduce","middle","$set","WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS","array","TO_OBJECT_BUG","arrayLike","$some","aCallable","internalSort","FF","IE_OR_EDGE","V8","WEBKIT","nativeSort","ACCEPT_INCORRECT_ARGUMENTS","STABLE_SORT","mod","getSortCompare","comparefn","$toLocaleString","TO_LOCALE_STRING_BUG","Uint8ArrayPrototype","arrayToString","IS_NOT_ARRAY_METHOD","createTypedArrayConstructor","InternalWeakMap","collectionWeak","isExtensible","NATIVE_WEAK_MAP","IS_IE11","ActiveXObject","$WeakMap","WeakMapPrototype","nativeDelete","nativeHas","nativeGet","nativeSet","microtask","validateArgumentsLength","IS_NODE","dontCallGetSet","formatDistanceLocale","lessThanXSeconds","one","other","xSeconds","halfAMinute","lessThanXMinutes","xMinutes","aboutXHours","xHours","xDays","aboutXWeeks","xWeeks","aboutXMonths","xMonths","aboutXYears","xYears","overXYears","almostXYears","formatDistance","tokenValue","addSuffix","comparison","buildFormatLongFn","defaultWidth","formats","dateFormats","full","long","medium","short","timeFormats","dateTimeFormats","formatLong","dateTime","formatRelativeLocale","lastWeek","yesterday","today","tomorrow","nextWeek","formatRelative","_date","_baseDate","_options","buildLocalizeFn","dirtyIndex","valuesArray","formattingValues","defaultFormattingWidth","_defaultWidth","_width","argumentCallback","eraValues","narrow","abbreviated","wide","quarterValues","monthValues","dayValues","dayPeriodValues","am","pm","midnight","noon","morning","afternoon","evening","night","formattingDayPeriodValues","ordinalNumber","dirtyNumber","rem100","localize","era","quarter","month","day","dayPeriod","buildMatchFn","matchPattern","matchPatterns","defaultMatchWidth","matchResult","matchedString","parsePatterns","defaultParseWidth","findKey","valueCallback","rest","buildMatchPatternFn","parseResult","parsePattern","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","any","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","parseInt","locale","weekStartsOn","firstWeekContainsDate","defaultOptions","getDefaultOptions","dateLongFormatter","timeLongFormatter","dateTimeLongFormatter","dateTimeFormat","datePattern","timePattern","longFormatters","P","getTimezoneOffsetInMilliseconds","utcDate","UTC","setUTCFullYear","startOfUTCISOWeekYear","dirtyDate","requiredArgs","year","getUTCISOWeekYear","fourthOfJanuary","setUTCHours","startOfUTCISOWeek","MILLISECONDS_IN_WEEK","getUTCISOWeek","toDate","diff","getUTCFullYear","fourthOfJanuaryOfNextYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","startOfUTCWeekYear","_ref","_ref2","_ref3","_options$firstWeekCon","_options$locale","_options$locale$optio","_defaultOptions$local","_defaultOptions$local2","toInteger","getUTCWeekYear","firstWeek","startOfUTCWeek","getUTCWeek","firstWeekOfNextYear","firstWeekOfThisYear","protectedDayOfYearTokens","protectedWeekYearTokens","isProtectedDayOfYearToken","isProtectedWeekYearToken","throwProtectedError","input","required","getUTCDay","setUTCDate","getUTCDate","_options$weekStartsOn","isNaN","MILLISECONDS_IN_DAY","getUTCDayOfYear","timestamp","setUTCMonth","startOfYearTimestamp","difference","addLeadingZeros","targetLength","output","formatters","signedYear","getUTCMonth","dayPeriodEnumValue","getUTCHours","getUTCMinutes","getUTCSeconds","numberOfDigits","milliseconds","getUTCMilliseconds","fractionalSeconds","dayPeriodEnum","G","lightFormatters","Y","signedWeekYear","weekYear","twoDigitYear","isoWeekYear","Q","q","L","week","I","isoWeek","dayOfYear","dayOfWeek","localDayOfWeek","isoDayOfWeek","hours","B","K","X","_localize","originalDate","_originalDate","timezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","formatTimezoneShort","z","T","dirtyDelimiter","absOffset","minutes","delimiter","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","dirtyFormatStr","_ref4","_options$locale2","_options$locale2$opti","_ref5","_ref6","_ref7","_options$locale3","_options$locale3$opti","_defaultOptions$local3","_defaultOptions$local4","formatStr","defaultLocale","isValid","subMilliseconds","formatterOptions","substring","firstCharacter","longFormatter","cleanEscapedString","formatter","useAdditionalWeekYearTokens","useAdditionalDayOfYearTokens","matched","_typeof","_inherits","subClass","superClass","_setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","Super","_getPrototypeOf","NewTarget","Reflect","construct","_possibleConstructorReturn","_assertThisInitialized","ReferenceError","Proxy","Boolean","_classCallCheck","_defineProperties","_createClass","protoProps","staticProps","_defineProperty","TIMEZONE_UNIT_PRIORITY","Setter","_utcDate","ValueSetter","_Setter","_super","validateValue","setValue","priority","subPriority","_this","DateToSystemTimezoneSetter","_Setter2","_super2","_this2","_len","_key","timestampIsSet","convertedDate","setFullYear","setHours","Parser","dateString","validate","_value","EraParser","_Parser","millisecondsInMinute","millisecondsInHour","millisecondsInSecond","numericPatterns","hour23h","hour24h","hour11h","hour12h","minute","second","singleDigit","twoDigits","threeDigits","fourDigits","anyDigitsSigned","singleDigitSigned","twoDigitsSigned","threeDigitsSigned","fourDigitsSigned","timezonePatterns","basicOptionalMinutes","basic","basicOptionalSeconds","extended","extendedOptionalSeconds","mapValue","parseFnResult","mapFn","parseNumericPattern","parseTimezonePattern","seconds","parseAnyDigitsSigned","parseNDigits","parseNDigitsSigned","dayPeriodEnumToHours","normalizeTwoDigitYear","currentYear","isCommonEra","absCurrentYear","rangeEnd","rangeEndCentury","isPreviousCentury","isLeapYearIndex","YearParser","isTwoDigitYear","normalizedTwoDigitYear","LocalWeekYearParser","ISOWeekYearParser","_flags","firstWeekOfYear","ExtendedYearParser","QuarterParser","StandAloneQuarterParser","MonthParser","StandAloneMonthParser","setUTCWeek","dirtyWeek","LocalWeekParser","setUTCISOWeek","dirtyISOWeek","ISOWeekParser","DAYS_IN_MONTH","DAYS_IN_MONTH_LEAP_YEAR","DateParser","isLeapYear","DayOfYearParser","setUTCDay","dirtyDay","currentDay","remainder","dayIndex","DayParser","LocalDayParser","wholeWeekDays","StandAloneLocalDayParser","setUTCISODay","ISODayParser","AMPMParser","AMPMMidnightParser","DayPeriodParser","Hour1to12Parser","isPM","Hour0to23Parser","Hour0To11Parser","Hour1To24Parser","MinuteParser","setUTCMinutes","SecondParser","setUTCSeconds","FractionOfSecondParser","setUTCMilliseconds","ISOTimezoneWithZParser","ISOTimezoneParser","TimestampSecondsParser","TimestampMillisecondsParser","parsers","_createForOfIteratorHelper","allowArrayLike","_unsupportedIterableToArray","F","_e","normalCompletion","didErr","_e2","return","minLen","_arrayLikeToArray","arr2","notWhitespaceRegExp","dirtyDateString","dirtyFormatString","dirtyReferenceDate","formatString","_step","subFnOptions","setters","tokens","usedTokens","_iterator","_loop","incompatibleTokens","incompatibleToken","usedToken","includes","fullToken","run","_ret","uniquePrioritySetters","setterArray","_step2","_iterator2","addMilliseconds","dirtyAmount","amount","argStr","GRID_INSTANCES","ITEM_ELEMENT_MAP","ACTION_SWAP","ACTION_MOVE","EVENT_SYNCHRONIZE","EVENT_LAYOUT_START","EVENT_LAYOUT_END","EVENT_LAYOUT_ABORT","EVENT_ADD","EVENT_REMOVE","EVENT_SHOW_START","EVENT_SHOW_END","EVENT_HIDE_START","EVENT_HIDE_END","EVENT_FILTER","EVENT_SORT","EVENT_MOVE","EVENT_SEND","EVENT_BEFORE_SEND","EVENT_RECEIVE","EVENT_BEFORE_RECEIVE","EVENT_DRAG_INIT","EVENT_DRAG_START","EVENT_DRAG_MOVE","EVENT_DRAG_SCROLL","EVENT_DRAG_END","EVENT_DRAG_RELEASE_START","EVENT_DRAG_RELEASE_END","EVENT_DESTROY","HAS_TOUCH_EVENTS","HAS_POINTER_EVENTS","PointerEvent","HAS_MS_POINTER_EVENTS","msPointerEnabled","MAX_SAFE_FLOAT32_INTEGER","Emitter","_events","_queue","_counter","_clearOnEmit","listeners","emit","queue","startIndex","argsLength","endIndex","burst","countListeners","pointerout","waitDuration","EdgeHack","dragger","_dragger","_timeout","_outEvent","_isActive","_addBehaviour","_removeBehaviour","_onTimeout","_resetData","_onStart","_onOut","pointerType","_getTrackedTouch","_onCancel","vendorPrefixes","cache$2","getPrefixedPropName","prefixedProp","camelProp","hasPassiveEvents","isPassiveEventsSupported","passiveOpts","ua","isEdge","isIE","isFirefox","isAndroid","listenerOptions","taProp","taPropPrefixed","documentElement","taDefaultValue","Dragger","cssProps","_element","_emitter","_isDestroyed","_cssProps","_touchAction","_pointerId","_startTime","_startX","_startY","_currentX","_currentY","_onMove","_onEnd","_edgeHack","setCssProps","setTouchAction","_preventDefault","_inputEvents","_pointerEvents","_msPointerEvents","_touchEvents","_mouseEvents","_emitterEvents","_activeInstances","preventDefault","cancelable","_activateInstance","_bindListeners","_deactivateInstance","_unbindListeners","_getEventPointerId","pointerId","changedTouches","_getTouchById","_reset","_createEvent","touch","srcEvent","distance","getDistance","deltaX","getDeltaX","deltaY","getDeltaY","deltaTime","getDeltaTime","isFirst","isFinal","touches","screenX","screenY","pageX","pageY","_emit","newProps","currentProps","dt","raf","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","msRequestAnimationFrame","Ticker","numLanes","_nextStep","_lanes","_stepQueue","_stepCallbacks","TickerLane","indices","callbacks","laneQueue","laneCallbacks","laneIndices","lanes","stepQueue","stepCallbacks","laneIndex","LAYOUT_READ","LAYOUT_WRITE","VISIBILITY_READ","VISIBILITY_WRITE","DRAG_START_READ","DRAG_START_WRITE","DRAG_MOVE_READ","DRAG_MOVE_WRITE","DRAG_SCROLL_READ","DRAG_SCROLL_WRITE","DRAG_SORT_READ","PLACEHOLDER_LAYOUT_READ","PLACEHOLDER_LAYOUT_WRITE","PLACEHOLDER_RESIZE_WRITE","AUTO_SCROLL_READ","AUTO_SCROLL_WRITE","DEBOUNCE_READ","LANE_READ","LANE_READ_TAIL","LANE_WRITE","ticker","addLayoutTick","itemId","cancelLayoutTick","addVisibilityTick","cancelVisibilityTick","addDragStartTick","cancelDragStartTick","addDragMoveTick","cancelDragMoveTick","addDragScrollTick","cancelDragScrollTick","addDragSortTick","cancelDragSortTick","addPlaceholderLayoutTick","cancelPlaceholderLayoutTick","addPlaceholderResizeTick","cancelPlaceholderResizeTick","addAutoScrollTick","cancelAutoScrollTick","addDebounceTick","debounceId","cancelDebounceTick","AXIS_X","AXIS_Y","FORWARD","BACKWARD","UP","DOWN","functionType","cache$1","getStyle","styles","getComputedStyle","getPropertyValue","getStyleAsFloat","DOC_ELEM","BODY","body","THRESHOLD_DATA","getScrollElement","getScrollLeft","pageXOffset","scrollLeft","getScrollTop","pageYOffset","scrollTop","getScrollLeftMax","scrollWidth","clientWidth","getScrollTopMax","scrollHeight","clientHeight","getContentRect","right","bottom","bcr","borderLeft","clientLeft","borderTop","clientTop","getItemAutoScrollSettings","item","_drag","_getGrid","_settings","dragAutoScroll","prepareItemScrollSync","_prepareScroll","applyItemScrollSync","_scrollDiffX","_scrollDiffY","_setTranslate","_left","_top","computeThreshold","threshold","safeZone","itemSize","targetSize","ScrollRequest","reset","ScrollAction","requestX","requestY","Pool","createItem","releaseItem","pool","isOverlapping","getIntersectionArea","getIntersectionScore","area","maxArea","onStop","isEnding","direction","maxValue","speed","duration","hasReachedEnd","computeCurrentScrollValue","computeNextScrollValue","nextValue","computeSpeed","tick","onStart","addRequest","removeRequest","computeScrollValues","scrollTo","pick","release","RECT_1","RECT_2","AutoScroller","_isTicking","_tickTime","_tickDeltaTime","_items","_actions","_requests","_requestOverlapCheck","_dragPositions","_dragDirections","_overlapCheckInterval","_requestPool","_actionPool","_readTick","_writeTick","smoothSpeed","maxSpeed","acceleration","deceleration","targetSpeed","factor","currentSpeed","nextSpeed","pointerHandle","pointerSize","pX","pY","_updateRequests","_updateActions","_applyActions","_startTicking","_stopTicking","_getItemHandleRect","itemDrag","_dragMoveEvent","_dragStartEvent","_clientX","_clientY","_height","_requestItemScroll","reqMap","_id","_cancelItemScroll","_checkItemOverlap","checkX","checkY","settings","targets","dragDirections","dragDirectionX","dragDirectionY","itemRect","testRect","testElement","testAxisX","testAxisY","testScore","testPriority","testThreshold","testDirection","testDistance","testMaxScrollX","testMaxScrollY","xElement","xPriority","xThreshold","xScore","xDirection","xDistance","xMaxScroll","yElement","yPriority","yThreshold","yScore","yDirection","yDistance","yMaxScroll","_updateScrollRequest","scrollRequest","targetCount","testIsAxisX","testScroll","testMaxScroll","smoothStop","reqX","reqY","checkTime","needsCheck","items","requestsX","requestsY","_requestAction","actions","isAxisX","requests","_updateDragDirection","dragPositions","addItem","updateItem","removeItem","isItemScrollingX","isItemScrollingY","isItemScrolling","ElProto","Element","matchesFn","matches","matchesSelector","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","elementMatches","selector","className","tempArray","numberType","arrayInsert","normalizeArrayIndex","sizeOffset","maxIndex","arrayMove","arraySwap","withIndex","temp","indexA","indexB","transformProp","styleNameRegEx","prefixRegex","msPrefixRegex","getStyleName","styleName","transformStyle","transformNone$1","displayInline","displayNone","displayStyle","isTransformed","display","getContainingBlock","parentElement","offsetA","offsetB","offsetDiff","getOffset","offsetData","getOffsetDiff","elemA","elemB","compareContainingBlocks","isScrollableOverflow","isScrollable","getScrollableAncestors","getRootNode","DocumentFragment","parentNode","translateValue","transformNone","rxMat3d","rxMatTx","rxMat3dTx","rxNextItem","getTranslate","isMat3d","tX","tY","removeClass","IS_IOS","platform","maxTouchPoints","START_PREDICATE_INACTIVE","START_PREDICATE_PENDING","START_PREDICATE_RESOLVED","SCROLL_LISTENER_OPTIONS","ItemDrag","getGrid","_item","_gridId","_isMigrating","_startPredicate","dragStartPredicate","defaultStartPredicate","_startPredicateState","_startPredicateResult","_isSortNeeded","_sortTimer","_blockedSortIndex","_sortX1","_sortX2","_sortY1","_sortY2","_preStartCheck","_preEndCheck","_onScroll","_prepareStart","_applyStart","_prepareMove","_applyMove","_applyScroll","_handleSort","_handleSortDelayed","_handle","dragHandle","dragCssProps","openAnchorHref","tagName","getCurrentStyles","autoScroller","isTrusted","defaultPrevented","_startPredicateData","delay","delayTimer","_resolveStartPredicate","_forceResolveStartPredicate","_resetStartPredicate","_finishStartPredicate","defaultSortPredicate","targetRect","returnData","gridsArray","minThreshold","maxThreshold","getTargetGrid","rootGrid","gridScore","grids","container","containerRect","dragSort","bestScore","_updateBoundingRect","innerWidth","_right","innerHeight","_bottom","sortThreshold","sortAction","migrateAction","score","isMigration","gridOffsetLeft","gridOffsetTop","matchScore","matchIndex","hasValidTargets","_gridX","_marginLeft","_gridY","_marginTop","_updateBorders","_borderLeft","_borderTop","_finishMigration","_cancelSort","_isStarted","_unbindScrollListeners","draggingClass","itemDraggingClass","_container","_containingBlock","_dragPrevMoveEvent","_scrollEvent","_scrollers","_moveDiffX","_moveDiffY","_containerDiffX","_containerDiffY","_bindScrollListeners","gridScrollers","gridContainer","dragContainer","scrollers","isClick","_resetHeuristics","_checkHeuristics","dragSortHeuristics","minDist","minDragDistance","diffX","diffY","canCheckBounceBack","minBounceBackAngle","atan2","prevAngle","deltaAngle","sin","cos","sortDuringScroll","shouldSort","sortInterval","_checkOverlap","_finishSort","isSortEnabled","needsFinalCheck","currentGrid","currentIndex","targetGrid","targetIndex","targetItem","dragSortPredicate","_hasListeners","fromGrid","toGrid","_sortData","appendTo","layoutSender","layoutReceiver","layout","_dragRelease","targetGridElement","targetSettings","targetContainer","currentSettings","currentContainer","currentVisClass","itemVisibleClass","itemHiddenClass","nextVisClass","itemClass","_refreshDimensions","dragEnabled","_visibility","setStyles","visibleStyles","hiddenStyles","isResolved","containingBlock","elementRect","hasDragContainer","migrate","_migrate","isPositioning","_layout","isReleasing","dragPlaceholder","_dragPlaceholder","dragAxis","nextEvent","prevEvent","moveDiffX","moveDiffY","scrollDiffX","scrollDiffY","unprefixRegEx","getUnprefixedPropName","nativeCode","isNative","feat","HAS_WEB_ANIMATIONS","animate","HAS_NATIVE_WEB_ANIMATIONS","Animator","_animation","_duration","_easing","_callback","_props","_onFinish","createFrame","prefix","frame","getTranslateString","ItemDragPlaceholder","_className","_didMigrate","_resetAfterLayout","_transX","_transY","_nextTransX","_nextTransY","_setupAnimation","_startAnimation","_updateDimensions","_onLayoutStart","_onLayoutEnd","_onReleaseEnd","_onMigrate","_onHide","ItemDragRelease","_isPositioningStarted","propsFrom","propsTo","onFinish","propName","propCount","propIndex","animation","currentValues","easing","cancelAnimation","onfinish","isAnimating","isInstant","nextLeft","nextTop","currentLeft","currentTop","nextX","nextY","animEnabled","layoutDuration","getElement","currentX","currentY","currentStyles","targetStyles","layoutEasing","nextGrid","itemPlaceholderClass","onCreate","removeChild","onRemove","updateDimensions","itemReleasingClass","dragRelease","useDragContainer","_placeToGrid","_nextLayoutData","didReparent","isJustReleased","needsReflow","releasingClass","MIN_ANIMATION_DISTANCE","ItemLayout","elementStyle","_isInterrupted","_currentStyles","_targetStyles","_nextLeft","_nextTop","_offsetLeft","_offsetTop","_skipNextAnimation","_animOptions","_finish","ItemMigrate","ItemVisibility","childElement","children","_isHidden","_isHiding","_isShowing","_childElement","_currentStyleProps","_finishShow","_finishHide","instant","gridSettings","animDuration","animEasing","_updateOffsets","processCallbackQueue","itemPositioningClass","_tX","_tY","xDiff","yDiff","containerDiff","translateX","translateY","isVisible","targetElement","targetItems","getItem","gridElement","hide","currentStyleProps","_removeCurrentStyles","toVisible","showDuration","hideDuration","showEasing","hideEasing","createUid","Item","_marginRight","_marginBottom","createPackerProcessor","isWorker","FILL_GAPS","HORIZONTAL","ALIGN_RIGHT","ALIGN_BOTTOM","ROUNDING","EPS","MIN_SLOT_SIZE","roundNumber","PackerProcessor","currentRects","nextRects","rectTarget","rectStore","slotSizes","rectId","slotIndex","slotData","sortRectsLeftTop","sortRectsTopLeft","computeLayout","bump","slotWidth","slotHeight","slot","slots","fillGaps","horizontal","alignRight","alignBottom","rounding","isPreProcessed","computeNextSlot","shards","ignoreCurrentRects","getRect","addRect","splitRect","purgeRects","hole","isRectAWithinRectB","rectA","rectB","rectIds","aId","bId","PACKET_INDEX_WIDTH","PACKET_INDEX_HEIGHT","PACKET_INDEX_OPTIONS","PACKET_HEADER_SLOTS","processor","onmessage","msg","subarray","postMessage","getWidth","getHeight","getMargin","getPosition","isShowing","isHiding","isDragging","isDestroyed","_refreshSortData","getters","sortData","_addToLayout","_removeFromLayout","_canSkipLayout","_destroy","removeElement","blobUrl","activeWorkers","createWorkerProcessors","workers","URL","createObjectURL","worker","Worker","destroyWorkerProcessors","onmessageerror","terminate","revokeObjectURL","isWorkerProcessorsSupported","PACKET_INDEX_ID","Packer","numWorkers","_processor","_layoutQueue","_layouts","_layoutCallbacks","_layoutWorkers","_layoutWorkerData","_workers","_onWorkerMessage","setOptions","_sendToWorker","layoutId","_finalizeLayout","_grid","isHorizontal","isBorderBox","_boxSizing","_borderRight","_borderBottom","createLayout","cancelLayout","queueIndex","debounce","durationMs","timer","lastTime","isCanceled","htmlCollectionType","nodeListType","isNodeList","objectType","objectToStringType","noop","NUMBER_TYPE","STRING_TYPE","INSTANT_LAYOUT","Grid","isElementInDom","composed","mergeSettings","normalizeStyles","_isLayoutFinished","_onLayoutDataReceived","containerClass","bindLayoutOnResize","layoutOnResize","getInitialGridElements","layoutOnInit","defaultSettings","userSettings","mergeObjects","isSourceObject","sourceKeys","elements","_resizeHandler","refreshItems","unbindLayoutOnResize","normalized","docElemStyle","createIndexMap","compareIndexMap","indexMap","itemA","itemB","defaultPacker","touchAction","userSelect","userDrag","tapHighlightColor","touchCallout","contentZooming","getItems","hiddenItemStyles","visibility","refreshSortData","synchronize","fragment","createDocumentFragment","unfinishedLayout","nextLayoutId","layoutItems","gridWidth","gridHeight","layoutSettings","newItems","needsLayout","active","allItems","removeElements","_setItemsVisibility","itemsToShow","itemsToHide","isPredicateString","isPredicateFn","syncWithLayout","tryFinishCounter","tryFinish","sortComparer","isDescending","origItems","defaultComparer","criteriaName","criteriaOrder","valA","valB","customComparer","comparer","descending","isSwap","fromItem","toItem","layoutStyles","itemsToLayout","numItems","counter","hasLayoutChanged","startEvent","endEvent","completedItems","hiddenItems","triggerVisibilityChange","interrupted","__esModule","default","locals","asyncGeneratorStep","gen","_next","_throw","arg","info","_asyncToGenerator","unsupportedIterableToArray","_regeneratorRuntime","Op","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","Context","makeInvokeMethod","tryCatch","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","NativeIteratorPrototype","Gp","defineIteratorMethods","_invoke","AsyncIterator","PromiseImpl","invoke","record","__await","unwrapped","previousPromise","callInvokeWithMethodAndArg","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","resultName","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","displayName","isGeneratorFunction","genFun","ctor","mark","awrap","async","iter","skipTempReset","rootRecord","rval","exception","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","_arrayWithoutHoles","arrayLikeToArray","_iterableToArray","_nonIterableSpread","_toConsumableArray","arrayWithoutHoles","iterableToArray","nonIterableSpread"],"sourceRoot":""}
|